feat: add 'azure' cloud option (and generalized module)
This commit is contained in:
@@ -11,11 +11,10 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
../../modules/cloud
|
||||||
../../modules/desktop/niri
|
../../modules/desktop/niri
|
||||||
|
|
||||||
../../modules/3d
|
../../modules/3d
|
||||||
../../modules/git.nix
|
../../modules/git.nix
|
||||||
# ../../modules/hetzner.nix
|
|
||||||
../../modules/k9s.nix
|
../../modules/k9s.nix
|
||||||
../../modules/kitty.nix
|
../../modules/kitty.nix
|
||||||
../../modules/ssh.nix
|
../../modules/ssh.nix
|
||||||
@@ -37,6 +36,7 @@ in
|
|||||||
xdg.userDirs.download = "${config.home.homeDirectory}/dl";
|
xdg.userDirs.download = "${config.home.homeDirectory}/dl";
|
||||||
|
|
||||||
browser.primary = "librewolf";
|
browser.primary = "librewolf";
|
||||||
|
cloud.hetzner.enable = true;
|
||||||
|
|
||||||
shell.bash = {
|
shell.bash = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
inputs,
|
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
@@ -12,9 +11,9 @@ in
|
|||||||
imports = [
|
imports = [
|
||||||
../../modules/ai-tools.nix
|
../../modules/ai-tools.nix
|
||||||
../../modules/anki.nix
|
../../modules/anki.nix
|
||||||
|
../../modules/cloud
|
||||||
../../modules/desktop/niri
|
../../modules/desktop/niri
|
||||||
../../modules/git.nix
|
../../modules/git.nix
|
||||||
# ../../modules/hetzner.nix
|
|
||||||
../../modules/k9s.nix
|
../../modules/k9s.nix
|
||||||
../../modules/kitty.nix
|
../../modules/kitty.nix
|
||||||
../../modules/ssh.nix
|
../../modules/ssh.nix
|
||||||
@@ -34,6 +33,7 @@ in
|
|||||||
xdg.userDirs.download = "${config.home.homeDirectory}/dl";
|
xdg.userDirs.download = "${config.home.homeDirectory}/dl";
|
||||||
|
|
||||||
browser.primary = "librewolf";
|
browser.primary = "librewolf";
|
||||||
|
cloud.hetzner.enable = true;
|
||||||
|
|
||||||
shell.bash = {
|
shell.bash = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ in
|
|||||||
imports = [
|
imports = [
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
inputs.sops-nix.homeManagerModules.sops
|
||||||
../../modules/ai-tools.nix
|
../../modules/ai-tools.nix
|
||||||
|
../../modules/cloud
|
||||||
../../modules/dconf.nix
|
../../modules/dconf.nix
|
||||||
../../modules/git.nix
|
../../modules/git.nix
|
||||||
../../modules/k9s.nix
|
../../modules/k9s.nix
|
||||||
@@ -59,6 +60,7 @@ in
|
|||||||
|
|
||||||
browser.primary = "firefox";
|
browser.primary = "firefox";
|
||||||
browser.secondary = "chromium";
|
browser.secondary = "chromium";
|
||||||
|
cloud.azure.enable = true;
|
||||||
|
|
||||||
shell.bash.enable = true;
|
shell.bash.enable = true;
|
||||||
starship.enable = true;
|
starship.enable = true;
|
||||||
|
|||||||
12
home/modules/cloud/azure.nix
Normal file
12
home/modules/cloud/azure.nix
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
config = lib.mkIf config.cloud.azure.enable {
|
||||||
|
home.packages = with pkgs; [ azure-cli ];
|
||||||
|
};
|
||||||
|
}
|
||||||
17
home/modules/cloud/default.nix
Normal file
17
home/modules/cloud/default.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
options.cloud = {
|
||||||
|
azure = {
|
||||||
|
enable = lib.mkEnableOption "azure CLI";
|
||||||
|
};
|
||||||
|
hetzner = {
|
||||||
|
enable = lib.mkEnableOption "hetzner CLI";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
./azure.nix
|
||||||
|
./hetzner.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
{
|
{
|
||||||
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
pkgs,
|
||||||
osConfig ? null,
|
osConfig ? null,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
@@ -8,9 +10,12 @@ let
|
|||||||
isNixOS = osConfig != null;
|
isNixOS = osConfig != null;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = {
|
config = lib.mkIf config.cloud.hetzner.enable {
|
||||||
warnings =
|
warnings =
|
||||||
lib.optional (!isNixOS)
|
lib.optional (!isNixOS)
|
||||||
"hcloud module requires NixOS host configuration. This module will not work with standalone home-manager.";
|
"hcloud module requires NixOS host configuration. This module will not work with standalone home-manager.";
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [ hcloud ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
home = {
|
|
||||||
packages = with pkgs; [ hcloud ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user