diff --git a/hosts/nixos/common/global/default.nix b/hosts/nixos/common/global/default.nix index 742be5d..9e5e074 100644 --- a/hosts/nixos/common/global/default.nix +++ b/hosts/nixos/common/global/default.nix @@ -10,13 +10,6 @@ let inputs.nur.nixosModules.nur inputs.slambda.nixosModule inputs.sops-nix.nixosModules.sops - - # {{{ self management - # NOTE: using `pkgs.system` before `module.options` is evaluated - # leads to infinite recursion! - inputs.smos.nixosModules.x86_64-linux.default - inputs.tickler.nixosModules.x86_64-linux.default - # }}} # }}} # {{{ global configuration ./cli/fish.nix diff --git a/hosts/nixos/lapetus/default.nix b/hosts/nixos/lapetus/default.nix index 20ab3d6..c5fc0f0 100644 --- a/hosts/nixos/lapetus/default.nix +++ b/hosts/nixos/lapetus/default.nix @@ -9,6 +9,7 @@ ./services/pounce.nix ./services/intray.nix ./services/vaultwarden.nix + ./services/zfs.nix ./filesystems ./hardware ]; diff --git a/hosts/nixos/lapetus/secrets.yaml b/hosts/nixos/lapetus/secrets.yaml index 5c92f30..8dc3c6b 100644 --- a/hosts/nixos/lapetus/secrets.yaml +++ b/hosts/nixos/lapetus/secrets.yaml @@ -1,4 +1,5 @@ tilde_irc_pass: ENC[AES256_GCM,data:+pw/g0pffo1zF++1H/+iFXQDCDw=,iv:zTBvaUCwt78dgv1jF9EmrTuHMnM2S+GUGpQZWY828tA=,tag:umqaQOWqy8aMOxWR0CNGHQ==,type:str] +zed_smtp_pass: ENC[AES256_GCM,data:Y6pPbs5amgZIvoIJZUM=,iv:vbvA9u8Snv4tCzguabrWg1osy/LOr8PmO/02f9ZajOY=,tag:8tlrMCZBqtjGfiuqSOOplw==,type:str] vaultwarden_env: ENC[AES256_GCM,data:39gY2J+AFTwIRar7tbF6D9WadTzw1xiqPE9T204Z,iv:k9m6wQIPh1qScCjgLnULjVxVmDxxmotd/xzVuH6ju/w=,tag:+xIkwguOwYryO4rgsyMOsQ==,type:str] sops: kms: [] @@ -24,8 +25,8 @@ sops: RHZ6alYrUU5BZ2xlMkdGR1dWRG5aeGMKJdsdtVZ6Mk9Vo3a+tS+rzAgaF2wpH+8U lWhA+c0Kbe8EJT8hm7Vr8PqBmElz4V9AnXSCTp7D+Cu4pfWsHopLUQ== -----END AGE ENCRYPTED FILE----- - lastmodified: "2024-02-10T04:02:57Z" - mac: ENC[AES256_GCM,data:N91XMd/cNYVEgOffhjJkFspV/QudWCRX0BVfRJ1oVzyqzcOfEutlw9UXl2ARMPGqZLWQx4QIS7b11bviJ95tRqLxt8EHy6xl/HJUEqeRqClE4c68dUoBpZGrMousOtHG40jdf5eciDATNGO+PDecyUjB5s3wZNN7dm2ozHSaBB0=,iv:7YmHsjX0JYI6FQ0RhDdjxTezE+jlfhHkem3EJ7bHDDg=,tag:eQjUA4Mcg+9JKsO7FFvvsw==,type:str] + lastmodified: "2024-02-12T13:56:45Z" + mac: ENC[AES256_GCM,data:Rz6m7xNjfFAz6zkyMb1hqPHNxQ0I5bo9jN/AO24TaepI2dJMTmRUDT9ezsiQHfjitTrfX1EVRccPRGFDUVCaxSKu11CY3oMw6IZgeJclJRs5skp7382S5cu+LGyg5EsVSJM4tFl3XboxvHX2/8sqBqmkuTVxjVHW1hWNU0ok/T4=,iv:j7Hc4KpeXcMc5QqkDpmwJLJxkjMHiTrX+zL4EtzLFPg=,tag:hB6ek9hnpNqgWamK0MwhPQ==,type:str] pgp: [] unencrypted_suffix: _unencrypted version: 3.8.1 diff --git a/hosts/nixos/lapetus/services/msmtp.nix b/hosts/nixos/lapetus/services/msmtp.nix new file mode 100644 index 0000000..755d4a8 --- /dev/null +++ b/hosts/nixos/lapetus/services/msmtp.nix @@ -0,0 +1,14 @@ +{ + programs.msmtp = { + enable = true; + setSendmail = true; + accounts = { + defaults = { + auth = true; + tls = true; + host = "smtp.migadu.com"; + port = 465; + }; + }; + }; +} diff --git a/hosts/nixos/lapetus/services/zfs.nix b/hosts/nixos/lapetus/services/zfs.nix new file mode 100644 index 0000000..33cf4e4 --- /dev/null +++ b/hosts/nixos/lapetus/services/zfs.nix @@ -0,0 +1,27 @@ +{ config, ... }: { + imports = [ ./msmtp.nix ]; + + # {{{ Zfs config + services.zfs = { + trim.enable = true; + autoScrub.enable = true; + + autoSnapshot = { + enable = true; + + # -k -p is the default, and --utc is there to prevent timezone-related issues + autoSnapshot.flags = "-k -p --utc"; + }; + + # zed.enableMail = true; + }; + # }}} + # {{{ Zed email config + sops.secrets.zed_smtp_pass.sopsFile = ../secrets.yaml; + programs.msmtp.accounts.zed = { + from = "zed@orbit.moonythm.dev"; + user = "zed@orbit.moonythm.dev"; + passwordeval = "cat ${config.sops.secrets.zed_smtp_pass.path}"; + }; + # }}} +}