diff --git a/flake.lock b/flake.lock index 569fe4c..365f95d 100644 --- a/flake.lock +++ b/flake.lock @@ -26,7 +26,7 @@ "nixpkgs": "nixpkgs" }, "locked": { - "narHash": "sha256-LbajVWkqSpZt2SW7tGqxIn391hCT02AyokxFuNyA/4w=", + "narHash": "sha256-28zT4n5SyxcE9KI4b6RowZyMuzlZ6FIw2KE6xX8OTnA=", "path": "../fudo-hosts", "type": "path" }, @@ -37,11 +37,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1628427351, - "narHash": "sha256-WuZUIQ07AvRw+T9wvQ3qFf8MXmKZ+ktZz9drNgWXDbs=", + "lastModified": 1629033443, + "narHash": "sha256-Vo3TvQvR5hsd3incx/xOt6GFgTm651CYVauHS/irOFo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "348bc5de8bca09c624f5c4975f538684da4713d2", + "rev": "8ac785da9843aa110caeed6c912875e46a415a11", "type": "github" }, "original": { @@ -52,11 +52,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1628427351, - "narHash": "sha256-WuZUIQ07AvRw+T9wvQ3qFf8MXmKZ+ktZz9drNgWXDbs=", + "lastModified": 1629033443, + "narHash": "sha256-Vo3TvQvR5hsd3incx/xOt6GFgTm651CYVauHS/irOFo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "348bc5de8bca09c624f5c4975f538684da4713d2", + "rev": "8ac785da9843aa110caeed6c912875e46a415a11", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 803bf4f..7fb4061 100644 --- a/flake.nix +++ b/flake.nix @@ -10,23 +10,26 @@ home-manager.inputs.nixpkgs.follows = "nixpkgs"; }; - outputs = { nixpkgs, hosts, home-manager, ... }: - let - pkgs = import nixpkgs { }; - lib = nixpkgs.lib; + outputs = { nixpkgs, hosts, home-manager, ... }: with builtins; + { + nixosConfigurations = listToAttrs (map (hostname: + let + hostOpts = hosts.host-configs.${hostname}; + pkgs = import nixpkgs { system = hostOpts.arch; }; - in { - nixConfigurations = lib.mapAttrs (hostname: hostOpts: - lib.nixosSystem { - system = hostOpts.platform; - modules = [ - (import ./initialize.nix { - hostname = hostname; - home-manager-package = home-manager; - pkgs = pkgs; - include-secrets = true; - }) - ]; - }) hosts.host-configs; + in { + name = hostname; + value = pkgs.lib.nixosSystem { + system = hostOpts.arch; + modules = [ + (import ./initialize.nix { + hostname = hostname; + home-manager-package = home-manager; + pkgs = pkgs; + include-secrets = true; + }) + ]; + }; + }) (attrNames hosts.host-configs)); }; } diff --git a/home-manager/niten.nix b/home-manager/niten.nix index a6cad1b..4d39a92 100644 --- a/home-manager/niten.nix +++ b/home-manager/niten.nix @@ -49,11 +49,11 @@ let redshift signal-desktop spotify - steam-with-pipewire - steam-with-pipewire.run - steamPackages.steamcmd - steamPackages.steam-fonts - steamPackages.steam-runtime + # steam-with-pipewire + # steam-with-pipewire.run + # steamPackages.steamcmd + # steamPackages.steam-fonts + # steamPackages.steam-runtime xclip ]; diff --git a/initialize.nix b/initialize.nix index d9e2cbc..7681463 100644 --- a/initialize.nix +++ b/initialize.nix @@ -8,14 +8,13 @@ in { ./lib ./config ./packages - + "${home-manager-package}/nixos" + ] ++ pkgs.lib.optional host-config.nixos-system [ (./. + "/config/hardware/${hostname}.nix") (./. + "/config/host-config/${hostname}.nix") (./. + "/config/profile-config/${host-config.profile}.nix") (./. + "/config/domain-config/${host-config.domain}.nix") (./. + "/config/site-config/${host-config.site}.nix") - - "${home-manager-package}/nixos" ]; config = { diff --git a/lib/fudo/hosts.nix b/lib/fudo/hosts.nix index 31bdc7d..b97437a 100644 --- a/lib/fudo/hosts.nix +++ b/lib/fudo/hosts.nix @@ -138,10 +138,16 @@ let default = false; }; - platform = mkOption { + nixos-system = mkOption { + type = bool; + description = "Whether the host is a NixOS system."; + default = true; + }; + + arch = mkOption { type = str; - description = "System platform of the host."; - default = "x86_64"; + description = "System architecture of the system."; + default = "x86_64-linux"; }; }; }; diff --git a/packages/flatpak/default.nix b/packages/flatpak/default.nix index 4db5180..dcef69a 100644 --- a/packages/flatpak/default.nix +++ b/packages/flatpak/default.nix @@ -1,3 +1,6 @@ +# NOTE TO FUTURE SELF: Nixpkgs Flatpak is currently only at 10.2, which doesn't +# allow nested containers...no Steam. + { lib, stdenv, fetchurl, fetchpatch, autoreconfHook, docbook_xml_dtd_45 , docbook-xsl-nons, which, libxml2, gobject-introspection, gtk-doc, intltool , libxslt, pkg-config, xmlto, appstream-glib, substituteAll, bison