This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

modules.htgen: vendor from stockholm

Copied from stockholm krebs/3modules/htgen.nix (cc283503), so it no
longer needs pkgs.htgen from the stockholm overlay.

+113 -14
-6
configs/paste.nix
··· 22 22 ''; 23 23 in 24 24 { 25 - imports = [ 26 - { 27 - key = "stockholm-htgen"; 28 - imports = [ self.inputs.stockholm.nixosModules.htgen ]; 29 - } 30 - ]; 31 25 32 26 services.nginx.virtualHosts.cyberlocker = { 33 27 enableACME = true;
+2
modules/default.nix
··· 5 5 ./fetchWallpaper.nix 6 6 ./sync-containers3.nix 7 7 ./parley.nix 8 + # copied from stockholm, see the header of each 9 + ./htgen.nix 8 10 ]; 9 11 }
+111
modules/htgen.nix
··· 1 + # Copied from stockholm krebs/3modules/htgen.nix (cc283503); htgen now comes 2 + # from stockholm's packages output instead of its overlay. 3 + { 4 + config, 5 + pkgs, 6 + self, 7 + ... 8 + }: 9 + 10 + with self.inputs.stockholm.lib; 11 + let 12 + optionalAttr = name: value: if name != null then { ${name} = value; } else { }; 13 + 14 + cfg = config.krebs.htgen; 15 + 16 + out = { 17 + options.krebs.htgen = api; 18 + config = imp; 19 + }; 20 + 21 + api = mkOption { 22 + default = { }; 23 + type = types.attrsOf ( 24 + types.submodule ( 25 + { config, ... }: { 26 + options = { 27 + enable = mkEnableOption "krebs.htgen-${config._module.args.name}"; 28 + 29 + name = mkOption { 30 + type = types.username; 31 + default = config._module.args.name; 32 + }; 33 + 34 + package = mkOption { 35 + default = self.inputs.stockholm.packages.${pkgs.stdenv.hostPlatform.system}.htgen; 36 + type = types.package; 37 + }; 38 + 39 + port = mkOption { 40 + type = types.uint; 41 + }; 42 + 43 + script = mkOption { 44 + type = types.nullOr types.str; 45 + default = null; 46 + }; 47 + 48 + scriptFile = mkOption { 49 + type = types.nullOr (types.either types.package types.pathname); 50 + default = null; 51 + }; 52 + 53 + user = mkOption { 54 + type = types.user; 55 + default = { 56 + name = "htgen-${config.name}"; 57 + home = "/var/lib/htgen-${config.name}"; 58 + }; 59 + defaultText = { 60 + name = "htgen-‹name›"; 61 + home = "/var/lib/htgen-‹name›"; 62 + }; 63 + }; 64 + }; 65 + } 66 + ) 67 + ); 68 + }; 69 + imp = { 70 + 71 + systemd.services = mapAttrs' ( 72 + name: htgen: 73 + nameValuePair "htgen-${name}" { 74 + wantedBy = [ "multi-user.target" ]; 75 + after = [ "network.target" ]; 76 + environment = { 77 + HTGEN_PORT = toString htgen.port; 78 + } 79 + // optionalAttr "HTGEN_SCRIPT" htgen.script 80 + // optionalAttr "HTGEN_SCRIPT_FILE" htgen.scriptFile; 81 + serviceConfig = { 82 + SyslogIdentifier = "htgen"; 83 + User = htgen.user.name; 84 + PrivateTmp = true; 85 + Restart = "always"; 86 + ExecStart = "${htgen.package}/bin/htgen --serve"; 87 + }; 88 + } 89 + ) cfg; 90 + 91 + users.users = mapAttrs' ( 92 + name: htgen: 93 + nameValuePair htgen.user.name { 94 + inherit (htgen.user) home name uid; 95 + group = htgen.user.name; 96 + createHome = true; 97 + isSystemUser = true; 98 + } 99 + ) cfg; 100 + 101 + users.groups = mapAttrs' ( 102 + _name: htgen: 103 + nameValuePair htgen.user.name { 104 + name = htgen.user.name; 105 + gid = htgen.user.uid; 106 + } 107 + ) cfg; 108 + 109 + }; 110 + in 111 + out
-7
configs/services/radio/container-host.nix
··· 1 1 { 2 - self, 3 2 config, 4 3 pkgs, 5 4 ... 6 5 }: 7 6 { 8 - imports = [ 9 - { 10 - key = "stockholm-htgen"; 11 - imports = [ self.inputs.stockholm.nixosModules.htgen ]; 12 - } 13 - ]; 14 7 krebs.sync-containers3.containers.radio = { 15 8 sshKey = config.clan.core.vars.generators.radio-container.files."radio.sync.key".path; 16 9 startCommand = ''
-1
configs/services/radio/news.nix
··· 79 79 }; 80 80 }; 81 81 imports = [ 82 - self.inputs.stockholm.nixosModules.htgen 83 82 ./tts.nix 84 83 ]; 85 84 krebs.htgen.news = {