fork/home-manager
git clone https://git.julia.blue/fork/home-manager
e4df31dc
master
1{ config , pkgs , options , lib , ...} : 2 3{ 4config = { 5services . screen-locker = { 6enable = true ; 7inactiveInterval = 5 ; 8lockCmd = " ${ pkgs . i3lock } /bin/i3lock -n -c AA0000" ; 9xssLockExtraOptions = [ "-test" ]; 10xautolockExtraOptions = [ "-test" ]; 11enableDetectSleep = true ; 12}; 13 14test . stubs . i3lock = { }; 15test . stubs . xss-lock = { }; 16 17# Use the same verification script as the basic configuration. The result 18# with the old options should be identical. 19nmt . script = ( import ./basic-configuration.nix { 20inherit config pkgs ; 21}). config . nmt . script ; 22 23test . asserts . warnings . expected = with lib ; 24let 25renamed = { 26xssLockExtraOptions = "xss-lock.extraOptions" ; 27xautolockExtraOptions = "xautolock.extraOptions" ; 28enableDetectSleep = "xautolock.detectSleep" ; 29}; 30in mapAttrsToList ( old :new : 31builtins . replaceStrings [ "\n" ] [ " " ] '' 32The option `services.screen-locker. ${ old } ' defined in 33${ showFiles options . services . screen-locker .${ old }. files } 34has been renamed to `services.screen-locker. ${ new } '.'' ) renamed ; 35}; 36}