blob: 8cf2a0a3fb668619fe2a4d5503f4b09c14a3bf8e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
{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;
home = ../homes;
# 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"; };
commonArgs = {inherit self inputs;};
in {
"watermelon" = mkSystem {
specialArgs = commonArgs;
modules = [
# this list defines which files will be imported to be used as "modules" in the system config
./watermelon/configuration.nix
# use the nixos-module for home-manager
home-manager
home
];
};
}
|