1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-25 03:09: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:
Rosario Pulella 2022-09-25 15:47:53 -04:00 committed by Robert Helgesson
parent 3eaadd82b8
commit 9b91709899
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
4 changed files with 55 additions and 0 deletions

2
.github/CODEOWNERS vendored
View file

@ -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

View file

@ -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'.
'';
}
]; ];
}; };
} }

View file

@ -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

View 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;
};
};
};
}