mirror of
https://github.com/nix-community/home-manager
synced 2024-12-24 18:59:47 +01:00
safeeyes: add module
This adds a basic module for Safe Eyes based off of the one in Nixpkgs.
This commit is contained in:
parent
3eaadd82b8
commit
9b91709899
4 changed files with 55 additions and 0 deletions
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
|
@ -448,6 +448,8 @@ Makefile @thiagokokada
|
||||||
/modules/services/redshift-gammastep @rycee @petabyteboy @thiagokokada
|
/modules/services/redshift-gammastep @rycee @petabyteboy @thiagokokada
|
||||||
/tests/modules/redshift-gammastep @thiagokokada
|
/tests/modules/redshift-gammastep @thiagokokada
|
||||||
|
|
||||||
|
/modules/services/safeeyes @Rosuavio
|
||||||
|
|
||||||
/modules/services/screen-locker.nix @jrobsonchase @rszamszur
|
/modules/services/screen-locker.nix @jrobsonchase @rszamszur
|
||||||
/tests/modules/services/screen-locker @jrobsonchase @rszamszur
|
/tests/modules/services/screen-locker @jrobsonchase @rszamszur
|
||||||
|
|
||||||
|
|
|
@ -704,6 +704,14 @@ in
|
||||||
A new module is available: 'xsession.windowManager.fluxbox'.
|
A new module is available: 'xsession.windowManager.fluxbox'.
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
time = "2022-09-25T21:00:05+00:00";
|
||||||
|
condition = hostPlatform.isLinux;
|
||||||
|
message = ''
|
||||||
|
A new module is available: 'services.safeeyes'.
|
||||||
|
'';
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -256,6 +256,7 @@ let
|
||||||
./services/redshift-gammastep/gammastep.nix
|
./services/redshift-gammastep/gammastep.nix
|
||||||
./services/redshift-gammastep/redshift.nix
|
./services/redshift-gammastep/redshift.nix
|
||||||
./services/rsibreak.nix
|
./services/rsibreak.nix
|
||||||
|
./services/safeeyes.nix
|
||||||
./services/screen-locker.nix
|
./services/screen-locker.nix
|
||||||
./services/sctd.nix
|
./services/sctd.nix
|
||||||
./services/spotifyd.nix
|
./services/spotifyd.nix
|
||||||
|
|
44
modules/services/safeeyes.nix
Normal file
44
modules/services/safeeyes.nix
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
cfg = config.services.safeeyes;
|
||||||
|
|
||||||
|
in {
|
||||||
|
meta.maintainers = [ hm.maintainers.rosuavio ];
|
||||||
|
|
||||||
|
options = {
|
||||||
|
services.safeeyes = {
|
||||||
|
enable = mkEnableOption "The Safe Eyes OSGI service";
|
||||||
|
|
||||||
|
package = mkPackageOption pkgs "safeeyes" { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
assertions = [
|
||||||
|
(hm.assertions.assertPlatform "services.safeeyes" pkgs platforms.linux)
|
||||||
|
];
|
||||||
|
|
||||||
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
|
systemd.user.services.safeeyes = {
|
||||||
|
Install.WantedBy = [ "graphical-session.target" ];
|
||||||
|
|
||||||
|
Unit = {
|
||||||
|
Description = "Safe Eyes";
|
||||||
|
PartOf = [ "graphical-session.target" ];
|
||||||
|
StartLimitIntervalSec = 350;
|
||||||
|
StartLimitBurst = 30;
|
||||||
|
};
|
||||||
|
|
||||||
|
Service = {
|
||||||
|
ExecStart = getExe pkgs.safeeyes;
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = 3;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue