feat: polkit rules for rebooting & poweroff etc., ly -> lemurs ; fix: seat{,d}
This commit is contained in:
@@ -62,6 +62,22 @@
|
|||||||
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
|
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 = {
|
home-manager = {
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
@@ -83,10 +99,9 @@
|
|||||||
|
|
||||||
services.gnome.glib-networking.enable = true;
|
services.gnome.glib-networking.enable = true;
|
||||||
|
|
||||||
#services.desktopManager.plasma6.enable = true;
|
services.displayManager.lemurs = {
|
||||||
|
|
||||||
services.displayManager.ly = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
|
settings.environment_switcher.include_tty_shell = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.steam = {
|
programs.steam = {
|
||||||
@@ -109,7 +124,7 @@
|
|||||||
wlr = {
|
wlr = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.screencast = {
|
settings.screencast = {
|
||||||
max_fps = 60;
|
max_fps = 180;
|
||||||
chooser_type = "simple";
|
chooser_type = "simple";
|
||||||
chooser_cmd = "${pkgs.slurp}/bin/slurp -f 'Monitor: %o' -or";
|
chooser_cmd = "${pkgs.slurp}/bin/slurp -f 'Monitor: %o' -or";
|
||||||
};
|
};
|
||||||
@@ -143,6 +158,7 @@
|
|||||||
extraGroups = [
|
extraGroups = [
|
||||||
"networkmanager"
|
"networkmanager"
|
||||||
"wheel"
|
"wheel"
|
||||||
|
"seat"
|
||||||
];
|
];
|
||||||
packages = [ ];
|
packages = [ ];
|
||||||
shell = pkgs.tcsh;
|
shell = pkgs.tcsh;
|
||||||
@@ -154,13 +170,6 @@
|
|||||||
"flakes"
|
"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" = {
|
environment.etc."csh.cshrc" = {
|
||||||
enable = true;
|
enable = true;
|
||||||
text =
|
text =
|
||||||
@@ -243,7 +252,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
|
|
||||||
EDITOR = "nvim";
|
EDITOR = "nvim";
|
||||||
SUDO_EDITOR = "nvim";
|
SUDO_EDITOR = "nvim";
|
||||||
BROWSER = "zen";
|
BROWSER = "zen";
|
||||||
@@ -251,6 +259,7 @@
|
|||||||
TERM = "foot";
|
TERM = "foot";
|
||||||
|
|
||||||
XDG_CURRENT_DESKTOP = "river";
|
XDG_CURRENT_DESKTOP = "river";
|
||||||
|
LIBSEAT_BACKEND = "seatd";
|
||||||
};
|
};
|
||||||
|
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05";
|
||||||
|
|||||||
@@ -14,26 +14,18 @@
|
|||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "/dev/disk/by-uuid/90aaba2e-42f2-4b98-8df6-bd4a72f6d688";
|
{ device = "/dev/disk/by-label/NIXROOT";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" =
|
||||||
{ device = "/dev/disk/by-uuid/F8E0-7E32";
|
{ device = "/dev/disk/by-label/NIXBOOT";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = [ "fmask=0077" "dmask=0077" ];
|
options = [ "fmask=0077" "dmask=0077" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
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";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user