diff --git a/flake.lock b/flake.lock index 22dddee..f663db9 100644 --- a/flake.lock +++ b/flake.lock @@ -771,42 +771,6 @@ "type": "github" } }, - "nixlib": { - "locked": { - "lastModified": 1736643958, - "narHash": "sha256-tmpqTSWVRJVhpvfSN9KXBvKEXplrwKnSZNAoNPf/S/s=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "1418bc28a52126761c02dd3d89b2d8ca0f521181", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, - "nixos-generators": { - "inputs": { - "nixlib": "nixlib", - "nixpkgs": [ - "nixpkgs-unstable" - ] - }, - "locked": { - "lastModified": 1742568034, - "narHash": "sha256-QaMEhcnscfF2MqB7flZr+sLJMMYZPnvqO4NYf9B4G38=", - "owner": "nix-community", - "repo": "nixos-generators", - "rev": "42ee229088490e3777ed7d1162cb9e9d8c3dbb11", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixos-generators", - "type": "github" - } - }, "nixos-hardware": { "locked": { "lastModified": 1744633460, @@ -976,7 +940,6 @@ "home-manager": "home-manager", "home-manager-unstable": "home-manager-unstable", "hyprland": "hyprland", - "nixos-generators": "nixos-generators", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", "nixpkgs-unstable": "nixpkgs-unstable", diff --git a/flake.nix b/flake.nix index 0423456..a00175a 100644 --- a/flake.nix +++ b/flake.nix @@ -14,10 +14,6 @@ url = "github:nix-community/home-manager/release-24.11"; inputs.nixpkgs.follows = "nixpkgs"; }; - nixos-generators = { - url = "github:nix-community/nixos-generators"; - inputs.nixpkgs.follows = "nixpkgs-unstable"; - }; # secrets management agenix = { url = "github:ryantm/agenix"; @@ -67,7 +63,6 @@ , home-manager-unstable #, nixos-cosmic , nixvim - , nixos-generators , stylix , disko , flake-utils @@ -142,9 +137,6 @@ }; "nix-laptop" = mkHost { specialArgs = { - ## Custom variables (e.g. ip, interface, etc) - vars = import ./systems/userdata-default.nix - // import ./systems/laptop/userdata.nix; pkgsVersion = nixpkgs-unstable; home-manager-version = home-manager-unstable; }; @@ -155,13 +147,6 @@ ./modules/collections/laptop.nix ]; }; - "mini-pc" = mkStableServer { - modules = [ ./users/anon ./systems/mini-pc/configuration.nix ]; - }; - "mini-pc-proxmox" = mkStableServer { - modules = - [ ./users/anon ./systems/mini-pc-proxmox/configuration.nix ]; - }; #initial install done with nix run github:nix-community/nixos-anywhere/73a6d3fef4c5b4ab9e4ac868f468ec8f9436afa7 -- --flake .#adam-site root@ #update with nixos-rebuild switch --flake .#adam-site --target-host "root@" "adam-site" = mkStableServer { @@ -174,13 +159,6 @@ modules = [ disko.nixosModules.disko ./systems/adam-site/configuration.nix ]; }; - "proxmox-test-vm" = mkHost { - minimal = true; - modules = [ - disko.nixosModules.disko - ./systems/proxmox-test-vm/configuration.nix - ]; - }; "amd-server" = mkHost { modules = [ ./users/kopatz ./systems/amd-server/configuration.nix ]; }; diff --git a/systems/laptop/userdata.nix b/systems/laptop/userdata.nix deleted file mode 100644 index f949c29..0000000 --- a/systems/laptop/userdata.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - interface = "enp10s0u1u2"; - ipv4 = "192.168.0.4"; - dns = "192.168.0.6"; - wm = "gnome-shell"; -} diff --git a/systems/mini-pc-proxmox/configuration.nix b/systems/mini-pc-proxmox/configuration.nix deleted file mode 100644 index e74173f..0000000 --- a/systems/mini-pc-proxmox/configuration.nix +++ /dev/null @@ -1,133 +0,0 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page -# and in the NixOS manual (accessible by running ‘nixos-help’). - -{ config, pkgs, modulesPath, lib, ... }: - -{ - imports = [ - # Include the results of the hardware scan. - ./hardware-configuration.nix - ../../modules/services/ssh.nix - ../../modules/services/step-ca.nix - ../../modules/fail2ban.nix - ../../modules/logging.nix - ../../modules/motd.nix - "${toString modulesPath}/virtualisation/proxmox-image.nix" - (modulesPath + "/installer/scan/not-detected.nix") - (modulesPath + "/profiles/qemu-guest.nix") - ]; - - proxmox.qemuConf = { - memory = 16384; - cores = 8; - net0 = "virtio=00:00:00:00:00:00,bridge=vmbr0,firewall=1"; - }; - boot = { - kernelParams = [ "console=tty0" "console=ttyS0" ]; - loader.timeout = lib.mkForce 1; - }; - - mainUser.layout = "de"; - mainUser.variant = "us"; - custom = { - static-ip = { - enable = true; - ip = "192.168.0.10"; - interface = "eth0"; - dns = "127.0.0.1"; - }; - user = { - name = "anon"; - layout = "de"; - variant = "us"; - }; - hardware = { - firmware.enable = true; - ssd.enable = true; - }; - misc = { - docker.enable = true; - backup = - let - kavita = "/data/kavita"; - gitolite = "/var/lib/gitolite"; - syncthing = [ "/data/synced/default/" "/data/synced/work_drive/" ]; - syncthingFull = syncthing - ++ [ "/data/synced/fh/" "/data/synced/books/" ]; - backupPathsSmall = [ "/home" gitolite ] ++ syncthing; - backupPathsMedium = [ "/home" gitolite ] ++ syncthing; - backupPathsFull = [ "/home" kavita gitolite ] ++ syncthingFull; - in - { - enable = true; - small = backupPathsSmall; # goes to backblaze - medium = backupPathsMedium; # goes to gdrive - large = backupPathsFull; # goes to local storage medium - }; - }; - services = { - acme.enable = true; - gitolite.enable = true; - github-runner.enable = true; - caldav.enable = true; - kop-monitor.enable = true; - kop-fileshare = { - basePath = "/stash"; - dataDir = "/1tbssd/kop-fileshare"; - enable = true; - }; - nginx.enable = true; - ente.enable = true; - kavita = { - enable = true; - dir = "/data/kavita"; - }; - wireguard = { - enable = true; - ip = "192.168.2.1"; - }; - adguard.enable = true; - syncthing = { - enable = true; - basePath = "/data/synced"; - }; - }; - nftables.enable = true; - cli-tools.enable = true; - nix = { - index.enable = true; - ld.enable = true; - settings.enable = true; - }; - }; - - networking.firewall.allowedTCPPorts = [ 25565 25566 ]; - networking.hostName = "mini-pc-proxmox"; # Define your hostname. - - # Set your time zone. - time.timeZone = "Europe/Vienna"; - - # Select internationalisation properties. - i18n.defaultLocale = "en_US.UTF-8"; - - i18n.extraLocaleSettings = { - LC_ADDRESS = "de_AT.UTF-8"; - LC_IDENTIFICATION = "de_AT.UTF-8"; - LC_MEASUREMENT = "de_AT.UTF-8"; - LC_MONETARY = "de_AT.UTF-8"; - LC_NAME = "de_AT.UTF-8"; - LC_NUMERIC = "de_AT.UTF-8"; - LC_PAPER = "de_AT.UTF-8"; - LC_TELEPHONE = "de_AT.UTF-8"; - LC_TIME = "de_AT.UTF-8"; - }; - - # Configure console keymap - console.keyMap = "de"; - - # Allow unfree packages - nixpkgs.config.allowUnfree = true; - - system.stateVersion = "23.11"; # Did you read the comment? -} diff --git a/systems/mini-pc-proxmox/hardware-configuration.nix b/systems/mini-pc-proxmox/hardware-configuration.nix deleted file mode 100644 index 445a884..0000000 --- a/systems/mini-pc-proxmox/hardware-configuration.nix +++ /dev/null @@ -1,19 +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, ... }: - -{ - fileSystems."/data" = - { - device = "/dev/disk/by-uuid/d117419d-fce9-4d52-85c7-e3481feaa22a"; - fsType = "btrfs"; - options = [ "compress=zstd" "noatime" "nofail" ]; - }; - fileSystems."/1tbssd" = - { - device = "/dev/disk/by-uuid/801d9217-9c38-4ca8-914e-e31361603892"; - fsType = "ext4"; - options = [ "defaults" "nofail" "noatime" ]; - }; -} diff --git a/systems/mini-pc/configuration.nix b/systems/mini-pc/configuration.nix deleted file mode 100644 index f3eca82..0000000 --- a/systems/mini-pc/configuration.nix +++ /dev/null @@ -1,121 +0,0 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page -# and in the NixOS manual (accessible by running ‘nixos-help’). - -{ config, pkgs, ... }: - -{ - imports = [ - # Include the results of the hardware scan. - ./hardware-configuration.nix - ../../modules/services/ssh.nix - ../../modules/services/step-ca.nix - ../../modules/services/syncthing.nix - ../../modules/fail2ban.nix - ../../modules/logging.nix - ../../modules/motd.nix - ]; - - networking.firewall.allowedTCPPorts = [ 25565 ]; - - mainUser.layout = "de"; - mainUser.variant = "us"; - custom = { - static-ip = { - enable = true; - ip = "192.168.0.10"; - interface = "enp5s0f0"; - dns = "127.0.0.1"; - }; - user = { - name = "anon"; - layout = "de"; - variant = "us"; - }; - hardware = { - firmware.enable = true; - ssd.enable = true; - }; - misc = { - btrfs.enable = true; - docker.enable = true; - backup = - let - kavita = "/data/kavita"; - gitolite = "/var/lib/gitolite"; - syncthing = [ "/synced/default/" "/synced/work_drive/" ]; - syncthingFull = syncthing ++ [ "/synced/fh/" "/synced/books/" ]; - backupPathsSmall = [ "/home" gitolite ] ++ syncthing; - backupPathsMedium = [ "/home" gitolite ] ++ syncthing; - backupPathsFull = [ "/home" kavita gitolite ] ++ syncthingFull; - in - { - enable = true; - small = backupPathsSmall; # goes to backblaze - medium = backupPathsMedium; # goes to gdrive - large = backupPathsFull; # goes to local storage medium - }; - }; - services = { - acme.enable = true; - gitolite.enable = true; - caldav.enable = true; - kop-monitor.enable = true; - kop-fileshare = { - basePath = "/stash"; - dataDir = "/1tbssd/kop-fileshare"; - enable = true; - }; - nginx.enable = true; - ente.enable = true; - kavita = { - enable = true; - dir = "/data/kavita"; - }; - wireguard = { - enable = true; - ip = "192.168.2.1"; - }; - adguard.enable = true; - }; - nftables.enable = true; - cli-tools.enable = true; - nix = { - index.enable = true; - ld.enable = true; - settings.enable = true; - }; - }; - - # Bootloader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - networking.hostName = "mini-pc"; # Define your hostname. - - # Set your time zone. - time.timeZone = "Europe/Vienna"; - - # Select internationalisation properties. - i18n.defaultLocale = "en_US.UTF-8"; - - i18n.extraLocaleSettings = { - LC_ADDRESS = "de_AT.UTF-8"; - LC_IDENTIFICATION = "de_AT.UTF-8"; - LC_MEASUREMENT = "de_AT.UTF-8"; - LC_MONETARY = "de_AT.UTF-8"; - LC_NAME = "de_AT.UTF-8"; - LC_NUMERIC = "de_AT.UTF-8"; - LC_PAPER = "de_AT.UTF-8"; - LC_TELEPHONE = "de_AT.UTF-8"; - LC_TIME = "de_AT.UTF-8"; - }; - - # Configure console keymap - console.keyMap = "de"; - - # Allow unfree packages - nixpkgs.config.allowUnfree = true; - - system.stateVersion = "23.11"; # Did you read the comment? -} diff --git a/systems/mini-pc/hardware-configuration.nix b/systems/mini-pc/hardware-configuration.nix deleted file mode 100644 index cd60b2c..0000000 --- a/systems/mini-pc/hardware-configuration.nix +++ /dev/null @@ -1,59 +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" "ehci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { - device = "/dev/disk/by-uuid/193dfa08-bf89-4a8b-a159-592c0a0b4d6e"; - fsType = "ext4"; - options = [ - "defaults" - "noatime" - ]; - }; - - fileSystems."/boot" = - { - device = "/dev/disk/by-uuid/EEC1-C78B"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; - - fileSystems."/data" = - { - device = "/dev/disk/by-uuid/d117419d-fce9-4d52-85c7-e3481feaa22a"; - fsType = "btrfs"; - options = [ "compress=zstd" "noatime" "nofail" ]; - }; - fileSystems."/1tbssd" = - { - device = "/dev/disk/by-uuid/801d9217-9c38-4ca8-914e-e31361603892"; - fsType = "ext4"; - options = [ "defaults" "nofail" "noatime" ]; - }; - - swapDevices = - [{ device = "/dev/disk/by-uuid/af6bf3d5-07a4-4139-9464-ffc1c4e23549"; }]; - - # 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..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.eno1.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/systems/proxmox-test-vm/configuration.nix b/systems/proxmox-test-vm/configuration.nix deleted file mode 100644 index a4a10c1..0000000 --- a/systems/proxmox-test-vm/configuration.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ modulesPath, config, lib, pkgs, ... }: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - (modulesPath + "/profiles/qemu-guest.nix") - ./disk-config.nix - ../../modules/services/ssh.nix - ]; - - time.timeZone = "Europe/Vienna"; - custom = { - nftables.enable = true; - nix = { - ld.enable = true; - settings.enable = true; - }; - }; - - users.users.root.openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFeP6qtVqE/gu72ZUZE8cdRi3INiUW9NqDR7SjXIzTw2" - ]; - environment.systemPackages = map lib.lowPrio [ pkgs.curl pkgs.gitMinimal ]; - boot.loader.grub = { - efiSupport = true; - efiInstallAsRemovable = true; - }; - system.stateVersion = "24.05"; -} diff --git a/systems/proxmox-test-vm/disk-config.nix b/systems/proxmox-test-vm/disk-config.nix deleted file mode 100644 index 7b8045b..0000000 --- a/systems/proxmox-test-vm/disk-config.nix +++ /dev/null @@ -1,56 +0,0 @@ -# Example to create a bios compatible gpt partition -{ lib, ... }: -{ - disko.devices = { - disk.disk1 = { - device = lib.mkDefault "/dev/sda"; - type = "disk"; - content = { - type = "gpt"; - partitions = { - boot = { - name = "boot"; - size = "1M"; - type = "EF02"; - }; - esp = { - name = "ESP"; - size = "200M"; - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - }; - }; - root = { - name = "root"; - size = "100%"; - content = { - type = "lvm_pv"; - vg = "pool"; - }; - }; - }; - }; - }; - lvm_vg = { - pool = { - type = "lvm_vg"; - lvs = { - root = { - size = "100%FREE"; - content = { - type = "filesystem"; - format = "ext4"; - mountpoint = "/"; - mountOptions = [ - "defaults" - ]; - }; - }; - }; - }; - }; - }; -} diff --git a/systems/userdata-default.nix b/systems/userdata-default.nix deleted file mode 100644 index ffcd441..0000000 --- a/systems/userdata-default.nix +++ /dev/null @@ -1 +0,0 @@ -{ }