nixdirfmt!

This commit is contained in:
kat witch 2021-03-02 22:32:02 +00:00
parent bfdd94bf7e
commit ad1faf2f24
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
18 changed files with 151 additions and 166 deletions

View file

@ -1,10 +1,10 @@
{ ... }:
let sources = import ../nix/sources.nix; in
{
imports = [
./deploy
(sources.tf-nix + "/modules/nixos/secrets.nix")
(sources.tf-nix + "/modules/nixos/secrets-users.nix")
];
let sources = import ../nix/sources.nix;
in {
imports = [
./deploy
(sources.tf-nix + "/modules/nixos/secrets.nix")
(sources.tf-nix + "/modules/nixos/secrets-users.nix")
];
}

View file

@ -2,15 +2,16 @@
with lib;
let cfg = config.meta.deploy;
secretsScript = concatMapStrings (file: ''
ssh $NIX_SSHOPTS root@${cfg.ssh.host} "mkdir -p ${toString file.out.dir}
cat > ${file.path}
chmod ${file.mode} ${file.path}
chown ${file.owner}:${file.group} ${file.path}" << 'EOF'
${file.text}
EOF
'') (attrValues config.secrets.files);
let
cfg = config.meta.deploy;
secretsScript = concatMapStrings (file: ''
ssh $NIX_SSHOPTS root@${cfg.ssh.host} "mkdir -p ${toString file.out.dir}
cat > ${file.path}
chmod ${file.mode} ${file.path}
chown ${file.owner}:${file.group} ${file.path}" << 'EOF'
${file.text}
EOF
'') (attrValues config.secrets.files);
in {
options = {
meta.deploy = {