Compare commits
2 commits
b8be3d80a8
...
cff3811cad
Author | SHA1 | Date | |
---|---|---|---|
Bruno BELANYI | cff3811cad | ||
Bruno BELANYI | 8f266245ee |
|
@ -65,13 +65,7 @@ in
|
|||
enable = my.mkDisableOption "Notify when about to lock the screen";
|
||||
|
||||
delay = mkOption {
|
||||
type = with types;
|
||||
addCheck int (x:
|
||||
let
|
||||
cfg = config.my.home.wm.screen-lock.notify;
|
||||
cornerCfg = config.my.home.wm.screen-lock.cornerLock;
|
||||
in
|
||||
(cfg.enable && cornerCfg.enable) -> cornerCfg.delay >= x);
|
||||
type = types.int;
|
||||
default = 5;
|
||||
example = 15;
|
||||
description = ''
|
||||
|
|
|
@ -12,6 +12,22 @@ let
|
|||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion =
|
||||
let
|
||||
inherit (cfg) cornerLock notify;
|
||||
bothEnabled = cornerLock.enable && notify.enable;
|
||||
cornerLockHigherThanNotify = cornerLock.delay >= notify.delay;
|
||||
in
|
||||
bothEnabled -> cornerLockHigherThanNotify;
|
||||
message = ''
|
||||
`config.my.home.wm.notify.delay` cannot have a value higher than
|
||||
`config.my.home.wm.cornerLock.delay`.
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
services.screen-locker = {
|
||||
enable = true;
|
||||
|
||||
|
|
21
modules/system/boot.nix
Normal file
21
modules/system/boot.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.system.boot;
|
||||
in
|
||||
{
|
||||
options.my.system.boot = with lib; {
|
||||
tmp = {
|
||||
clean = mkEnableOption "clean `/tmp` on boot.";
|
||||
|
||||
tmpfs = my.mkDisableOption "mount `/tmp` as a tmpfs on boot.";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
boot = {
|
||||
cleanTmpDir = cfg.tmp.clean;
|
||||
|
||||
tmpOnTmpfs = cfg.tmp.tmpfs;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
./boot.nix
|
||||
./documentation.nix
|
||||
./language.nix
|
||||
./media.nix
|
||||
|
|
Loading…
Reference in a new issue