diff options
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 91 |
1 files changed, 48 insertions, 43 deletions
@@ -6,6 +6,9 @@ nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs-old.url = "github:nixos/nixpkgs/nixos-25.05"; + nix-index-database.url = "github:nix-community/nix-index-database"; + nix-index-database.inputs.nixpkgs.follows = "nixpkgs-unstable"; + home-manager = { url = "github:nix-community/home-manager/release-25.11"; # The `follows` keyword in inputs is used for inheritance. @@ -201,19 +204,23 @@ home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit inputs; }; } - # lib.nixosSystem { - # modules = [ - # ./modules/nixos/nix-common.nix - # ./modules/nixos/environment.nix - # ./modules/nixos/system-packages.nix - - # ./modules/users/defin.nix - # ./modules/users/root.nix - # ]; - # # # Let 'nixos-version --json' know the Git revision of this flake. (for containers?) - # # system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev; - # # nix.registry.nixpkgs.flake = nixpkgs; - # } + ]; + nixIndex = [ + nix-index-database.nixosModules.nix-index { + programs.nix-index-database.comma.enable = true; + } + ]; + minimalModuleConfig = minimalHomeManagerSettings ++ nixIndex ++ [ + ./modules/nixos/nix-common.nix + ./modules/nixos/environment.nix + ./modules/nixos/system-packages.nix + ./modules/nixos/tailscale.nix + + ./modules/users/defin.nix + ./modules/users/root.nix + # # Let 'nixos-version --json' know the Git revision of this flake. (for containers?) + # system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev; + # nix.registry.nixpkgs.flake = nixpkgs; ]; # vm = lib.nixosSystem { # system = "x86_64-linux"; @@ -242,7 +249,7 @@ nixosConfigurations = { khad = lib.nixosSystem { # Main desktop - modules = minimalHomeManagerSettings ++ [ ./machines/khad + modules = minimalModuleConfig ++ [ ./machines/khad # lix-module.nixosModules.default sops-nix.nixosModules.sops home-manager.nixosModules.home-manager { home-manager.users.defin = import ./home-manager/tiling-wm.nix; } @@ -250,7 +257,7 @@ }; zenbook = lib.nixosSystem { # Personal laptop # specialArgs = { inherit inputs; }; - modules = minimalHomeManagerSettings ++ [ ./machines/zenbook + modules = minimalModuleConfig ++ [ ./machines/zenbook # lix-module.nixosModules.default # hyprland.homeManagerModules.default {wayland.windowManager.hyprland.enable = true;} home-manager.nixosModules.home-manager { home-manager.users.defin = import ./home-manager/tiling-wm.nix; } @@ -258,7 +265,7 @@ }; betsy = lib.nixosSystem { # work laptop - modules = minimalHomeManagerSettings ++ [ ./machines/betsy + modules = minimalModuleConfig ++ [ ./machines/betsy # lix-module.nixosModules.default home-manager.nixosModules.home-manager { home-manager.users.defin = import ./home-manager/home.nix; } @@ -266,10 +273,10 @@ }; doretta = lib.nixosSystem { # build server specialArgs = { inherit inputs; }; - modules = minimalHomeManagerSettings ++ [ ./machines/doretta + modules = minimalModuleConfig ++ [ ./machines/doretta + home-manager.nixosModules.home-manager { home-manager.users.defin = import ./home-manager/doretta.nix; } # lix-module.nixosModules.default microvm.nixosModules.host - home-manager.nixosModules.home-manager { home-manager.users.defin = import ./home-manager/doretta.nix; } { microvm.autostart = [ "foolcreek" @@ -280,13 +287,13 @@ ]; }; bosco = lib.nixosSystem { # networking server - modules = minimalHomeManagerSettings ++ [ ./machines/bosco + modules = minimalModuleConfig ++ [ ./machines/bosco # lix-module.nixosModules.default home-manager.nixosModules.home-manager { home-manager.users.defin = import ./home-manager/default.nix; } ]; }; biski = lib.nixosSystem { # another networking server, physical instead of cloud - modules = minimalHomeManagerSettings ++ [ ./machines/biski + modules = minimalModuleConfig ++ [ ./machines/biski disko.nixosModules.disko home-manager.nixosModules.home-manager { home-manager.users.defin = import ./home-manager/default.nix; } ]; @@ -298,13 +305,13 @@ config.allowUnfree = true; }; }; - modules = minimalHomeManagerSettings ++ [ ./machines/picast + modules = minimalModuleConfig ++ [ ./machines/picast home-manager.nixosModules.home-manager { home-manager.users.defin = import ./home-manager/default.nix; } ]; }; microvm-test = lib.nixosSystem { # test system = "x86_64-linux"; - modules = minimalHomeManagerSettings ++ [ + modules = minimalModuleConfig ++ [ microvm.nixosModules.microvm # home-manager.nixosModules.home-manager { home-manager.users.defin = import ./home-manager/default.nix; } { @@ -314,19 +321,17 @@ ]; }; foolcreek = lib.nixosSystem { # vm for website - specialArgs = { inherit inputs home-manager; }; - modules = minimalHomeManagerSettings ++ [ ./machines/vm/foolcreek + specialArgs = { inherit inputs; }; + modules = minimalModuleConfig ++ [ ./machines/vm/foolcreek microvm.nixosModules.microvm # home-manager.nixosModules.home-manager { home-manager.users.defin = import ./home-manager/default.nix; } ]; }; live = lib.nixosSystem { - modules = minimalHomeManagerSettings ++ [ + modules = minimalModuleConfig ++ [ (nixpkgs + "/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix") ./machines/iso/configuration.nix - ./modules/users/defin.nix - ./modules/nixos/system-packages.nix home-manager.nixosModules.home-manager { home-manager.users.defin = import ./home-manager/default.nix; } { nixpkgs.hostPlatform = "aarch64-linux"; } @@ -344,20 +349,20 @@ # vms = { # expose the build attribute directly # foolcreekwireless = foolcreekwireless.config.system.build.vm; # }; - homeConfigurations = { #NOTE: no worky yet - # Standalone HM only - # # Desktop - # "defin@khad" = lib.homeManagerConfiguration { - # modules = [ ./home-manager/home.nix ]; - # pkgs = pkgsFor.x86_64-linux; - # extraSpecialArgs = { inherit inputs outputs; }; - # }; - # Laptop - "defin@nixos-zenbook" = lib.homeManagerConfiguration { - modules = [ ./home-manager/home.nix ]; - pkgs = pkgsFor.x86_64-linux; - extraSpecialArgs = { inherit inputs outputs; }; - }; - }; - }; + # homeConfigurations = { #NOTE: no worky yet + # # Standalone HM only + # # # Desktop + # # "defin@khad" = lib.homeManagerConfiguration { + # # modules = [ ./home-manager/home.nix ]; + # # pkgs = pkgsFor.x86_64-linux; + # # extraSpecialArgs = { inherit inputs outputs; }; + # # }; + # # Laptop -- example + # # "defin@nixos-zenbook" = lib.homeManagerConfiguration { + # # modules = [ ./home-manager/home.nix ]; + # # pkgs = pkgsFor.x86_64-linux; + # # extraSpecialArgs = { inherit inputs outputs; }; + # # }; + # }; + }; } |
