os/hosts/default.nix
Timothy DeHerrera 5d8413a85a
pkgs#unstable: remove specialArgs
The `specialArgs` defined in `hosts` has kept some modules from working
in external flakes. Instead, we simply enumerate packages in `hosts`
which should be pulled from `unstablePkgs`.
2020-07-26 22:18:59 -06:00

62 lines
1.5 KiB
Nix

inputs@{ home, nixpkgs, unstablePkgs, self, pkgs, system, ... }:
let
inherit (nixpkgs) lib;
utils = import ../lib/utils.nix { inherit lib; };
inherit (utils) recImport;
inherit (builtins) attrValues removeAttrs;
config = hostName:
lib.nixosSystem {
inherit system;
modules = let
inherit (home.nixosModules) home-manager;
core = self.nixosModules.profiles.core;
global = {
networking.hostName = hostName;
nix.nixPath = [
"nixpkgs=${nixpkgs}"
"nixos-config=/etc/nixos/configuration.nix"
"nixpkgs-overlays=/etc/nixos/overlays"
];
nixpkgs = { inherit pkgs; };
nix.registry = {
nixpkgs.flake = nixpkgs;
nixflk.flake = self;
master.flake = inputs.unstable;
};
};
unstables = {
systemd.package = unstablePkgs.systemd;
nixpkgs.overlays = [
(final: prev:
with unstablePkgs; {
inherit starship element-desktop discord signal-desktop mpv;
})
];
};
local = import "${toString ./.}/${hostName}.nix";
# Everything in `./modules/list.nix`.
flakeModules =
attrValues (removeAttrs self.nixosModules [ "profiles" ]);
in flakeModules ++ [ core global local home-manager unstables ];
};
hosts = recImport {
dir = ./.;
_import = config;
};
in hosts