From 934d10580b5e42545be09b5282a20e215d4e77b8 Mon Sep 17 00:00:00 2001 From: sid Date: Fri, 3 Apr 2026 16:48:25 +0200 Subject: [PATCH] rm wg-client. add virt to pc --- flake.lock | 8 ++++---- flake.nix | 2 +- hosts/16ach6/default.nix | 1 - hosts/16ach6/wireguard.nix | 18 ------------------ hosts/pc/default.nix | 1 + hosts/pc/virtualisation.nix | 24 ++++++++++++++++++++++++ users/sid/home/hyprland/packages.nix | 1 + 7 files changed, 31 insertions(+), 24 deletions(-) delete mode 100644 hosts/16ach6/wireguard.nix create mode 100644 hosts/pc/virtualisation.nix diff --git a/flake.lock b/flake.lock index 5d7a17d..248fd04 100644 --- a/flake.lock +++ b/flake.lock @@ -1496,11 +1496,11 @@ "stylix": "stylix_2" }, "locked": { - "lastModified": 1774901524, - "narHash": "sha256-bFjoY/aiDxy558zuih65K86YRzzwVBeUcdWlW80TfGA=", + "lastModified": 1775227577, + "narHash": "sha256-TFSpEicXp49HhF+4HteqTT5cHhddDbP2M/L/e6vHiSI=", "ref": "release-25.11", - "rev": "7e5a951877711847300548c2f5aaf42d2b3a1d65", - "revCount": 19, + "rev": "7a3ecf1545878271b03200515469b0a73121c856", + "revCount": 24, "type": "git", "url": "https://git.sid.ovh/sid/synix.git" }, diff --git a/flake.nix b/flake.nix index c19e441..32f57f6 100644 --- a/flake.nix +++ b/flake.nix @@ -78,7 +78,7 @@ system: modules: home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.${system}; - modules = [ ./users/sid/home ] + modules; + modules = [ ./users/sid/home ] ++ modules; extraSpecialArgs = { inherit inputs outputs; }; diff --git a/hosts/16ach6/default.nix b/hosts/16ach6/default.nix index 1947510..f6fe1b2 100644 --- a/hosts/16ach6/default.nix +++ b/hosts/16ach6/default.nix @@ -12,7 +12,6 @@ ./secrets ./virtualisation.nix # ./winapps.nix # trying windows-oci for now - # ./wireguard.nix # TODO: use NM for client config ../../users/sid diff --git a/hosts/16ach6/wireguard.nix b/hosts/16ach6/wireguard.nix deleted file mode 100644 index 8152a83..0000000 --- a/hosts/16ach6/wireguard.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ inputs, ... }: - -{ - imports = [ inputs.synix.nixosModules.wg-client ]; - - networking.wg-client = { - enable = true; - interfaces = { - wg0 = { - clientAddress = "10.0.0.2"; - peer = { - publicIP = "91.99.172.127"; - publicKey = "hRrnXl1heROHfpXkHOmjITUpG/ht3omVsWurLcChIS4="; - }; - }; - }; - }; -} diff --git a/hosts/pc/default.nix b/hosts/pc/default.nix index 6d83c37..db09e67 100644 --- a/hosts/pc/default.nix +++ b/hosts/pc/default.nix @@ -12,6 +12,7 @@ ./packages.nix ./secrets ./services.nix + ./virtualisation.nix ../../users/sid diff --git a/hosts/pc/virtualisation.nix b/hosts/pc/virtualisation.nix new file mode 100644 index 0000000..ba2d623 --- /dev/null +++ b/hosts/pc/virtualisation.nix @@ -0,0 +1,24 @@ +{ + inputs, + ... +}: + +{ + imports = [ inputs.synix.nixosModules.virtualisation ]; + + virtualisation = { + libvirtd.deviceACL = [ + "/dev/kvm" + "/dev/net/tun" + "/dev/vfio/vfio" + "/dev/null" + "/dev/ptmx" + ]; + hugepages.enable = true; + quickemu.enable = true; + }; + + users.extraGroups.libvirtd.members = [ "sid" ]; + users.extraGroups.qemu-libvirtd.members = [ "sid" ]; + users.extraGroups.kvm.members = [ "sid" ]; +} diff --git a/users/sid/home/hyprland/packages.nix b/users/sid/home/hyprland/packages.nix index b61ced2..9e23e05 100644 --- a/users/sid/home/hyprland/packages.nix +++ b/users/sid/home/hyprland/packages.nix @@ -20,6 +20,7 @@ in spotify teams-for-linux texliveFull + tor-browser xournalpp zotero