Adding an iso configuration

This commit is contained in:
Lyes Saadi 2024-07-07 13:23:54 +02:00
parent 33782949ce
commit 35af3efeff
No known key found for this signature in database
GPG key ID: 17418538BAA17767
3 changed files with 84 additions and 63 deletions

View file

@ -22,15 +22,17 @@
]; ];
}; };
# iso = nixpkgs.lib.nixosSystem { iso = nixpkgs.lib.nixosSystem {
# system = "x86_64-linux"; system = "x86_64-linux";
# specialArgs = attrs; specialArgs = attrs;
# modules = [ modules = [
# ./general/configuration.nix ./general/configuration.nix
# nix-flatpak.nixosModules.nix-flatpak nix-flatpak.nixosModules.nix-flatpak
# ./specific/iso/configuration.nix "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
# ]; "${nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix"
# }; ./specific/iso/configuration.nix
];
};
}; };
}; };
} }

View file

@ -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;
}

View file

@ -9,6 +9,60 @@
# boot.kernelPackages = pkgs.linuxPackages_6_1; # boot.kernelPackages = pkgs.linuxPackages_6_1;
boot.kernelPackages = pkgs.linuxPackages_latest; 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 # Optimisation
# nixpkgs.hostPlatform = { # 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;
} }