diff options
| -rw-r--r-- | user-profiles/core.nix | 1 | ||||
| -rw-r--r-- | user-profiles/feeds/module.nix | 26 |
2 files changed, 27 insertions, 0 deletions
diff --git a/user-profiles/core.nix b/user-profiles/core.nix index fb80343d..ff8cb9f9 100644 --- a/user-profiles/core.nix +++ b/user-profiles/core.nix | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | config = { | 8 | config = { |
| 9 | manual.manpages.enable = true; | 9 | manual.manpages.enable = true; |
| 10 | home.stateVersion = "20.09"; | 10 | home.stateVersion = "20.09"; |
| 11 | systemd.user.startServices = "sd-switch"; | ||
| 11 | }; | 12 | }; |
| 12 | }; | 13 | }; |
| 13 | } | 14 | } |
diff --git a/user-profiles/feeds/module.nix b/user-profiles/feeds/module.nix index 1face90e..ffde87b8 100644 --- a/user-profiles/feeds/module.nix +++ b/user-profiles/feeds/module.nix | |||
| @@ -156,5 +156,31 @@ in { | |||
| 156 | NOTMUCH_CONFIG=${configPath} $DRY_RUN_CMD ${pkgs.notmuch}/bin/notmuch new $NOTMUCH_VERBOSE_ARG | 156 | NOTMUCH_CONFIG=${configPath} $DRY_RUN_CMD ${pkgs.notmuch}/bin/notmuch new $NOTMUCH_VERBOSE_ARG |
| 157 | fi | 157 | fi |
| 158 | ''; | 158 | ''; |
| 159 | |||
| 160 | systemd.user.services."logrotate-imm" = { | ||
| 161 | Unit = { | ||
| 162 | Description = "Rotate imm logfile"; | ||
| 163 | }; | ||
| 164 | Service = { | ||
| 165 | Type = "oneshot"; | ||
| 166 | ExecStart = '' | ||
| 167 | ${pkgs.logrotate}/bin/logrotate --state ${config.xdg.configHome}/imm/imm.logrotate ${pkgs.writeText "logrotate.conf" '' | ||
| 168 | ${config.xdg.configHome}/imm/imm.log { | ||
| 169 | rotate 5 | ||
| 170 | size 1m | ||
| 171 | } | ||
| 172 | ''} | ||
| 173 | ''; | ||
| 174 | }; | ||
| 175 | }; | ||
| 176 | systemd.user.timers."logrotate-imm" = { | ||
| 177 | Timer = { | ||
| 178 | OnActiveSec = "6h"; | ||
| 179 | OnUnitActiveSec = "6h"; | ||
| 180 | }; | ||
| 181 | Install = { | ||
| 182 | WantedBy = ["default.target"]; | ||
| 183 | }; | ||
| 184 | }; | ||
| 159 | }; | 185 | }; |
| 160 | } | 186 | } |
