From 2f7179e7d59f67e9f02ebc0a1a9864b130011a98 Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Mon, 7 Oct 2024 22:35:37 +0200 Subject: [PATCH 1/7] Update youmubot --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 73aca71..33ccfb1 100644 --- a/flake.lock +++ b/flake.lock @@ -1549,11 +1549,11 @@ "rust-overlay": "rust-overlay_4" }, "locked": { - "lastModified": 1726330095, - "narHash": "sha256-5Qhb4stOM8gbasfALX7Zaw7Q6OZZm2PjBC/8dYAOR8g=", + "lastModified": 1727526746, + "narHash": "sha256-xoLYz6yjKeQlJMrPtahUCsDJ1GYuQYAHMaXZsHIwtco=", "owner": "natsukagami", "repo": "youmubot", - "rev": "76fd6c803d9c50a3ad677218dad249f596efe760", + "rev": "a8d1d1122373a918e8328d35eec6198c814ebc85", "type": "github" }, "original": { From 55397974b4cefb26550adc57db24518ab149137d Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Mon, 7 Oct 2024 22:53:57 +0200 Subject: [PATCH 2/7] Update conduit to v0.9 --- flake.lock | 8 ++--- flake.nix | 2 +- modules/cloud/conduit/default.nix | 51 ++----------------------------- 3 files changed, 7 insertions(+), 54 deletions(-) diff --git a/flake.lock b/flake.lock index 33ccfb1..5168e5f 100644 --- a/flake.lock +++ b/flake.lock @@ -55,16 +55,16 @@ "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1718214198, - "narHash": "sha256-/qKPeE2Ptweaf+rHOvdW0TUDLwN9D93MMgDoU4fTzEA=", + "lastModified": 1728224242, + "narHash": "sha256-mQLfRAun2G/LDnw3jyFGJbOqpxh2PL8IGzFELRfAgAI=", "owner": "famedly", "repo": "conduit", - "rev": "7a5b8930134cf7ea5ff9880e6fa468b2b3e05c98", + "rev": "f8d7ef04e664580e882bac852877b68e7bd3ab1e", "type": "gitlab" }, "original": { "owner": "famedly", - "ref": "v0.8.0", + "ref": "v0.9.0", "repo": "conduit", "type": "gitlab" } diff --git a/flake.nix b/flake.nix index 183de09..e68e428 100644 --- a/flake.nix +++ b/flake.nix @@ -47,7 +47,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; dtth-phanpy.url = "git+ssh://gitea@git.dtth.ch/nki/phanpy?ref=dtth-fork"; - conduit.url = "gitlab:famedly/conduit/v0.8.0"; + conduit.url = "gitlab:famedly/conduit/v0.9.0"; nix-gaming.url = github:fufexan/nix-gaming; # --- Sources diff --git a/modules/cloud/conduit/default.nix b/modules/cloud/conduit/default.nix index 08fe655..c4ad7cd 100644 --- a/modules/cloud/conduit/default.nix +++ b/modules/cloud/conduit/default.nix @@ -74,6 +74,8 @@ with lib; global.port = instance.port; global.allow_registration = instance.allow_registration; global.database_path = "/mnt/data/${srvName}/"; + global.well_known_client = "https://${instance.host}"; + global.well_known_server = "${instance.host}:443"; }); in { @@ -114,61 +116,12 @@ with lib; )) cfg.instances); - # Serving .well-known files - # This is a single .well-known/matrix/server file that points to the server, - # which is NOT on port 8448 since Cloudflare doesn't allow us to route HTTPS - # through that port. - config.services.nginx = mkIf cfg.enable - { - enable = true; - virtualHosts = lib.attrsets.mapAttrs' - (name: instance: lib.attrsets.nameValuePair "conduit-${name}-well-known" { - listen = [{ addr = "127.0.0.1"; port = instance.well-known_port; }]; - # Check https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/configuring-well-known.md - # for the file structure. - root = pkgs.symlinkJoin - { - name = "well-known-files-for-conduit-${name}"; - paths = [ - (pkgs.writeTextDir ".well-known/matrix/client" (builtins.toJSON { - "m.homeserver".base_url = "https://${instance.host}"; - "org.matrix.msc3575.proxy".url = "https://${instance.host}"; - })) - (pkgs.writeTextDir ".well-known/matrix/server" (builtins.toJSON { - "m.server" = "${instance.host}:443"; - })) - ]; - }; - extraConfig = - # Enable CORS from anywhere since we want all clients to find us out - '' - add_header 'Access-Control-Allow-Origin' "*"; - '' + - # Force returning values to be JSON data - '' - default_type application/json; - ''; - }) - cfg.instances; - }; - config.cloud.traefik.hosts = mkIf cfg.enable ( (lib.attrsets.mapAttrs' (name: instance: lib.attrsets.nameValuePair "conduit-${name}" ({ inherit (instance) host port noCloudflare; })) cfg.instances) - // (lib.attrsets.mapAttrs' - (name: instance: lib.attrsets.nameValuePair "conduit-${name}-well-known" ( - let - server_name = if instance.server_name == "" then instance.host else instance.server_name; - in - { - port = instance.well-known_port; - filter = "Host(`${server_name}`) && PathPrefix(`/.well-known`)"; - } - )) - cfg.instances) ); } From 600ba660c9634baa9b35793a810137c27897b2ef Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Wed, 9 Oct 2024 11:47:29 +0200 Subject: [PATCH 3/7] Add compatibility workarounds for 24.05 --- home/modules/programs/my-kitty/default.nix | 14 +++++++++++--- modules/common/linux/default.nix | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/home/modules/programs/my-kitty/default.nix b/home/modules/programs/my-kitty/default.nix index 298c53b..a1c03c0 100644 --- a/home/modules/programs/my-kitty/default.nix +++ b/home/modules/programs/my-kitty/default.nix @@ -2,10 +2,20 @@ let cfg = config.nki.programs.kitty; + + theme = { lib, options, config, ... }: { + programs.kitty = lib.mkIf config.nki.programs.kitty.enable ( + if builtins.hasAttr "themeFile" options.programs.kitty then { + themeFile = "ayu_light"; + } else { + theme = "Ayu Light"; + } + ); + }; in with lib; { - imports = [ ./darwin.nix ./linux.nix ./tabs.nix ]; + imports = [ theme ./darwin.nix ./linux.nix ./tabs.nix ]; options.nki.programs.kitty = { enable = mkEnableOption "Enable kitty"; @@ -50,8 +60,6 @@ with lib; font.name = "Fantasque Sans Mono"; font.size = cfg.fontSize; - themeFile = "ayu_light"; - settings = let # Background color and transparency diff --git a/modules/common/linux/default.nix b/modules/common/linux/default.nix index 5029847..39b69a0 100644 --- a/modules/common/linux/default.nix +++ b/modules/common/linux/default.nix @@ -38,7 +38,7 @@ let }; accounts = { pkgs, ... }: mkIf (config.common.linux.enable && !pkgs.stdenv.isAarch64) { - environment.systemPackages = with pkgs; [ glib gnome-control-center ]; + environment.systemPackages = [ pkgs.glib (pkgs.gnome-control-center or pkgs.gnome.gnome-control-center) ]; services.accounts-daemon.enable = true; services.gnome.gnome-online-accounts.enable = true; # programs.evolution.enable = true; From 267f135972550d04832c901b8f784a7b4505a78d Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Thu, 10 Oct 2024 16:59:52 +0200 Subject: [PATCH 4/7] Enhance nx and nsh to support unstable and git nixpkgs --- home/fish/fish.nix | 55 +++++++++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/home/fish/fish.nix b/home/fish/fish.nix index 46c157d..23a49cd 100644 --- a/home/fish/fish.nix +++ b/home/fish/fish.nix @@ -61,19 +61,18 @@ in # Simplify nix usage! nx = { body = '' - set impure - if test $argv[1] = "--impure" - set impure "--impure" - set argv $argv[2..] - end - if test (count $argv) -gt 0 - nix run $impure nixpkgs#$argv[1] -- $argv[2..] - else - echo "nx [--impure] {package} [args...]" + argparse -s 'h/help' 'impure' 'u/unstable' 'g/git' -- $argv + if set -q _flag_help || test (count $argv) -eq 0 + echo "nx [--impure] [-u/--unstable/-g/--git] {package} [args...]" return 1 + else + set -q _flag_impure && set impure "--impure" + set nixpkgs "nixpkgs" + set -q _flag_unstable && set nixpkgs "nixpkgs-unstable" + set -q _flag_git && set nixpkgs "github:nixOS/nixpkgs/nixpkgs-unstable" + nix run $impure $nixpkgs"#"$argv[1] -- $argv[2..] end ''; - wraps = "nix run"; description = "Runs an app from the nixpkgs store."; }; @@ -81,25 +80,35 @@ in description = "Spawns a shell from the given nixpkgs packages"; wraps = "nix shell"; body = '' - set impure - if test $argv[1] = "--impure" - set impure "--impure" - set argv $argv[2..] + function help + echo "nsh [--impure] [--impure] [-u/--unstable/-g/--git] {package}* [-c command args...]" end - if test (count $argv) -gt 0 - set minusc (contains -i -- "-c" $argv) - if test -z $minusc - nix shell $impure nixpkgs#$argv -c fish - else if test $minusc -eq (count $argv) - echo "nsh [--impure] {packages} [-c command args...]" + argparse -s 'h/help' 'impure' 'u/unstable' 'g/git' -- $argv + if set -q _flag_help || test (count $argv) -eq 0 + help + return 0 + end + set packages $argv + set minusc (contains -i -- "-c" $argv) + if test -n "$minusc" + if test $minusc -eq 1 + help return 1 - else - nix shell $impure nixpkgs#$argv[..(math $minusc - 1)] $argv[$minusc..] end + set packages $argv[..(math $minusc - 1)] + set argv $argv[(math $minusc + 1)..] else - echo "nsh [--impure] {packages} [-c command args...]" + set argv "fish" "-i" + end + if test (count $packages) -eq 0 + help return 1 end + set -q _flag_impure && set impure "--impure" + set nixpkgs "nixpkgs" + set -q _flag_unstable && set nixpkgs "nixpkgs-unstable" + set -q _flag_git && set nixpkgs "github:nixOS/nixpkgs/nixpkgs-unstable" + nix shell $impure $nixpkgs"#"$packages --command $argv ''; }; # Grep stuff From d99d57f53eec7c4229f8a164759467d88727b604 Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Thu, 10 Oct 2024 17:00:54 +0200 Subject: [PATCH 5/7] Update nixpkgs-unstable, add scala to common --- flake.lock | 12 ++++++------ home/common.nix | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 5168e5f..6cfe9e7 100644 --- a/flake.lock +++ b/flake.lock @@ -742,11 +742,11 @@ ] }, "locked": { - "lastModified": 1727383923, - "narHash": "sha256-4/vacp3CwdGoPf8U4e/N8OsGYtO09WTcQK5FqYfJbKs=", + "lastModified": 1728337164, + "narHash": "sha256-VdRTjJFyq4Q9U7Z/UoC2Q5jK8vSo6E86lHc2OanXtvc=", "owner": "nix-community", "repo": "home-manager", - "rev": "ffe2d07e771580a005e675108212597e5b367d2d", + "rev": "038630363e7de57c36c417fd2f5d7c14773403e4", "type": "github" }, "original": { @@ -1022,11 +1022,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1727492312, - "narHash": "sha256-oRkgc+DosM3HIl9el98TxF2rtliKHCNVw00nlQC7xYM=", + "lastModified": 1728409405, + "narHash": "sha256-kk530XBUGDpt0DQbyUb3yDpSddPqF9PA5KTo/nsmmg0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "4471f9f67fe0f95f5fec4cc2ebac59fe32af2b62", + "rev": "1366d1af8f58325602280e43ed6233849fb92216", "type": "github" }, "original": { diff --git a/home/common.nix b/home/common.nix index b646fc1..a78b648 100644 --- a/home/common.nix +++ b/home/common.nix @@ -28,6 +28,7 @@ fx # JSON viewer glow # Markdown viewer nix-output-monitor # Nice nix output formatting + unstable.scala-next ## PDF Processors poppler_utils ## htop replacement From c14aab4a8f7064255b6464710e7303e17527c30e Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Sat, 12 Oct 2024 17:08:29 +0200 Subject: [PATCH 6/7] Update phanpy and gts --- flake.lock | 20 ++++++++++---------- overlay.nix | 6 +++--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/flake.lock b/flake.lock index 6cfe9e7..0f8ef1f 100644 --- a/flake.lock +++ b/flake.lock @@ -232,11 +232,11 @@ "nixpkgs": "nixpkgs_7" }, "locked": { - "lastModified": 1723470164, - "narHash": "sha256-ZWcDD4HTmFtEJgEA2Ydg2mA+yu0FVcfEHbCGVXDatfw=", + "lastModified": 1728598146, + "narHash": "sha256-8zAvVSR3chBSJ7YKW+MYC1mrDxtZDFBPVobfO4KPXzg=", "ref": "dtth-fork", - "rev": "c72bd47bbd18523b951b3fa73c789629504d0eb3", - "revCount": 2721, + "rev": "fc6bd96aef92d7796d9c7663ac23e3fa837f8ddb", + "revCount": 3218, "type": "git", "url": "ssh://gitea@git.dtth.ch/nki/phanpy" }, @@ -485,11 +485,11 @@ "systems": "systems_3" }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", "type": "github" }, "original": { @@ -1134,11 +1134,11 @@ }, "nixpkgs_7": { "locked": { - "lastModified": 1723175592, - "narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=", + "lastModified": 1728492678, + "narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=", "owner": "nixOS", "repo": "nixpkgs", - "rev": "5e0ca22929f3342b19569b21b2f3462f053e497b", + "rev": "5633bcff0c6162b9e4b5f1264264611e950c8ec7", "type": "github" }, "original": { diff --git a/overlay.nix b/overlay.nix index 17501c1..def8c33 100644 --- a/overlay.nix +++ b/overlay.nix @@ -25,7 +25,7 @@ let overlay-versioning = final: prev: { gotosocial = prev.gotosocial.overrideAttrs (attrs: rec { - version = "0.16.0"; + version = "0.17.0-rc3"; ldflags = [ "-s" "-w" @@ -35,13 +35,13 @@ let web-assets = final.fetchurl { url = "https://github.com/superseriousbusiness/gotosocial/releases/download/v${version}/gotosocial_${version}_web-assets.tar.gz"; - hash = "sha256-aZQpd5KvoZvXEMVzGbWrtGsc+P1JStjZ6U5mX6q7Vb0="; + hash = "sha256-Uwltr5syOnDZOgMc2L/iedxiMMKXmULzm0SAs3W0SXQ="; }; src = final.fetchFromGitHub { owner = "superseriousbusiness"; repo = "gotosocial"; rev = "v${version}"; - hash = "sha256-QoG09+jmq5e5vxDVtkhY35098W/9B1HsYTuUnz43LV4="; + hash = "sha256-c7CJFQWTMCBZuzI/Mf5PJuCWY1NKW4LLMAJem3TTJvM="; }; postInstall = '' tar xf ${web-assets} From 22d1dbebe68f396328e2c6b60394565efb16d5cf Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Sun, 13 Oct 2024 22:41:50 +0200 Subject: [PATCH 7/7] Update youmubot --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 0f8ef1f..3a7a51a 100644 --- a/flake.lock +++ b/flake.lock @@ -1549,11 +1549,11 @@ "rust-overlay": "rust-overlay_4" }, "locked": { - "lastModified": 1727526746, - "narHash": "sha256-xoLYz6yjKeQlJMrPtahUCsDJ1GYuQYAHMaXZsHIwtco=", + "lastModified": 1728746553, + "narHash": "sha256-BlZpmTt6wyMIpJvd5nEWGgqJQbtjVTzBlYYQVShZ7Io=", "owner": "natsukagami", "repo": "youmubot", - "rev": "a8d1d1122373a918e8328d35eec6198c814ebc85", + "rev": "c5354e30ad40f67938deed1deb5ea92bb168a586", "type": "github" }, "original": {