2023-06-11 23:09:59 +02:00
|
|
|
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: LGPL-3.0-or-later
|
2023-06-18 20:07:47 +02:00
|
|
|
{ inputs, lib', config, ... }:
|
2023-06-11 23:09:59 +02:00
|
|
|
let
|
2023-06-18 20:07:47 +02:00
|
|
|
inherit (lib')
|
2023-06-11 23:09:59 +02:00
|
|
|
flip
|
|
|
|
mapAttrs
|
|
|
|
singleton;
|
|
|
|
|
|
|
|
config' = config;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
flake.nixosConfigurations.liveusb = inputs.nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
2023-06-18 20:07:47 +02:00
|
|
|
lib = lib';
|
2023-06-11 23:09:59 +02:00
|
|
|
|
|
|
|
specialArgs = {
|
|
|
|
config' = config';
|
|
|
|
inputs' = inputs;
|
2023-06-18 20:07:47 +02:00
|
|
|
secret = lib'.loadSecrets inputs.secrets;
|
2023-06-11 23:09:59 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
modules = singleton
|
|
|
|
({ pkgs, config, ... }:
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
"${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-base.nix"
|
|
|
|
../../common/nixpkgs.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
isoImage.edition = "xfce";
|
|
|
|
|
|
|
|
services.xserver.videoDrivers = [ "nvidia" ];
|
|
|
|
|
|
|
|
boot.supportedFilesystems = singleton "zfs";
|
|
|
|
|
|
|
|
boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_1;
|
|
|
|
boot.kernelParams = [
|
|
|
|
"nvidia.NVreg_EnableS0ixPowerManagement=1"
|
|
|
|
"nvidia.NVreg_S0ixPowerManagementVideoMemoryThreshold=2048"
|
|
|
|
];
|
|
|
|
|
|
|
|
hardware.nvidia = {
|
|
|
|
powerManagement.enable = true;
|
|
|
|
package = config.boot.kernelPackages.nvidia_x11_beta;
|
|
|
|
};
|
|
|
|
|
|
|
|
services.xserver = {
|
|
|
|
desktopManager = {
|
|
|
|
xterm.enable = false;
|
|
|
|
xfce.enable = true;
|
|
|
|
};
|
|
|
|
displayManager.defaultSession = "xfce";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
|
|
|
}
|