From 1ad87d46c6f5289ee16e554e769211532f7d77b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vili=20Sinerv=C3=A4?= Date: Thu, 5 Jun 2025 01:04:54 +0300 Subject: [PATCH 1/2] Adjust generic conf --- hosts/nixos/configuration.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hosts/nixos/configuration.nix b/hosts/nixos/configuration.nix index c73a14e..2708940 100644 --- a/hosts/nixos/configuration.nix +++ b/hosts/nixos/configuration.nix @@ -1,11 +1,9 @@ { lib, ... }: { - networking.hostName = "nixos"; - - imports = [ ../../shared/base.nix ]; - - #Many installs will need this, and it won't hurt either way - services.qemuGuest.enable = true; + imports = [ + ../../shared/base.nix + ../../shared/hardware/vm.nix + ]; #Prevent user from being locked out of the system before switching to proper config users.mutableUsers = lib.mkForce true; From d1f197d1794f021a5863d30dda113166952540ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vili=20Sinerv=C3=A4?= Date: Thu, 5 Jun 2025 01:12:48 +0300 Subject: [PATCH 2/2] Migrate wg-rpi to flakes --- flake.nix | 60 ++++++++++++-------- hosts/{ => special}/wg-rpi/configuration.nix | 3 +- 2 files changed, 39 insertions(+), 24 deletions(-) rename hosts/{ => special}/wg-rpi/configuration.nix (98%) diff --git a/flake.nix b/flake.nix index 0b257e3..712fbe0 100644 --- a/flake.nix +++ b/flake.nix @@ -12,29 +12,43 @@ outputs = { nixpkgs, nixvim, ... }: { - nixosConfigurations = ( - let - hosts = builtins.attrNames (builtins.readDir ./hosts); - in - builtins.listToAttrs ( - map ( - host: - nixpkgs.lib.nameValuePair host ( - nixpkgs.lib.nixosSystem { - specialArgs = { - nixpkgs-flake = nixpkgs; - inherit nixvim; - }; - system = "x86_64-linux"; - modules = [ - { networking.hostName = host; } - ./hosts/${host}/configuration.nix - ./hosts/${host}/state.nix - ]; - } - ) - ) hosts + nixosConfigurations = + ( + let + hosts = builtins.attrNames (builtins.readDir ./hosts); + in + builtins.listToAttrs ( + map ( + host: + nixpkgs.lib.nameValuePair host ( + nixpkgs.lib.nixosSystem { + specialArgs = { + nixpkgs-flake = nixpkgs; + inherit nixvim; + }; + system = "x86_64-linux"; + modules = [ + { networking.hostName = host; } + ./hosts/${host}/configuration.nix + ./hosts/${host}/state.nix + ]; + } + ) + ) hosts + ) ) - ); + // { + wg-rpi = nixpkgs.lib.nixosSystem { + specialArgs = { + nixpkgs-flake = nixpkgs; + inherit nixvim; + }; + system = "aarch64-linux"; + modules = [ + { networking.hostName = "wg-rpi"; } + ./hosts/special/wg-rpi/configuration.nix + ]; + }; + }; }; } diff --git a/hosts/wg-rpi/configuration.nix b/hosts/special/wg-rpi/configuration.nix similarity index 98% rename from hosts/wg-rpi/configuration.nix rename to hosts/special/wg-rpi/configuration.nix index afe65be..179e05a 100644 --- a/hosts/wg-rpi/configuration.nix +++ b/hosts/special/wg-rpi/configuration.nix @@ -8,7 +8,7 @@ let ddPassFile = "/root/wg-conf/ddPassFile"; in { - imports = [ ../../shared/base.nix ]; + imports = [ ../../../shared/base.nix ]; environment.systemPackages = with pkgs; [ wireguard-tools @@ -94,6 +94,7 @@ in passwordFile = ddPassFile; }; #################### EVERYTHING BELOW THIS SHOULD NOT NEED TO CHANGE #################### + stateVersion = "24.11"; nix.settings = { cores = 3;