at master 2.3 kB view raw
1{ 2 pkgs, 3 config, 4 lib, 5 ... 6}: 7 8{ 9 imports = [ 10 ./hardware-configuration.nix 11 ./zfs.nix 12 ./services.nix 13 ./owntracks.nix 14 ]; 15 16 custom = { 17 enable = true; 18 tailscale = true; 19 autoUpgrade.enable = true; 20 homeManager.enable = true; 21 }; 22 23 home-manager.users.${config.custom.username}.config.custom.machineColour = "blue"; 24 25 environment.systemPackages = with pkgs; [ 26 smartmontools 27 powertop 28 hdparm 29 restic 30 (ffmpeg.overrideAttrs (_: { 31 withVpl = true; 32 })) 33 #stig 34 ]; 35 36 eilean = { 37 publicInterface = "enp1s0"; 38 }; 39 40 powerManagement = { 41 powertop.enable = true; 42 # spins down drives after 1hr 43 powerUpCommands = '' 44 sudo ${pkgs.hdparm}/sbin/hdparm -S 242 /dev/disk/by-id/ata-ST16000NM001G-2KK103_ZL28CDKQ 45 sudo ${pkgs.hdparm}/sbin/hdparm -S 242 /dev/disk/by-id/ata-TOSHIBA_MG08ACA16TE_83E0A00UFVGG 46 ''; 47 }; 48 49 age.secrets."restic.env".file = ../../secrets/restic.env.age; 50 age.secrets.restic-repo.file = ../../secrets/restic-repo.age; 51 age.secrets.restic-elephant.file = ../../secrets/restic-elephant.age; 52 services.restic.backups.sync = { 53 environmentFile = config.age.secrets."restic.env".path; 54 repositoryFile = config.age.secrets.restic-repo.path; 55 passwordFile = config.age.secrets.restic-elephant.path; 56 initialize = true; 57 paths = [ 58 "/tank/family/mp4/" 59 "/tank/family/other/" 60 "/tank/photos/" 61 ]; 62 timerConfig = { 63 OnCalendar = "03:00"; 64 }; 65 pruneOpts = [ 66 "--keep-daily 7" 67 "--keep-weekly 4" 68 "--keep-yearly 10" 69 ]; 70 }; 71 72 # Add hardware transcoding support to `ffmpeg_6` and derived packages (like jellyfin-ffmpeg) 73 # for Intel Alder Lake N100's Quick Sync Video (QSV) using Intel OneVPL. 74 hardware.graphics = { 75 enable = true; 76 extraPackages = with pkgs; [ 77 # Video Acceleration API (VA-API) user mode driver 78 intel-media-driver 79 # Intel Video Processing Library (VPL) API runtime implementation 80 vpl-gpu-rt 81 ]; 82 }; 83 nixpkgs.config.packageOverrides = prev: { 84 jellyfin-ffmpeg = prev.jellyfin-ffmpeg.overrideAttrs (_: { 85 withVpl = true; 86 }); 87 }; 88 89 boot.kernel.sysctl = { 90 "net.ipv4.ip_forward" = 1; 91 "net.ipv6.conf.all.forwarding" = 1; 92 }; 93}