tmpfiles: migrate to an RFC42-style option
This commit is contained in:
parent
32a671dce5
commit
090aa14e5d
9 changed files with 247 additions and 31 deletions
|
|
@ -36,14 +36,12 @@ in
|
|||
|
||||
# Use `systemd-tmpfiles` since glab requires its configuration file to have
|
||||
# mode 0600.
|
||||
systemd.user.tmpfiles.rules =
|
||||
let
|
||||
target = "${config.xdg.configHome}/glab-cli/config.yml";
|
||||
in
|
||||
lib.mkIf (cfg.settings != { }) [
|
||||
"C+ ${target} - - - - ${yaml.generate "glab-config" cfg.settings}"
|
||||
"z ${target} 0600"
|
||||
];
|
||||
systemd.user.tmpfiles.settings.glab = lib.mkIf (cfg.settings != { }) {
|
||||
"${config.xdg.configHome}/glab-cli/config.yml" = {
|
||||
"C+".argument = yaml.generate "glab-config" cfg.settings;
|
||||
z.mode = "0600";
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile."glab-cli/aliases.yml" = lib.mkIf (cfg.aliases != { }) {
|
||||
source = yaml.generate "glab-aliases" cfg.aliases;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue