From f6e4dea4681e56e7e706f56f9d6ae6c939d44ad1 Mon Sep 17 00:00:00 2001 From: Tyler Mayoff Date: Thu, 1 May 2025 19:27:36 +0000 Subject: [PATCH] Cleanup --- dot_config/flake/flake.nix | 2 +- .../flake/machines/mal/configuration.nix | 32 +++++++++++++++++++ .../machines/mal/hardware-configuration.nix | 16 ++-------- 3 files changed, 35 insertions(+), 15 deletions(-) diff --git a/dot_config/flake/flake.nix b/dot_config/flake/flake.nix index 7649e93..45f3012 100644 --- a/dot_config/flake/flake.nix +++ b/dot_config/flake/flake.nix @@ -61,7 +61,7 @@ modules = [ ./machines/mal/configuration.nix - lix-module.nixosModules.default + # lix-module.nixosModules.default home-manager.nixosModules.home-manager { diff --git a/dot_config/flake/machines/mal/configuration.nix b/dot_config/flake/machines/mal/configuration.nix index 5443845..4d60574 100644 --- a/dot_config/flake/machines/mal/configuration.nix +++ b/dot_config/flake/machines/mal/configuration.nix @@ -156,6 +156,38 @@ in { }; }; + systemd.services."restore-nextcloud" = { + script = '' + # Remove keys + + ${secrets} + + printf "\nRestore nextcloud \n" + ${pkgs.restic}/bin/restic -r "$RESTIC_REPOSITORY/NextCloud" restore latest -vvv --target / + # ${pkgs.restic}/bin/restic -r "$RESTIC_REPOSITORY/NextCloud" check -vvv + ''; + serviceConfig = { + Type = "simple"; + User = "root"; + }; + }; + + systemd.services."restore-backups" = { + script = '' + # Remove keys + + ${secrets} + + printf "\nRestore nextcloud \n" + ${pkgs.restic}/bin/restic -r "$RESTIC_REPOSITORY/Backups" restore latest -vvv --target / + # ${pkgs.restic}/bin/restic -r "$RESTIC_REPOSITORY/NextCloud" check -vvv + ''; + serviceConfig = { + Type = "simple"; + User = "root"; + }; + }; + programs.fish.enable = true; # List services that you want to enable: diff --git a/dot_config/flake/machines/mal/hardware-configuration.nix b/dot_config/flake/machines/mal/hardware-configuration.nix index d818b4d..46b09b6 100644 --- a/dot_config/flake/machines/mal/hardware-configuration.nix +++ b/dot_config/flake/machines/mal/hardware-configuration.nix @@ -28,23 +28,11 @@ options = ["fmask=0022" "dmask=0022"]; }; - fileSystems."/mnt/store" = { - device = "nix-store"; + fileSystems."/mnt/user" = { + device = "array"; fsType = "9p"; }; - fileSystems."/nix/store" = { - depends = [ - "/mnt/store" - ]; - - device = "/mnt/store"; - fsType = "none"; - options = [ - "bind" - ]; - }; - swapDevices = []; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking