diff --git a/flake.nix b/flake.nix index 41947d6..b77a529 100644 --- a/flake.nix +++ b/flake.nix @@ -130,6 +130,16 @@ ./hosts/ti-clt-dsk01/home.nix ]; }; + + "deploy@v-th-ctr-01" = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.x86_64-linux; + extraSpecialArgs = { inherit inputs nix-colors; }; + modules = [ + ({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; }) + + ./hosts/v-th-ctr-01/home.nix + ]; + }; }; }; } diff --git a/hosts/v-th-ctr-01/default.nix b/hosts/v-th-ctr-01/default.nix index 7920a36..36a0006 100644 --- a/hosts/v-th-ctr-01/default.nix +++ b/hosts/v-th-ctr-01/default.nix @@ -59,13 +59,13 @@ allowedUDPPorts = [ 80 443 53 ]; }; - users.users.timo = { + users.users.deploy = { isNormalUser = true; - description = "Timo Boomers"; + description = "Deploy"; extraGroups = [ "networkmanager" "wheel" "dialout" ]; }; - nix.settings.trusted-users = [ "root" "timo" ]; + nix.settings.trusted-users = [ "root" "deploy" ]; system.stateVersion = "24.05"; } diff --git a/hosts/v-th-ctr-01/home.nix b/hosts/v-th-ctr-01/home.nix index 8ac63ea..f9439d3 100644 --- a/hosts/v-th-ctr-01/home.nix +++ b/hosts/v-th-ctr-01/home.nix @@ -8,12 +8,12 @@ config = { home = { - username = "timo"; - homeDirectory = "/home/timo"; + username = "deploy"; + homeDirectory = "/home/deploy"; }; settings = { - applications.common.enable = false; + applications.common.enable = true; applications.alacritty.enable = false; applications.devenv.enable = false; applications.firefox.enable = false; @@ -26,6 +26,7 @@ applications.zellij.enable = false; services.nextcloud-sync.enable = false; + services.podman.enable = true; theming.fonts.enable = false; theming.stylix.enable = false; @@ -33,6 +34,8 @@ theming.stylix.theme = "da-one-ocean"; desktop-environments.hyprland.enable = false; + + containers.nginx.enable = true; }; home.packages = with pkgs; [ diff --git a/modules/home/containers/nginx.nix b/modules/home/containers/nginx.nix new file mode 100644 index 0000000..5ccc836 --- /dev/null +++ b/modules/home/containers/nginx.nix @@ -0,0 +1,26 @@ +{ config, lib, ... }: + +with lib; + +let + cfg = config.settings.containers.nginx; +in { + options = { + settings.containers.nginx.enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = '' + Enable nginx container + ''; + }; + }; + + config = mkIf cfg.enable { + services.podman.containers.nginx = { + image = "nginx"; + ports = [ + "8080:80" + ]; + }; + }; +} diff --git a/modules/home/default.nix b/modules/home/default.nix index 3a254dd..20103ba 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -15,6 +15,7 @@ ./applications/zellij.nix ./services/nextcloud.nix + ./services/podman.nix ./theming/fonts.nix ./theming/stylix.nix diff --git a/modules/home/services/podman.nix b/modules/home/services/podman.nix new file mode 100644 index 0000000..c073d04 --- /dev/null +++ b/modules/home/services/podman.nix @@ -0,0 +1,23 @@ +{ pkgs, lib, config, ... }: + +with lib; + +let + cfg = config.settings.services.podman; +in { + options = { + settings.services.podman.enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = '' + Enable podman configuration + ''; + }; + }; + + config = mkIf cfg.enable { + services.podman = { + enable = true; + }; + }; +}