diff --git a/flake.lock b/flake.lock index b5a7648..345247b 100644 --- a/flake.lock +++ b/flake.lock @@ -58,11 +58,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1728909085, - "narHash": "sha256-WLxED18lodtQiayIPDE5zwAfkPJSjHJ35UhZ8h3cJUg=", + "lastModified": 1730741070, + "narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c0b1da36f7c34a7146501f684e9ebdf15d2bebf8", + "rev": "d063c1dd113c91ab27959ba540c0d9753409edf3", "type": "github" }, "original": { @@ -88,11 +88,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1728888510, - "narHash": "sha256-nsNdSldaAyu6PE3YUA+YQLqUDJh+gRbBooMMekZJwvI=", + "lastModified": 1730785428, + "narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c", + "rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7", "type": "github" }, "original": { diff --git a/homelab/README.md b/homelab/README.md index f968a16..cc5eca3 100644 --- a/homelab/README.md +++ b/homelab/README.md @@ -1,13 +1,44 @@ -# Create proxy network -`docker network create proxy` +# Configuration steps -# Configure caddy cloudflare -Find instructions on [caddy-dns cloudflare](https://github.com/caddy-dns/cloudflare) +## 1. Install [NixOS](https://nixos.org/) + +Follow the steps from the [NixOS Manual Installation](https://nixos.org/manual/nixos/stable/#sec-installation-manual) + +> At the edit configuration.nix step you must: +> +> - Add a user to the configuration file and set a password +> - Enable openssh + +## 2. Configuring flake + +1. Clone this repository +2. Copy hardware configuration to host
+ `cp /etc/nixos/hardware-configuration.nix ~/nix/hosts//hardware-configuration.nix` +3. Rebuild system + `sudo nixos-rebuild switch --flake .#` +4. Rebuild home-manager + `home-manager switch --flake .#@` +5. Reboot + +## 3. Configuring docker containers + +1. Create proxy network
+ `docker network create proxy` + +2. Configure [Adguard](./adguard/README.md) +3. Configure [Caddy](./caddy/README.md) +4. Configure [Authelia](./authelia/README.md) +5. Configure the rest of the services # Services -| Name | Use | Domain | Auth | -| --- | --- | --- | --- | -| Adguard | DNS | https://adguard.timo.bmrs.nl/ | local | -| Caddy | Reverse proxy | - | - | -| Forgejo | Git | https://git.timo.bmrs.nl/ | Openid | -| Ldap | User directory | https://ldap.timo.bmrs.nl/ | - | + +| Name | Use | Domain | Auth | +| ------- | -------------- | ----------------------------- | ------ | +| Adguard | DNS | https://adguard.timo.bmrs.nl/ | local | +| Caddy | Reverse proxy | - | - | +| Forgejo | Git | https://git.timo.bmrs.nl/ | Openid | +| Ldap | User directory | https://ldap.timo.bmrs.nl/ | - | + +# Services to try out + +- [Beszel](https://github.com/henrygd/beszel) diff --git a/homelab/adguard/README.md b/homelab/adguard/README.md new file mode 100644 index 0000000..24a0cbc --- /dev/null +++ b/homelab/adguard/README.md @@ -0,0 +1,7 @@ +# Adguard Home + +1. Temporaraly edit ports in docker-compose file to setup +2. Configuration screen
+ 1. Change listen interface to port 3000 +3. Add DNS rewrite for *.timo.bmrs.nl +4. Delete temporaraly port edit in docker-compose diff --git a/homelab/authelia/README.md b/homelab/authelia/README.md index 7bcd542..89b03a9 100644 --- a/homelab/authelia/README.md +++ b/homelab/authelia/README.md @@ -1,2 +1,13 @@ -- Follow [This](https://www.authelia.com/configuration/identity-providers/openid-connect/provider/) guide for generating keys -- Store the keys in the /keys directory +# Authelia + +1. Edit environment variables. + 1. For HMAC_SECRET, JWT_SECRET, ADMIN_PASSWORD, SESSION_SECRET, STORAGE_ENCRYPTION_KEY, LLDAP_KEY_SEED use an random alphanumeric string of at least 64 characters + 2. For CLIENT_SECRET, CLIEND_ID: [Generate client identifier](https://www.authelia.com/integration/openid-connect/frequently-asked-questions/#how-do-i-generate-a-client-identifier-or-client-secret) + 1. Use single quotes for the client secret + +2. Generate PAM file using and save it to the /config/keys directory: [Generating keypair](https://www.authelia.com/reference/guides/generating-secure-values/#generating-an-rsa-keypair) + 1. Save the random password + +3. Configure LLDAP + 1. Create a user in LLDAP with the group: lldap_password_manager + 2. Create groups: forgejo diff --git a/homelab/caddy/README.md b/homelab/caddy/README.md index b5bf719..b69ae0f 100644 --- a/homelab/caddy/README.md +++ b/homelab/caddy/README.md @@ -1,2 +1,4 @@ # Caddy reverse proxy -Follow [this](https://github.com/caddy-dns/cloudflare) to obtain secrets + +1. Obtain cloudflare tokens: [Caddy Cloudflare](https://github.com/caddy-dns/cloudflare) +2. Set environment variables diff --git a/homelab/nextcloud/README.md b/homelab/nextcloud/README.md new file mode 100644 index 0000000..5895975 --- /dev/null +++ b/homelab/nextcloud/README.md @@ -0,0 +1,4 @@ +# Nextcloud + +1. Configure environment variables +2. Update office configuration diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index 57d5764..4da722f 100644 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -50,11 +50,15 @@ unstable.prusa-slicer signal-desktop unstable.vesktop - unstable.goofcord - unstable.blender - unstable.legcord + unstable.webcord + blender + unstable.xournalpp + freecad loupe unstable.rnote + scrcpy + unstable.bottles + # Office libreoffice diff --git a/modules/home/cli/common/helix.nix b/modules/home/cli/common/helix.nix index 9f21965..09dfc54 100644 --- a/modules/home/cli/common/helix.nix +++ b/modules/home/cli/common/helix.nix @@ -7,6 +7,8 @@ unstable.svls unstable.nil unstable.nixpkgs-fmt + unstable.tectonic + unstable.texlab dprint ]; @@ -45,6 +47,40 @@ command = "svls"; }; + language-server.texlab = { + config = { + texlab.chktex = { + onOpenAndSave = true; + onEdit = true; + }; + texlab.forwardSearch = { + executable = "zathura"; + args = [ + "--synctex-forward" + "%l:%c:%f" + "%p" + ]; + }; + texlab.build = { + auxDirectory = "build"; + logDirectory = "build"; + pdfDirectory = "build"; + forwardSearchAfter = true; + onSave = true; + executable = "tectonic"; + args = [ + "-X" + "compile" + "--synctex" + "--keep-logs" + "--keep-intermediates" + "--outdir=build" + "%f" + ]; + }; + }; + }; + language = [ { name = "verilog"; @@ -65,6 +101,11 @@ formatter.command = "dprint"; formatter.args = ["fmt" "--stdin" "md" "--config" "/home/xeovalyte/.config/.dprint.json"]; } + { + name = "typst"; + auto-format = false; + formatter.command = "${pkgs.typstfmt}/bin/typstfmt"; + } ]; }; themes = { diff --git a/modules/home/gui/common/firefox.nix b/modules/home/gui/common/firefox.nix index 9019361..5bf5cb5 100644 --- a/modules/home/gui/common/firefox.nix +++ b/modules/home/gui/common/firefox.nix @@ -60,16 +60,20 @@ name = "Brightspace"; bookmarks = [ { - name = "LCA"; - url = "https://brightspace.tudelft.nl/d2l/le/content/681008/Home"; + name = "Books"; + url = "https://drive.google.com/drive/folders/1L5OTbn5p3i7_Nc80hc5PztiEGHKwi-I4"; } { - name = "DSA"; - url = "https://brightspace.tudelft.nl/d2l/le/content/681012/Home"; + name = "LCB"; + url = "https://brightspace.tudelft.nl/d2l/le/content/681010/Home"; } { - name = "iEE"; - url = "https://brightspace.tudelft.nl/d2l/le/content/681018/Home"; + name = "Calculus"; + url = "https://brightspace.tudelft.nl/d2l/le/content/681024/Home"; + } + { + name = "IP1"; + url = "https://brightspace.tudelft.nl/d2l/le/content/681020/Home"; } ]; } diff --git a/modules/home/gui/hyprland/default.nix b/modules/home/gui/hyprland/default.nix index 17cbfbe..2594728 100644 --- a/modules/home/gui/hyprland/default.nix +++ b/modules/home/gui/hyprland/default.nix @@ -51,6 +51,7 @@ follow_mouse = 2; touchpad = { natural_scroll = true; + scroll_factor = 0.5; clickfinger_behavior = true; }; };