Compare commits

..

No commits in common. "8102d1d00913847e52f5ea5a0648d8981769b383" and "a422110adfdf1642c34a912b895ebc5c528727a4" have entirely different histories.

23 changed files with 403 additions and 603 deletions

650
flake.lock generated

File diff suppressed because it is too large Load diff

View file

@ -20,10 +20,6 @@
reviewqueue.url = "github:jdonszelmann/review-queue"; reviewqueue.url = "github:jdonszelmann/review-queue";
compiler-construction-2021.url = "git+ssh://forgejo@git.donsz.nl/jana/eelco-visser-compiler-construction.git"; compiler-construction-2021.url = "git+ssh://forgejo@git.donsz.nl/jana/eelco-visser-compiler-construction.git";
mifg.url = "git+ssh://forgejo@git.donsz.nl/jana/money.is.fckn.gay.git"; mifg.url = "git+ssh://forgejo@git.donsz.nl/jana/money.is.fckn.gay.git";
isadle.url = "git+ssh://forgejo@git.donsz.nl/jana/isadle.git";
# desktop/laptop
probe-rs-rules.url = "github:jneem/probe-rs-rules";
# server # server
raw-data.url = "git+ssh://forgejo@git.donsz.nl/jana/raw-data.git"; raw-data.url = "git+ssh://forgejo@git.donsz.nl/jana/raw-data.git";
@ -34,7 +30,7 @@
# home # home
nixvim = { nixvim = {
url = "github:nix-community/nixvim"; url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs-unstable";
}; };
t.url = "github:jdonszelmann/t-rs"; t.url = "github:jdonszelmann/t-rs";
dumpasm.url = "github:jdonszelmann/dumpasm"; dumpasm.url = "github:jdonszelmann/dumpasm";

View file

@ -19,7 +19,7 @@
host all all 10.0.0.0/24 trust host all all 10.0.0.0/24 trust
# and the local network # and the local network
host all all 192.168.178.0/24 trust host all all 192.168.0.0/24 trust
''; '';
settings = { settings = {
listen_addresses = "*"; listen_addresses = "*";
@ -58,10 +58,6 @@
name = "immich"; name = "immich";
ensureDBOwnership = true; ensureDBOwnership = true;
} }
{
name = "homepage";
ensureDBOwnership = true;
}
]; ];
ensureDatabases = map (i: i.name) ensureUsers; ensureDatabases = map (i: i.name) ensureUsers;
}; };

View file

@ -146,6 +146,118 @@ in
}; };
}; };
systemd.services.promtail.serviceConfig.User = lib.mkForce "nginx";
services.promtail = {
enable = true;
configuration = {
server = {
http_listen_port = 3031;
grpc_listen_port = 0;
};
positions = {
filename = "/tmp/positions.yaml";
};
clients = [
{
url = "http://127.0.0.1:${toString config.services.loki.configuration.server.http_listen_port}/loki/api/v1/push";
}
];
scrape_configs = [
{
job_name = "nginx";
static_configs = [
{
targets = [ "localhost" ];
labels = {
job = "nginx";
host = "fili";
__path__ = "/var/log/nginx/json_access.log";
};
}
];
pipeline_stages = [
{
json = {
expressions = {
msec = "msec";
connection = "connection";
connection_requests = "connection_requests";
pid = "pid";
request_id = "request_id";
request_length = "request_length";
remote_addr = "remote_addr";
remote_user = "remote_user";
remote_port = "remote_port";
time_local = "time_local";
time_iso8601 = "time_iso8601";
request = "request";
request_uri = "request_uri";
args = "args";
status = "status";
body_bytes_sent = "body_bytes_sent";
bytes_sent = "bytes_sent";
http_referer = "http_referer";
http_user_agent = "http_user_agent";
http_x_forwarded_for = "http_x_forwarded_for";
http_host = "http_host";
server_name = "server_name";
request_time = "request_time";
upstream = "upstream";
upstream_connect_time = "upstream_connect_time";
upstream_header_time = "upstream_header_time";
upstream_response_time = "upstream_response_time";
upstream_response_length = "upstream_response_length";
upstream_cache_status = "upstream_cache_status";
ssl_protocol = "ssl_protocol";
ssl_cipher = "ssl_cipher";
scheme = "scheme";
request_method = "request_method";
server_protocol = "server_protocol";
pipe = "pipe";
gzip_ratio = "gzip_ratio";
http_cf_ray = "http_cf_ray";
};
};
}
{
timestamp = {
source = "msec";
format = "Unix";
};
}
# {
# geoip = {
# db = "/var/lib/geoip-databases/GeoLite2-City.mmdb";
# source = "remote_addr";
# db_type = "city";
# };
# }
# {
# pack = {
# labels = [ "geoip_country_name" ];
# };
# }
];
}
{
job_name = "journal";
journal = {
max_age = "12h";
labels = {
job = "systemd-journal";
host = "fili";
};
};
relabel_configs = [
{
source_labels = [ "__journal__systemd_unit" ];
target_label = "unit";
}
];
}
];
};
};
services.grafana = { services.grafana = {
enable = false; enable = false;

View file

@ -8,6 +8,5 @@ _: {
./compiler-construction-2021.nix ./compiler-construction-2021.nix
./mapfm-poster.nix ./mapfm-poster.nix
./money-is-fckn-gay.nix ./money-is-fckn-gay.nix
./isadle.nix
]; ];
} }

View file

@ -1,10 +1,4 @@
{ { flakes, pkgs, ... }:
flakes,
pkgs,
config,
secrets,
...
}:
let let
cache = pkg: '' cache = pkg: ''
location ~* \.(png|jpg|jpeg|gif|svg|ico|woff|woff2|ttf)$ { location ~* \.(png|jpg|jpeg|gif|svg|ico|woff|woff2|ttf)$ {
@ -38,52 +32,15 @@ let
locations."/".return = return; locations."/".return = return;
} }
// ssl; // ssl;
package = flakes.homepage.packages.${pkgs.system};
in in
{ {
sops.secrets.homepage = { services.nginx = {
sopsFile = "${secrets}/homepage.env"; virtualHosts = {
}; "donsz.nl" = site regular;
"jdonszelmann.nl" = site regular;
systemd.services.homepage = { "blog.donsz.nl" = redirect "301 https://donsz.nl/blog";
description = "homepage"; "gay.donsz.nl" = site gay;
wantedBy = [ "multi-user.target" ]; "jana.is.fckn.gay" = site gay;
serviceConfig = {
DynamicUser = "yes";
ExecStart = "${pkgs.bash}/bin/bash ${package.website}/bin/run";
Restart = "on-failure";
RestartSec = "5s";
EnvironmentFile = config.sops.secrets.homepage.path;
WorkingDirectory = "${package.website}";
StateDirectory = "homepage";
};
environment = {
BETTER_AUTH_URL = "https://donsz.nl";
DATABASE_LOCATION = "/var/lib/homepage/db.sqlite";
HOST = "localhost";
PORT = "11020";
}; };
}; };
services.nginx.virtualHosts = {
"donsz.nl" = {
forceSSL = true;
enableACME = true;
extraConfig = ''
${cache "${package.website}/homepage/client"}
'';
locations."/".proxyPass = "http://localhost:${toString 11020}";
};
"blog.donsz.nl" = redirect "301 https://donsz.nl/blog";
};
# services.nginx = {
# virtualHosts = {
# "donsz.nl" = site regular;
# "jdonszelmann.nl" = site regular;
# "gay.donsz.nl" = site gay;
# "jana.is.fckn.gay" = site gay;
# };
# };
} }

View file

@ -1,17 +0,0 @@
{ pkgs, flakes, ... }:
{
services.nginx = {
virtualHosts."isadle.donsz.nl" = {
forceSSL = true;
http2 = true;
enableACME = true;
locations."/" = {
root = flakes.isadle.packages.${pkgs.system}.isadle;
extraConfig = ''
autoindex on;
'';
};
};
};
}

View file

@ -1,15 +1,11 @@
{ { pkgs
pkgs, , config
config, , ...
flakes,
...
}: }:
{ {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./kanata.nix ./kanata.nix
flakes.probe-rs-rules.nixosModules.${pkgs.system}.default
]; ];
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
@ -41,14 +37,11 @@
variant = ""; variant = "";
}; };
users.groups.plugdev = { };
users.users.jana = { users.users.jana = {
extraGroups = [ extraGroups = [
"networkmanager" "networkmanager"
"wheel" "wheel"
"docker" "docker"
"plugdev"
]; ];
packages = with pkgs; [ ]; packages = with pkgs; [ ];
}; };
@ -68,32 +61,31 @@
signal-desktop signal-desktop
nautilus nautilus
probe-rs-tools
adwaita-icon-theme adwaita-icon-theme
(pkgs.callPackage ( (pkgs.callPackage
{ stdenv }: (
stdenv.mkDerivation { { stdenv }:
name = "global-cursor-theme"; stdenv.mkDerivation {
unpackPhase = "true"; name = "global-cursor-theme";
outputs = [ "out" ]; unpackPhase = "true";
installPhase = '' outputs = [ "out" ];
mkdir -p $out/share/icons/default installPhase = ''
cat << EOF > $out/share/icons/default/index.theme mkdir -p $out/share/icons/default
[Icon Theme] cat << EOF > $out/share/icons/default/index.theme
Name=Default [Icon Theme]
Comment=Default Cursor Theme Name=Default
Inherits=Adwaita Comment=Default Cursor Theme
EOF Inherits=Adwaita
''; EOF
} '';
) { }) }
)
{ })
perf perf
rr rr
]; ];
hardware.probe-rs.enable = true;
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
services.xserver.enable = true; services.xserver.enable = true;
@ -117,8 +109,6 @@
hardware.graphics = { hardware.graphics = {
enable = true; enable = true;
enable32Bit = true;
extraPackages = with pkgs; [ extraPackages = with pkgs; [
libva-vdpau-driver libva-vdpau-driver
intel-media-driver intel-media-driver
@ -168,12 +158,10 @@
programs.steam = { programs.steam = {
enable = true; enable = true;
remotePlay.openFirewall = true; remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
localNetworkGameTransfers.openFirewall = true; localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
}; };
programs.nix-ld.enable = true;
# programs.mtr.enable = true; # programs.mtr.enable = true;
# programs.gnupg.agent = { # programs.gnupg.agent = {

View file

@ -6,7 +6,6 @@
niri-unstable, niri-unstable,
raw-data, raw-data,
p1n3appl3, p1n3appl3,
isadle,
pkgs, pkgs,
... ...
}@inputs: }@inputs:
@ -21,6 +20,5 @@ in
pipethon = pipethon.packages.${system}.python; pipethon = pipethon.packages.${system}.python;
raw-data = raw-data.packages.${system}.default; raw-data = raw-data.packages.${system}.default;
p1n3appl3 = p1n3appl3.packages.${system}; p1n3appl3 = p1n3appl3.packages.${system};
isadle = isadle.packages.${system}.default;
} }
// (import ./maple.nix inputs) // (import ./maple.nix inputs)

View file

@ -214,7 +214,7 @@
just just
uv uv
llvmPackages.bintools llvmPackages.bintools
nodejs_22 nodejs
(writeShellScriptBin "nas" '' (writeShellScriptBin "nas" ''
mkdir -p ~/Documents/nas mkdir -p ~/Documents/nas

View file

@ -168,18 +168,6 @@ inputs@{ machine, ... }:
keyword = "!no"; keyword = "!no";
url = "https://search.nixos.org/options?query=%s"; url = "https://search.nixos.org/options?query=%s";
} }
{
keyword = "!ri";
url = "https://github.com/rust-lang/rust/issues/%s";
}
{
keyword = "!tf";
url = "https://rust.tf/%s";
}
{
keyword = "!dg";
url = "https://rustc-dev-guide.rust-lang.org/?search=%s";
}
# { # {
# name = "bank"; # name = "bank";

View file

@ -20,7 +20,6 @@ inputs@{ machine, ... }:
"cp-ser" = cp-media "ser" "shows"; "cp-ser" = cp-media "ser" "shows";
"cp-ani" = cp-media "ani" "anime"; "cp-ani" = cp-media "ani" "anime";
"ragdoll" = ragdoll; "ragdoll" = ragdoll;
"jjj" = jjj;
"dumpasm" = "${pkgs.custom.dumpasm}/bin/dumpasm"; "dumpasm" = "${pkgs.custom.dumpasm}/bin/dumpasm";
"p" = calc; "p" = calc;
"s" = "systemctl"; "s" = "systemctl";

View file

@ -34,21 +34,4 @@
SSH_TMUX_SESSION_NAME="ssh-from-$(hostname)-$TMUX_SESSION_NAME" SSH_TMUX_SESSION_NAME="ssh-from-$(hostname)-$TMUX_SESSION_NAME"
tmux detach -E "kitten ssh -t ragdoll \"export TMUX_SESSION_NAME=$SSH_TMUX_SESSION_NAME; tmux attach -t $SSH_TMUX_SESSION_NAME || tmux new -e TMUX_SESSION_NAME=$SSH_TMUX_SESSION_NAME -s $SSH_TMUX_SESSION_NAME\"; exec tmux attach -t $TMUX_SESSION_NAME" tmux detach -E "kitten ssh -t ragdoll \"export TMUX_SESSION_NAME=$SSH_TMUX_SESSION_NAME; tmux attach -t $SSH_TMUX_SESSION_NAME || tmux new -e TMUX_SESSION_NAME=$SSH_TMUX_SESSION_NAME -s $SSH_TMUX_SESSION_NAME\"; exec tmux attach -t $TMUX_SESSION_NAME"
''}/bin/ragdoll"; ''}/bin/ragdoll";
jjj = "${pkgs.writeScriptBin "jjj" ''
cmd="\${"1:-show"}"
shift
selected=$(
jj log -r 'all()' --color=always \
| fzf \
--min-height=15 \
--cycle \
--ansi \
--prompt "jj $cmd> "
) || exit 0
rev=$(echo "$selected" | awk '{for(i=1;i<=NF;i++) if(length($i)>=7){print $i; exit}}')
jj "$cmd" -r "$rev" "$@"
''}/bin/jjj";
} }

View file

@ -85,8 +85,7 @@ inputs@{ machine, ... }:
''; '';
# if(.contained_in('first_parent(@)'), label("git_head", "HEAD")), # if(.contained_in('first_parent(@)'), label("git_head", "HEAD")),
status_summary = "'\n' ++ self.diff().summary() ++ '\n'"; status_summary = "'\n' ++ self.diff().summary() ++ '\n'";
space = "'\n\n\n'"; log_oneline_with_status_summary = "log_oneline ++ if(self.current_working_copy() && self.diff().files().len() > 0, status_summary)";
log_oneline_with_status_summary = "if(self.current_working_copy(), space) ++ log_oneline ++ if(self.current_working_copy() && self.diff().files().len() > 0, status_summary)";
}; };
aliases = aliases =
@ -168,15 +167,15 @@ inputs@{ machine, ... }:
]; ];
t = tug; t = tug;
d = [ "describe" ]; d = "describe";
dm = [ dm = [
"describe" "describe"
"-m" "-m"
]; ];
e = [ "edit" ]; e = "edit";
s = [ "squash" ]; s = "squash";
si = [ "squash -i" ]; si = "squash -i";
sp = [ "split" ]; sp = "split";
}; };
templates = { templates = {

View file

@ -364,7 +364,7 @@ inputs@{ machine, ... }:
}; };
"Mod+Period" = { "Mod+Period" = {
allow-when-locked = true; allow-when-locked = true;
action.spawn-sh = "playerctl next"; action.spawn-sh = "playerctl nest";
}; };
"Mod+Comma" = { "Mod+Comma" = {
allow-when-locked = true; allow-when-locked = true;

View file

@ -30,10 +30,6 @@ vim.cmd([[
inoremap <silent> <F1> <CMD>FloatermToggle<CR> inoremap <silent> <F1> <CMD>FloatermToggle<CR>
nnoremap <silent> <F1> <CMD>FloatermToggle<CR> nnoremap <silent> <F1> <CMD>FloatermToggle<CR>
tnoremap <silent> <F1> <C-\><C-n><CMD>FloatermToggle<CR> tnoremap <silent> <F1> <C-\><C-n><CMD>FloatermToggle<CR>
inoremap <silent> <F9> <CMD>FloatermHide<CR>
nnoremap <silent> <F9> <CMD>FloatermHide<CR>
tnoremap <silent> <F9> <C-\><C-n><CMD>FloatermHide<CR>
]]) ]])
vim.keymap.set('n', 'gr', (function() builtin.lsp_references({}) end), {}) vim.keymap.set('n', 'gr', (function() builtin.lsp_references({}) end), {})
@ -111,7 +107,7 @@ vim.cmd([[
]]) ]])
vim.cmd([[ vim.cmd([[
" let g:suda_smart_edit = 1 let g:suda_smart_edit = 1
filetype plugin indent on filetype plugin indent on
]]) ]])

View file

@ -36,7 +36,7 @@ inputs@{ machine, ... }:
EDITOR = "nvim"; EDITOR = "nvim";
}; };
packages = with pkgs; [ packages = with pkgs-unstable; [
tree-sitter tree-sitter
(pkgs.stdenv.mkDerivation { (pkgs.stdenv.mkDerivation {
name = "editor-hax"; name = "editor-hax";
@ -83,7 +83,7 @@ inputs@{ machine, ... }:
clipboard.providers.wl-copy.enable = true; clipboard.providers.wl-copy.enable = true;
performance = { performance = {
byteCompileLua.enable = false; byteCompileLua.enable = true;
combinePlugins = { combinePlugins = {
enable = false; enable = false;
@ -93,12 +93,12 @@ inputs@{ machine, ... }:
}; };
}; };
# extraLuaPackages = ps: [ ps.magick ]; extraLuaPackages = ps: [ ps.magick ];
extraPackages = [ pkgs.imagemagick ]; extraPackages = [ pkgs.imagemagick ];
# package = (import inputs.unstable { inherit (pkgs) system; }).neovim-unwrapped; # package = (import inputs.unstable { inherit (pkgs) system; }).neovim-unwrapped;
# package = pkgs.neovim-unwrapped; # package = pkgs.neovim-unwrapped;
# package = with pkgs-unstable; neovim-unwrapped; package = with pkgs-unstable; neovim-unwrapped;
colorschemes.onedark = { colorschemes.onedark = {
enable = true; enable = true;

View file

@ -39,7 +39,7 @@ def find_or_create_pane(window, args):
run(f"tmux send-keys -t {pane} Escape") run(f"tmux send-keys -t {pane} Escape")
# note the space, this tells nvim not to save it in history # note the space, this tells nvim not to save it in history
run(f"tmux send-keys -t {pane} F9 \": drop {args}\" Enter") run(f"tmux send-keys -t {pane} \": drop {args}\" Enter")
run(f"tmux select-pane -t {pane} -Z") run(f"tmux select-pane -t {pane} -Z")
else: else:
create_pane(args) create_pane(args)

View file

@ -30,7 +30,7 @@ in
(luamap "n" "<leader>/" "${telescope}.current_buffer_fuzzy_find()") (luamap "n" "<leader>/" "${telescope}.current_buffer_fuzzy_find()")
# last used pickers/searches # last used pickers/searches
(luamap "n" "<leader>p" "${telescope}.pickers()") (luamap "n" "<leader>p" "${telescope}.pickers()")
(luamap "n" "<leader>m" "${telescope}.marks()") (luamap "n" "<leader>m" "${telescope}.search_history()")
# open buffers # open buffers
(luamap "n" "<leader>b" "${telescope}.buffers({sort_mru = true})") (luamap "n" "<leader>b" "${telescope}.buffers({sort_mru = true})")
(luamap "n" "<leader><Tab>" "${telescope}.buffers({sort_mru = true})") (luamap "n" "<leader><Tab>" "${telescope}.buffers({sort_mru = true})")

View file

@ -30,7 +30,7 @@ in
ansiesc.enable = true; ansiesc.enable = true;
treesitter-textobjects = { treesitter-textobjects = {
enable = true; enable = false;
settings = { settings = {
lsp_interop.enable = true; lsp_interop.enable = true;
select = { select = {
@ -168,13 +168,6 @@ in
}; };
}; };
marks = {
enable = true;
settings = {
cyclic = true;
};
};
rainbow-delimiters.enable = true; rainbow-delimiters.enable = true;
lsp-format.enable = true; lsp-format.enable = true;
fugitive.enable = true; fugitive.enable = true;
@ -184,7 +177,7 @@ in
nvim-autopairs.enable = true; nvim-autopairs.enable = true;
spider.enable = true; spider.enable = true;
origami = { origami = {
enable = false; enable = true;
settings.autofold.enabled = false; settings.autofold.enabled = false;
}; };
@ -806,7 +799,7 @@ in
telescope-ui-select-nvim telescope-ui-select-nvim
telescope-fzf-native-nvim telescope-fzf-native-nvim
# vim-suda vim-suda
render-markdown render-markdown
telescope-file-browser telescope-file-browser
vim-astro vim-astro

View file

@ -18,8 +18,8 @@ inputs@{ machine, ... }:
proxyJump = "fili"; proxyJump = "fili";
}; };
ragdoll = { ragdoll = {
hostname = "hexcat.nl"; hostname = "192.168.178.138";
port = 4455; proxyJump = "fili";
}; };
"*" = { "*" = {

View file

@ -46,12 +46,7 @@ in
home-config = home-config =
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [ xdg-utils ];
glib
(pkgs.writeShellScriptBin "xdg-open" ''
gio open "$@"
'')
];
xdg = { xdg = {
enable = true; enable = true;

View file

@ -1 +1 @@
Ptmux;_Gd=a,a=d,q=2\\ Ptmux;_Ga=d,q=2,d=a\\