This repository has no description
0

Configure Feed

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

modules.realwallpaper: vendor from stockholm

Copied from stockholm krebs/3modules/realwallpaper.nix (cc283503); the
wallpaper generator comes from stockholm's packages output instead of
its overlay.

+84 -3
-3
configs/realwallpaper.nix
··· 5 5 ... 6 6 }: 7 7 { 8 - imports = [ 9 - self.inputs.stockholm.nixosModules.realwallpaper 10 - ]; 11 8 krebs.realwallpaper.enable = true; 12 9 13 10 system.activationScripts.wallpaper-chmod = ''
+1
modules/default.nix
··· 8 8 # copied from stockholm, see the header of each 9 9 ./htgen.nix 10 10 ./reaktor2.nix 11 + ./realwallpaper.nix 11 12 ]; 12 13 }
+83
modules/realwallpaper.nix
··· 1 + # Copied from stockholm krebs/3modules/realwallpaper.nix (cc283503); 2 + # realwallpaper now comes from stockholm's packages output instead of its 3 + # overlay. 4 + { 5 + config, 6 + lib, 7 + pkgs, 8 + self, 9 + ... 10 + }: 11 + 12 + with self.inputs.stockholm.lib; 13 + let 14 + cfg = config.krebs.realwallpaper; 15 + 16 + out = { 17 + options.krebs.realwallpaper = api; 18 + config = lib.mkIf cfg.enable imp; 19 + }; 20 + 21 + api = { 22 + enable = mkEnableOption "realwallpaper"; 23 + 24 + workingDir = mkOption { 25 + type = types.str; 26 + default = "/var/realwallpaper/"; 27 + }; 28 + 29 + marker = mkOption { 30 + type = types.str; 31 + default = "http://graph.r/network.json"; 32 + }; 33 + 34 + timerConfig = mkOption { 35 + type = types.unspecified; 36 + default = { 37 + OnCalendar = "*:0/15"; 38 + }; 39 + }; 40 + }; 41 + 42 + imp = { 43 + systemd.timers.realwallpaper = { 44 + description = "real wallpaper generator timer"; 45 + wantedBy = [ "timers.target" ]; 46 + 47 + timerConfig = cfg.timerConfig; 48 + }; 49 + 50 + systemd.services.realwallpaper = { 51 + description = "real wallpaper generator"; 52 + after = [ "network.target" ]; 53 + 54 + environment = { 55 + working_dir = cfg.workingDir; 56 + marker_url = cfg.marker; 57 + }; 58 + 59 + restartIfChanged = true; 60 + 61 + serviceConfig = { 62 + Type = "simple"; 63 + Restart = "on-failure"; 64 + ExecStart = "${ 65 + self.inputs.stockholm.packages.${pkgs.stdenv.hostPlatform.system}.realwallpaper 66 + }/bin/generate-wallpaper"; 67 + User = "realwallpaper"; 68 + }; 69 + }; 70 + 71 + users.extraUsers.realwallpaper = { 72 + uid = genid "realwallpaper"; 73 + group = "realwallpaper"; 74 + home = cfg.workingDir; 75 + createHome = true; 76 + isSystemUser = true; 77 + }; 78 + 79 + users.groups.realwallpaper = { }; 80 + }; 81 + 82 + in 83 + out