Compare commits

...

1 Commits

Author SHA1 Message Date
d341f7280b multisystem init 2024-12-05 20:09:11 +01:00
3 changed files with 69 additions and 53 deletions

View File

@ -30,7 +30,7 @@ in
# "ddcci-driver" # Brightness Controll (even on OLEDS) # "ddcci-driver" # Brightness Controll (even on OLEDS)
# "i2c-dev" # Brightness Controll (even on OLEDS) # "i2c-dev" # Brightness Controll (even on OLEDS)
#]; #];
kernelParams = [ "module_blacklist=i915" "nvidia_drm.modeset=1" ]; #kernelParams = [ "module_blacklist=i915" "nvidia_drm.modeset=1" ];
#kernelPatches = [ { #kernelPatches = [ {
# name = "hdr"; # name = "hdr";
# patch = null; # patch = null;
@ -38,15 +38,21 @@ in
# AMD_PRIVATE_COLOR y # AMD_PRIVATE_COLOR y
# ''; # '';
# } ]; # } ];
extraModprobeConfig = '' #extraModprobeConfig = ''
options nvidia_drm modes.et=1 fbdev=1 # options nvidia_drm modes.et=1 fbdev=1
options nvidia NVreg_PreserveVideoMemoryAllocations=1 # options nvidia NVreg_PreserveVideoMemoryAllocations=1
''; #'';
loader = { loader = {
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
systemd-boot = { efi.efiSysMountPoint = "/boot";
consoleMode = "max"; #systemd-boot = {
memtest86.enable = true; # consoleMode = "max";
# memtest86.enable = true;
#};
grub = {
enable = true;
efiSupport = true;
device = "nodev";
}; };
}; };
initrd.systemd.enable = true; initrd.systemd.enable = true;
@ -55,11 +61,11 @@ in
# Filesystems # Filesystems
fileSystems = fileSystems =
{ {
"/share" = { #"/share" = {
options = [ # options = [
"nofail" # "nofail"
]; # ];
}; #};
}; };
# Graphics # Graphics
@ -67,19 +73,26 @@ in
graphics = { graphics = {
enable = true; enable = true;
enable32Bit = true; enable32Bit = true;
extraPackages = with pkgs; [
vpl-gpu-rt # newer gpus
intel-media-sdk # older gpus
];
}; };
nvidia = { bluetooth.enable = true;
modesetting.enable = true; # required #nvidia = {
powerManagement.enable = false; # Experimental # modesetting.enable = true; # required
open = false; # Support limited to Turing and later: https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus # powerManagement.enable = false; # Experimental
nvidiaSettings = true; # accessible via nvidia-settings # open = false; # Support limited to Turing and later: https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
package = config.boot.kernelPackages.nvidiaPackages.stable; # nvidiaSettings = true; # accessible via nvidia-settings
}; # package = config.boot.kernelPackages.nvidiaPackages.stable;
#};
}; };
networking = networking =
{ {
hostName = "Zuse1"; # Define your hostname. hostName = "Zuse2"; # Define your hostname
networkmanager.enable = true;
wireless.userControlled.enable = true;
#nameservers = [ #nameservers = [
# "127.0.0.1" # "127.0.0.1"
# "::1" # "::1"
@ -117,13 +130,13 @@ networking =
services.xserver = { services.xserver = {
enable = true; enable = true;
videoDrivers = [ "nvidia" ]; #videoDrivers = [ "nvidia" ];
excludePackages = with pkgs; [ excludePackages = with pkgs; [
xterm # why the fuck is this garbage even shipped? xterm # why the fuck is this garbage even shipped?
]; ];
# Configure keymap in X11 # Configure keymap in X11
xkb.layout = "us"; xkb.layout = "de";
xkb.options = "eurosign:e,caps:escape"; xkb.options = "eurosign:e,caps:escape";
# DWM (minimal Xorg Fallback) # DWM (minimal Xorg Fallback)
@ -159,6 +172,9 @@ services.gnome.gnome-keyring.enable = true;
security.pam.services.sddm.enableGnomeKeyring = true; security.pam.services.sddm.enableGnomeKeyring = true;
security.pam.services.hyprlock.enableGnomeKeyring = true; security.pam.services.hyprlock.enableGnomeKeyring = true;
# Bluetooth managment
services.blueman.enable = true;
# Enable CUPS to print documents. # Enable CUPS to print documents.
services.printing.enable = true; services.printing.enable = true;
@ -211,6 +227,7 @@ security.krb5 = {
# Enable touchpad support (enabled default in most desktopManager). # Enable touchpad support (enabled default in most desktopManager).
# services.libinput.enable = true; # services.libinput.enable = true;
# /share # /share
users.groups.share = {}; users.groups.share = {};
@ -247,6 +264,13 @@ systemd.tmpfiles.rules = [
shell = pkgs.zsh; shell = pkgs.zsh;
}; };
users.users.kiosk = {
isNormalUser = true;
home = "/var/kiosk";
homeMode = "700";
extraGroups = ["audio"];
};
# Font Config # Font Config
fonts = { fonts = {
enableDefaultPackages = true; enableDefaultPackages = true;
@ -315,6 +339,7 @@ environment.etc.crypttab = {
#backgroundbin = "$XDG_PICTURES_DIR/Wallpapers/current"; #backgroundbin = "$XDG_PICTURES_DIR/Wallpapers/current";
loginBackground = true; loginBackground = true;
}) })
networkmanagerapplet # Network Manager GUI
]; ];
programs = { programs = {
@ -358,7 +383,9 @@ programs.gnupg.agent = {
enableSSHSupport = true; enableSSHSupport = true;
}; };
security.polkit.extraConfig = '' security.polkit = {
enable = true;
extraConfig = ''
polkit.addRule(function(action, subject) { polkit.addRule(function(action, subject) {
if ( if (
subject.isInGroup("users") subject.isInGroup("users")
@ -374,22 +401,6 @@ security.polkit.extraConfig = ''
} }
}) })
''; '';
systemd.user.services =
{
polkit-gnome-authentication-agent-1 = {
description = "polkit-gnome-authentication-agent-1";
wantedBy = [ "graphical-session.target" ];
wants = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
}; };
system.userActivationScripts.linktosharedfolder.text = '' system.userActivationScripts.linktosharedfolder.text = ''

View File

@ -38,6 +38,12 @@
}) })
]; ];
}; };
Zuse2 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
];
};
}; };
}; };
} }

