mirror of
https://github.com/nmasur/dotfiles
synced 2025-04-24 15:02:24 +00:00
Compare commits
2 Commits
f4f5f19183
...
fa797c81f8
Author | SHA1 | Date | |
---|---|---|---|
|
fa797c81f8 | ||
|
d243d68c72 |
@ -9,21 +9,27 @@ nixpkgs.lib.nixosSystem {
|
|||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = { };
|
specialArgs = { };
|
||||||
modules = [
|
modules = [
|
||||||
./hardware-configuration.nix
|
|
||||||
../../modules/common
|
|
||||||
../../modules/nixos
|
|
||||||
globals
|
globals
|
||||||
wsl.nixosModules.wsl
|
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
disko.nixosModules.disko
|
disko.nixosModules.disko
|
||||||
|
../../modules/common
|
||||||
|
../../modules/nixos
|
||||||
{
|
{
|
||||||
|
# Hardeware
|
||||||
server = true;
|
server = true;
|
||||||
networking.hostName = "swan";
|
networking.hostName = "swan";
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules =
|
||||||
|
[ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
powerManagement.cpuFreqGovernor = "powersave";
|
||||||
|
hardware.cpu.intel.updateMicrocode = true;
|
||||||
|
|
||||||
|
# ZFS
|
||||||
|
zfs.enable = true;
|
||||||
# head -c 8 /etc/machine-id
|
# head -c 8 /etc/machine-id
|
||||||
networking.hostId = "600279f4"; # Random ID required for ZFS
|
networking.hostId = "600279f4"; # Random ID required for ZFS
|
||||||
|
|
||||||
zfs.enable = true;
|
|
||||||
disko = {
|
disko = {
|
||||||
enableConfig = true;
|
enableConfig = true;
|
||||||
devices = (import ../../disks/root.nix { disk = "/dev/nvme0n1"; });
|
devices = (import ../../disks/root.nix { disk = "/dev/nvme0n1"; });
|
||||||
|
@ -1,39 +0,0 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
|
||||||
# and may be overwritten by future invocations. Please make changes
|
|
||||||
# to /etc/nixos/configuration.nix instead.
|
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules =
|
|
||||||
[ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
# fileSystems."/" = {
|
|
||||||
# device = "/dev/disk/by-label/nixos";
|
|
||||||
# fsType = "ext4";
|
|
||||||
# };
|
|
||||||
#
|
|
||||||
# fileSystems."/boot" = {
|
|
||||||
# device = "/dev/disk/by-label/boot";
|
|
||||||
# fsType = "vfat";
|
|
||||||
# };
|
|
||||||
|
|
||||||
swapDevices = [ ];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
|
||||||
hardware.cpu.intel.updateMicrocode =
|
|
||||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
@ -1,4 +1,4 @@
|
|||||||
{ config, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
arrServer = lib.mkOption {
|
arrServer = lib.mkOption {
|
||||||
@ -14,11 +14,14 @@
|
|||||||
services.radarr.enable = true;
|
services.radarr.enable = true;
|
||||||
services.bazarr.enable = true;
|
services.bazarr.enable = true;
|
||||||
services.prowlarr.enable = true;
|
services.prowlarr.enable = true;
|
||||||
|
services.sabnzbd.enable = true;
|
||||||
|
unfreePackages = [ "unrar" ]; # Required for sabnzbd
|
||||||
|
|
||||||
# Grant users access to destination directories
|
# Grant users access to destination directories
|
||||||
users.users.sonarr.extraGroups = [ "jellyfin" ];
|
users.users.sonarr.extraGroups = [ "jellyfin" ];
|
||||||
users.users.radarr.extraGroups = [ "jellyfin" ];
|
users.users.radarr.extraGroups = [ "jellyfin" ];
|
||||||
users.users.bazarr.extraGroups = [ "jellyfin" ];
|
users.users.bazarr.extraGroups = [ "jellyfin" ];
|
||||||
|
users.users.sabnzbd.extraGroups = [ "jellyfin" ];
|
||||||
|
|
||||||
# Requires updating the base_url config value in each service
|
# Requires updating the base_url config value in each service
|
||||||
# If you try to rewrite the URL, the service won't redirect properly
|
# If you try to rewrite the URL, the service won't redirect properly
|
||||||
@ -67,6 +70,17 @@
|
|||||||
upstreams = [{ dial = "localhost:6767"; }];
|
upstreams = [{ dial = "localhost:6767"; }];
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
group = "download";
|
||||||
|
match = [{
|
||||||
|
host = [ config.arrServer ];
|
||||||
|
path = [ "/sabnzbd*" ];
|
||||||
|
}];
|
||||||
|
handle = [{
|
||||||
|
handler = "reverse_proxy";
|
||||||
|
upstreams = [{ dial = "localhost:8085"; }];
|
||||||
|
}];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user