flakfiy some Justfile recipes and experiment with wayland based custom desktop
This commit is contained in:
parent
06a47c0d23
commit
476e10780b
18 changed files with 739 additions and 149 deletions
|
@ -32,28 +32,37 @@
|
|||
old.propagatedBuildInputs
|
||||
++ [radicale-storage-decsync];
|
||||
});
|
||||
radicale-config = pkgs.writeText "radicale-config" ''
|
||||
[auth]
|
||||
type = htpasswd
|
||||
htpasswd_filename = ${
|
||||
pkgs.writeText "radicale" ''
|
||||
radicale:${passwords.users.radicale}
|
||||
''
|
||||
}
|
||||
htpasswd_encryption = bcrypt
|
||||
|
||||
[storage]
|
||||
type = radicale_storage_decsync
|
||||
filesystem_folder = ${config.xdg.dataHome}/radicale
|
||||
decsync_dir = ${config.xdg.dataHome}/decsync
|
||||
'';
|
||||
in {
|
||||
systemd.user.services.radicale = {
|
||||
Unit.Description = "Radicale with DecSync";
|
||||
Service = {
|
||||
ExecStart = "${radicale-decsync}/bin/radicale -C ${radicale-config}";
|
||||
Restart = "on-failure";
|
||||
mkRadicaleService = { suffix, port }: let
|
||||
radicale-config = pkgs.writeText "radicale-config-${suffix}" ''
|
||||
[server]
|
||||
hosts = localhost:${builtins.toString(port)}
|
||||
|
||||
[auth]
|
||||
type = htpasswd
|
||||
htpasswd_filename = ${
|
||||
pkgs.writeText "radicale" ''
|
||||
radicale:${passwords.users.radicale}
|
||||
''
|
||||
}
|
||||
htpasswd_encryption = bcrypt
|
||||
|
||||
[storage]
|
||||
type = radicale_storage_decsync
|
||||
filesystem_folder = ${config.xdg.dataHome}/radicale-${suffix}
|
||||
decsync_dir = ${config.xdg.dataHome}/decsync-${suffix}
|
||||
'';
|
||||
in {
|
||||
systemd.user.services."radicale-${suffix}" = {
|
||||
Unit.Description = "Radicale with DecSync (${suffix})";
|
||||
Service = {
|
||||
ExecStart = "${radicale-decsync}/bin/radicale -C ${radicale-config}";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
Install.WantedBy = ["default.target"];
|
||||
};
|
||||
Install.WantedBy = ["default.target"];
|
||||
};
|
||||
}
|
||||
in builtins.foldl' (sum: cur: lib.recursiveUpdate sum (mkRadicaleService cur)) {} [
|
||||
{suffix = "personal"; port = 5232;}
|
||||
{suffix = "family"; port = 5233;}
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue