NixOS-Config/flake.nix

51 lines
1.8 KiB
Nix
Raw Normal View History

2024-08-24 22:16:51 -04:00
{
inputs = {
2024-10-15 02:40:43 -04:00
nixpkgs.url = "nixpkgs/nixos-24.05";
unstable.url = "nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-08-24 22:16:51 -04:00
nur.url = "github:nix-community/NUR";
blender-bin.url = "https://flakehub.com/f/edolstra/blender-bin/1.0.9.tar.gz";
2024-09-23 11:41:28 -04:00
hardware.url = "github:nixos/nixos-hardware/master";
2024-08-24 22:16:51 -04:00
2024-10-09 03:36:08 -04:00
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.4.1";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-10-15 02:40:43 -04:00
mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05";
minecraft.url = "github:Infinidoge/nix-minecraft";
2024-08-24 22:16:51 -04:00
};
outputs = { self, nixpkgs, unstable, home-manager, nur, blender-bin, hardware, lanzaboote, mailserver, minecraft, ... }:
let
mkNixos = modules: nixpkgs.lib.nixosSystem {
inherit modules;
specialArgs = { inherit nixpkgs unstable hardware lanzaboote mailserver minecraft; };
};
mkHome = modules: pkgs: home-manager.lib.homeManagerConfiguration {
inherit modules pkgs;
2024-10-15 02:40:43 -04:00
extraSpecialArgs = { inherit unstable nur blender-bin; };
};
in {
2024-10-15 02:40:43 -04:00
# nixos-rebuild switch --flake .#hostname
2024-08-24 22:16:51 -04:00
nixosConfigurations = {
2024-10-15 02:40:43 -04:00
firefly = mkNixos [ ./hosts/firefly/system ];
cyberspark = mkNixos [ ./hosts/cyberspark/system ];
shuttleworth = mkNixos [ ./hosts/shuttleworth/system ];
2024-08-24 22:16:51 -04:00
};
2024-10-15 02:40:43 -04:00
# home-manager switch --flake .#username@hostname
2024-08-24 22:16:51 -04:00
homeConfigurations = {
2024-10-15 02:40:43 -04:00
"jimbo@firefly" = mkHome [ ./hosts/firefly/home ] nixpkgs.legacyPackages.x86_64-linux;
"jimbo@cyberspark" = mkHome [ ./hosts/cyberspark/home ] nixpkgs.legacyPackages.x86_64-linux;
"jimbo@shuttleworth" = mkHome [ ./hosts/shuttleworth/home ] nixpkgs.legacyPackages.aarch64-linux;
2024-08-24 22:16:51 -04:00
};
};
}