Merge remote-tracking branch 'origin/master' into kakoune-package
This commit is contained in:
commit
c726f21983
46
flake.lock
46
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"
|
||||
}
|
||||
|
@ -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": {
|
||||
|
@ -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": {
|
||||
|
@ -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": {
|
||||
|
@ -1549,11 +1549,11 @@
|
|||
"rust-overlay": "rust-overlay_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726330095,
|
||||
"narHash": "sha256-5Qhb4stOM8gbasfALX7Zaw7Q6OZZm2PjBC/8dYAOR8g=",
|
||||
"lastModified": 1728746553,
|
||||
"narHash": "sha256-BlZpmTt6wyMIpJvd5nEWGgqJQbtjVTzBlYYQVShZ7Io=",
|
||||
"owner": "natsukagami",
|
||||
"repo": "youmubot",
|
||||
"rev": "76fd6c803d9c50a3ad677218dad249f596efe760",
|
||||
"rev": "c5354e30ad40f67938deed1deb5ea92bb168a586",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Reference in a new issue