From dca0ac1e57d29b55a8fe43b6fac62f08e472a727 Mon Sep 17 00:00:00 2001 From: kat witch Date: Sun, 14 Mar 2021 02:47:55 +0000 Subject: [PATCH] Private profile setup and a deploy bugfix --- config/home.nix | 6 +++++- config/hosts/samhain/configuration.nix | 2 +- config/hosts/yule/configuration.nix | 2 +- config/nixos.nix | 2 +- modules/nixos/deploy/default.nix | 5 +++-- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/config/home.nix b/config/home.nix index 699f0261..e7a04b00 100644 --- a/config/home.nix +++ b/config/home.nix @@ -6,5 +6,9 @@ let }; in { - imports = lib.attrValues homeModules ++ [ ../modules/home ]; + imports = lib.attrValues homeModules ++ [ + ../modules/home + ./private/profile/home + ]; } + diff --git a/config/hosts/samhain/configuration.nix b/config/hosts/samhain/configuration.nix index e5c85b5e..98156772 100644 --- a/config/hosts/samhain/configuration.nix +++ b/config/hosts/samhain/configuration.nix @@ -10,7 +10,7 @@ ./torrenting.nix ]; - deploy.profiles = [ "gui" "sway" "kat" ]; + deploy.profiles = [ "gui" "sway" "kat" "private" ]; deploy.ssh.host = "192.168.1.135"; # graphics tablet diff --git a/config/hosts/yule/configuration.nix b/config/hosts/yule/configuration.nix index c38ded29..6ba24790 100644 --- a/config/hosts/yule/configuration.nix +++ b/config/hosts/yule/configuration.nix @@ -3,7 +3,7 @@ { imports = [ ./hardware.nix ../../services/zfs.nix ]; - deploy.profiles = [ "gui" "sway" "kat" "laptop" ]; + deploy.profiles = [ "gui" "sway" "kat" "laptop" "private" ]; deploy.ssh.host = "192.168.1.92"; boot.loader.systemd-boot.enable = true; diff --git a/config/nixos.nix b/config/nixos.nix index d8661ef0..49b48b71 100644 --- a/config/nixos.nix +++ b/config/nixos.nix @@ -7,7 +7,7 @@ let }; in { - imports = lib.attrValues nixosModules; + imports = lib.attrValues nixosModules ++ [ ./private/profile/nixos ]; options.home-manager.users = lib.mkOption { type = lib.types.attrsOf (lib.types.submoduleWith { diff --git a/modules/nixos/deploy/default.nix b/modules/nixos/deploy/default.nix index e3c628d7..dd95bae1 100644 --- a/modules/nixos/deploy/default.nix +++ b/modules/nixos/deploy/default.nix @@ -8,10 +8,11 @@ let 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' + chown ${file.owner}:${file.group} ${file.path}"'' + (if file.source != null then "< ${toString file.source}\n" else '' + <<'EOF' ${file.text} EOF - '') (attrValues config.secrets.files); + '')) (attrValues config.secrets.files); in { options = { deploy = {