grace/dots
dotfiles/nix configs
git clone https://git.gae.moe/grace/dots
b70d9f9
main
1{ pkgs , ...} : 2 3{ 4imports = [ 5../modules/dns.nix 6../modules/nginx.nix 7../modules/ntfy.nix 8../modules/gitsrv.nix 9../modules/url.nix 10../modules/tailscale.nix 11../modules/users.nix 12../modules/nixos-base.nix 13]; 14 15systemd . services . backup-ext = { 16description = "Mirror /mnt/ext to dijkstra" ; 17wants = [ "network-online.target" ]; 18after = [ "network-online.target" ]; 19unitConfig . RequiresMountsFor = [ "/mnt/ext" ]; 20path = [ pkgs . openssh pkgs . rsync pkgs . util-linux ]; 21serviceConfig . Type = "oneshot" ; 22script = '' 23mountpoint -q /mnt/ext 24ssh -o BatchMode=yes -o StrictHostKeyChecking=yes -i /root/.ssh/id_ed25519 grace@d.i.gae.moe \ 25'mountpoint -q /mnt/backup && sudo -n mkdir -p /mnt/backup/knuth' 26rsync -aHAX --numeric-ids --delete-delay --stats \ 27-e 'ssh -o BatchMode=yes -o StrictHostKeyChecking=yes -i /root/.ssh/id_ed25519' \ 28--rsync-path= 'mountpoint -q /mnt/backup && sudo -n rsync' \ 29/mnt/ext/ grace@d.i.gae.moe:/mnt/backup/knuth/ 30'' ; 31}; 32systemd . timers . backup-ext = { 33wantedBy = [ "timers.target" ]; 34timerConfig = { 35OnCalendar = "daily" ; 36Persistent = true ; 37}; 38}; 39 40boot . loader . grub = { 41enable = true ; 42device = "/dev/vda" ; 43}; 44system . stateVersion = "25.11" ; 45nix = { 46distributedBuilds = true ; 47 48settings = { 49max-jobs = 0 ; 50builders-use-substitutes = true ; 51}; 52 53buildMachines = [ 54{ 55hostName = "d.i.gae.moe" ; 56sshUser = "builder" ; 57sshKey = "/root/.ssh/id_ed25519" ; 58protocol = "ssh-ng" ; 59system = "x86_64-linux" ; 60maxJobs = 8 ; 61speedFactor = 1 ; 62} 63]; 64}; 65}