Merge master into staging-next
This commit is contained in:
@@ -29,11 +29,20 @@ with lib;
|
||||
security.apparmor.enable = mkDefault true;
|
||||
|
||||
boot.kernelParams = [
|
||||
# Slab/slub sanity checks, redzoning, and poisoning
|
||||
"slub_debug=FZP"
|
||||
|
||||
# Disable slab merging to make certain heap overflow attacks harder
|
||||
"slab_nomerge"
|
||||
|
||||
# Overwrite free'd memory
|
||||
"page_poison=1"
|
||||
|
||||
# Disable legacy virtual syscalls
|
||||
"vsyscall=none"
|
||||
|
||||
# Enable PTI even if CPU claims to be safe from meltdown
|
||||
"pti=on"
|
||||
];
|
||||
|
||||
boot.blacklistedKernelModules = [
|
||||
|
||||
@@ -9,7 +9,8 @@ in
|
||||
options.programs.xss-lock = {
|
||||
enable = mkEnableOption "xss-lock";
|
||||
lockerCommand = mkOption {
|
||||
example = "xlock";
|
||||
default = "${pkgs.i3lock}/bin/i3lock";
|
||||
example = literalExample ''''${pkgs.i3lock-fancy}/bin/i3lock-fancy'';
|
||||
type = types.string;
|
||||
description = "Locker to be used with xsslock";
|
||||
};
|
||||
|
||||
@@ -32,7 +32,6 @@ in {
|
||||
default = [];
|
||||
description = "Extra arguments to lircd.";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
@@ -43,14 +42,15 @@ in {
|
||||
# Note: LIRC executables raises a warning, if lirc_options.conf do not exists
|
||||
environment.etc."lirc/lirc_options.conf".text = cfg.options;
|
||||
|
||||
passthru.lirc.socket = "/run/lirc/lircd";
|
||||
|
||||
environment.systemPackages = [ pkgs.lirc ];
|
||||
|
||||
systemd.sockets.lircd = {
|
||||
description = "LIRC daemon socket";
|
||||
wantedBy = [ "sockets.target" ];
|
||||
socketConfig = {
|
||||
# default search path
|
||||
ListenStream = "/run/lirc/lircd";
|
||||
ListenStream = config.passthru.lirc.socket;
|
||||
SocketUser = "lirc";
|
||||
SocketMode = "0660";
|
||||
};
|
||||
|
||||
@@ -33,12 +33,14 @@ in {
|
||||
default = [];
|
||||
description = "Additional command line arguments to pass to VDR.";
|
||||
};
|
||||
|
||||
enableLirc = mkEnableOption "enable LIRC";
|
||||
};
|
||||
};
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
config = mkIf cfg.enable (mkMerge [{
|
||||
systemd.tmpfiles.rules = [
|
||||
"d ${cfg.videoDir} 0755 vdr vdr -"
|
||||
"Z ${cfg.videoDir} - vdr vdr -"
|
||||
@@ -67,5 +69,13 @@ in {
|
||||
};
|
||||
|
||||
users.groups.vdr = {};
|
||||
};
|
||||
}
|
||||
|
||||
(mkIf cfg.enableLirc {
|
||||
services.lirc.enable = true;
|
||||
users.users.vdr.extraGroups = [ "lirc" ];
|
||||
services.vdr.extraArguments = [
|
||||
"--lirc=${config.passthru.lirc.socket}"
|
||||
];
|
||||
})]);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ with lib;
|
||||
machine = {
|
||||
imports = [ ./common/x11.nix ./common/user-account.nix ];
|
||||
programs.xss-lock.enable = true;
|
||||
programs.xss-lock.lockerCommand = "${pkgs.xlockmore}/bin/xlock";
|
||||
services.xserver.displayManager.auto.user = "alice";
|
||||
};
|
||||
|
||||
@@ -20,6 +19,6 @@ with lib;
|
||||
|
||||
$machine->fail("pgrep xlock");
|
||||
$machine->succeed("su -l alice -c 'xset dpms force standby'");
|
||||
$machine->waitUntilSucceeds("pgrep xlock");
|
||||
$machine->waitUntilSucceeds("pgrep i3lock");
|
||||
'';
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user