diff --git a/flake.nix b/flake.nix index fcf3b7a..fc60ccc 100644 --- a/flake.nix +++ b/flake.nix @@ -34,7 +34,7 @@ specialArgs = { inherit inputs system; }; modules = [ nvf.nixosModules.default - ./hosts/darkstar/configuration.nix + ./hosts/molniya/configuration.nix home-manager.nixosModules.home-manager { home-manager = { @@ -46,34 +46,6 @@ } ]; }; - - - # server (r320) - kepler = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs system; }; - modules = [ - ./hosts/kepler/configuration.nix - home-manager.nixosModules.home-manager - { - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - extraSpecialArgs = { inherit inputs; }; - users.user = ./hosts/kepler/config/home/home.nix; - }; - } - ]; - }; - - # router - voyager = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs system; }; - modules = [ - ./hosts/voyager/configuration.nix - ]; - }; }; }; } diff --git a/hosts/kepler/config/boot.nix b/hosts/kepler/config/boot.nix deleted file mode 100644 index 15ba7ea..0000000 --- a/hosts/kepler/config/boot.nix +++ /dev/null @@ -1,25 +0,0 @@ -_: -{ - boot = { - loader = { - systemd-boot = { - enable = true; - }; - efi = { - canTouchEfiVariables = true; - }; - }; - initrd.systemd.enable = true; - supportedFilesystems = [ "zfs" ]; - - zfs = { - devNodes = "/dev/disk/by-id"; - forceImportRoot = true; - forceImportAll = true; - }; - kernelParams = [ "scsi_mod.scan=sync" "rootdelay=10" "zfs.zfs_arc_max=34359738368" ]; - extraModprobeConfig = '' - options scsi_mod scan=sync - ''; - }; -} diff --git a/hosts/kepler/config/default.nix b/hosts/kepler/config/default.nix deleted file mode 100644 index 9e0d155..0000000 --- a/hosts/kepler/config/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -_: -{ - imports = [ - ./boot.nix - ./networking.nix - ./gnupg.nix - ./pkgs.nix - ./system.nix - ./ssh.nix - ./jellyfin.nix - ./shell.nix - ./freedom/default.nix - ./docker/default.nix - ]; -} diff --git a/hosts/kepler/config/docker/default.nix b/hosts/kepler/config/docker/default.nix deleted file mode 100644 index ead158e..0000000 --- a/hosts/kepler/config/docker/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ config, pkgs, ... }: -{ - virtualisation = { - oci-containers = { - backend = "docker"; - }; - docker = { - enable = true; - enableOnBoot = true; - rootless = { - enable = true; - setSocketVariable = true; - }; - }; - }; - imports = [ - ./gluetun.nix - ./qbittorrent.nix - ./jdownloader.nix - ]; -} diff --git a/hosts/kepler/config/docker/gluetun.nix b/hosts/kepler/config/docker/gluetun.nix deleted file mode 100644 index 04d84a2..0000000 --- a/hosts/kepler/config/docker/gluetun.nix +++ /dev/null @@ -1,56 +0,0 @@ -{ config, pkgs, ... }: -let - protonvpnConfig = { - VPN_SERVICE_PROVIDER = "protonvpn"; - VPN_PORT_FORWARDING = "on"; - VPN_PORT_FORWARDING_PROVIDER="protonvpn"; - }; - gluetunConfig = { - SHADOWSOCKS = "on"; - HTTPPROXY = "on"; - HTTPPROXY_STEALTH = "on"; - - FIREWALL_OUTBOUND_SUBNETS="10.11.0.0/24"; - DNS_UPSTREAM_RESOLVERS = "cloudflare"; - - BLOCK_SURVEILLANCE="on"; - BLOCK_ADS="on"; - BLOCK_MALICIOUS="on"; - }; -in -{ - virtualisation.oci-containers.containers = { - # protonvpn - pvpn-de-01 = { - autoStart = true; - image = "qmcgaw/gluetun:latest"; - capabilities = { NET_ADMIN = true; }; - devices = [ "/dev/net/tun:/dev/net/tun" ]; - environmentFiles = [ - "/etc/secrets/gluetun.env" - ]; - environment = { - # GLUETUN ENV VARS # - VPN_TYPE="openvpn"; - SERVER_COUNTRIES = "Germany"; - VPN_INTERFACE="tun0"; - - } // protonvpnConfig // gluetunConfig; - ports = [ - # gluetun - "8000:8000" - "7001:8388/tcp" - "7001:8388/udp" - "8001:8888" - - # qbittorrent - "8080:8080" - "6881:6881/tcp" - "6881:6881/udp" - - # jdownloader - "5800:5800" - ]; - }; - }; -} diff --git a/hosts/kepler/config/docker/jdownloader.nix b/hosts/kepler/config/docker/jdownloader.nix deleted file mode 100644 index 0f8c8d1..0000000 --- a/hosts/kepler/config/docker/jdownloader.nix +++ /dev/null @@ -1,22 +0,0 @@ -_: -{ - virtualisation.oci-containers.containers = { - # qbittorrent - jdownloader = { - autoStart = true; - image = "jlesage/jdownloader-2:latest"; - networks = [ - "container:pvpn-de-01" - ]; - environment = { - TZ="Europe/Berlin"; - KEEP_APP_RUNNING="1"; - DARK_MODE="1"; - }; - volumes = [ - "/srv/docker/jdownloader/config:/config:rw" - "/srv/docker/jdownloader/downloads:/output:rw" - ]; - }; - }; -} diff --git a/hosts/kepler/config/docker/qbittorrent.nix b/hosts/kepler/config/docker/qbittorrent.nix deleted file mode 100644 index d0502d6..0000000 --- a/hosts/kepler/config/docker/qbittorrent.nix +++ /dev/null @@ -1,21 +0,0 @@ -_: -{ - virtualisation.oci-containers.containers = { - # qbittorrent - qbittorrent = { - autoStart = true; - image = "qbittorrentofficial/qbittorrent-nox:latest"; - networks = [ - "container:pvpn-de-01" - ]; - environment = { - WEBUI_PORT = "8080"; - TZ="Europe/Berlin"; - }; - volumes = [ - "/srv/docker/qbittorrent/config:/config" - "/srv/docker/qbittorrent/downloads:/downloads" - ]; - }; - }; -} diff --git a/hosts/kepler/config/freedom/default.nix b/hosts/kepler/config/freedom/default.nix deleted file mode 100644 index f859940..0000000 --- a/hosts/kepler/config/freedom/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -_: -{ - imports = [ - ./invidious.nix - ./nitter.nix - ./tor.nix - ./unbound.nix - ]; -} diff --git a/hosts/kepler/config/freedom/invidious.nix b/hosts/kepler/config/freedom/invidious.nix deleted file mode 100644 index 2fff7b2..0000000 --- a/hosts/kepler/config/freedom/invidious.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ config, pkgs, ... }: -{ - services = { - invidious = { - enable = true; - port = 3001; - }; - }; -} diff --git a/hosts/kepler/config/freedom/nitter.nix b/hosts/kepler/config/freedom/nitter.nix deleted file mode 100644 index ff30fe3..0000000 --- a/hosts/kepler/config/freedom/nitter.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ config, pkgs, ... }: -{ - services = { - nitter = { - enable = true; - - server = { - https = true; - port = 3002; - hostname = "nitter twitter"; - }; - }; - }; -} diff --git a/hosts/kepler/config/freedom/tor.nix b/hosts/kepler/config/freedom/tor.nix deleted file mode 100644 index 1af76cc..0000000 --- a/hosts/kepler/config/freedom/tor.nix +++ /dev/null @@ -1,15 +0,0 @@ -_: -{ - services.tor = { - enable = true; - enableGeoIP = true; - client = { - enable = true; - socksListenAddress = { - IsolateDestAddr = true; - addr = "10.11.0.10"; - port = 9050; - }; - }; - }; -} diff --git a/hosts/kepler/config/freedom/unbound.nix b/hosts/kepler/config/freedom/unbound.nix deleted file mode 100644 index 065839a..0000000 --- a/hosts/kepler/config/freedom/unbound.nix +++ /dev/null @@ -1,28 +0,0 @@ -_: -{ - services.unbound = { - enable = true; - enableRootTrustAnchor = true; - settings = { - server = { - interface = [ "127.0.0.1" "10.11.0.10" ]; - - access-control = [ - "127.0.0.0/8 allow" - "10.11.0.0/24 allow" - ]; - - prefetch = true; - prefetch-key = true; - qname-minimisation = true; - - hide-identity = true; - hide-version = true; - - harden-glue = true; - harden-below-nxdomain = true; - harden-dnssec-stripped = true; - }; - }; - }; -} diff --git a/hosts/kepler/config/git.nix b/hosts/kepler/config/git.nix deleted file mode 100644 index 7f7c8ab..0000000 --- a/hosts/kepler/config/git.nix +++ /dev/null @@ -1,4 +0,0 @@ -_: -{ - -} diff --git a/hosts/kepler/config/gnupg.nix b/hosts/kepler/config/gnupg.nix deleted file mode 100644 index c0aba4e..0000000 --- a/hosts/kepler/config/gnupg.nix +++ /dev/null @@ -1,8 +0,0 @@ -_: -{ - programs.gnupg.agent = { - enable = true; - enableSSHSupport = true; - }; - -} diff --git a/hosts/kepler/config/home/home.nix b/hosts/kepler/config/home/home.nix deleted file mode 100644 index befb383..0000000 --- a/hosts/kepler/config/home/home.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ config, pkgs, ... }: -{ - home = { - username = "user"; - homeDirectory = "/home/user"; - - enableNixpkgsReleaseCheck = false; - stateVersion = "26.05"; - }; -} diff --git a/hosts/kepler/config/jellyfin.nix b/hosts/kepler/config/jellyfin.nix deleted file mode 100644 index 6e0192e..0000000 --- a/hosts/kepler/config/jellyfin.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ config, pkgs, ... }: -{ - services = { - jellyfin = { - enable = true; - openFirewall = false; - }; - }; -} diff --git a/hosts/kepler/config/networking.nix b/hosts/kepler/config/networking.nix deleted file mode 100644 index 674b8f7..0000000 --- a/hosts/kepler/config/networking.nix +++ /dev/null @@ -1,22 +0,0 @@ -_: -{ - networking = { - hostName = "kepler"; - hostId = "a984053d"; - networkmanager = { enable = true; }; - firewall = { enable = false; }; - - interfaces = { - eno1 = { - ipv4.addresses = [{ - address = "10.11.0.10"; - prefixLength = 24; - }]; - }; - }; - defaultGateway = { - address = "10.11.0.1"; - interface = "eno1"; - }; - }; -} diff --git a/hosts/kepler/config/pkgs.nix b/hosts/kepler/config/pkgs.nix deleted file mode 100644 index 9591956..0000000 --- a/hosts/kepler/config/pkgs.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ pkgs, ... }: -{ - environment.systemPackages = with pkgs; [ - vim - wget - git - curl - fastfetch - net-tools - ethtool - dhcpcd - dig - usbutils - dhcpcd - host - dnslookup - drill - dig - tree - lsof - ]; -} diff --git a/hosts/kepler/config/ssh.nix b/hosts/kepler/config/ssh.nix deleted file mode 100644 index 798faae..0000000 --- a/hosts/kepler/config/ssh.nix +++ /dev/null @@ -1,8 +0,0 @@ -_: -{ - services = { - openssh = { - enable = true; - }; - }; -} diff --git a/hosts/kepler/config/system.nix b/hosts/kepler/config/system.nix deleted file mode 100644 index 1c8fca3..0000000 --- a/hosts/kepler/config/system.nix +++ /dev/null @@ -1,7 +0,0 @@ -_: -{ - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - system = { - stateVersion = "26.05"; - }; -} diff --git a/hosts/kepler/configuration.nix b/hosts/kepler/configuration.nix deleted file mode 100644 index 04cd8c4..0000000 --- a/hosts/kepler/configuration.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - imports = [ - ./hardware-configuration.nix - ./config/default.nix - ../../config/default/default.nix - ]; - - time.timeZone = "Europe/Berlin"; - -} - diff --git a/hosts/kepler/hardware-configuration.nix b/hosts/kepler/hardware-configuration.nix deleted file mode 100644 index 0361c64..0000000 --- a/hosts/kepler/hardware-configuration.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ config, lib, pkgs, modulesPath, ... }: - -{ - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "mpt3sas" "usb_storage" "usbhid" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "rpool/root"; - fsType = "zfs"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/9B62-3696"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; - fileSystems."/data/storage" = { - device = "data/storage"; - fsType = "zfs"; - }; - swapDevices = [ ]; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/hosts/voyager/config/boot.nix b/hosts/voyager/config/boot.nix deleted file mode 100644 index fae17e9..0000000 --- a/hosts/voyager/config/boot.nix +++ /dev/null @@ -1,13 +0,0 @@ -_: -{ - boot = { - loader = { - systemd-boot = { - enable = true; - }; - efi = { - canTouchEfiVariables = true; - }; - }; - }; -} diff --git a/hosts/voyager/config/default.nix b/hosts/voyager/config/default.nix deleted file mode 100644 index 4f30806..0000000 --- a/hosts/voyager/config/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ config, pkgs, ... }: -{ - imports = [ - #./dhcp.nix - #./nat.nix - #./firewall.nix - ./users.nix - ./networking.nix - ./time.nix - ./system.nix - ./boot.nix - ]; -} diff --git a/hosts/voyager/config/dhcp.nix b/hosts/voyager/config/dhcp.nix deleted file mode 100644 index e69de29..0000000 diff --git a/hosts/voyager/config/firewall.nix b/hosts/voyager/config/firewall.nix deleted file mode 100644 index e69de29..0000000 diff --git a/hosts/voyager/config/nat.nix b/hosts/voyager/config/nat.nix deleted file mode 100644 index e69de29..0000000 diff --git a/hosts/voyager/config/networking.nix b/hosts/voyager/config/networking.nix deleted file mode 100644 index ff4ba82..0000000 --- a/hosts/voyager/config/networking.nix +++ /dev/null @@ -1,21 +0,0 @@ -_: -{ - networking = { - hostName = "voyager"; - networkmanager = { enable = true; }; - firewall = { enable = false; }; - - interfaces = { - eno1 = { - ipv4.addresses = [{ - address = "10.11.0.10"; - prefixLength = 24; - }]; - }; - }; - defaultGateway = { - address = "10.11.0.1"; - interface = "eno1"; - }; - }; -} diff --git a/hosts/voyager/config/system.nix b/hosts/voyager/config/system.nix deleted file mode 100644 index 1c8fca3..0000000 --- a/hosts/voyager/config/system.nix +++ /dev/null @@ -1,7 +0,0 @@ -_: -{ - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - system = { - stateVersion = "26.05"; - }; -} diff --git a/hosts/voyager/config/time.nix b/hosts/voyager/config/time.nix deleted file mode 100644 index 92f2aa3..0000000 --- a/hosts/voyager/config/time.nix +++ /dev/null @@ -1,4 +0,0 @@ -_: -{ - time.timeZone = "Europe/Berlin"; -} diff --git a/hosts/voyager/config/users.nix b/hosts/voyager/config/users.nix deleted file mode 100644 index 2be8303..0000000 --- a/hosts/voyager/config/users.nix +++ /dev/null @@ -1,15 +0,0 @@ -_: -{ - users.users.user = { - isNormalUser = true; - extraGroups = [ "wheel" "docker" "network" "plugdev" ]; - - openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDdCJK3NBMbGwvSxXq0kp/FzWUU0l0D1WX8f4vBubtZ7" ]; - }; - security = { - doas = { - enable = true; - extraConfig = "permit nopass keepenv :wheel"; - }; - }; -} diff --git a/hosts/voyager/configuration.nix b/hosts/voyager/configuration.nix deleted file mode 100644 index 950a96a..0000000 --- a/hosts/voyager/configuration.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - imports = [ - ./hardware-configuration.nix - ./config/default.nix - ../../config/default/default.nix - ]; - -} - diff --git a/hosts/voyager/hardware-configuration.nix b/hosts/voyager/hardware-configuration.nix deleted file mode 100644 index d4ca9f3..0000000 --- a/hosts/voyager/hardware-configuration.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ 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-uuid/dfbd029b-d568-41fc-93f3-43a6ac059661"; - fsType = "ext4"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/1942-B7E9"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; - - swapDevices = [ ]; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -}