-
-
Save Xe/4a71d7741e508d9002be91b62248144a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
pa = { pkgs, ... }: { | |
imports = [ ../../common/base.nix ../../common/generic-libvirtd.nix ]; | |
deployment.targetHost = "192.168.122.96"; | |
# create a service-specific user | |
users.users.example.isSystemUser = true; | |
# without this group the secret can't be read | |
users.users.example.extraGroups = [ "keys" ]; | |
systemd.services.example = { | |
wantedBy = [ "multi-user.target" ]; | |
after = [ "example-key.service" ]; | |
wants = [ "example-key.service" ]; | |
serviceConfig.User = "example"; | |
serviceConfig.Type = "oneshot"; | |
script = '' | |
stat /run/keys/example | |
''; | |
}; | |
deployment.keys.example = { | |
text = "this is a super sekrit value :)"; | |
user = "example"; | |
group = "example"; | |
permissions = "0640"; | |
}; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment