diff options
| author | Jakub Stachurski <j.stachurski@student.utwente.nl> | 2026-05-08 23:24:16 +0200 |
|---|---|---|
| committer | Jakub Stachurski <j.stachurski@student.utwente.nl> | 2026-05-08 23:24:16 +0200 |
| commit | 2e96b20f6dc6ae0aac2ca58db111d00ac0d7ca85 (patch) | |
| tree | a421aadde8b4da889f6002b98731899994a9d027 /services | |
| parent | bb957032ffc5352229edbbdcdb56b9dba4408f37 (diff) | |
remove gomuks
Diffstat (limited to 'services')
| -rw-r--r-- | services/gomuks.nix | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/services/gomuks.nix b/services/gomuks.nix deleted file mode 100644 index be53daa..0000000 --- a/services/gomuks.nix +++ /dev/null @@ -1,67 +0,0 @@ -{ - pkgs, - config, - lib, -}: -let - cfg = config.wilkuu.services.gomuks; - hostname = config.networking.hostName; -in -{ - options.wilkuu.serivces.gomuks = with lib; { - enable = mkEnableOption "Enable gomuks"; - # Hostname option is reused a lot, we might need to create a util for the options at this rate. - hostname = mkOption { - type = types.str; - default = "$matrix.{config.networking.hostName}.local"; - description = "Hostname on which gomuks should be hosted."; - }; - package = mkPackageOption pkgs "gomuks-web" { }; - dataDir = mkOption { - type = types.path; - default = "/srv/gomuks/"; - description = "Directory for where gomuks will store it's files."; - }; - - }; - config = lib.mkIf cfg.enable ( - let - yaml = pkgs.writers.writeYAML; - cfgDir = "${cfg.dataDir}/.config"; - configFile = yaml.generate "config.yaml" { - password_file = config.sops.secrets."gomuks/password".path; - }; - in - { - users.users.gomuks = { - isSystemUser = true; - group = "gomuks"; - }; - users.groups.gomuks = { }; - - sops.secrets."gomuks/password" = { - owner = "gomuks"; - sopsFile = ./secrets/${hostname}/gomuks.yaml; - }; - - systemd.services.gomuks = { - name = "gomuks"; - serviceConifg = { - User = "gomuks"; - ExecStart = "${cfg.package}"; - WorkingDirectory = "${cfg.dataDir}"; - Restart = "always"; - Environment = [ - "XDG_CONFIG_HOME=${cfgDir}" - ]; - }; - }; - - systemd.tmpfiles.rules = [ - "d ${cfgDir} 0700 ${cfg.user} ${cfg.user} -" - "L+ ${cfgDir}/config.yaml - - - - ${configFile}" - ]; - - } - ); -} |
