diff --git a/hosts/ame/default.nix b/hosts/ame/default.nix index e014174..6d80112 100644 --- a/hosts/ame/default.nix +++ b/hosts/ame/default.nix @@ -1,10 +1,7 @@ -{ - config, - pkgs, - ... -}: { +{...}: { imports = [ ./hardware-configuration.nix + ./services ../../modules ../../modules/fonts.nix ]; diff --git a/hosts/ame/hardware-configuration.nix b/hosts/ame/hardware-configuration.nix index 83aa026..aec1f4d 100644 --- a/hosts/ame/hardware-configuration.nix +++ b/hosts/ame/hardware-configuration.nix @@ -19,6 +19,11 @@ fsType = "ext4"; }; + fileSystems."/nas" = { + device = "192.168.1.71:/volume1/ame"; + fsType = "nfs"; + }; + fileSystems."/boot/efi" = { device = "/dev/disk/by-uuid/4D09-1D57"; fsType = "vfat"; diff --git a/hosts/ame/home.nix b/hosts/ame/home.nix index 525f8d0..6ab79c2 100755 --- a/hosts/ame/home.nix +++ b/hosts/ame/home.nix @@ -1,7 +1,6 @@ {pkgs, ...}: { imports = [ ../../home - ../../home/librewolf ../../home/wezterm ../../home/zathura ../../home/lf @@ -19,6 +18,7 @@ username = "notoh"; homeDirectory = "/home/notoh"; packages = with pkgs; [ + brave webcord discord spotify-player diff --git a/hosts/ame/services/default.nix b/hosts/ame/services/default.nix new file mode 100644 index 0000000..3175140 --- /dev/null +++ b/hosts/ame/services/default.nix @@ -0,0 +1,5 @@ +{...}: { + imports = [ + ./restic.nix + ]; +} diff --git a/hosts/ame/services/restic.nix b/hosts/ame/services/restic.nix new file mode 100644 index 0000000..84c8c9f --- /dev/null +++ b/hosts/ame/services/restic.nix @@ -0,0 +1,40 @@ +{ + pkgs, + config, + ... +}: { + sops.secrets.restic-repo-pwd = {}; + environment.systemPackages = [pkgs.restic]; + services.restic = { + backups = { + ame = { + paths = [ + "/home" + ]; + exclude = [ + "*.qcow2" + "*.iso" + "/home/*/Downloads" + "/home/*/Videos" + "/home/*/.cache" + "/home/*/.rustup" + "/home/*/.cargo" + "/home/*/.mplayer" + "/home/*/.local/share/Trash" + "/home/*/.local/share/.var" + ]; + pruneOpts = [ + "--keep-daily=4" + "--keep-weekly=3" + "--keep-monthly=2" + ]; + initialize = true; + repository = "/nas/home"; + passwordFile = config.sops.secrets.restic-repo-pwd.path; + timerConfig = { + OnCalendar = "daily"; + }; + }; + }; + }; +}