Work in progress further refactoring.

This commit is contained in:
kat witch 2021-03-03 04:01:28 +00:00
parent 556a302df9
commit 20b4bafa85
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
20 changed files with 42 additions and 39 deletions

View file

@ -1,9 +1,9 @@
{ sources, ... }:
{
home-manager.users = {
imports = [
(sources.tf-nix + "/modules/home/secrets.nix")
];
{
home-manager.users.kat = {
imports = [
(sources.tf-nix + "/modules/home/secrets.nix")
];
};
}
}

View file

@ -3,7 +3,7 @@
with lib;
let
cfg = config.meta.deploy;
cfg = config.deploy;
secretsScript = concatMapStrings (file: ''
ssh $NIX_SSHOPTS root@${cfg.ssh.host} "mkdir -p ${toString file.out.dir}
cat > ${file.path}
@ -14,7 +14,7 @@ let
'') (attrValues config.secrets.files);
in {
options = {
meta.deploy = {
deploy = {
enable = mkOption {
type = types.bool;
default = true;
@ -39,7 +39,7 @@ in {
};
config = mkIf cfg.enable {
meta.deploy.profiles = [ "all" ];
deploy.profiles = [ "all" ];
system.build.deployScript =
pkgs.writeScript "deploy-${config.networking.hostName}" ''