feat: polkit rules for rebooting & poweroff etc., ly -> lemurs ; fix: seat{,d}

This commit is contained in:
2026-05-23 18:08:57 -04:00
parent a478599e84
commit 75ca3f5002
2 changed files with 23 additions and 22 deletions
+21 -12
View File
@@ -62,6 +62,22 @@
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
'';
security.polkit = {
enable = true;
extraConfig = ''
// https://github.com/frasertajima/tailscale_shortcuts/blob/0d1f3992890114c5ea6dfb972fcc782325681e3d/V2_CAUTION/reboot_polkit.md?plain=1#L33
polkit.addRule(function(action, subject) {
if (subject.isInGroup("wheel") &&
(action.id == "org.freedesktop.login1.reboot" ||
action.id == "org.freedesktop.login1.suspend" ||
action.id == "org.freedesktop.login1.poweroff" ||
action.id == "org.freedesktop.login1.shutdown")) {
return polkit.Result.YES;
}
});
'';
};
home-manager = {
extraSpecialArgs = {
inherit inputs;
@@ -83,10 +99,9 @@
services.gnome.glib-networking.enable = true;
#services.desktopManager.plasma6.enable = true;
services.displayManager.ly = {
services.displayManager.lemurs = {
enable = true;
settings.environment_switcher.include_tty_shell = true;
};
programs.steam = {
@@ -109,7 +124,7 @@
wlr = {
enable = true;
settings.screencast = {
max_fps = 60;
max_fps = 180;
chooser_type = "simple";
chooser_cmd = "${pkgs.slurp}/bin/slurp -f 'Monitor: %o' -or";
};
@@ -143,6 +158,7 @@
extraGroups = [
"networkmanager"
"wheel"
"seat"
];
packages = [ ];
shell = pkgs.tcsh;
@@ -154,13 +170,6 @@
"flakes"
];
# environment.etc."csh.cshrc" = {
# enable = true;
# text = lib.concatStringsSep "\n" (
# lib.mapAttrsToList (name: value: "set ${name} = ${value}") config.environment.sessionVariables
# );
# };
environment.etc."csh.cshrc" = {
enable = true;
text =
@@ -243,7 +252,6 @@
};
environment.sessionVariables = {
EDITOR = "nvim";
SUDO_EDITOR = "nvim";
BROWSER = "zen";
@@ -251,6 +259,7 @@
TERM = "foot";
XDG_CURRENT_DESKTOP = "river";
LIBSEAT_BACKEND = "seatd";
};
system.stateVersion = "24.05";
+2 -10
View File
@@ -14,26 +14,18 @@
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/90aaba2e-42f2-4b98-8df6-bd4a72f6d688";
{ device = "/dev/disk/by-label/NIXROOT";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/F8E0-7E32";
{ device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# 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`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp10s0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp18s0f4u1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}