mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 21:19:45 +01:00
numlock: add test
- Add evanjs to CODEOWNERS for numlock and numlock test - Add evanjs to maintainers for numlock module
This commit is contained in:
parent
b3498cccb3
commit
9b1b55ba02
5 changed files with 25 additions and 0 deletions
3
.github/CODEOWNERS
vendored
3
.github/CODEOWNERS
vendored
|
@ -13,6 +13,9 @@
|
|||
|
||||
/modules/misc/news.nix @rycee
|
||||
|
||||
/modules/misc/numlock.nix @evanjs
|
||||
/tests/modules/misc/numlock @evanjs
|
||||
|
||||
/modules/misc/pam.nix @rycee
|
||||
/tests/modules/misc/pam @rycee
|
||||
|
||||
|
|
|
@ -7,6 +7,8 @@ let
|
|||
cfg = config.xsession.numlock;
|
||||
|
||||
in {
|
||||
meta.maintainers = [ maintainers.evanjs ];
|
||||
|
||||
options = { xsession.numlock.enable = mkEnableOption "Num Lock"; };
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
|
|
@ -75,6 +75,7 @@ import nmt {
|
|||
] ++ lib.optionals pkgs.stdenv.hostPlatform.isLinux [
|
||||
./meta # Suffices to run on one platform.
|
||||
./modules/misc/debug
|
||||
./modules/misc/numlock
|
||||
./modules/misc/pam
|
||||
./modules/misc/xdg
|
||||
./modules/misc/xsession
|
||||
|
|
1
tests/modules/misc/numlock/default.nix
Normal file
1
tests/modules/misc/numlock/default.nix
Normal file
|
@ -0,0 +1 @@
|
|||
{ numlock = ./numlock.nix; }
|
18
tests/modules/misc/numlock/numlock.nix
Normal file
18
tests/modules/misc/numlock/numlock.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
xsession.numlock.enable = true;
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(self: super: { numlockx = pkgs.writeScriptBin "dummy-numlockx" ""; })
|
||||
];
|
||||
|
||||
nmt.script = ''
|
||||
serviceFile=home-files/.config/systemd/user/numlockx.service
|
||||
assertFileExists $serviceFile
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue