mirror of
https://github.com/nmasur/dotfiles
synced 2025-04-28 14:42:24 +00:00
Compare commits
No commits in common. "fa797c81f83546e78dea764fcedb3176d8fc4367" and "f4f5f19183645687226687527653b4a576471218" have entirely different histories.
fa797c81f8
...
f4f5f19183
@ -9,27 +9,21 @@ nixpkgs.lib.nixosSystem {
|
|||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = { };
|
specialArgs = { };
|
||||||
modules = [
|
modules = [
|
||||||
globals
|
./hardware-configuration.nix
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
disko.nixosModules.disko
|
|
||||||
../../modules/common
|
../../modules/common
|
||||||
../../modules/nixos
|
../../modules/nixos
|
||||||
|
globals
|
||||||
|
wsl.nixosModules.wsl
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
disko.nixosModules.disko
|
||||||
{
|
{
|
||||||
# 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"; });
|
||||||
|
39
hosts/swan/hardware-configuration.nix
Normal file
39
hosts/swan/hardware-configuration.nix
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# 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, pkgs, lib, ... }: {
|
{ config, lib, ... }: {
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
arrServer = lib.mkOption {
|
arrServer = lib.mkOption {
|
||||||
@ -14,14 +14,11 @@
|
|||||||
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
|
||||||
@ -70,17 +67,6 @@
|
|||||||
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