From ccf29ce98fab46a6ba5d0182000259b039957430 Mon Sep 17 00:00:00 2001 From: Fern Garden Date: Wed, 9 Jul 2025 09:32:15 +0800 Subject: [PATCH 1/4] Reconfigure specialArgs --- flake.nix | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/flake.nix b/flake.nix index 1617fde..cb43779 100755 --- a/flake.nix +++ b/flake.nix @@ -12,9 +12,10 @@ flake = false; }; - # Updated packages. + # Packages. fluffychat2.url = "github:NixOS/nixpkgs?ref=pull/419632/head"; # FluffyChat 2.0.0 feishin0_17.url = "github:NixOS/nixpkgs?ref=pull/414929/head"; # Feishin 0.17.0 + webone.url = "github:firewalkwithm3/webone?rev=256f5e115ceffb71fd2d61e0c7cb9b6b55c7571a"; # WebOne HTTP proxy. }; outputs = @@ -34,7 +35,7 @@ { hostname, suite, - platform, + platform ? "x86_64-linux", user ? "fern", extraModules ? [ ], }: @@ -42,17 +43,20 @@ system = platform; specialArgs = { - inherit user; - secrets = builtins.toString inputs.secrets; - fluffychat2 = import fluffychat2 { inherit system; }; - feishin0_17 = import feishin0_17 { inherit system; }; + inherit hostname suite platform user; # Inherit variables. + secrets = builtins.toString inputs.secrets; # Secrets directory. + # Packages + userPkgs = { + fluffychat = fluffychat2.legacyPackages.${system}.fluffychat; + feishin = feishin0_17.legacyPackages.${system}.feishin; + webone = webone.packages.${system}.default; + }; }; modules = [ ./suites/common.nix ./suites/${suite}.nix ./hosts/${suite}/${hostname}.nix - { networking.hostName = hostname; } ] ++ extraModules; }; in @@ -62,7 +66,6 @@ muskduck = mkHost { hostname = "muskduck"; suite = "laptop"; - platform = "x86_64-linux"; extraModules = [ lanzaboote.nixosModules.lanzaboote nixos-hardware.nixosModules.lenovo-thinkpad-t480 @@ -85,27 +88,23 @@ hostname = "docker"; suite = "vm"; user = "docker"; - platform = "x86_64-linux"; }; vm-minecraft = mkHost { hostname = "minecraft"; suite = "vm"; user = "docker"; - platform = "x86_64-linux"; }; # LXC containers. lxc-technitium = mkHost { hostname = "technitium"; suite = "lxc"; - platform = "x86_64-linux"; }; lxc-firefox-syncserver = mkHost { hostname = "firefox-syncserver"; suite = "lxc"; - platform = "x86_64-linux"; extraModules = [ sops-nix.nixosModules.sops ]; From 7c04159aa968da8f209c8530e1176d8cc855b439 Mon Sep 17 00:00:00 2001 From: Fern Garden Date: Wed, 9 Jul 2025 09:32:27 +0800 Subject: [PATCH 2/4] Update flake.lock --- flake.lock | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/flake.lock b/flake.lock index 4cea764..d0e01e1 100755 --- a/flake.lock +++ b/flake.lock @@ -192,6 +192,22 @@ "type": "github" } }, + "nixpkgs_4": { + "locked": { + "lastModified": 1751741127, + "narHash": "sha256-t75Shs76NgxjZSgvvZZ9qOmz5zuBE8buUaYD28BMTxg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "29e290002bfff26af1db6f64d070698019460302", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.05", + "repo": "nixpkgs", + "type": "github" + } + }, "pre-commit-hooks-nix": { "inputs": { "flake-compat": [ @@ -226,7 +242,8 @@ "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_2", "secrets": "secrets", - "sops-nix": "sops-nix" + "sops-nix": "sops-nix", + "webone": "webone" } }, "rust-overlay": { @@ -284,6 +301,25 @@ "repo": "sops-nix", "type": "github" } + }, + "webone": { + "inputs": { + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1752022159, + "narHash": "sha256-WFkQ1WA+BRLuwfmh6uMym3IoUSXOu2sSM5XzalsLeUQ=", + "owner": "firewalkwithm3", + "repo": "webone", + "rev": "256f5e115ceffb71fd2d61e0c7cb9b6b55c7571a", + "type": "github" + }, + "original": { + "owner": "firewalkwithm3", + "repo": "webone", + "rev": "256f5e115ceffb71fd2d61e0c7cb9b6b55c7571a", + "type": "github" + } } }, "root": "root", From 13e52cb27e3925ab0482226db7a0b23735a39642 Mon Sep 17 00:00:00 2001 From: Fern Garden Date: Wed, 9 Jul 2025 09:32:39 +0800 Subject: [PATCH 3/4] Move hostname config --- suites/common.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/suites/common.nix b/suites/common.nix index 9b44417..f53627b 100644 --- a/suites/common.nix +++ b/suites/common.nix @@ -1,6 +1,7 @@ { pkgs, lib, + hostname, user, ... }: @@ -48,6 +49,9 @@ with lib; # Enable networking. networking.networkmanager.enable = true; + # Set hostname + networking.hostName = hostname; + # Define a user account. users.users.${user} = { isNormalUser = true; From f1216bc9adabe444abeac39c6a6d6c69d1cc1c1c Mon Sep 17 00:00:00 2001 From: Fern Garden Date: Wed, 9 Jul 2025 09:32:53 +0800 Subject: [PATCH 4/4] Rename packages --- suites/laptop.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/suites/laptop.nix b/suites/laptop.nix index ac439ca..cada81b 100755 --- a/suites/laptop.nix +++ b/suites/laptop.nix @@ -1,8 +1,7 @@ { pkgs, + userPkgs, lib, - feishin0_17, - fluffychat2, ... }: with lib; @@ -110,7 +109,7 @@ with lib; caligula celluloid discord - feishin0_17.feishin + userPkgs.feishin ghostty gimp3 glabels-qt @@ -138,7 +137,7 @@ with lib; }) # FluffyChat 2.0.0 with fixed desktop item. - (fluffychat2.fluffychat.overrideAttrs ( + (userPkgs.fluffychat.overrideAttrs ( finalAttrs: previousAttrs: { desktopItems = [ ((builtins.elemAt previousAttrs.desktopItems 0).override { startupWMClass = "fluffychat"; })