From b665767f35df1ca474ae46f202bfd5cab3d9bfb6 Mon Sep 17 00:00:00 2001 From: Alexander Date: Thu, 5 Feb 2026 15:39:22 +0100 Subject: [PATCH] Fix susano-minimal build, switch to unstable nixpkgs --- flake.nix | 5 +-- machines/amaterasu/minimal/default.nix | 42 ++++++++++++++++--------- machines/susano/main/default.nix | 43 +++++++++++++++++--------- machines/susano/minimal/default.nix | 41 ++++++++++++++++-------- 4 files changed, 88 insertions(+), 43 deletions(-) diff --git a/flake.nix b/flake.nix index 033d1f0..4f0967f 100644 --- a/flake.nix +++ b/flake.nix @@ -119,11 +119,11 @@ ### # Proxmox Homelab Machine ### - susano-minimal = mkComputer + susano-minimal = mkUnstableComputer ./machines/susano/minimal [] "susano"; - susano = mkComputer + susano = mkUnstableComputer ./machines/susano/main [ sops-nix.nixosModules.sops @@ -250,6 +250,7 @@ "x86_64-linux" = { default = upkgs.mkShell { buildInputs = with upkgs; [ + opencode ]; shellHook = '' diff --git a/machines/amaterasu/minimal/default.nix b/machines/amaterasu/minimal/default.nix index 4a561bb..98d14c7 100644 --- a/machines/amaterasu/minimal/default.nix +++ b/machines/amaterasu/minimal/default.nix @@ -1,16 +1,23 @@ - -{ config, pkgs, extraHomeModules, inputs, lib, username, ... }: +{ + config, + pkgs, + extraHomeModules, + inputs, + lib, + username, + ... +}: let flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs; -in { - imports = - [ - ../../minimal.nix +in +{ + imports = [ + ../../minimal.nix - ../hardware-configuration.nix - ../disko-config.nix - ]; + ../hardware-configuration.nix + ../disko-config.nix + ]; nixpkgs = { # You can add overlays here @@ -33,13 +40,16 @@ in { nix-path = config.nix.nixPath; # Allow user to reubild nixos without sudo - trusted-users = [ "root" username ]; + trusted-users = [ + "root" + username + ]; }; # Opinionated: disable channels channel.enable = false; # Opinionated: make flake registry and nix path match flake inputs - registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs; + registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs; nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs; }; @@ -74,7 +84,10 @@ in { isNormalUser = true; description = "NixOS Proxmox Builder"; hashedPassword = "$6$00vM.zXgahhw6KQO$BpCilKSdUNDlIaOlGrWJAdzh7KCIYoW3uoC1VV9I0eaJyui7J0Yv6BCajGwrn0JwrgWmvOfEMPeyGs4/wWD9q."; - extraGroups = [ "networkmanager" "wheel" ]; + extraGroups = [ + "networkmanager" + "wheel" + ]; packages = with pkgs; [ ]; openssh.authorizedKeys.keys = [ @@ -112,12 +125,13 @@ in { useGlobalPkgs = true; useUserPackages = true; backupFileExtension = "backup"; - extraSpecialArgs = { inherit inputs; }; + extraSpecialArgs = { inherit inputs username; }; users."${username}" = { imports = [ ./home.nix - ] ++ extraHomeModules; + ] + ++ extraHomeModules; }; }; diff --git a/machines/susano/main/default.nix b/machines/susano/main/default.nix index ce3a596..4b5128d 100644 --- a/machines/susano/main/default.nix +++ b/machines/susano/main/default.nix @@ -1,16 +1,24 @@ -{ config, pkgs, extraHomeModules, inputs, lib, username, ... }: +{ + config, + pkgs, + extraHomeModules, + inputs, + lib, + username, + ... +}: let flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs; -in { - imports = - [ - ../../minimal.nix +in +{ + imports = [ + ../../minimal.nix - ../hardware-configuration.nix - ../disko-config.nix - ./sops.nix - ]; + ../hardware-configuration.nix + ../disko-config.nix + ./sops.nix + ]; nixpkgs = { # You can add overlays here @@ -42,13 +50,16 @@ in { nix-path = config.nix.nixPath; # Allow user to reubild nixos without sudo - trusted-users = [ "root" username ]; + trusted-users = [ + "root" + username + ]; }; # Opinionated: disable channels channel.enable = false; # Opinionated: make flake registry and nix path match flake inputs - registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs; + registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs; nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs; }; @@ -83,7 +94,10 @@ in { isNormalUser = true; description = "NixOS Proxmox Homelab"; hashedPassword = "$6$7LSgOtcEozV0gkN9$pCltKL683UqJ3M7C4ZIgZsytAGtQS375g64ckuJQPFtUjxiGCxehJtkP91Pba.rIZNe3eZqnJfIQNwnJWmyVJ0"; - extraGroups = [ "networkmanager" "wheel" ]; + extraGroups = [ + "networkmanager" + "wheel" + ]; packages = with pkgs; [ ]; openssh.authorizedKeys.keys = [ @@ -119,12 +133,13 @@ in { useGlobalPkgs = true; useUserPackages = true; backupFileExtension = "backup"; - extraSpecialArgs = { inherit inputs; }; + extraSpecialArgs = { inherit inputs username; }; users."${username}" = { imports = [ ./home.nix - ] ++ extraHomeModules; + ] + ++ extraHomeModules; }; }; diff --git a/machines/susano/minimal/default.nix b/machines/susano/minimal/default.nix index 3004c29..4d6b60b 100644 --- a/machines/susano/minimal/default.nix +++ b/machines/susano/minimal/default.nix @@ -1,15 +1,23 @@ -{ config, pkgs, extraHomeModules, inputs, lib, username, ... }: +{ + config, + pkgs, + extraHomeModules, + inputs, + lib, + username, + ... +}: let flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs; -in { - imports = - [ - ../../minimal.nix +in +{ + imports = [ + ../../minimal.nix - ../hardware-configuration.nix - ../disko-config.nix - ]; + ../hardware-configuration.nix + ../disko-config.nix + ]; nixpkgs = { # You can add overlays here @@ -41,13 +49,16 @@ in { nix-path = config.nix.nixPath; # Allow user to reubild nixos without sudo - trusted-users = [ "root" username ]; + trusted-users = [ + "root" + username + ]; }; # Opinionated: disable channels channel.enable = false; # Opinionated: make flake registry and nix path match flake inputs - registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs; + registry = lib.mkForce (lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs); nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs; }; @@ -82,7 +93,10 @@ in { isNormalUser = true; description = "NixOS Proxmox Homelab"; hashedPassword = "$6$7LSgOtcEozV0gkN9$pCltKL683UqJ3M7C4ZIgZsytAGtQS375g64ckuJQPFtUjxiGCxehJtkP91Pba.rIZNe3eZqnJfIQNwnJWmyVJ0"; - extraGroups = [ "networkmanager" "wheel" ]; + extraGroups = [ + "networkmanager" + "wheel" + ]; packages = with pkgs; [ ]; openssh.authorizedKeys.keys = [ @@ -118,12 +132,13 @@ in { useGlobalPkgs = true; useUserPackages = true; backupFileExtension = "backup"; - extraSpecialArgs = { inherit inputs; }; + extraSpecialArgs = { inherit inputs username; }; users."${username}" = { imports = [ ./home.nix - ] ++ extraHomeModules; + ] + ++ extraHomeModules; }; };