diff --git a/build_all.sh b/build_all.sh new file mode 100755 index 0000000..40c13bb --- /dev/null +++ b/build_all.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +set -euo pipefail + +# FLAKE_PATH="${1:-/tmp/flake}" +FLAKE_PATH=./flake.nix +CACHE="mycache" +GC_ROOT="/tmp/gcroots-ci" +mkdir -p "$GC_ROOT" + +declare -a paths_to_push + +# Build all NixOS configs +nixos_configs=$(nix eval --json "$FLAKE_PATH#nixosConfigurations" --apply 'builtins.attrNames' | jq -r '.[]') +for host in $nixos_configs; do + echo "▶ Building NixOS config: $host" + out_path=$(nix build --print-out-paths "$FLAKE_PATH#nixosConfigurations.${host}.config.system.build.toplevel") + paths_to_push+=("$out_path") +done + +# Build all Home Manager configs +home_configs=$(nix eval --json "$FLAKE_PATH#homeConfigurations" --apply 'builtins.attrNames' | jq -r '.[]') +for user in $home_configs; do + echo "▶ Building Home config: $user" + out_path=$(nix build --print-out-paths "$FLAKE_PATH#homeConfigurations.${user}.activationPackage") + paths_to_push+=("$out_path") +done + +# Push all at once +echo "📦 Pushing ${#paths_to_push[@]} paths to attic cache: $CACHE" +attic push "$CACHE" "${paths_to_push[@]}" + +# Clean up +nix store delete "${paths_to_push[@]}" diff --git a/common/networking/hosts.nix b/common/networking/hosts.nix index 54126d5..2f11d39 100644 --- a/common/networking/hosts.nix +++ b/common/networking/hosts.nix @@ -13,6 +13,8 @@ _: { 10.147.17.246 registry.zerotier.gwg313.xyz 10.147.17.246 ci.zerotier.gwg313.xyz 10.147.17.246 uptime.zerotier.gwg313.xyz + 10.147.17.246 hdoc.zerotier.gwg313.xyz + 10.147.17.246 cache.zerotier.gwg313.xyz @@ -24,6 +26,10 @@ _: { 10.1.10.50 s3-console.gwg313.xyz 10.1.10.50 pastebin.gwg313.xyz 10.1.10.50 audiobooks.gwg313.xyz + 10.1.10.50 snippets.gwg313.xyz + 10.1.10.50 bookmarks.gwg313.xyz 10.1.10.9 uptime.gwg313.xyz + 10.1.10.50 hdoc.gwg313.xyz + 10.1.10.13 cache.gwg313.xyz ''; } diff --git a/common/nixos/common.nix b/common/nixos/common.nix index b037ec7..c7ea2bf 100644 --- a/common/nixos/common.nix +++ b/common/nixos/common.nix @@ -33,7 +33,7 @@ nix = { settings = { substituters = [ - "https://cache.gwg313.xyz/mycache?priority=5" + # "https://cache.gwg313.xyz/mycache?priority=5" "https://cache.nixos.org?priority=10" "https://hyprland.cachix.org" "https://nix-community.cachix.org" @@ -41,7 +41,7 @@ "https://numtide.cachix.org" ]; trusted-public-keys = [ - "mycache:ovUjiiyQNUGjK8yZA4dPV1f8tIfCZrGIubdWvWpdvtc=" + # "mycache:ovUjiiyQNUGjK8yZA4dPV1f8tIfCZrGIubdWvWpdvtc=" "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" diff --git a/home-manager/modules/common.nix b/home-manager/modules/common.nix index de2739c..d5eb1dd 100644 --- a/home-manager/modules/common.nix +++ b/home-manager/modules/common.nix @@ -29,6 +29,7 @@ attic-client ncdu minio-client + kanata # Editors # neovim # Improved version of vim, often used with overlays. diff --git a/home-manager/modules/gammastep.nix b/home-manager/modules/gammastep.nix deleted file mode 100644 index 1256e14..0000000 --- a/home-manager/modules/gammastep.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ - services.gammastep = { - enable = true; - latitude = 45.4; - longitude = -75.7; - temperature = { - day = 6500; - night = 3500; - }; - tray = true; - }; -} diff --git a/home-manager/modules/ghostty.nix b/home-manager/modules/ghostty.nix index e9ba672..a68e100 100644 --- a/home-manager/modules/ghostty.nix +++ b/home-manager/modules/ghostty.nix @@ -12,14 +12,15 @@ # background-opacity = 0.8; background-opacity = 1; confirm-close-surface = false; - font-family = lib.mkForce "Comic Code Ligatures"; - font-size = 16; + # font-family = lib.mkForce "Comic Code Ligatures"; + font-family = lib.mkForce "Terminus"; + font-size = 9; gtk-titlebar = false; # theme = "Teerb"; }; - }; home.packages = with pkgs; [ ueberzugpp + terminus_font_ttf ]; } diff --git a/home-manager/modules/nixcord.nix b/home-manager/modules/nixcord.nix index ce30e0c..09a3981 100644 --- a/home-manager/modules/nixcord.nix +++ b/home-manager/modules/nixcord.nix @@ -1,25 +1,12 @@ +# Discord is a popular chat application. +{ inputs, ... }: { - # ... + # imports = [inputs.nixcord.homeModules.nixcord]; + programs.nixcord = { enable = true; - # quickCss = "some CSS"; config = { - # useQuickCss = true; - themeLinks = [ - ]; - frameless = true; # set some Vencord options - plugins = { - hideAttachments.enable = true; - ignoreActivities = { - enable = true; - ignorePlaying = true; - ignoreWatching = true; - # ignoredActivities = [ "someActivity" ]; - }; - }; - }; - extraConfig = { + frameless = true; }; }; - # ... } diff --git a/home-manager/modules/nvf/languages.nix b/home-manager/modules/nvf/languages.nix index c17999d..84f56b2 100644 --- a/home-manager/modules/nvf/languages.nix +++ b/home-manager/modules/nvf/languages.nix @@ -44,6 +44,13 @@ bash.enable = true; nix.enable = true; tailwind.enable = true; + typst = { + enable = true; + lsp.enable = true; + lsp.server = "tinymist"; + format.enable = true; + treesitter.enable = true; + }; }; }; } diff --git a/home-manager/modules/zen.nix b/home-manager/modules/zen.nix index 02cc268..9f83f37 100644 --- a/home-manager/modules/zen.nix +++ b/home-manager/modules/zen.nix @@ -1,87 +1,27 @@ +# Zen is a minimalistic web browser. +{ inputs, ... }: { - pkgs, - config, - inputs, - ... -}: -let - accent = "#${config.lib.stylix.colors.base0D}"; - background = "#${config.lib.stylix.colors.base00}"; - foreground = "#${config.lib.stylix.colors.base05}"; - muted = "#${config.lib.stylix.colors.base03}"; + imports = [ + inputs.zen-browser.homeModules.beta + ]; - settings = '' - { - "config": { - "title" : "Welcome Home", - "openLinksInNewTab": false, - "locale": "en-US", - "colors": { - "primary": "${accent}", - "background": "${background}", - "foreground": "${foreground}", - "muted": "#${muted}" - }, - "folders": [ - { - "name": "Bookmarks", - "links": [ - {"title": "MyNixOs", "url": "https://mynixos.com", "icon": "󱄅"}, - {"title": "Github", "url": "https://github.com", "icon": ""}, - {"title": "Proton", "url": "https://mail.proton.me/u/0/inbox", "icon": ""}, - {"title": "Chat GPT", "url": "https://chat.openai.com/", "icon": "󰭹"}, - {"title": "Nixvim", "url": "https://nix-community.github.io/nixvim/", "icon": ""}, - {"title": "Hyprland Wiki", "url": "https://wiki.hyprland.org/", "icon": "󰖬"}, - {"title": "Youtube", "url": "https://youtube.com", "icon": "󰗃"} - ] - }, - { - "name": "Uni", - "links": [ - {"title": "Outlook", "url": "https://outlook.office.com/mail/", "icon": "󰴢"}, - {"title": "Office", "url": "https://www.office.com/?auth=2", "icon": "󰏆"}, - {"title": "Teams", "url": "https://teams.microsoft.com/_", "icon": "󰊻"}, - {"title": "Brightspace", "url": "https://carleton.ca/brightspace/_", "icon": "󱨡"} - ] - } - ] - } - } - ''; + programs.zen-browser = { + enable = true; + policies = { + DisableAppUpdate = true; + DisableTelemetry = true; - homepage = pkgs.buildNpmPackage { - pname = "homepage"; - version = "0.0.0"; - - src = pkgs.fetchFromGitHub { - owner = "gwg313"; - repo = "homepage"; - rev = "b77d35ed3596eb451bd2ec78063d7cc6e73c773d"; - hash = "sha256-j/40922kfAh6zqJ4IRYpr66YXNNYsxuXwZ0aiJFJea0="; - }; - - # npmDepsHash = lib.fakeHash; - npmDepsHash = "sha256-bG+CHTq2Rst3JMxsjAC81KhK+G7WwsTVD1eyP87g0z4="; - - buildPhase = '' - npm install - cp ${pkgs.writeText "src/routes/config.json" settings} src/routes/config.json - npm run build - mkdir $out - mv build $out - ''; - - meta = { - description = "homepage"; - homepage = "https://github.com/gwg313/homepage"; + AutofillAddressesEnabled = false; + AutoFillCreditCardEnabled = false; + DisablePocket = true; + DisableProfileImport = true; + DisableSetDesktopBackground = true; + DontCheckDefaultBrowser = true; + HomepageURL = "https://duckduckgo.com"; + StartPage = "homepage"; + NewTabPage = true; + OfferToSaveLogins = false; + # find more options here: https://mozilla.github.io/policy-templates/ }; }; -in -{ - home.file.".config/homepage" = { - source = "${homepage}/build"; - recursive = true; - }; - - home.packages = with pkgs; [ inputs.zen-browser.packages."${system}".default ]; } diff --git a/home-manager/scripts/night-shift/default.nix b/home-manager/scripts/night-shift/default.nix index 2e010cc..0d78f1b 100644 --- a/home-manager/scripts/night-shift/default.nix +++ b/home-manager/scripts/night-shift/default.nix @@ -76,4 +76,42 @@ in night-shift-status night-shift-status-icon ]; + + systemd.user.services.night-shift-on = { + Unit = { + Description = "Enable Night Shift at 8:30PM"; + }; + Service = { + ExecStart = "${night-shift-on}/bin/night-shift-on"; + }; + }; + + systemd.user.timers.night-shift-on = { + Unit = { + Description = "Timer for Night Shift ON"; + }; + Timer = { + OnCalendar = "*-*-* 20:30:00"; + Persistent = true; + }; + }; + + systemd.user.services.night-shift-off = { + Unit = { + Description = "Disable Night Shift at 6:35AM"; + }; + Service = { + ExecStart = "${night-shift-off}/bin/night-shift-off"; + }; + }; + + systemd.user.timers.night-shift-off = { + Unit = { + Description = "Timer for Night Shift OFF"; + }; + Timer = { + OnCalendar = "*-*-* 06:31:00"; + Persistent = true; + }; + }; } diff --git a/hosts/candlekeep/configuration.nix b/hosts/candlekeep/configuration.nix index 425c19e..013da22 100644 --- a/hosts/candlekeep/configuration.nix +++ b/hosts/candlekeep/configuration.nix @@ -19,7 +19,7 @@ ../../common/style/stylix.nix # ../../common/style/vars/candlekeep.nix ../../common/nixos/sysctl - ../../common/nixos/tuigreet.nix + # ../../common/nixos/tuigreet.nix ../../common/networking ../../common/nixos diff --git a/hosts/panopticon/promtail.nix b/hosts/panopticon/promtail.nix index d916e33..3738e00 100644 --- a/hosts/panopticon/promtail.nix +++ b/hosts/panopticon/promtail.nix @@ -25,6 +25,23 @@ host = config.networking.hostName; }; }; + pipeline_stages = [ + { + journal = { + labels = [ "_SYSTEMD_UNIT" ]; + }; + } + ]; + } + { + job_name = "sshd"; + journal = { + labels = { + job = "sshd"; + host = config.networking.hostName; + }; + journal_filters = [ "_SYSTEMD_UNIT=sshd.service" ]; + }; } ]; }; diff --git a/hosts/seikan/routes.nix b/hosts/seikan/routes.nix index b85909d..d272e67 100644 --- a/hosts/seikan/routes.nix +++ b/hosts/seikan/routes.nix @@ -80,6 +80,18 @@ url = "https://uptime.zerotier.gwg313.xyz"; } ]; + + hdoc_zt.loadBalancer.servers = [ + { + url = "https://hdoc.zerotier.gwg313.xyz"; + } + ]; + + cache_zt.loadBalancer.servers = [ + { + url = "https://cache.zerotier.gwg313.xyz"; + } + ]; }; routers = { @@ -185,6 +197,22 @@ tls.certResolver = "le"; middlewares = [ "headers" ]; }; + + hdoc_zt = { + entryPoints = [ "websecure" ]; + rule = "Host(`hdoc.gwg313.xyz`)"; + service = "hdoc_zt"; + tls.certResolver = "le"; + middlewares = [ "headers" ]; + }; + + cache_zt = { + entryPoints = [ "websecure" ]; + rule = "Host(`cache.gwg313.xyz`)"; + service = "hdoc_zt"; + tls.certResolver = "le"; + middlewares = [ "headers" ]; + }; }; }; }; diff --git a/hosts/waypoint/routes.nix b/hosts/waypoint/routes.nix index 5119cd8..3e50065 100644 --- a/hosts/waypoint/routes.nix +++ b/hosts/waypoint/routes.nix @@ -108,6 +108,21 @@ tls.certResolver = "le"; middlewares = [ "headers" ]; }; + hdoc = { + entryPoints = [ "websecure" ]; + rule = "Host(`hdoc.gwg313.xyz`)"; + service = "hdoc_local"; + tls.certResolver = "le"; + middlewares = [ "headers" ]; + }; + + cache = { + entryPoints = [ "websecure" ]; + rule = "Host(`cache.gwg313.xyz`)"; + service = "cache_local"; + tls.certResolver = "le"; + middlewares = [ "headers" ]; + }; }; }; }; diff --git a/hosts/waypoint/routes_zerotier.nix b/hosts/waypoint/routes_zerotier.nix index ea52c68..f93e83d 100644 --- a/hosts/waypoint/routes_zerotier.nix +++ b/hosts/waypoint/routes_zerotier.nix @@ -115,6 +115,14 @@ tls.certResolver = "le"; middlewares = [ "headers" ]; }; + + hdoc_zt = { + entryPoints = [ "websecure" ]; + rule = "Host(`hdoc.zerotier.gwg313.xyz`)"; + service = "hdoc_local"; + tls.certResolver = "le"; + middlewares = [ "headers" ]; + }; }; }; }; diff --git a/hosts/waypoint/services.nix b/hosts/waypoint/services.nix index 48975ff..45da58b 100644 --- a/hosts/waypoint/services.nix +++ b/hosts/waypoint/services.nix @@ -46,18 +46,18 @@ bookmarks_local.loadBalancer.servers = [ { - url = "http://10.1.10.3:30099"; + url = "https://bookmarks.gwg313.xyz"; } ]; pastebin_local.loadBalancer.servers = [ { - url = "http://10.1.10.3:32090"; + url = "https://pastebin.gwg313.xyz"; } ]; snippets_local.loadBalancer.servers = [ { - url = "http://10.1.10.3:31111"; + url = "https://snippets.gwg313.xyz"; } ]; git_local.loadBalancer.servers = [ @@ -95,6 +95,18 @@ url = "https://uptime.gwg313.xyz"; } ]; + + hdoc_local.loadBalancer.servers = [ + { + url = "https://hdoc.gwg313.xyz"; + } + ]; + + cache_local.loadBalancer.servers = [ + { + url = "https://cache.gwg313.xyz"; + } + ]; }; }; }; diff --git a/wallpapers/ign_circuit.png b/wallpapers/ign_circuit.png new file mode 100644 index 0000000..cce40bf Binary files /dev/null and b/wallpapers/ign_circuit.png differ