From c7ec1a542352fe2abe855cc52c3e7e3bf0b3ce94 Mon Sep 17 00:00:00 2001 From: Romain Paquet Date: Thu, 26 Mar 2026 21:16:42 +0000 Subject: [PATCH 1/2] backups: refactor and add renoir --- clan/backups.nix | 41 +++++++++++++++++++++++++++++++++++++ clan/flake-module.nix | 27 +----------------------- nixosModules/storagebox.nix | 12 ----------- 3 files changed, 42 insertions(+), 38 deletions(-) create mode 100644 clan/backups.nix delete mode 100644 nixosModules/storagebox.nix diff --git a/clan/backups.nix b/clan/backups.nix new file mode 100644 index 0000000..dc0a8c6 --- /dev/null +++ b/clan/backups.nix @@ -0,0 +1,41 @@ +{ lib, self, ... }: +{ + clan.inventory.instances."borgbackup-storagebox" = { + module.input = "clan-core"; + module.name = "borgbackup"; + + roles.client.machines = lib.genAttrs [ "crocus" "genepi" "renoir" "verbena" ] ( + machine: + let + config = self.nixosConfigurations.${machine}.config; + user = "u422292"; + host = "${user}.your-storagebox.de"; + in + { + settings.destinations."storagebox-${config.networking.hostName}" = { + repo = "${user}@${host}:./borgbackup/${config.networking.hostName}"; + rsh = "ssh -oPort=23 -i ${ + config.clan.core.vars.generators.borgbackup.files."borgbackup.ssh".path + } -oStrictHostKeyChecking=accept-new"; + }; + } + ); + roles.client.extraModules = [ + { + programs.ssh.knownHosts = + let + user = "u422292"; + host = "${user}.your-storagebox.de"; + in + { + storagebox-ed25519 = { + hostNames = [ "[${host}]:23" ]; + publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIICf9svRenC/PLKIL9nk6K/pxQgoiFC41wTNvoIncOxs"; + }; + }; + } + + ]; + roles.server.machines = { }; + }; +} diff --git a/clan/flake-module.nix b/clan/flake-module.nix index de97fbb..9ab6fd9 100644 --- a/clan/flake-module.nix +++ b/clan/flake-module.nix @@ -1,6 +1,7 @@ { self, lib, ... }: { imports = [ + ./backups.nix ./machines.nix ./monitoring.nix ./network.nix @@ -89,32 +90,6 @@ roles.default.tags.all = { }; }; - clan.inventory.instances."borgbackup-storagebox" = { - module.input = "clan-core"; - module.name = "borgbackup"; - - roles.client.machines = lib.genAttrs [ "crocus" "genepi" "verbena" ] ( - machine: - let - config = self.nixosConfigurations.${machine}.config; - user = "u422292"; - host = "${user}.your-storagebox.de"; - in - { - settings.destinations."storagebox-${config.networking.hostName}" = { - repo = "${user}@${host}:./borgbackup/${config.networking.hostName}"; - rsh = "ssh -oPort=23 -i ${ - config.clan.core.vars.generators.borgbackup.files."borgbackup.ssh".path - } -oStrictHostKeyChecking=accept-new"; - }; - } - ); - roles.client.extraModules = [ - self.nixosModules.storagebox - ]; - roles.server.machines = { }; - }; - clan.inventory.instances.syncthing = { roles.peer.tags.syncthing = { }; roles.peer.settings.folders = { diff --git a/nixosModules/storagebox.nix b/nixosModules/storagebox.nix deleted file mode 100644 index bee2255..0000000 --- a/nixosModules/storagebox.nix +++ /dev/null @@ -1,12 +0,0 @@ -let - user = "u422292"; - host = "${user}.your-storagebox.de"; -in -{ - programs.ssh.knownHosts = { - storagebox-ed25519 = { - hostNames = [ "[${host}]:23" ]; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIICf9svRenC/PLKIL9nk6K/pxQgoiFC41wTNvoIncOxs"; - }; - }; -} From 4b22702ed6cb1e9584a548a6430f04f5e8b3932e Mon Sep 17 00:00:00 2001 From: Romain Paquet Date: Thu, 26 Mar 2026 21:16:42 +0000 Subject: [PATCH 2/2] add networkmanager on desktops Also adds my user to the group to control it --- nixosModules/desktop.nix | 4 ++++ nixosModules/user-rpqt.nix | 12 ++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/nixosModules/desktop.nix b/nixosModules/desktop.nix index ab10a8b..75037e5 100644 --- a/nixosModules/desktop.nix +++ b/nixosModules/desktop.nix @@ -52,4 +52,8 @@ }; programs.kdeconnect.enable = true; + + networking.networkmanager = { + enable = true; + }; } diff --git a/nixosModules/user-rpqt.nix b/nixosModules/user-rpqt.nix index 4c1d0bb..b9d9aed 100644 --- a/nixosModules/user-rpqt.nix +++ b/nixosModules/user-rpqt.nix @@ -1,4 +1,9 @@ -{ lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: { users.users.rpqt = { isNormalUser = true; @@ -14,7 +19,10 @@ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGa8R8obgptefcp27Cdp9bc2fiyc9x0oTfMsTPFp2ktE rpqt@haze" ]; - extraGroups = [ "wheel" ]; + extraGroups = [ + "wheel" + ] + ++ lib.mkIf config.networking.networkmanager.enabled [ "networkmanager" ]; }; programs.fish.enable = true;