M configuration.nix => configuration.nix +29 -19
@@ 23,8 23,17 @@
boot.supportedFilesystems = [ "zfs" ];
boot.loader.grub.copyKernels = true;
+ # Enable virtualisation
+ boot.kernelModules = [ "kvm-amd" "kvm-intel" "coretemp" "jc42" ];
+ virtualisation.libvirtd.enable = true;
+
+ # Enable automatic upgrades but don't reboot
+ system.autoUpgrade.enable = true;
+ system.autoUpgrade.allowReboot = false;
+
networking.hostName = "nas"; # Define your hostname.
networking.hostId = "e058e4cd";
+ # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Set your time zone.
# time.timeZone = "Europe/Amsterdam";
@@ 38,6 47,10 @@
networking.interfaces.enp0s20f2.useDHCP = true;
networking.interfaces.enp0s20f3.useDHCP = true;
+ # Configure network proxy if necessary
+ # networking.proxy.default = "http://user:password@proxy:port/";
+ # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
+
# Select internationalisation properties.
# i18n.defaultLocale = "en_US.UTF-8";
# console = {
@@ 54,9 67,14 @@
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
- curl wget vim tmux
- git
+ lm_sensors
+ wget curl vim tmux htop
+ git ripgrep
+ clang llvm gcc binutils file
go
+ rustc cargo cargo-flamegraph openssl pkg-config
+ navidrome
+ jellyfin
];
# Some programs need SUID wrappers, can be configured further or are
@@ 75,30 93,22 @@
enable = true;
};
-# navidrome = {
-# enable = true;
-# };
-
- jellyfin = {
+ navidrome = {
enable = true;
+ settings = {
+ Address = "0.0.0.0";
+ MusicFolder = "/mnt/guava/music";
+ };
};
- };
- systemd.services.navidrome = {
- enable = true;
- description = "Navidrome Music Server and Streamer compatible with Subsonic/Airsonic";
- unitConfig = {
- Type = "simple";
- };
- serviceConfig = {
- ExecStart = "/nix/var/nix/profiles/default/bin/navidrome --musicfolder /mnt/guava/music";
+ jellyfin = {
+ enable = true;
};
- wantedBy = [ "multi-user.target" ];
};
# Open ports in the firewall.
- networking.firewall.allowedTCPPorts = [ 4533 8096 ];
- # networking.firewall.allowedUDPPorts = [ ... ];
+ networking.firewall.allowedTCPPorts = [ 4533 8096 6167 ];
+ networking.firewall.allowedUDPPorts = [ 6167 ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
M hardware-configuration.nix => hardware-configuration.nix +22 -182
@@ 8,38 8,43 @@
[ (modulesPath + "/installer/scan/not-detected.nix")
];
- boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "xhci_pci" "usb_storage" "usbhid" "sd_mod" ];
+ boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "xhci_pci" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
- { device = "nixos";
+ { device = "nixos/root";
fsType = "zfs";
};
fileSystems."/boot" =
- { device = "/dev/disk/by-uuid/2D48-A7DE";
+ { device = "/dev/disk/by-uuid/C47A-2DC5";
fsType = "vfat";
};
- fileSystems."/mnt/guava" =
- { device = "guava";
+ fileSystems."/mnt/guava/movies" =
+ { device = "guava/movies";
fsType = "zfs";
};
- fileSystems."/mnt/guava/books" =
- { device = "guava/books";
+ fileSystems."/mnt/guava/music" =
+ { device = "guava/music";
fsType = "zfs";
};
- fileSystems."/mnt/guava/anime" =
- { device = "guava/anime";
+ fileSystems."/mnt/guava/shows" =
+ { device = "guava/shows";
fsType = "zfs";
};
- fileSystems."/mnt/guava/Downloads" =
- { device = "guava/Downloads";
+ fileSystems."/mnt/guava/pictures" =
+ { device = "guava/pictures";
+ fsType = "zfs";
+ };
+
+ fileSystems."/mnt/guava/anime" =
+ { device = "guava/anime";
fsType = "zfs";
};
@@ 48,8 53,8 @@
fsType = "zfs";
};
- fileSystems."/mnt/guava/.vm_cache" =
- { device = "guava/.vm_cache";
+ fileSystems."/mnt/guava/books" =
+ { device = "guava/books";
fsType = "zfs";
};
@@ 58,186 63,21 @@
fsType = "zfs";
};
- fileSystems."/mnt/guava/jjf_music" =
- { device = "guava/jjf_music";
- fsType = "zfs";
- };
-
fileSystems."/mnt/guava/isos" =
{ device = "guava/isos";
fsType = "zfs";
};
- fileSystems."/mnt/guava/home" =
- { device = "guava/home";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/pictures" =
- { device = "guava/pictures";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/shows" =
- { device = "guava/shows";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/ports" =
- { device = "guava/ports";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/music" =
- { device = "guava/music";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/jails" =
- { device = "guava/jails";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/movies" =
- { device = "guava/movies";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/wallpapers" =
- { device = "guava/wallpapers";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/zones" =
- { device = "guava/zones";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/vm" =
- { device = "guava/vm";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/backups/ErkNinja" =
- { device = "guava/backups/ErkNinja";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/.vm_cache/boot2docker" =
- { device = "guava/.vm_cache/boot2docker";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/home/guava" =
- { device = "guava/home/guava";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/Downloads/incoming" =
- { device = "guava/Downloads/incoming";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/home/pitaya" =
- { device = "guava/home/pitaya";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/jails/base-linux" =
- { device = "guava/jails/base-linux";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/vm/docker_host_0" =
- { device = "guava/vm/docker_host_0";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/home/tomato" =
- { device = "guava/home/tomato";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/zones/gonic0" =
- { device = "guava/zones/gonic0";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/jails/jamstash" =
- { device = "guava/jails/jamstash";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/jails/jellyfin-freebsd" =
- { device = "guava/jails/jellyfin-freebsd";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/jails/navidrome" =
- { device = "guava/jails/navidrome";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/jails/golang" =
- { device = "guava/jails/golang";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/jails/base" =
- { device = "guava/jails/base";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/jails/plex" =
- { device = "guava/jails/plex";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/jails/gonic" =
- { device = "guava/jails/gonic";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/zones/sonic0" =
- { device = "guava/zones/sonic0";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/zones/openbsd0" =
- { device = "guava/zones/openbsd0";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/.vm_cache/boot2docker/vmlinuz64" =
- { device = "guava/.vm_cache/boot2docker/vmlinuz64";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/zones/plex0" =
- { device = "guava/zones/plex0";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/.vm_cache/boot2docker/initrd" =
- { device = "guava/.vm_cache/boot2docker/initrd";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/vm/docker_host_0/files" =
- { device = "guava/vm/docker_host_0/files";
- fsType = "zfs";
- };
-
- fileSystems."/mnt/guava/vm/docker_host_0/docker" =
- { device = "guava/vm/docker_host_0/docker";
+ fileSystems."/mnt/guava/Downloads" =
+ { device = "guava/Downloads";
fsType = "zfs";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/2b47c28e-7a36-4473-9474-aa157159a007"; }
- { device = "/dev/disk/by-uuid/a59c234c-f7a0-4670-a3cf-217e3151fe60"; }
- { device = "/dev/disk/by-uuid/92b65e36-f5dc-4bae-b885-4ca2b28bd00d"; }
{ device = "/dev/disk/by-uuid/7de3ccde-cfed-4d8b-ab64-fa4672be132c"; }
+ { device = "/dev/disk/by-uuid/92b65e36-f5dc-4bae-b885-4ca2b28bd00d"; }
+ { device = "/dev/disk/by-uuid/a59c234c-f7a0-4670-a3cf-217e3151fe60"; }
{ device = "/dev/disk/by-uuid/e69fc33f-b507-4137-b0e9-ed96c5e83bee"; }
{ device = "/dev/disk/by-uuid/ed391543-65bb-4d37-ae41-119ca11c4888"; }
];