From 14accceb02b1c59281b1d1e9726bacc39a118074 Mon Sep 17 00:00:00 2001 From: beatzaplenty Date: Sun, 19 Jul 2026 06:27:22 +1000 Subject: [PATCH] updated to efi boot and resolved module paths --- configuration.nix | 123 ------------------------------ flake.nix | 16 +--- hardware-configuration.nix | 39 ---------- hosts/docker/configuration.nix | 2 + hosts/nix-cache/configuration.nix | 2 + hosts/nixos/configuration.nix | 6 +- hosts/nixos/home.nix | 2 +- hosts/pxe-boot/configuration.nix | 5 +- hosts/server/configuration.nix | 2 + modules/common/configuration.nix | 2 +- 10 files changed, 19 insertions(+), 180 deletions(-) delete mode 100644 configuration.nix delete mode 100644 hardware-configuration.nix diff --git a/configuration.nix b/configuration.nix deleted file mode 100644 index e937c0b..0000000 --- a/configuration.nix +++ /dev/null @@ -1,123 +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, on -# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). - -{ config, lib, pkgs, ... }: - -{ - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ]; - - # Use the systemd-boot EFI boot loader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - # networking.hostName = "nixos"; # Define your hostname. - # Pick only one of the below networking options. - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - # networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. - - # Set your time zone. - # time.timeZone = "Europe/Amsterdam"; - - # 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 = { - # font = "Lat2-Terminus16"; - # keyMap = "us"; - # useXkbConfig = true; # use xkb.options in tty. - # }; - - # Enable the X11 windowing system. - # services.xserver.enable = true; - - - - - # Configure keymap in X11 - # services.xserver.xkb.layout = "us"; - # services.xserver.xkb.options = "eurosign:e,caps:escape"; - - # Enable CUPS to print documents. - # services.printing.enable = true; - - # Enable sound. - # services.pulseaudio.enable = true; - # OR - # services.pipewire = { - # enable = true; - # pulse.enable = true; - # }; - - # Enable touchpad support (enabled default in most desktopManager). - # services.libinput.enable = true; - - # Define a user account. Don't forget to set a password with ‘passwd’. - # users.users.alice = { - # isNormalUser = true; - # extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. - # packages = with pkgs; [ - # tree - # ]; - # }; - - # programs.firefox.enable = true; - - # List packages installed in system profile. - # You can use https://search.nixos.org/ to find more packages (and options). - # environment.systemPackages = with pkgs; [ - # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. - # wget - # ]; - - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - # programs.mtr.enable = true; - # programs.gnupg.agent = { - # enable = true; - # enableSSHSupport = true; - # }; - - # List services that you want to enable: - - # Enable the OpenSSH daemon. - # services.openssh.enable = true; - - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - # networking.firewall.enable = false; - - # Copy the NixOS configuration file and link it from the resulting system - # (/run/current-system/configuration.nix). This is useful in case you - # accidentally delete configuration.nix. - # system.copySystemConfiguration = true; - - # This option defines the first version of NixOS you have installed on this particular machine, - # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. - # - # Most users should NEVER change this value after the initial install, for any reason, - # even if you've upgraded your system to a new NixOS release. - # - # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, - # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how - # to actually do that. - # - # This value being lower than the current NixOS release does NOT mean your system is - # out of date, out of support, or vulnerable. - # - # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, - # and migrated your data accordingly. - # - # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . - system.stateVersion = "25.05"; # Did you read the comment? - -} - diff --git a/flake.nix b/flake.nix index d193ff1..1d47bc0 100644 --- a/flake.nix +++ b/flake.nix @@ -32,6 +32,7 @@ nixos = nixpkgs.lib.nixosSystem { inherit system; modules = [ + inputs.disko.nixosModules.disko ./hosts/nixos/configuration.nix ./modules/hardware-configuration/vm/proxmox.nix @@ -61,6 +62,7 @@ docker = nixpkgs.lib.nixosSystem { }; modules = [ + inputs.disko.nixosModules.disko ./hosts/docker/configuration.nix ./modules/hardware-configuration/vm/proxmox.nix @@ -71,23 +73,12 @@ docker = nixpkgs.lib.nixosSystem { } ]; }; - kuma = nixpkgs.lib.nixosSystem { - inherit system; - modules = [ - ./hosts/kuma/configuration.nix - ./modules/hardware-configuration/vm/proxmox.nix - home-manager.nixosModules.home-manager { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.nixos = import ./modules/common/home.nix; - } - ]; - }; server = nixpkgs.lib.nixosSystem { inherit system; modules = [ + inputs.disko.nixosModules.disko ./hosts/server/configuration.nix ./modules/hardware-configuration/vm/proxmox.nix @@ -102,6 +93,7 @@ docker = nixpkgs.lib.nixosSystem { nix-cache = nixpkgs.lib.nixosSystem { inherit system; modules = [ + inputs.disko.nixosModules.disko ./hosts/nix-cache/configuration.nix ./modules/hardware-configuration/vm/proxmox.nix diff --git a/hardware-configuration.nix b/hardware-configuration.nix deleted file mode 100644 index b597358..0000000 --- a/hardware-configuration.nix +++ /dev/null @@ -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 + "/profiles/qemu-guest.nix") - ]; - - boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/5d2613a6-7f60-43e4-8d13-05c5c4bab09d"; - fsType = "ext4"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/A28A-9C15"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/4e3ccb67-cf77-4dc8-872c-6fc57869fb8b"; } - ]; - - # 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.ens18.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; -} diff --git a/hosts/docker/configuration.nix b/hosts/docker/configuration.nix index 9ef6ffa..01161b6 100644 --- a/hosts/docker/configuration.nix +++ b/hosts/docker/configuration.nix @@ -18,6 +18,8 @@ ../../modules/services/nextcloud-cron-job.nix ../../modules/services/docker-health-to-gotify.nix ../../modules/services/enable-rpcbind.nix + ../../modules/disko/proxmox.nix + ../../modules/boot/efi.nix ]; diff --git a/hosts/nix-cache/configuration.nix b/hosts/nix-cache/configuration.nix index 9eb0a0f..d4fa1c7 100644 --- a/hosts/nix-cache/configuration.nix +++ b/hosts/nix-cache/configuration.nix @@ -10,6 +10,8 @@ ../../modules/common/configuration.nix ../../modules/nix-cache/server.nix ../../modules/beszel/enable-agent.nix + ../../modules/disko/proxmox.nix + ../../modules/boot/efi.nix ]; networking.hostName = "nix-cache"; # Define your hostname. diff --git a/hosts/nixos/configuration.nix b/hosts/nixos/configuration.nix index a14661a..c81cb5e 100644 --- a/hosts/nixos/configuration.nix +++ b/hosts/nixos/configuration.nix @@ -28,8 +28,10 @@ in { imports = [ # Include the results of the hardware scan. ../../modules/common/configuration.nix - ../../modules/nix/cache-client.nix - ../../modules/nix/remote-builder-client.nix + ../../modules/nix-cache/client.nix + ../../modules/remote-builder-client.nix + ../../modules/disko/proxmox.nix + ../../modules/boot/efi.nix ]; # Bootloader. diff --git a/hosts/nixos/home.nix b/hosts/nixos/home.nix index 00a9a73..3569aa1 100644 --- a/hosts/nixos/home.nix +++ b/hosts/nixos/home.nix @@ -3,7 +3,7 @@ { imports = [ - ../../common/aliases.nix + ../../modules/common/aliases.nix ]; home.username = "nixos"; # your actual username diff --git a/hosts/pxe-boot/configuration.nix b/hosts/pxe-boot/configuration.nix index b307b46..2f7f6cd 100644 --- a/hosts/pxe-boot/configuration.nix +++ b/hosts/pxe-boot/configuration.nix @@ -94,9 +94,10 @@ in imports = [ ../../modules/common/configuration.nix - ../../modules/nix/cache-client.nix - ../../modules/nix/remote-builder-client.nix + ../../modules/nix-cache/client.nix + ../../modules/remote-builder-client.nix ../../modules/disko/proxmox.nix + ../../modules/boot/efi.nix ]; networking.hostName = "pxe-boot"; diff --git a/hosts/server/configuration.nix b/hosts/server/configuration.nix index 0c0b6fa..d4befad 100644 --- a/hosts/server/configuration.nix +++ b/hosts/server/configuration.nix @@ -13,6 +13,8 @@ ../../modules/services/enable-rpcbind.nix ../../modules/services/zfs/enable-service.nix # ../../modules/services/zfs/auto-mount-volumes.nix + ../../modules/disko/proxmox.nix + ../../modules/boot/efi.nix ]; diff --git a/modules/common/configuration.nix b/modules/common/configuration.nix index 60ac48d..c5f0036 100644 --- a/modules/common/configuration.nix +++ b/modules/common/configuration.nix @@ -7,7 +7,7 @@ ../set-locale.nix ]; # Use the GRUB 2 boot loader. - boot.loader.grub.enable = true; + # boot.loader.grub.enable = true; #boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.