dotfiles/hosts/default.nix

34 lines
1.1 KiB
Nix
Raw Normal View History

{self, ...}: let
# get inputs from self
inherit (self) inputs;
# get necessary inputs from self.inputs
inherit (inputs) nixpkgs lanzaboote nixos-hardware;
inherit (inputs.home-manager.nixosModules) home-manager;
# get lib from nixpkgs and create and alias for lib.nixosSystem
# for potential future overrides & abstractions
inherit (nixpkgs) lib;
mkSystem = lib.nixosSystem;
2023-04-25 20:10:57 +00:00
home = ../homes;
2023-04-25 20:10:57 +00:00
# define a sharedArgs variable that we can simply inherit
# across all hosts to avoid traversing the file whenever
# we need to add a common specialArg
# if a host needs a specific arg that others do not need
# then we can merge into the old attribute set as such:
# specialArgs = commonArgs // { newArg = "value"; };
2023-04-26 01:16:53 +00:00
commonArgs = {inherit self inputs;};
in {
"nixpad" = mkSystem {
specialArgs = commonArgs;
2023-04-26 01:16:53 +00:00
modules = [
# this list defines which files will be imported to be used as "modules" in the system config
./nixpad/configuration.nix
# use the nixos-module for home-manager
home-manager
home
2023-04-26 01:16:53 +00:00
];
};
2023-04-25 20:10:57 +00:00
}