View File

@ -8,33 +8,30 @@
[ (modulesPath + "/installer/scan/not-detected.nix") [ (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sr_mod" ]; boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/2ba31f86-69eb-448c-a224-7bb228803f95"; { device = "/dev/disk/by-uuid/445ce2b5-db78-48b5-bde7-1aa3057bafae";
fsType = "btrfs"; fsType = "btrfs";
}; };
boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/b9457757-75bc-494e-adaa-87d772b93cbd"; fileSystems."/var/lib/docker/btrfs" =
{ device = "/var/lib/docker/btrfs";
fsType = "none";
options = [ "bind" ];
};
fileSystems."/boot" = fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/12CE-A600"; { device = "/dev/disk/by-uuid/3139-13CA";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ]; options = [ "fmask=0022" "dmask=0022" ];
}; };
fileSystems."/share" =
{ device = "/dev/disk/by-uuid/61d599a8-170a-4e97-abb3-cd0cb32edac2";
fsType = "btrfs";
};
boot.initrd.luks.devices."share".device = "/dev/disk/by-uuid/87aa812d-b5dd-44b7-bb4d-303d6ac7c11a";
swapDevices = swapDevices =
[ { device = "/dev/disk/by-uuid/a07a0f5b-012b-4b37-b052-8e2da8615413"; } [ { device = "/dev/disk/by-uuid/4fc7c055-f053-4bfa-a609-58ad9444450f"; }
]; ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
@ -42,7 +39,9 @@
# still possible to use this option, but it's recommended to use it in conjunction # still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
# networking.interfaces.docker0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;