Adding an iso configuration
This commit is contained in:
parent
33782949ce
commit
35af3efeff
3 changed files with 84 additions and 63 deletions
20
flake.nix
20
flake.nix
|
|
@ -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
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
19
specific/iso/configuration.nix
Normal file
19
specific/iso/configuration.nix
Normal 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;
|
||||||
|
}
|
||||||
|
|
@ -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;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue