mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-29 09:42:33 +01:00
refactor: Use haumea for filesystem-based module system for flake outputs
refactor: Use hyphen(`-`) for variable names & folder names(except Python), replace all unserscore(`_`) with hyphen(`-`).
This commit is contained in:
1 parent
d7738efed2
commit
b382999a70
167 files changed
+1570
-955
No files matched your search
+13
-10
@@ -1,20 +1,23 @@
|
||||
# colmena - Remote Deployment via SSH
|
||||
{
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
specialArgs,
|
||||
inputs,
|
||||
nixos-modules,
|
||||
home-module ? null,
|
||||
host_tags,
|
||||
targetUser ? specialArgs.username,
|
||||
myvars,
|
||||
system,
|
||||
tags,
|
||||
ssh-user,
|
||||
genSpecialArgs,
|
||||
...
|
||||
}: let
|
||||
inherit (specialArgs) username;
|
||||
inherit (inputs) home-manager;
|
||||
specialArgs = genSpecialArgs system;
|
||||
in
|
||||
{name, ...}: {
|
||||
deployment = {
|
||||
inherit targetUser;
|
||||
targetHost = builtins.replaceStrings ["_"] ["-"] name; # hostName or IP address
|
||||
tags = host_tags;
|
||||
inherit tags;
|
||||
targetUser = ssh-user;
|
||||
targetHost = name; # hostName or IP address
|
||||
};
|
||||
|
||||
imports =
|
||||
@@ -28,7 +31,7 @@ in
|
||||
home-manager.useUserPackages = true;
|
||||
|
||||
home-manager.extraSpecialArgs = specialArgs;
|
||||
home-manager.users."${username}" = home-module;
|
||||
home-manager.users."${myvars.username}" = home-module;
|
||||
}
|
||||
]
|
||||
else []
|
||||
|
||||
Reference in new issue
Block a user