propagate node config and hostname to nixos modules
This commit is contained in:
parent
aec16966ae
commit
b486ee8cb7
2 changed files with 7 additions and 7 deletions
3
TODO.md
3
TODO.md
|
|
@ -5,9 +5,6 @@
|
||||||
- [ ] support hs system per dir, ie hosts/<name>/overlays or hosts/<name>/nixpkgs.nix
|
- [ ] support hs system per dir, ie hosts/<name>/overlays or hosts/<name>/nixpkgs.nix
|
||||||
|
|
||||||
## Queued
|
## Queued
|
||||||
- [X] base should automatically be set as the default (dont do anything with the default)
|
|
||||||
- [X] try to remove common foot guns, ie abort if the user provides the home-manager or microvm nixosModules
|
|
||||||
since cerulean ALREADY provides these
|
|
||||||
- [ ] per node home configuration is a lil jank rn
|
- [ ] per node home configuration is a lil jank rn
|
||||||
|
|
||||||
- [ ] deploy port should default to the first port given to `services.openssh`
|
- [ ] deploy port should default to the first port given to `services.openssh`
|
||||||
|
|
|
||||||
|
|
@ -86,9 +86,10 @@ in
|
||||||
|
|
||||||
userArgs = nodes.args // node.args;
|
userArgs = nodes.args // node.args;
|
||||||
ceruleanArgs = {
|
ceruleanArgs = {
|
||||||
inherit systems root base;
|
inherit systems root base node;
|
||||||
inherit (node) system;
|
inherit (node) system;
|
||||||
inherit (this) snow;
|
inherit (this) snow;
|
||||||
|
hostname = name;
|
||||||
|
|
||||||
_cerulean = {
|
_cerulean = {
|
||||||
inherit inputs userArgs ceruleanArgs homeManager;
|
inherit inputs userArgs ceruleanArgs homeManager;
|
||||||
|
|
@ -128,7 +129,6 @@ in
|
||||||
(node.deploy)
|
(node.deploy)
|
||||||
ssh
|
ssh
|
||||||
user
|
user
|
||||||
sudoCmd
|
|
||||||
interactiveSudo
|
interactiveSudo
|
||||||
remoteBuild
|
remoteBuild
|
||||||
rollback
|
rollback
|
||||||
|
|
@ -140,14 +140,17 @@ in
|
||||||
|
|
||||||
nixosFor = system: inputs.deploy-rs.lib.${system}.activate.nixos;
|
nixosFor = system: inputs.deploy-rs.lib.${system}.activate.nixos;
|
||||||
in {
|
in {
|
||||||
hostname = ssh.host;
|
hostname =
|
||||||
|
if ssh.host != null
|
||||||
|
then ssh.host
|
||||||
|
else "";
|
||||||
|
|
||||||
profilesOrder = ["default"]; # profiles priority
|
profilesOrder = ["default"]; # profiles priority
|
||||||
profiles.default = {
|
profiles.default = {
|
||||||
path = nixosFor node.system nixosConfigurations.${name};
|
path = nixosFor node.system nixosConfigurations.${name};
|
||||||
|
|
||||||
user = user;
|
user = user;
|
||||||
sudo = sudoCmd;
|
sudo = "sudo -u";
|
||||||
interactiveSudo = interactiveSudo;
|
interactiveSudo = interactiveSudo;
|
||||||
|
|
||||||
fastConnection = false;
|
fastConnection = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue