diff --git a/flake.nix b/flake.nix index 7ef0b7c..fafc5e7 100644 --- a/flake.nix +++ b/flake.nix @@ -22,15 +22,17 @@ ]; }; - # iso = nixpkgs.lib.nixosSystem { - # system = "x86_64-linux"; - # specialArgs = attrs; - # modules = [ - # ./general/configuration.nix - # nix-flatpak.nixosModules.nix-flatpak - # ./specific/iso/configuration.nix - # ]; - # }; + iso = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = attrs; + modules = [ + ./general/configuration.nix + nix-flatpak.nixosModules.nix-flatpak + "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix" + "${nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix" + ./specific/iso/configuration.nix + ]; + }; }; }; } diff --git a/specific/iso/configuration.nix b/specific/iso/configuration.nix new file mode 100644 index 0000000..39d5c9a --- /dev/null +++ b/specific/iso/configuration.nix @@ -0,0 +1,19 @@ +{ pkgs, lib, ... }: +let + calamares-auto-start = pkgs.makeAutostartItem { name = "io.calamares.calamares"; package = pkgs.calamares-nixos; }; +in { + # VMs + services.spice-vdagentd.enable = true; + services.qemuGuest.enable = true; + + # Calamares for graphical installation + environment.systemPackages = with pkgs; [ + libsForQt5.kpmcore + calamares-nixos + calamares-auto-start + calamares-nixos-extensions + ]; + + networking.hostName = "lyes-iso"; + networking.wireless.enable = lib.mkForce false; +} diff --git a/specific/lyes-pc/configuration.nix b/specific/lyes-pc/configuration.nix index 5a2e627..c187619 100644 --- a/specific/lyes-pc/configuration.nix +++ b/specific/lyes-pc/configuration.nix @@ -9,6 +9,60 @@ # boot.kernelPackages = pkgs.linuxPackages_6_1; boot.kernelPackages = pkgs.linuxPackages_latest; + # Boot + boot.loader.systemd-boot.extraEntries = { + "fedora.conf" = '' + title Fedora + efi /EFI/fedora/grubx64.efi + ''; + }; + + # Filesystem + fileSystems = { + "/".options = [ "compress=zstd:1" ]; + "/home".options = [ "compress=zstd:1" ]; + "/nix".options = [ "compress=zstd:1" "noatime" ]; + }; + + # Networking + networking.hostName = "lyes-pc"; + + # NVidia + services.xserver.videoDrivers = [ "nvidia" ]; + + hardware.graphics = { + enable = true; + enable32Bit = true; + }; + + hardware.nvidia = { + # Modesetting is needed for most wayland compositors + modesetting.enable = true; + + # Use the open source version of the kernel module + # Only available on driver 515.43.04+ + open = true; + + # Enable the nvidia settings menu + nvidiaSettings = true; + + # Optionally, you may need to select the appropriate driver version for your specific GPU + # package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta; + + prime = { + offload = { + enable = true; + enableOffloadCmd = true; + }; + + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + }; + + # For containers + hardware.nvidia-container-toolkit.enable = true; + # Optimisation # nixpkgs.hostPlatform = { @@ -77,58 +131,4 @@ # }; # }; # }; - - # Boot - boot.loader.systemd-boot.extraEntries = { - "fedora.conf" = '' - title Fedora - efi /EFI/fedora/grubx64.efi - ''; - }; - - # Filesystem - fileSystems = { - "/".options = [ "compress=zstd:1" ]; - "/home".options = [ "compress=zstd:1" ]; - "/nix".options = [ "compress=zstd:1" "noatime" ]; - }; - - # Networking - networking.hostName = "lyes-pc"; - - # NVidia - services.xserver.videoDrivers = [ "nvidia" ]; - - hardware.graphics = { - enable = true; - enable32Bit = true; - }; - - hardware.nvidia = { - # Modesetting is needed for most wayland compositors - modesetting.enable = true; - - # Use the open source version of the kernel module - # Only available on driver 515.43.04+ - open = true; - - # Enable the nvidia settings menu - nvidiaSettings = true; - - # Optionally, you may need to select the appropriate driver version for your specific GPU - # package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta; - - prime = { - offload = { - enable = true; - enableOffloadCmd = true; - }; - - intelBusId = "PCI:0:2:0"; - nvidiaBusId = "PCI:1:0:0"; - }; - }; - - # For containers - hardware.nvidia-container-toolkit.enable = true; }