NixOS-Config/flake.nix

96 lines
2.5 KiB
Nix
Raw Normal View History

2024-08-24 22:16:51 -04:00
{
inputs = {
# System inputs
2024-10-15 02:40:43 -04:00
nixpkgs.url = "nixpkgs/nixos-24.05";
unstable.url = "nixpkgs/nixos-unstable";
hardware.url = "github:nixos/nixos-hardware/master";
2024-10-15 02:40:43 -04:00
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.4.1";
2024-10-15 02:40:43 -04:00
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
impermanence.url = "github:nix-community/impermanence";
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
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
# Home inputs
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
2024-10-09 03:36:08 -04:00
inputs.nixpkgs.follows = "nixpkgs";
};
nur.url = "github:nix-community/NUR";
blender-bin.url = "https://flakehub.com/f/edolstra/blender-bin/1.0.9.tar.gz";
2024-08-24 22:16:51 -04:00
};
outputs = {
nixpkgs,
unstable,
hardware,
lanzaboote,
disko,
impermanence,
chaotic,
mailserver,
minecraft,
home-manager,
nur,
blender-bin,
...
}:
let
mkNix = modules: nixpkgs.lib.nixosSystem {
inherit modules;
specialArgs = {
inherit
unstable
hardware
lanzaboote
disko
impermanence
chaotic
mailserver
minecraft
home-manager
nur
blender-bin
;
};
};
mkHome = modules: pkgs: home-manager.lib.homeManagerConfiguration {
inherit modules pkgs;
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 = {
firefly = mkNix [ ./hosts/firefly ]; # Main Desktop
2024-10-28 00:11:01 -04:00
detritus = mkNix [ ./hosts/detritus/system ]; # Acer Desktop
2024-10-27 00:54:30 -04:00
shuttle = mkNix [ ./hosts/shuttleworth/system ]; # Pinebook Pro
2024-10-27 00:45:30 -04:00
lacros = mkNix [ ./hosts/lacros/system ]; # Dell Chromebook
redmond = mkNix [ ./hosts/redmond/system ]; # Lenovo Laptop
2024-10-28 00:11:01 -04:00
treefruit = mkNix [ ./hosts/treefruit/system ]; # Macbook Pro 14,1
2024-10-27 00:45:30 -04:00
cyberspark = mkNix [ ./hosts/cyberspark/system ]; # Dell Optiplex 7010
bomberman = mkNix [ ./hosts/bomberman/system ]; # Oracle ARM
2024-08-24 22:16:51 -04:00
};
# home-manager switch --flake .#username
homeConfigurations."jimbo" = mkHome [ ./modules/home ] nixpkgs.legacyPackages.x86_64-linux;
2024-08-24 22:16:51 -04:00
};
}