Move lockscreen into an option

This commit is contained in:
Andreas Zweili 2023-05-27 17:38:54 +02:00
parent ea5fe2a6f6
commit 241222d043
4 changed files with 27 additions and 12 deletions

View File

@ -2,6 +2,7 @@
{
imports = [
(import ./eog { inherit custom; })
./lockscreen
(import ./makemkv { inherit custom; })
];
}

View File

@ -1,14 +1,21 @@
{ pkgs, ... }:
{ config, lib, pkgs, ... }:
let
cfg = config.programs.lockscreen;
in
{
# enable lockscreen
programs.xss-lock = {
enable = true;
lockerCommand = "${pkgs.i3lock}/bin/i3lock -c 000000";
options = {
programs.lockscreen.enable = lib.mkEnableOption "Lockscreen";
};
environment.systemPackages = with pkgs; [
i3lock
];
config = lib.mkIf cfg.enable {
programs.xss-lock = {
enable = true;
lockerCommand = "${pkgs.i3lock}/bin/i3lock -c 000000";
};
environment.systemPackages = with pkgs; [
i3lock
];
};
}

View File

@ -8,7 +8,6 @@
"${custom.inputs.self}/hardware/nvidia"
"${custom.inputs.self}/hardware/dvd"
(import "${custom.inputs.self}/modules/desktop" { inherit custom; })
"${custom.inputs.self}/modules/lockscreen"
"${custom.inputs.self}/modules/logs-share"
"${custom.inputs.self}/modules/rdp"
(import "${custom.inputs.self}/modules/restic-client-desktop" { inherit custom; })
@ -52,7 +51,11 @@
swapDevices = [
{ device = "/dev/disk/by-label/swap"; }
];
programs.makemkv.enable = true;
programs = {
lockscreen.enable = true;
makemkv.enable = true;
};
virtualisation.virtualbox.host.enable = true;
}

View File

@ -7,7 +7,6 @@
"${custom.inputs.self}/hardware/bluetooth"
(import "${custom.inputs.self}/modules/desktop" { inherit custom; })
(import "${custom.inputs.self}/modules/docker" { inherit custom; })
"${custom.inputs.self}/modules/lockscreen"
(import "${custom.inputs.self}/modules/restic-client-desktop" { inherit custom; })
"${custom.inputs.self}/modules/tlp"
"${custom.inputs.self}/modules/tmux"
@ -43,6 +42,11 @@
{ device = "/dev/disk/by-label/swap"; }
];
programs = {
lockscreen.enable = true;
makemkv.enable = true;
};
virtualisation.virtualbox.host.enable = true;
}