Compare commits
1 commit
820fda70aa
...
38101c98d3
Author | SHA1 | Date | |
---|---|---|---|
38101c98d3 |
4 changed files with 65 additions and 45 deletions
|
@ -351,13 +351,11 @@ binds {
|
||||||
Mod+B { spawn "firefox"; }
|
Mod+B { spawn "firefox"; }
|
||||||
Mod+RETURN { spawn "emacsclient" "-c" "--eval" "(ccr/start-eshell)"; }
|
Mod+RETURN { spawn "emacsclient" "-c" "--eval" "(ccr/start-eshell)"; }
|
||||||
Mod+M { spawn "emacsclient" "-c" "--eval" "(notmuch-search \"tag:new\")"; }
|
Mod+M { spawn "emacsclient" "-c" "--eval" "(notmuch-search \"tag:new\")"; }
|
||||||
// Mod+G { spawn "emacsclient" "-c" "--eval" "(switch-to-buffer (gptel \"*ChatGPT*\"))" "-F" "((name . \"GPTel - Emacs\") (width . $NIRI_GPTEL_COLS) (height . $NIRI_GPTEL_ROWS))'"; }
|
Mod+G { spawn "emacsclient" "-c" "--eval" "(switch-to-buffer (gptel \"*ChatGPT*\"))" "-F" "((name . \"GPTel - Emacs\") (width . $NIRI_GPTEL_COLS) (height . $NIRI_GPTEL_ROWS))'"; }
|
||||||
Mod+G { spawn "run-floating-gptel"; }
|
|
||||||
Mod+Shift+C { spawn "emacsclient" "-c" "--eval" "(org-roam-dailies-capture-today)"; }
|
Mod+Shift+C { spawn "emacsclient" "-c" "--eval" "(org-roam-dailies-capture-today)"; }
|
||||||
Mod+Alt+L { spawn "swaylock"; }
|
Mod+Alt+L { spawn "swaylock"; }
|
||||||
Mod+Space { spawn "rofi" "-show" "menu" "-modi" "menu:rofi-power-menu"; }
|
Mod+Space { spawn "rofi" "-show" "menu" "-modi" "menu:rofi-power-menu"; }
|
||||||
// Mod+Ctrl+b { spawn "foot" "--title='bTop'" "-W" "$NIRI_BTOP_COLSx$NIRI_BTOP_ROWS" "btop";}
|
Mod+Ctrl+b { spawn "foot" "--title='bTop'" "-W" "NIRI_BTOP_COLSx$NIRI_BTOP_ROWS" "btop";}
|
||||||
Mod+Ctrl+b { spawn "run-floating-btop"; }
|
|
||||||
|
|
||||||
// Example volume keys mappings for PipeWire & WirePlumber.
|
// Example volume keys mappings for PipeWire & WirePlumber.
|
||||||
// The allow-when-locked=true property makes them work even when the session is locked.
|
// The allow-when-locked=true property makes them work even when the session is locked.
|
||||||
|
|
|
@ -2,52 +2,13 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
hostname,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
|
||||||
niriVars =
|
|
||||||
{
|
|
||||||
picard = {
|
|
||||||
floating-gptel = {
|
|
||||||
rows = "60";
|
|
||||||
cols = "150";
|
|
||||||
};
|
|
||||||
floating-btop = {
|
|
||||||
rows = "210";
|
|
||||||
cols = "60";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
kirk = {
|
|
||||||
floating-gptel = {
|
|
||||||
rows = "40";
|
|
||||||
cols = "140";
|
|
||||||
};
|
|
||||||
floating-btop = {
|
|
||||||
rows = "40";
|
|
||||||
cols = "140";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
."${hostname}" or niriVars.kirk;
|
|
||||||
run-floating-gptel =
|
|
||||||
with niriVars.floating-gptel;
|
|
||||||
pkgs.writeScriptBin "run-floating-gptel" ''
|
|
||||||
emacsclient -c --eval '(switch-to-buffer (gptel "*GptEl*"))' -F '((name . "GPTel - Emacs") (width . ${cols}) (height . ${rows}))'
|
|
||||||
'';
|
|
||||||
run-floating-btop =
|
|
||||||
with niriVars.floating-btop;
|
|
||||||
pkgs.writeScriptBin "run-floating-btop" ''
|
|
||||||
foot --title='bTop' -W ${rows}x${cols} btop
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
niri
|
niri
|
||||||
waypaper
|
waypaper
|
||||||
xwayland-satellite
|
xwayland-satellite
|
||||||
run-floating-gptel
|
|
||||||
run-floating-btop
|
|
||||||
];
|
];
|
||||||
systemd.user.targets.niri-session = {
|
systemd.user.targets.niri-session = {
|
||||||
Unit = {
|
Unit = {
|
||||||
|
@ -72,10 +33,25 @@ in
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = let
|
||||||
|
niriVars = {
|
||||||
|
picard = {
|
||||||
|
NIRI_GPTEL_ROWS = 60;
|
||||||
|
NIRI_GPTEL_COLS = 150;
|
||||||
|
NIRI_BTOP_ROWS = 210;
|
||||||
|
NIRI_BTOP_COLS = 60;
|
||||||
|
};
|
||||||
|
kirk = {
|
||||||
|
NIRI_GPTEL_ROWS = 40;
|
||||||
|
NIRI_GPTEL_COLS = 140;
|
||||||
|
NIRI_BTOP_ROWS = 140;
|
||||||
|
NIRI_BTOP_COLS = 40;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in {
|
||||||
DISPLAY = ":0";
|
DISPLAY = ":0";
|
||||||
QT_QPA_PLATFORM = "wayland";
|
QT_QPA_PLATFORM = "wayland";
|
||||||
};
|
} // (niriVars."${config.networking.hostname}" or niriVars.kirk);
|
||||||
|
|
||||||
programs.rofi = {
|
programs.rofi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
"adb"
|
"adb"
|
||||||
"prometheus-exporters"
|
"prometheus-exporters"
|
||||||
"promtail"
|
"promtail"
|
||||||
|
"dump1090"
|
||||||
]
|
]
|
||||||
++ [ ./disko.nix ];
|
++ [ ./disko.nix ];
|
||||||
|
|
||||||
|
|
45
modules/dump1090/default.nix
Normal file
45
modules/dump1090/default.nix
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
{ pkgs, lib, ... }:
|
||||||
|
{
|
||||||
|
systemd.services.dump1090-fa = {
|
||||||
|
description = "dump1090 ADS-B receiver (FlightAware customization)";
|
||||||
|
after = [ "network.target" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
DynamicUser = true;
|
||||||
|
SupplementaryGroups = "plugdev";
|
||||||
|
ExecStart = lib.escapeShellArgs [
|
||||||
|
(lib.getExe pkgs.dump1090)
|
||||||
|
"--net"
|
||||||
|
"--write-json"
|
||||||
|
"%t/dump1090-fa"
|
||||||
|
];
|
||||||
|
RuntimeDirectory = "dump1090-fa";
|
||||||
|
WorkingDirectory = "%t/dump1090-fa";
|
||||||
|
RuntimeDirectoryMode = 755;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
virtualHosts."dump1090-fa" = {
|
||||||
|
listen = [
|
||||||
|
{
|
||||||
|
addr = "0.0.0.0";
|
||||||
|
port = 8080;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
locations = {
|
||||||
|
"/".alias = "${pkgs.dump1090}/share/dump1090/";
|
||||||
|
"/data/".alias = "/run/dump1090-fa/";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# TODO before upstreaming in nixpkgs
|
||||||
|
# - add `meta.mainProgram` to dump1090
|
||||||
|
# - rename dump1090 to dump1090-fa
|
||||||
|
# - optionally create an alias for dump1090
|
||||||
|
# - securing the systemd service (`systemd-analyze security dump1090-fa`)
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue