nix/nixos.nix

46 lines
1.4 KiB
Nix
Raw Normal View History

2023-09-05 22:39:17 -05:00
inputs @ { self, ... }:
let
2023-09-14 17:12:13 -05:00
daniel = system: {
home-manager.users.daniel = {
2023-09-14 17:12:39 -05:00
nixpkgs.overlays = [
(final: prev: {
helix = prev.helix // inputs.helix.packages.${system}.helix;
rtx = prev.rtx // inputs.rtx.packages.${system}.rtx;
})
];
2023-09-14 17:12:13 -05:00
imports = [ ./home/user.nix ./home/linux.nix ];
};
2023-09-05 22:39:17 -05:00
};
2023-09-14 17:12:13 -05:00
hms = system: [
2023-09-05 22:39:17 -05:00
inputs.home-manager.nixosModules.home-manager
2023-09-14 17:12:13 -05:00
(daniel system)
2023-09-05 22:39:17 -05:00
];
disko = scheme: disks: [
inputs.disko.nixosModules.disko
scheme
{ _module.args.disks = disks; }
];
2023-09-14 17:12:13 -05:00
nixosSystem = system: modules: (inputs.nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs system; };
2023-09-05 23:51:32 -05:00
modules = [
inputs.sops-nix.nixosModules.sops
./nixos/common.nix
2023-09-14 17:12:13 -05:00
] ++ modules ++ hms system;
2023-09-05 23:51:32 -05:00
});
2023-09-14 17:12:13 -05:00
diskoNixosSystem = system: scheme: disks: modules: (nixosSystem system ((disko scheme disks) ++ modules));
2023-09-05 22:39:17 -05:00
in
{
2023-09-05 23:51:32 -05:00
# TODO: disko-fy rascal and beefcake?
2023-09-05 22:39:17 -05:00
beefcake = nixosSystem [
2023-09-05 23:51:32 -05:00
./nixos/beefcake.nix
2023-09-05 22:39:17 -05:00
inputs.api-lyte-dev.nixosModules.x86_64-linux.api-lyte-dev
2023-09-05 23:51:32 -05:00
];
2023-09-05 22:39:17 -05:00
2023-09-05 23:51:32 -05:00
rascal = nixosSystem [ ./nixos/rascal.nix ];
2023-09-14 17:12:39 -05:00
2023-09-14 17:12:13 -05:00
musicbox = diskoNixosSystem "x86_64-linux" self.diskoConfigurations.unencrypted [ "/dev/sda" ] [ ./nixos/musicbox.nix ];
thinker = diskoNixosSystem "x86_64-linux" self.diskoConfigurations.standard [ "/dev/nvme0n1" ] [ ./nixos/thinker.nix ];
2023-09-06 00:14:34 -05:00
# dragon = diskoNixosSystem self.diskoConfigurations.standard [ "/dev/disk/by-uuid/asdf" ] [ ./nixos/dragon.nix ];
2023-09-05 22:39:17 -05:00
}