use doas, get steam to work

This commit is contained in:
Christoph Cullmann 2024-10-05 18:25:08 +02:00
parent 9176534664
commit 36e8e08e2f
No known key found for this signature in database
2 changed files with 24 additions and 14 deletions

View file

@ -376,6 +376,7 @@ in
vscodium
vulkan-tools
wayland-utils
xorg.xhost
xorg.xlsclients
zoxide
zsh
@ -489,8 +490,11 @@ in
};
};
# OpenGL
hardware.graphics.enable = true;
# OpenGL, 32-bit for steam
hardware.graphics = {
enable = true;
enable32Bit = true;
};
# try to ensure we can use our network LaserJet
services.printing.enable = true;
@ -560,9 +564,15 @@ in
virtualisation.virtualbox.host.enableHardening = false;
virtualisation.virtualbox.host.addNetworkInterface = false;
# configure sudo
security.sudo.execWheelOnly = true;
security.sudo.extraConfig = ''
Defaults lecture = never
'';
# use doas instead of sudo
security.sudo.enable = false;
security.doas.enable = true;
security.doas.extraRules = [
# wheel users are allowed to become all users
{ groups = [ "wheel" ]; noPass = false; keepEnv = true; persist = true; }
# wheel users can use sandbox stuff without password
{ groups = [ "wheel" ]; runAs = "sandbox-games"; noPass = true; }
{ groups = [ "wheel" ]; runAs = "sandbox-kde"; noPass = true; }
];
}

View file

@ -31,13 +31,13 @@
# aliases
shellAliases = {
# system build/update/cleanup
update = "sudo nixos-rebuild boot";
upgrade = "sudo nixos-rebuild boot --upgrade";
updatenow = "sudo nixos-rebuild switch";
upgradenow = "sudo nixos-rebuild switch --upgrade";
gc = "sudo nix-collect-garbage --delete-older-than 7d";
verify = "sudo nix --extra-experimental-features nix-command store verify --all";
optimize = "sudo nix --extra-experimental-features nix-command store optimise";
update = "doas nixos-rebuild boot";
upgrade = "doas nixos-rebuild boot --upgrade";
updatenow = "doas nixos-rebuild switch";
upgradenow = "doas nixos-rebuild switch --upgrade";
gc = "doas nix-collect-garbage --delete-older-than 7d";
verify = "doas nix --extra-experimental-features nix-command store verify --all";
optimize = "doas nix --extra-experimental-features nix-command store optimise";
# list latest files last
ltr = "eza -l -s modified";