Merge pull request 'Add inputs to specialArgs and make templates use it' (#3798) from templates into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3798
This commit is contained in:
@@ -189,6 +189,10 @@ in
|
|||||||
./computed-tags.nix
|
./computed-tags.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
specialArgs = {
|
||||||
|
self = lib.mkDefault config.self;
|
||||||
|
};
|
||||||
|
|
||||||
# Ready to use configurations
|
# Ready to use configurations
|
||||||
# These are only shallow wrapping the 'nixosModules' or 'darwinModules' with
|
# These are only shallow wrapping the 'nixosModules' or 'darwinModules' with
|
||||||
# lib.nixosSystem
|
# lib.nixosSystem
|
||||||
|
|||||||
@@ -7,11 +7,10 @@
|
|||||||
outputs =
|
outputs =
|
||||||
inputs@{
|
inputs@{
|
||||||
self,
|
self,
|
||||||
clan-core,
|
|
||||||
flake-parts,
|
flake-parts,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
flake-parts.lib.mkFlake { inherit inputs; } ({
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||||
systems = [
|
systems = [
|
||||||
"x86_64-linux"
|
"x86_64-linux"
|
||||||
"aarch64-linux"
|
"aarch64-linux"
|
||||||
@@ -23,10 +22,6 @@
|
|||||||
clan = {
|
clan = {
|
||||||
meta.name = "__CHANGE_ME__"; # Ensure this is unique among all clans you want to use.
|
meta.name = "__CHANGE_ME__"; # Ensure this is unique among all clans you want to use.
|
||||||
|
|
||||||
# Make flake available in modules
|
|
||||||
specialArgs.self = {
|
|
||||||
inherit (self) inputs nixosModules packages;
|
|
||||||
};
|
|
||||||
inherit self;
|
inherit self;
|
||||||
machines = {
|
machines = {
|
||||||
# "jon" will be the hostname of the machine
|
# "jon" will be the hostname of the machine
|
||||||
@@ -109,5 +104,5 @@
|
|||||||
{
|
{
|
||||||
devShells.default = pkgs.mkShell { packages = [ inputs'.clan-core.packages.clan-cli ]; };
|
devShells.default = pkgs.mkShell { packages = [ inputs'.clan-core.packages.clan-cli ]; };
|
||||||
};
|
};
|
||||||
});
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,14 @@
|
|||||||
{ clan-core, ... }:
|
{
|
||||||
|
clan-core,
|
||||||
|
# Optional, if you want to access other flakes:
|
||||||
|
# self,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
clan-core.clanModules.sshd
|
clan-core.clanModules.sshd
|
||||||
clan-core.clanModules.root-password
|
clan-core.clanModules.root-password
|
||||||
|
# You can access other flakes imported in your flake via `self` like this:
|
||||||
|
# self.inputs.nix-index-database.nixosModules.nix-index
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
{ config, clan-core, ... }:
|
{
|
||||||
|
config,
|
||||||
|
clan-core,
|
||||||
|
# Optional, if you want to access other flakes:
|
||||||
|
# self,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
# Enables the OpenSSH server for remote access
|
# Enables the OpenSSH server for remote access
|
||||||
@@ -7,6 +13,9 @@
|
|||||||
clan-core.clanModules.root-password
|
clan-core.clanModules.root-password
|
||||||
clan-core.clanModules.user-password
|
clan-core.clanModules.user-password
|
||||||
clan-core.clanModules.state-version
|
clan-core.clanModules.state-version
|
||||||
|
|
||||||
|
# You can access other flakes imported in your flake via `self` like this:
|
||||||
|
# self.inputs.nix-index-database.nixosModules.nix-index
|
||||||
];
|
];
|
||||||
|
|
||||||
# Locale service discovery and mDNS
|
# Locale service discovery and mDNS
|
||||||
|
|||||||
Reference in New Issue
Block a user