artemis.nix (2552B)
1 # Server 2 3 { config, pkgs, lib, machine, username, email, fullname, domain, sshkey, sshport, timezone, htpasswd, todosecret, vpnusername, vpnpassword, privatekey, ... }: 4 5 let 6 home-manager = builtins.fetchTarball https://github.com/nix-community/home-manager/archive/master.tar.gz; 7 in 8 9 { 10 11 networking.hostName = "artemis"; 12 13 imports = [ 14 (import "${home-manager}/nixos") 15 (import ../scripts/blog-duolingo.nix {inherit pkgs domain username;}) 16 (import ../scripts/blog-status.nix {inherit pkgs domain;}) 17 (import ../common/docker.nix {inherit config pkgs username domain timezone htpasswd todosecret vpnusername vpnpassword;}) 18 ../common/dhcp.nix 19 ../common/flakes.nix 20 ../common/garbage.nix 21 (import ../common/locale.nix {inherit pkgs timezone;}) 22 (import ../scripts/magnets.nix {inherit pkgs;}) 23 ../common/mount-drives.nix 24 ../common/packages.nix 25 (import ../scripts/restic.nix {inherit pkgs;}) 26 (import ../common/ssh.nix {inherit username sshkey sshport;}) 27 (import ../common/syncthing.nix {inherit config pkgs username;}) 28 (import ../common/user.nix {inherit config pkgs username fullname;}) 29 ../common/vnstat.nix 30 (import ../scripts/stagit-generate.nix {inherit pkgs;}) 31 ]; 32 home-manager = { 33 backupFileExtension = "hm-bak"; 34 users.${username} = {pkgs, ...}: { 35 imports = [ 36 (import ../home/fish.nix {inherit pkgs domain;}) 37 (import ../home/git.nix {inherit fullname email;}) 38 ../home/htop.nix 39 ../home/neovim.nix 40 (import ../home/rbw.nix {inherit pkgs domain email;}) 41 (import ../home/rclone.nix {inherit domain username sshport privatekey;}) 42 (import ../home/ssh.nix {inherit domain username sshport privatekey;}) 43 ]; 44 home.stateVersion = "25.05"; 45 }; 46 }; 47 48 # Hardware and system 49 boot = { 50 initrd = { 51 availableKernelModules = [ "xhci_pci" "virtio_pci" "virtio_scsi" "usbhid" ]; 52 kernelModules = [ ]; 53 }; 54 kernelModules = [ ]; 55 extraModulePackages = [ ]; 56 loader = { 57 systemd-boot.enable = true; 58 efi.canTouchEfiVariables = true; 59 }; 60 }; 61 nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; 62 63 # Cron jobs 64 services.cron = { 65 enable = true; 66 systemCronJobs = [ 67 "*/10 * * * * ${username} blog-status" 68 "*/10 * * * * ${username} magnets" 69 "*/10 * * * * ${username} stagit-generate" 70 "55 23 * * SUN ${username} blog-duolingo" 71 "0 */12 * * * ${username} backup-cloud" 72 ]; 73 }; 74 75 system.stateVersion = "25.05"; # Did you read the comment? 76 77 }