nixfiles/hosts/nixos.nix

53 lines
1.5 KiB
Nix
Raw Normal View History

2022-03-02 17:36:42 +00:00
{ self, nixpkgs-unstable, tree, ... }@inputs:
let
defaults = import ./defaults.nix inputs;
defaultSpecialArgs = defaults.defaultSpecialArgs // {
inputs = inputs // {
# set these to the correct versions from inputs
nixpkgs = inputs.nixpkgs-unstable;
home-manager = inputs.home-manager-unstable;
};
};
defaultModules = defaults.defaultModules ++ [
# NO_INLINE
2022-03-09 19:20:34 +00:00
tree.impure.profiles.base-linux
inputs.home-manager-unstable.nixosModules.home-manager
];
nixosUnstableSystem = nixpkgs-unstable.lib.nixosSystem;
2022-03-02 17:36:42 +00:00
in {
lappy = nixosUnstableSystem {
specialArgs = defaultSpecialArgs;
2022-03-02 17:36:42 +00:00
system = "x86_64-linux";
modules = defaultModules ++ [ ./lappy/lappy.nix ./lappy/hardware.nix ];
2022-03-02 17:36:42 +00:00
};
lappy-vm = nixosUnstableSystem {
specialArgs = defaultSpecialArgs;
2022-03-02 17:36:42 +00:00
system = "x86_64-linux";
modules = defaultModules ++ [ ./lappy/lappy.nix ./lappy/vm.nix ];
2022-03-02 17:36:42 +00:00
};
rescue-x86_64 = nixosUnstableSystem {
specialArgs = defaultSpecialArgs;
2022-03-02 17:36:42 +00:00
system = "x86_64-linux";
modules = defaultModules ++ [ ./rescue/rescue.nix ];
2022-03-02 17:36:42 +00:00
};
hetzner-vm = nixosUnstableSystem {
specialArgs = defaultSpecialArgs;
2022-03-02 17:36:42 +00:00
system = "x86_64-linux";
modules = defaultModules ++ [ ./hetzner-vm/hetzner-vm.nix ];
2022-03-02 17:36:42 +00:00
};
# nix --no-sandbox build .#nixosConfigurations.raspberry.config.system.build.sdImage
raspberry = nixosUnstableSystem {
specialArgs = defaultSpecialArgs;
2022-03-02 17:36:42 +00:00
system = "aarch64-linux";
modules = defaultModules ++ [ ./raspberry/raspberry.nix ];
2022-03-02 17:36:42 +00:00
};
}