Revert "swaylock: warn on implicit enable default"

This reverts commit 45e3b622b1.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
Austin Horstman
2026-03-23 08:30:11 -05:00
parent c6fe2944ad
commit b02a36dc79
3 changed files with 5 additions and 30 deletions

View File

@@ -13,24 +13,11 @@ in
options.programs.swaylock = {
enable = lib.mkOption {
type = lib.types.bool;
inherit
(lib.hm.deprecations.mkStateVersionOptionDefault {
inherit (config.home) stateVersion;
since = "23.05";
optionPath = [
"programs"
"swaylock"
"enable"
];
legacy = {
value = cfg.settings != { };
text = "config.programs.swaylock.settings != { }";
};
current.value = false;
})
default
defaultText
;
default = lib.versionOlder config.home.stateVersion "23.05" && (cfg.settings != { });
defaultText = lib.literalExpression ''
true if state version < 23.05 and settings { },
false otherwise
'';
example = true;
description = ''
Whether to enable swaylock.

View File

@@ -1,11 +0,0 @@
{
home.stateVersion = "23.05";
programs.swaylock.settings = {
color = "808080";
};
nmt.script = ''
assertPathNotExists home-files/.config/swaylock/config
'';
}

View File

@@ -1,6 +1,5 @@
{ lib, pkgs, ... }:
lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
swaylock-current-default-disabled = import ./current-default-disabled.nix;
swaylock-disabled = import ./disabled.nix;
swaylock-settings = import ./settings.nix;
swaylock-enabled = import ./enabled.nix;