diff --git a/flake.lock b/flake.lock index 0e457ac..f722a7b 100644 --- a/flake.lock +++ b/flake.lock @@ -27,11 +27,11 @@ }, "catppuccin": { "locked": { - "lastModified": 1726952185, - "narHash": "sha256-l/HbsQjJMT6tlf8KCooFYi3J6wjIips3n6/aWAoLY4g=", + "lastModified": 1730036420, + "narHash": "sha256-rv2bz7J6Wo7AenPiu4+ptCB1AFyaMcS77y89zbRAtI8=", "owner": "catppuccin", "repo": "nix", - "rev": "630b559cc1cb4c0bdd525af506935323e4ccd5d1", + "rev": "0b7bf04628414a402d255924f65e9a0d1a53d92b", "type": "github" }, "original": { @@ -288,11 +288,11 @@ ] }, "locked": { - "lastModified": 1727383923, - "narHash": "sha256-4/vacp3CwdGoPf8U4e/N8OsGYtO09WTcQK5FqYfJbKs=", + "lastModified": 1730016908, + "narHash": "sha256-bFCxJco7d8IgmjfNExNz9knP8wvwbXU4s/d53KOK6U0=", "owner": "nix-community", "repo": "home-manager", - "rev": "ffe2d07e771580a005e675108212597e5b367d2d", + "rev": "e83414058edd339148dc142a8437edb9450574c8", "type": "github" }, "original": { @@ -348,11 +348,11 @@ }, "nixlib": { "locked": { - "lastModified": 1726966855, - "narHash": "sha256-25ByioeOBFcnitO5lM/Mufnv/u7YtHEHEM8QFuiS40k=", + "lastModified": 1729386149, + "narHash": "sha256-hUP9oxmnOmNnKcDOf5Y55HQ+NnoT0+bLWHLQWLLw9Ks=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "575704ff85d3a41dc5bfef7b55380cbc7b87f3c2", + "rev": "cce4521b6df014e79a7b7afc58c703ed683c916e", "type": "github" }, "original": { @@ -369,11 +369,11 @@ ] }, "locked": { - "lastModified": 1727312535, - "narHash": "sha256-exnTgS6OBYvEa8v5x8UsLQK2ERdDFwXNFQHoT2cqycY=", + "lastModified": 1729472750, + "narHash": "sha256-s93LPHi5BN7I2xSGNAFWiYb8WRsPvT1LE9ZjZBrpFlg=", "owner": "nix-community", "repo": "nixos-generators", - "rev": "f31447cd3f8e54674bd1675969e97e6043a309bc", + "rev": "7c60ba4bc8d6aa2ba3e5b0f6ceb9fc07bc261565", "type": "github" }, "original": { @@ -384,11 +384,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1727540359, - "narHash": "sha256-U+225h1kJZpWb23+RaX1sBkqC4fA7aa7eBbgiQ5HcO4=", + "lastModified": 1730068391, + "narHash": "sha256-jlAGtfMuI8pUUoUmNkm2P/38pOtHZdcAf3Az8XQLAf4=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "fb08bde00c20252b892a3e57fb094eb62b65ba61", + "rev": "6906ac67a1078cf950b8527341e229eeecb5bc30", "type": "github" }, "original": { @@ -400,11 +400,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1727348695, - "narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=", + "lastModified": 1729880355, + "narHash": "sha256-RP+OQ6koQQLX5nw0NmcDrzvGL8HDLnyXt/jHhL1jwjM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1925c603f17fc89f4c8f6bf6f631a802ad85d784", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", "type": "github" }, "original": { @@ -516,11 +516,11 @@ "powerlevel10k": { "flake": false, "locked": { - "lastModified": 1726575020, - "narHash": "sha256-cI7Nf+W02xfnarri7Dy+nXXpq5u+Ggh7HKk1++0Qq4Q=", + "lastModified": 1729844804, + "narHash": "sha256-4g6L7ZL86QqrGnZ1F8dHbHlT9T80DR2FGsW1qQbk14k=", "owner": "romkatv", "repo": "powerlevel10k", - "rev": "087405df7838f4c3e835025699bd7b98b9731acc", + "rev": "67a365b9dbf2c784ca8e655d681df10ef2d4a1a4", "type": "github" }, "original": { diff --git a/modules/home/apps/tmux/default.nix b/modules/home/apps/tmux/default.nix index 79a0af3..3607a01 100644 --- a/modules/home/apps/tmux/default.nix +++ b/modules/home/apps/tmux/default.nix @@ -9,14 +9,29 @@ inherit (pkgs) tmuxPlugins; cfg = config.${namespace}.apps.tmux; + + tmsConfig = { + display_full_path = true; + session_sort_order = "LastAttached"; + search_dirs = [ + { + path = "${config.home.homeDirectory}/src"; + depth = 2; + } + ]; + }; in { options.${namespace}.apps.tmux = { enable = mkEnableOption "tmux"; }; config = lib.mkIf cfg.enable { + home.packages = [pkgs.tmux-sessionizer]; + programs.tmux = { enable = true; + + baseIndex = 1; catppuccin.enable = true; keyMode = "vi"; newSession = true; @@ -40,19 +55,40 @@ in { } tmuxPlugins.open + tmuxPlugins.pain-control tmuxPlugins.tmux-fzf tmuxPlugins.vim-tmux-navigator ]; - extraConfig = '' - # Scrolling with mouse wheel scrolls output instead of previous commands - setw -g mouse on + extraConfig = + '' + # Scrolling with mouse wheel scrolls output instead of previous commands + setw -g mouse on - # Open panes in the same directory - bind c new-window -c "#{pane_current_path}" - bind '"' split-window -c "#{pane_current_path}" - bind % split-window -h -c "#{pane_current_path}" - ''; + # Open panes in the same directory + bind c new-window -c "#{pane_current_path}" + bind '"' split-window -c "#{pane_current_path}" + bind % split-window -h -c "#{pane_current_path}" + + # sessionizer + bind C-o display-popup -E "${pkgs.tmux-sessionizer}/bin/tms" + bind C-j display-popup -E "${pkgs.tmux-sessionizer}/bin/tms switch" + bind C-w display-popup -E "${pkgs.tmux-sessionizer}/bin/tms windows" + bind C-s command-prompt -p "Rename active session to:" "run-shell '${pkgs.tmux-sessionizer}/bin/tms rename %1'" + + '' + + lib.strings.optionalString config.programs.lazygit.enable '' + # Open lazygit in a popup + # Spins up a new session with a '-lg' suffix (hitting the shortcut + # toggles between attaching and detaching) + bind C-g if-shell "[[ $(tmux display-message -p '#S') == *-lg ]]" { + detach-client + } { + display-popup -h 90% -w 90% -E "tmux new-session -A -s $(tmux display-message -p '#S')-lg ${pkgs.lazygit}/bin/lazygit" + } + ''; }; + + xdg.configFile."tms/config.toml".source = (pkgs.formats.toml {}).generate "tms-config" tmsConfig; }; } diff --git a/modules/home/tools/eza/default.nix b/modules/home/tools/eza/default.nix index dcc871c..6f8dc98 100644 --- a/modules/home/tools/eza/default.nix +++ b/modules/home/tools/eza/default.nix @@ -15,7 +15,7 @@ in { config = mkIf cfg.enable { programs.eza = { enable = true; - icons = true; + icons = "auto"; git = true; }; }; diff --git a/modules/nixos/services/gitea/default.nix b/modules/nixos/services/forgejo/default.nix similarity index 68% rename from modules/nixos/services/gitea/default.nix rename to modules/nixos/services/forgejo/default.nix index d939908..01bdc75 100644 --- a/modules/nixos/services/gitea/default.nix +++ b/modules/nixos/services/forgejo/default.nix @@ -7,11 +7,11 @@ }: let inherit (lib) mkIf mkEnableOption mkOption types; - cfg = config.${namespace}.services.gitea; - gitea_cfg = config.services.gitea; + cfg = config.${namespace}.services.forgejo; + forgejo_cfg = config.services.forgejo; in { - options.${namespace}.services.gitea = { - enable = mkEnableOption "gitea"; + options.${namespace}.services.forgejo = { + enable = mkEnableOption "forgejo"; acmeCertName = mkOption { type = types.str; default = ""; @@ -23,19 +23,18 @@ in { }; config = mkIf cfg.enable { - services.gitea = { + services.forgejo = { enable = true; - appName = "Internal Gitea server"; database = { - type = "postgres"; + type = "sqlite3"; }; useWizard = false; settings = { server = { - DOMAIN = "gitea.kilonull.com"; - ROOT_URL = "https://gitea.kilonull.com"; + DOMAIN = "git.kilonull.com"; + ROOT_URL = "https://git.kilonull.com"; HTTP_PORT = 3001; }; @@ -47,23 +46,27 @@ in { ui.THEMES = '' catppuccin-latte-rosewater,catppuccin-latte-flamingo,catppuccin-latte-pink,catppuccin-latte-mauve,catppuccin-latte-red,catppuccin-latte-maroon,catppuccin-latte-peach,catppuccin-latte-yellow,catppuccin-latte-green,catppuccin-latte-teal,catppuccin-latte-sky,catppuccin-latte-sapphire,catppuccin-latte-blue,catppuccin-latte-lavender,catppuccin-frappe-rosewater,catppuccin-frappe-flamingo,catppuccin-frappe-pink,catppuccin-frappe-mauve,catppuccin-frappe-red,catppuccin-frappe-maroon,catppuccin-frappe-peach,catppuccin-frappe-yellow,catppuccin-frappe-green,catppuccin-frappe-teal,catppuccin-frappe-sky,catppuccin-frappe-sapphire,catppuccin-frappe-blue,catppuccin-frappe-lavender,catppuccin-macchiato-rosewater,catppuccin-macchiato-flamingo,catppuccin-macchiato-pink,catppuccin-macchiato-mauve,catppuccin-macchiato-red,catppuccin-macchiato-maroon,catppuccin-macchiato-peach,catppuccin-macchiato-yellow,catppuccin-macchiato-green,catppuccin-macchiato-teal,catppuccin-macchiato-sky,catppuccin-macchiato-sapphire,catppuccin-macchiato-blue,catppuccin-macchiato-lavender,catppuccin-mocha-rosewater,catppuccin-mocha-flamingo,catppuccin-mocha-pink,catppuccin-mocha-mauve,catppuccin-mocha-red,catppuccin-mocha-maroon,catppuccin-mocha-peach,catppuccin-mocha-yellow,catppuccin-mocha-green,catppuccin-mocha-teal,catppuccin-mocha-sky,catppuccin-mocha-sapphire,catppuccin-mocha-blue,catppuccin-mocha-lavender ''; + ui.DEFAULT_THEME = "catppuccin-mocha-green"; }; }; systemd.tmpfiles.rules = [ - "d '${gitea_cfg.customDir}/public' 0750 ${gitea_cfg.user} ${gitea_cfg.group} - -" - "z '${gitea_cfg.customDir}/public' 0750 ${gitea_cfg.user} ${gitea_cfg.group} - -" - "d '${gitea_cfg.customDir}/public/assets' 0750 ${gitea_cfg.user} ${gitea_cfg.group} - -" - "z '${gitea_cfg.customDir}/public/assets' 0750 ${gitea_cfg.user} ${gitea_cfg.group} - -" - "L+ '${gitea_cfg.customDir}/public/assets/css' - - - - ${pkgs.aa.catppuccin-gitea}/share/gitea-themes" + "d '${forgejo_cfg.customDir}/public' 0750 ${forgejo_cfg.user} ${forgejo_cfg.group} - -" + "z '${forgejo_cfg.customDir}/public' 0750 ${forgejo_cfg.user} ${forgejo_cfg.group} - -" + "d '${forgejo_cfg.customDir}/public/assets' 0750 ${forgejo_cfg.user} ${forgejo_cfg.group} - -" + "z '${forgejo_cfg.customDir}/public/assets' 0750 ${forgejo_cfg.user} ${forgejo_cfg.group} - -" + "L+ '${forgejo_cfg.customDir}/public/assets/css' - - - - ${pkgs.aa.catppuccin-gitea}/share/gitea-themes" ]; services.nginx = { enable = true; - virtualHosts."gitea.kilonull.com" = + virtualHosts."git.kilonull.com" = { locations."/" = { - proxyPass = "http://127.0.0.1:${toString gitea_cfg.settings.server.HTTP_PORT}"; + proxyPass = "http://127.0.0.1:${toString forgejo_cfg.settings.server.HTTP_PORT}"; + }; + locations."= /" = { + return = "301 /explore/repos"; }; } // lib.optionalAttrs (cfg.acmeCertName != "") { diff --git a/modules/nixos/services/nextcloud/default.nix b/modules/nixos/services/nextcloud/default.nix index d635b13..07850f7 100644 --- a/modules/nixos/services/nextcloud/default.nix +++ b/modules/nixos/services/nextcloud/default.nix @@ -27,7 +27,7 @@ in { services.nextcloud = { enable = true; - package = pkgs.nextcloud29; + package = pkgs.nextcloud30; hostName = "nextcloud.kilonull.com"; https = true; database.createLocally = true; diff --git a/packages/teslamate-grafana-dashboards/default.nix b/packages/teslamate-grafana-dashboards/default.nix index c0bf659..8645d5e 100644 --- a/packages/teslamate-grafana-dashboards/default.nix +++ b/packages/teslamate-grafana-dashboards/default.nix @@ -5,13 +5,13 @@ }: stdenv.mkDerivation rec { pname = "teslamate-grafana-dashboards"; - version = "1.30.1"; + version = "1.31.0"; src = fetchFromGitHub { owner = "teslamate-org"; repo = "teslamate"; rev = "v${version}"; - hash = "sha256-Iky9zWb3m/ex/amZw2dP5ZOpFw3uyg0JG6e9PkV+t4A="; + hash = "sha256-aX6FjOKyjsA/0IgLw/AnB01ddNk0yS6vd01BH/reBP4="; }; dontBuild = true; diff --git a/systems/x86_64-linux/gospel/default.nix b/systems/x86_64-linux/gospel/default.nix index bc8ffb3..6417f98 100644 --- a/systems/x86_64-linux/gospel/default.nix +++ b/systems/x86_64-linux/gospel/default.nix @@ -63,6 +63,19 @@ system.monitoring.enable = true; }; + services.udev.packages = [ + (pkgs.writeTextFile { + name = "microbit-udev-rules"; + text = '' + # CMSIS-DAP for microbit + ACTION!="add|change", GOTO="microbit_rules_end" + SUBSYSTEM=="usb", ATTR{idVendor}=="0d28", ATTR{idProduct}=="0204", TAG+="uaccess" + LABEL="microbit_rules_end" + ''; + destination = "/etc/udev/rules.d/69-microbit.rules"; + }) + ]; + services.gitea-actions-runner.instances = { gospel = { enable = true; diff --git a/systems/x86_64-linux/node/default.nix b/systems/x86_64-linux/node/default.nix index e52b4ee..f647198 100644 --- a/systems/x86_64-linux/node/default.nix +++ b/systems/x86_64-linux/node/default.nix @@ -50,7 +50,7 @@ }; acmeCertName = "kilonull.com"; }; - services.gitea = { + services.forgejo = { enable = true; acmeCertName = "kilonull.com"; };