1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 18:21:07 +01:00

8 Commits

7 changed files with 13 additions and 312 deletions

View File

@@ -161,7 +161,7 @@ in
}
{
services.getty = {
greetingLine = lib.mkForce "";
greetingLine = lib.mkForce "As-salamu alaykum wa rahmatullahi wa barakatuh!";
helpLine = lib.mkForce "";
};
}
@@ -232,7 +232,6 @@ in
./flameshot.nix
./packages.nix
./virtualization.nix
./picom.nix
./stardict.nix
./polkit.nix
./printing.nix
@@ -257,25 +256,6 @@ in
}
./tor.nix
./mastodon-bot.nix
{
fileSystems."${remoteDir}/fritz" = {
device = "//192.168.178.1/FRITZ.NAS/Backup";
fsType = "cifs";
options = [
"username=ftpuser"
"password=ftppassword"
"noauto"
"nounix"
"rw"
# "noserverino" # ref https://askubuntu.com/a/1265165
"uid=${toString config.users.users.me.uid}"
"gid=${toString config.users.groups.users.gid}"
"x-systemd.automount"
"x-systemd.device-timeout=1"
"x-systemd.idle-timeout=1min"
];
};
}
{
home-manager.users.me = {
xdg.userDirs = rec {

View File

@@ -5,11 +5,6 @@
niveumPackages,
...
}: let
dashboard = pkgs.writers.writeDashBin "dashboard" ''
${pkgs.alacritty}/bin/alacritty --option font.size=4 --class dashboard --command ${pkgs.writers.writeDash "dashboard-inner" ''
exec ${pkgs.procps}/bin/watch -c -n 10 ${niveumPackages.q}/bin/q
''}
'';
inherit (import ../lib) defaultApplications;
klem = niveumPackages.klem.override {
config.dmenu = "${pkgs.dmenu}/bin/dmenu -i -p klem";
@@ -86,9 +81,14 @@ in {
};
};
programs.slock.enable = true;
environment.systemPackages = [dashboard];
environment.systemPackages = [
pkgs.xsecurelock
];
environment.sessionVariables = {
XSECURELOCK_NO_COMPOSITE = "1";
XSECURELOCK_BACKGROUND_COLOR = "navy";
XSECURELOCK_PASSWORD_PROMPT = "time_hex";
};
services.displayManager.defaultSession = "none+i3";
services.xserver = {
@@ -113,7 +113,6 @@ in {
'';
};
home-manager.users.me = let
modifier = "Mod4";
infoWorkspace = "";
@@ -275,7 +274,7 @@ in {
xsession.windowManager.i3 = {
enable = true;
extraConfig = ''
bindsym --release ${modifier}+Shift+w exec /run/wrappers/bin/slock
bindsym --release ${modifier}+Shift+w exec xsecurelock
exec "${pkgs.obsidian}/bin/obsidian"
for_window [class="obsidian"] , move scratchpad
@@ -284,8 +283,7 @@ in {
exec "${pkgs.writers.writeDash "irc" "exec ${pkgs.alacritty}/bin/alacritty --class message -e ssh weechat@makanek -t tmux attach-session -t IM"}"
exec "${pkgs.writers.writeDash "email" "exec ${pkgs.alacritty}/bin/alacritty --class message -e aerc"}"
assign [class="dashboard"] ${infoWorkspace}
exec ${dashboard}/bin/dashboard
exec --no-startup-id ${pkgs.xss-lock}/bin/xss-lock -- xsecurelock
'';
config = {
inherit modifier gaps modes bars floating window colors;

View File

@@ -1,25 +0,0 @@
{
services.picom = {
enable = true;
# activeOpacity = 1;
fade = true;
fadeDelta = 1;
# inactiveOpacity = 0.9;
# shadow = true;
# menuOpacity = 0.9;
# shadowOpacity = 0.3;
fadeExclude = [
"class_g = 'slock'" # don't want a transparent lock screen!
"name *?= 'slock'"
"focused = 1"
];
opacityRules = [
# opacity-rule overrides both inactive and active opacity
# video in browser tabs
# substring /regex match of title bar text
"99:name *?= 'Youtube'"
"99:WM_CLASS@:s *= 'mpv$'"
];
};
}

View File

@@ -331,7 +331,6 @@
cro = pkgs.callPackage packages/cro.nix {};
default-gateway = pkgs.callPackage packages/default-gateway.nix {};
depp = pkgs.callPackage packages/depp.nix {};
dashboard = pkgs.callPackage packages/dashboard {};
fkill = pkgs.callPackage packages/fkill.nix {};
fzfmenu = pkgs.callPackage packages/fzfmenu.nix {};
gpt35 = pkgs.callPackage packages/gpt.nix {model = "gpt-3.5-turbo";};

View File

@@ -1,247 +0,0 @@
{
writers,
formats,
acpi,
wtf,
himalaya,
lib,
jq,
gh,
curl,
khal,
todoman,
gnused,
coreutils,
astrolog,
weatherCityIds ? [2950159],
}: let
rowCount = 10;
columnCount = 6;
yaml = formats.yaml {};
command = args:
{
enabled = true;
type = "cmdrunner";
}
// args;
configuration.wtf = rec {
grid = {
columns = lib.replicate columnCount 32;
rows = lib.replicate rowCount 5;
};
mods.vdir_khal = command {
title = "Calendar";
cmd = "${khal}/bin/khal";
args = ["--color" "list" "--exclude-calendar" "calendarium-tridentinum"];
refreshInterval = "1m";
position = {
top = 4;
left = 0;
height = 4;
width = 2;
};
};
mods.vdir_todo = command {
enabled = true;
title = "Agenda";
cmd = writers.writeDash "vdir_todo" "${todoman}/bin/todo --color=always -h | ${coreutils}/bin/tac";
refreshInterval = "1m";
position = {
top = 4;
left = 2;
height = 4;
width = 2;
};
};
mods.weather = {
enabled = true;
cityids = weatherCityIds;
position = {
top = 8;
left = 2;
height = 2;
width = 2;
};
refreshInterval = "15m";
language = "DE";
tempUnit = "C";
useEmoji = true;
compact = true;
};
mods.top = command {
title = "uptime";
cmd = writers.writeDash "top" "top -b -n 1 -E g | ${gnused}/bin/sed -n '1,5p'";
refreshInterval = "30s";
position = {
top = 4;
left = 4;
height = 2;
width = 2;
};
enabled = true;
};
mods.resourceusage = {
enabled = true;
cpuCombined = false;
position = {
top = 6;
left = 4;
height = 2;
width = 2;
};
refreshInterval = "1s";
showCPU = true;
showMem = true;
showSwp = false;
};
mods.ipapi = {
enabled = false;
position = {
top = 0;
left = 1;
height = 2;
width = 2;
};
refreshInterval = "150s";
};
mods.battery-status = command {
enabled = true;
cmd = writers.writeDash "battery-status" ''
${acpi}/bin/acpi --battery --details | sed 's/^Battery //'
'';
refreshInterval = "1m";
position = {
top = 8;
left = 4;
height = 2;
width = 2;
};
};
mods.disk-usage = command {
enabled = false;
cmd = "df";
args = ["-h"];
refreshInterval = "1m";
position = {
top = 8;
left = 4;
height = 2;
width = 2;
};
};
mods.email = command {
title = "Email";
cmd = writers.writeDash "email" ''
${himalaya}/bin/himalaya accounts --output json \
| ${jq}/bin/jq -r 'map(.name) | join("\n")' \
| while read -r account
do
${himalaya}/bin/himalaya list --account "$account" -o json \
| ${jq}/bin/jq -r '
map(select(.flags == [])
| "\u001b[33m\(.from.addr)\u001b[0m \(.subject)") | join("\n")
'
done
'';
refreshInterval = "5m";
position = {
top = 0;
left = 0;
height = 4;
width = 2;
};
};
mods.gh-status = command {
enabled = true;
title = "GitHub";
cmd = writers.writeDash "gh-status" ''
${gh}/bin/gh api notifications \
| ${jq}/bin/jq -r 'map("\u001b[35m\(.repository.full_name)\u001b[0m \(.subject.title)") | join("\n")'
'';
refreshInterval = "5m";
position = {
top = 0;
left = 2;
height = 2;
width = 2;
};
};
mods.gh-issues = command {
enabled = true;
title = "GitHub";
cmd = writers.writeDash "gh-issues" ''
${gh}/bin/gh api issues \
| ${jq}/bin/jq -r 'map(select(.repository.owner.login == "kmein") | "\u001b[35m\(.repository.name)\u001b[0m \(.title)") | join("\n")'
'';
refreshInterval = "5m";
position = {
top = 2;
left = 2;
height = 2;
width = 2;
};
};
mods.calendar = command {
title = "Calendar";
cmd = "cal";
args = ["-3" "-m" "-w"];
pty = true;
refreshInterval = "5m";
position = {
top = 8;
left = 0;
height = 2;
width = 2;
};
};
mods.astro-aspects = command {
title = "Aspects";
enabled = false;
cmd = writers.writeDash "astro-aspects" "${astrolog}/bin/astrolog -n -zN Berlin -d";
refreshInterval = "1h";
position = {
top = 7;
left = 3;
height = 1;
width = 2;
};
};
mods.feed = command {
enabled = true;
title = "Feed";
cmd = writers.writeDash "feed" ''
${curl}/bin/curl -u "$WTF_MINIFLUX_API_KEY" --basic -s 'https://feed.kmein.de/v1/entries?status=unread&direction=desc' \
| ${jq}/bin/jq -r '
.total as $total | (
.entries
| map(select(.feed | .hide_globally| not) | "\(.feed.category.title) \u001b[32m\(.author)\u001b[0m \(.title)")
| join("\n")
)'
'';
# position = { top = 0; left = 5; height = 5; width = 1; };
position = {
top = 0;
left = 4;
height = 4;
width = 2;
};
refreshInterval = "15m";
};
mods.astro-positions = command {
enabled = false;
title = "Positions";
cmd = writers.writeDash "astro-positions" "${astrolog}/bin/astrolog -q $(date +'%m %d %Y %H:%M') -zN Berlin | ${gnused}/bin/sed -n '4,16p' | ${coreutils}/bin/cut -c 1-33";
refreshInterval = "1h";
position = {
top = 5;
left = 5;
height = 3;
width = 1;
};
};
};
in
writers.writeDashBin "dashboard" ''
exec ${wtf}/bin/wtfutil --config=${yaml.generate "config.yml" configuration}
''

Submodule secrets updated: 236a3353a7...83d9103f20

View File

@@ -405,15 +405,11 @@ in
static_configs = [
{
targets = [
"https://alew.hu-berlin.de"
"https://beta.alew.hu-berlin.de"
"https://alew.hu-berlin.de/api/search?substring=die&domain=lemma&derivations=true&addition=true&diacritics=false&position=infix"
"https://beta.alew.hu-berlin.de/api/search?substring=die&domain=lemma&derivations=true&addition=true&diacritics=false&position=infix"
"https://zodiac.fly.dev/api/lemma/get?lemmaId=2582"
"https://pad.kmein.de"
"https://code.kmein.de"
"https://radio.kmein.de"
"https://tarot.kmein.de"
"https://iching.kmein.de"
"https://social.krebsco.de"
"https://cloud.kmein.de"
"http://grafana.kmein.r"