diff --git a/README.md b/README.md index 1c27513..76cad4e 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,4 @@ rewrite of my nixos flake with hopefully better structuring and modularity > [!WARNING] -> this flake is ment for personal use. code is not well documented and is not ment to be used by others. use at your own risk. - -## hosts -- `thinkpad` - my thinkpad t480 with an i5 8350u, 16gb of ram, and 256gb nvme ssd (140 allocated for nixos, rest for windows 11) -- `homelab` - my homelab server in a vm on a proxmox host with an i7 8700t, 32gb of ram, and 512gb boot drive (with hotplug enabled for cpu and ram) - -## credits -- [orangc's flake](https://git.orangc.net/c/dots) \ No newline at end of file +> this flake is ment for personal use. code is not well documented and is not ment to be used by others. use at your own risk. \ No newline at end of file diff --git a/flake.lock b/flake.lock index c00515b..cc8baa0 100644 --- a/flake.lock +++ b/flake.lock @@ -123,12 +123,47 @@ "type": "github" } }, + "nixpkgs_4": { + "locked": { + "lastModified": 1772736753, + "narHash": "sha256-au/m3+EuBLoSzWUCb64a/MZq6QUtOV8oC0D9tY2scPQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "917fec990948658ef1ccd07cef2a1ef060786846", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "ctp": "ctp", "gl": "gl", "hm": "hm", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_3", + "sops": "sops" + } + }, + "sops": { + "inputs": { + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1773096132, + "narHash": "sha256-M3zEnq9OElB7zqc+mjgPlByPm1O5t2fbUrH3t/Hm5Ag=", + "owner": "Mic92", + "repo": "sops-nix", + "rev": "d1ff3b1034d5bab5d7d8086a7803c5a5968cd784", + "type": "github" + }, + "original": { + "owner": "Mic92", + "repo": "sops-nix", + "type": "github" } }, "systems": { diff --git a/flake.nix b/flake.nix index 8130e57..692ca4d 100644 --- a/flake.nix +++ b/flake.nix @@ -7,6 +7,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + sops.url = "github:Mic92/sops-nix"; gl.url = "github:nix-community/nixGL"; ctp.url = "github:catppuccin/nix"; }; @@ -30,6 +31,7 @@ modules = [ ./hosts/${host}/config.nix inputs.ctp.nixosModules.catppuccin + inputs.sops.nixosModules.sops ]; }; @@ -39,6 +41,7 @@ modules = [ ./hosts/${host}/config.nix inputs.ctp.nixosModules.catppuccin + inputs.sops.nixosModules.sops inputs.hm.nixosModules.home-manager { home-manager = { diff --git a/modules/system/homelab/dash.nix b/modules/system/homelab/dash.nix index 727faf4..97ddade 100644 --- a/modules/system/homelab/dash.nix +++ b/modules/system/homelab/dash.nix @@ -78,6 +78,7 @@ [ "Ntfy" "ntfy" "https://notify.proxy.${homelab.domain}" "http://localhost:8067/" ] [ "SearXNG" "searxng" "https://search.proxy.${homelab.domain}" "http://localhost:8091/" ] [ "Dockge" "docker" "https://containers.proxy.${homelab.domain}" "http://localhost:5001/" ] + [ "Guacamole" "apacheguacamole" "https://remote.proxy.${homelab.domain}/guacamole" "http://localhost:8085/guacamole/" ] ]; bookmarks = [ [ "Tailscale" "tailscale" "https://login.tailscale.com/" ] diff --git a/modules/system/homelab/git.nix b/modules/system/homelab/git.nix index 72c6050..3d436ca 100644 --- a/modules/system/homelab/git.nix +++ b/modules/system/homelab/git.nix @@ -1,4 +1,4 @@ -{ pkgs, homelab, ... }: { +{ lib, pkgs, homelab, ... }: { services = { forgejo = { enable = true; diff --git a/modules/system/homelab/proxy.nix b/modules/system/homelab/proxy.nix index f831f17..10a6a32 100644 --- a/modules/system/homelab/proxy.nix +++ b/modules/system/homelab/proxy.nix @@ -13,6 +13,7 @@ "gallery" = d "http://localhost:2283"; "dynamic" = d "http://localhost:8082"; + "remote" = d "http://localhost:8085"; "search" = d "http://localhost:8091"; "notify" = d "http://localhost:8067"; "media" = d "http://localhost:8096"; diff --git a/modules/system/homelab/remote.nix b/modules/system/homelab/remote.nix new file mode 100644 index 0000000..c8b6671 --- /dev/null +++ b/modules/system/homelab/remote.nix @@ -0,0 +1,19 @@ +{ ... }: { + services = { + guacamole-server = { + enable = true; + host = "127.0.0.1"; + port = 4822; + }; + guacamole-client = { + enable = true; + enableWebserver = true; + userMappingXml = "/mnt/data/guacamole/user-mapping.xml"; + settings = { + guacd-hostname = "127.0.0.1"; + guacd-port = 4822; + }; + }; + tomcat.port = 8085; + }; +} \ No newline at end of file diff --git a/modules/system/homelab/share.nix b/modules/system/homelab/share.nix new file mode 100644 index 0000000..6a01a39 --- /dev/null +++ b/modules/system/homelab/share.nix @@ -0,0 +1,34 @@ +{ ... }: { + services = { + httpd = { + enable = true; + virtualHosts."cdn" = { + listen = [{ ip = "127.0.0.1"; port = 3000; }]; + documentRoot = "/mnt/share"; + }; + }; + + samba = { + enable = true; + settings = { + global = { + workgroup = "WORKGROUP"; + "disable netbios" = "yes"; + "allow insecure wide links" = "yes"; + "server min protocol" = "SMB2_02"; + }; + "NAS" = { + path = "/mnt/share"; + browseable = "yes"; + "read only" = "no"; + "create mask" = "0664"; + "force create mode" = "0664"; + "directory mask" = "0775"; + "force directory mode" = "0775"; + "follow symlinks" = "yes"; + "wide links" = "yes"; + }; + }; + }; + }; +} \ No newline at end of file diff --git a/modules/system/server.nix b/modules/system/server.nix index daa3747..fd10d22 100644 --- a/modules/system/server.nix +++ b/modules/system/server.nix @@ -11,6 +11,7 @@ in { ./homelab/containers.nix ./homelab/gallery.nix ./homelab/tunnels.nix + ./homelab/remote.nix ./homelab/notify.nix ./homelab/search.nix ./homelab/media.nix