feat: add 'azure' cloud option (and generalized module)
This commit is contained in:
@@ -11,11 +11,10 @@ let
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
../../modules/cloud
|
||||
../../modules/desktop/niri
|
||||
|
||||
../../modules/3d
|
||||
../../modules/git.nix
|
||||
# ../../modules/hetzner.nix
|
||||
../../modules/k9s.nix
|
||||
../../modules/kitty.nix
|
||||
../../modules/ssh.nix
|
||||
@@ -37,6 +36,7 @@ in
|
||||
xdg.userDirs.download = "${config.home.homeDirectory}/dl";
|
||||
|
||||
browser.primary = "librewolf";
|
||||
cloud.hetzner.enable = true;
|
||||
|
||||
shell.bash = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
@@ -12,9 +11,9 @@ in
|
||||
imports = [
|
||||
../../modules/ai-tools.nix
|
||||
../../modules/anki.nix
|
||||
../../modules/cloud
|
||||
../../modules/desktop/niri
|
||||
../../modules/git.nix
|
||||
# ../../modules/hetzner.nix
|
||||
../../modules/k9s.nix
|
||||
../../modules/kitty.nix
|
||||
../../modules/ssh.nix
|
||||
@@ -34,6 +33,7 @@ in
|
||||
xdg.userDirs.download = "${config.home.homeDirectory}/dl";
|
||||
|
||||
browser.primary = "librewolf";
|
||||
cloud.hetzner.enable = true;
|
||||
|
||||
shell.bash = {
|
||||
enable = true;
|
||||
|
||||
@@ -12,6 +12,7 @@ in
|
||||
imports = [
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
../../modules/ai-tools.nix
|
||||
../../modules/cloud
|
||||
../../modules/dconf.nix
|
||||
../../modules/git.nix
|
||||
../../modules/k9s.nix
|
||||
@@ -59,6 +60,7 @@ in
|
||||
|
||||
browser.primary = "firefox";
|
||||
browser.secondary = "chromium";
|
||||
cloud.azure.enable = true;
|
||||
|
||||
shell.bash.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,
|
||||
pkgs,
|
||||
osConfig ? null,
|
||||
...
|
||||
}:
|
||||
@@ -8,9 +10,12 @@ let
|
||||
isNixOS = osConfig != null;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
config = lib.mkIf config.cloud.hetzner.enable {
|
||||
warnings =
|
||||
lib.optional (!isNixOS)
|
||||
"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