dotfiles/hosts/default.nix

43 lines
1.2 KiB
Nix
Raw Normal View History

{self, ...}: let
# get inputs from self
inherit (self) inputs;
# get necessary inputs from self.inputs
inherit (inputs) nixpkgs;
2024-02-16 12:21:48 +00:00
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 {
2024-02-16 12:21:48 +00:00
"watermelon" = 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
2024-02-16 12:21:48 +00:00
./watermelon/configuration.nix
2023-04-26 01:16:53 +00:00
# use the nixos-module for home-manager
home-manager
home
2023-04-26 01:16:53 +00:00
];
};
2024-05-29 13:39:33 +00:00
2024-08-25 00:06:21 +00:00
"sunfish" = mkSystem {
2024-05-29 13:39:33 +00:00
specialArgs = commonArgs;
modules = [
2024-08-25 00:06:21 +00:00
./sunfish/configuration.nix
2024-05-29 13:39:33 +00:00
home-manager
home
];
};
2023-04-25 20:10:57 +00:00
}