{ description = "Jimbo's systems as a flake"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; unstable.url = "github:nixos/nixpkgs/nixos-unstable"; nur.url = "github:nix-community/NUR"; mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05"; blender-bin.url = "https://flakehub.com/f/edolstra/blender-bin/1.0.9.tar.gz"; minecraft.url = "github:Infinidoge/nix-minecraft"; hardware.url = "github:nixos/nixos-hardware/master"; # Secure boot lanzaboote = { url = "github:nix-community/lanzaboote/v0.4.1"; inputs.nixpkgs.follows = "nixpkgs"; }; home-manager = { url = "github:nix-community/home-manager/release-24.05"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = { self, nixpkgs, unstable, nur, mailserver, blender-bin, hardware, lanzaboote, home-manager, ... }@inputs: let mkNixos = modules: nixpkgs.lib.nixosSystem { inherit modules; specialArgs = { inherit (self) inputs outputs; }; }; mkHome = modules: pkgs: home-manager.lib.homeManagerConfiguration { inherit modules pkgs; extraSpecialArgs = { inherit (self) inputs outputs; }; }; in { # Variables defined so they can be accessed globally secrets = import ./variables/secrets; displays = import ./variables/displays; ips = import ./variables/ips; look = import ./variables/look; ws = import ./variables/workspaces; # NixOS config entrypoint, use 'nixos-rebuild --flake .#your-hostname' nixosConfigurations = { firefly = mkNixos [ ./hosts/firefly/system lanzaboote.nixosModules.lanzaboote ]; cyberspark = mkNixos [ ./hosts/cyberspark/system mailserver.nixosModule ]; shuttleworth = mkNixos [ ./hosts/shuttleworth/system hardware.nixosModules.pine64-pinebook-pro ]; }; # Home-manager configuration, use 'home-manager --flake .#your-username@your-hostname' homeConfigurations = { "jimbo@firefly" = mkHome [ ./hosts/firefly/home nur.nixosModules.nur ] nixpkgs.legacyPackages.x86_64-linux; "jimbo@cyberspark" = mkHome [ ./hosts/cyberspark/home ] nixpkgs.legacyPackages.x86_64-linux; "jimbo@shuttleworth" = mkHome [ ./hosts/shuttleworth/home nur.nixosModules.nur ] nixpkgs.legacyPackages.aarch64-linux; # Profile for ssh envrionments on different non-root systems "jimbo@terminal" = mkHome [ ./hosts/terminal/home ] nixpkgs.legacyPackages.x86_64-linux; }; }; }