1
0
mirror of https://github.com/kmein/niveum synced 2026-03-22 04:41:07 +01:00

11 Commits

27 changed files with 313 additions and 109 deletions

10
ci.nix
View File

@@ -3,7 +3,7 @@
system,
name,
}: let
inherit (inputs) nixpkgs;
nixpkgs = inputs.nixos-stable;
pkgs = nixpkgs.legacyPackages.${system};
ensureFiles = paths:
pkgs.runCommand "directory" {} ''
@@ -23,6 +23,13 @@
"nixos-config=${toString ./.}/systems/${name}/configuration.nix"
"system-secrets=${systemSecrets}"
"secrets=${sharedSecrets}"
"nixpkgs=${
toString (
if name == "kabsa" || name == "manakish"
then inputs.nixos-unstable
else inputs.nixos-stable
)
}"
]
++ nixpkgs.lib.mapAttrsToList (name: value: "${name}=${value}") inputs);
# cd ~/.password-store/shared && find * -type f | sed 's/.gpg$//'
@@ -55,6 +62,7 @@
kabsa = ensureFiles basic;
manakish = ensureFiles basic;
tahina = ensureFiles basic;
ful = ensureFiles basic;
makanek = ensureFiles ([
"irc/retiolum"
"irc/hackint"

View File

@@ -3,29 +3,15 @@
lib,
config,
...
}: {
environment.variables.TERMINAL = "alacritty";
environment.systemPackages = [
pkgs.alacritty
];
home-manager.users.me.xdg.configFile = let
inherit (import <niveum/lib>) colours;
colourNames = ["black" "red" "green" "yellow" "blue" "magenta" "cyan" "white"];
colourPairs = lib.getAttrs colourNames colours;
in {
"alacritty/alacritty.yml".source = (pkgs.formats.yaml {}).generate "alacritty.yml" {
background_opacity = 0.9;
colors = {
primary = {inherit (colours) background foreground;};
normal = lib.mapAttrs (_: colour: colour.dark) colourPairs;
bright = lib.mapAttrs (_: colour: colour.bright) colourPairs;
};
}: let
alacritty-cfg = theme:
(pkgs.formats.yaml {}).generate "alacritty.yml" {
window.opacity = 0.9;
font = {
normal.family = "Monospace";
size = 6;
};
live_config_reload = true;
key_bindings = [
{
key = "Plus";
@@ -43,6 +29,33 @@
action = "ResetFontSize";
}
];
colors = let
colourNames = ["black" "red" "green" "yellow" "blue" "magenta" "cyan" "white"];
colourPairs = lib.getAttrs colourNames theme;
in {
primary = {inherit (theme) background foreground;};
normal = lib.mapAttrs (_: colour: colour.dark) colourPairs;
bright = lib.mapAttrs (_: colour: colour.bright) colourPairs;
};
};
alacritty-pkg = pkgs.symlinkJoin {
name = "alacritty";
paths = [
(pkgs.writeDashBin "alacritty" ''
${pkgs.alacritty}/bin/alacritty --config-file /var/theme/config/alacritty.yml "$@"
'')
pkgs.alacritty
];
};
in {
environment.variables.TERMINAL = "alacritty";
environment.systemPackages = [
alacritty-pkg
];
environment.etc = {
"themes/dark/alacritty.yml".source = alacritty-cfg (import <niveum/lib/colours/ayu-dark.nix>);
"themes/light/alacritty.yml".source = alacritty-cfg (import <niveum/lib/colours/ayu-light.nix>);
};
}

View File

@@ -8,7 +8,7 @@
acpi_call
];
boot.kernelModules = ["tp_smapi" "acpi_call"];
environment.systemPackages = [pkgs.tpacpi-bat];
environment.systemPackages = [pkgs.tpacpi-bat pkgs.powertop];
services.tlp = {
enable = true;

View File

@@ -7,6 +7,7 @@
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # uBlock Origin
"pjjgklgkfeoeiebjogplpnibpfnffkng" # undistracted
"nhdogjmejiglipccpnnnanhbledajbpd" # vuejs devtools
"eimadpbcbfnmbkopoojfekhnkhdbieeh" # dark reader
];
};

View File

@@ -30,7 +30,6 @@ in {
tocharian-font = pkgs.callPackage <niveum/packages/tocharian-font.nix> {};
iolanguage = pkgs.callPackage <niveum/packages/iolanguage.nix> {};
ix = pkgs.callPackage <niveum/packages/ix.nix> {};
unstable = import <nixpkgs-unstable> {inherit (config.nixpkgs) config;};
};
};
overlays = [
@@ -80,7 +79,6 @@ in {
hardware.pulseaudio = {
enable = true;
package = pkgs.pulseaudioFull;
extraModules = [pkgs.pulseaudio-modules-bt];
# copy server:/run/pulse/.config/pulse/cookie to client:~/.config/pulse/cookie to authenticate a client machine
zeroconf.discovery.enable = true;
extraConfig = ''
@@ -247,7 +245,7 @@ in {
./polkit.nix
./power-action.nix
./printing.nix
./openweathermap.nix
# ./openweathermap.nix
./wallpaper.nix
./redshift.nix
./retiolum.nix
@@ -258,7 +256,7 @@ in {
./sshd.nix
./sudo.nix
./sxiv.nix
./theming.nix
./themes.nix
./tmux.nix
./traadfri.nix
./unclutter.nix

View File

@@ -12,5 +12,5 @@
];
};
users.users.me.extraGroups = ["docker"];
environment.systemPackages = [pkgs.docker pkgs.docker_compose];
environment.systemPackages = [pkgs.docker pkgs.docker-compose];
}

View File

@@ -7,17 +7,17 @@
alegreya
alegreya-sans
amiri
unstable.annapurna-sil
annapurna-sil
cantarell-fonts
charis-sil
corefonts
crimson
eb-garamond
etBook
unstable.ezra-sil
ezra-sil
fira
font-awesome-ttf
unstable.galatia-sil
font-awesome
galatia-sil
gentium
gfs-fonts
gyre-fonts

View File

@@ -50,12 +50,12 @@ in {
rebase.autoStash = true;
merge.autoStash = true;
# ref https://github.com/dandavison/delta
core.pager = "${pkgs.delta}/bin/delta";
interactive.diffFilter = "${pkgs.delta}/bin/delta --color-only";
delta.navigate = true;
merge.conflictStyle = "diff3";
diff.colorMoved = "default";
# # ref https://github.com/dandavison/delta
# core.pager = "${pkgs.delta}/bin/delta";
# interactive.diffFilter = "${pkgs.delta}/bin/delta --color-only";
# delta.navigate = true;
# merge.conflictStyle = "diff3";
# diff.colorMoved = "default";
};
};
};

View File

@@ -248,8 +248,9 @@ in {
"${modifier}+p" = "exec --no-startup-id ${pkgs.pass}/bin/passmenu -l 5";
"${modifier}+u" = "exec ${pkgs.scripts.unicodmenu}/bin/unicodmenu";
"${modifier}+F6" = "exec ${pkgs.xorg.xkill}/bin/xkill";
"${modifier}+F7" = "exec ${pkgs.scripts.showkeys-toggle}/bin/showkeys-toggle";
"${modifier}+F8" = "exec ${pkgs.xorg.xkill}/bin/xkill";
"${modifier}+F8" = "exec switch-theme toggle";
"${modifier}+F9" = "exec ${pkgs.redshift}/bin/redshift -O 4000 -b 0.85";
"${modifier}+F10" = "exec ${pkgs.redshift}/bin/redshift -x";
"${modifier}+F11" = "exec ${pkgs.xcalib}/bin/xcalib -invert -alter";

View File

@@ -29,7 +29,7 @@ in {
lib.mapAttrsToList
(language: variant:
pkgs.writers.writeDashBin "kb-${language}" ''
${pkgs.xlibs.setxkbmap}/bin/setxkbmap ${defaultLanguage},${language} ${languages.${defaultLanguage}},${variant}
${pkgs.xorg.setxkbmap}/bin/setxkbmap ${defaultLanguage},${language} ${languages.${defaultLanguage}},${variant}
'')
languages;

View File

@@ -48,7 +48,7 @@ in {
networking.networkmanager = {
enable = true;
packages = [
plugins = [
pkgs.networkmanager-openvpn
pkgs.networkmanager-fortisslvpn
];

View File

@@ -33,7 +33,7 @@
})
];
astrolog = pkgs.unstable.astrolog.overrideAttrs (old:
astrolog = pkgs.astrolog.overrideAttrs (old:
old
// {
installPhase = ''
@@ -100,10 +100,10 @@ in {
htmlq
xsv # csv toolkit
xmlstarlet # xml toolkit
manpages
man-pages
posix_man_pages
tree
fuse_exfat # to mount windows drives
exfat # to mount windows drives
parallel # for parallel, since moreutils shadows task spooler
ripgrep # better grep
rlwrap
@@ -115,17 +115,17 @@ in {
arandr # xrandr for noobs
libnotify # for notify-send
xclip # clipboard CLI
dragon-drop # drag and drop
xdragon # drag and drop
xorg.xkill # kill by clicking
audacity
calibre
electrum
inkscape
astrolog
unstable.anki # flashcards
anki # flashcards
jbofihe # lojbanic software
unstable.zoom-us # video conferencing
unstable.alejandra # nix formatter
zoom-us # video conferencing
alejandra # nix formatter
pdfgrep # search in pdf
pdftk # pdf toolkit
mupdf
@@ -230,7 +230,7 @@ in {
]))
python3Packages.poetry
htmlTidy
html-tidy
nodePackages.csslint
nodePackages.jsonlint
nodePackages.prettier

View File

@@ -5,6 +5,7 @@
...
}: let
inherit (import <niveum/lib>) sshPort kieran;
externalNetwork = import <niveum/lib/external-network.nix>;
in {
services.xserver.displayManager.sessionCommands = "${pkgs.openssh}/bin/ssh-add";
@@ -25,12 +26,12 @@ in {
port = sshPort;
};
makanek = {
hostname = "88.99.83.173";
hostname = externalNetwork.makanek;
user = "root";
port = sshPort;
};
"makanek.r" = {
hostname = "makanek.r";
ful = {
hostname = externalNetwork.ful;
user = "root";
port = sshPort;
};
@@ -44,11 +45,6 @@ in {
user = "kfm";
port = sshPort;
};
toum = {
hostname = "toum.r";
user = "root";
port = sshPort;
};
kabsa = {
hostname = "kabsa.r";
user = "kfm";
@@ -62,16 +58,6 @@ in {
hostname = "135.181.85.233";
user = "root";
};
"ful.r" = {
hostname = "ful.r";
user = "root";
port = sshPort;
};
ful = {
hostname = "130.61.217.114";
user = "root";
port = sshPort;
};
};
};
}

View File

@@ -1,8 +1,11 @@
{
config,
pkgs,
lib,
...
}: let
unstable = import <nixos-unstable> {inherit (config.nixpkgs) config;};
toSymbols = pkgs.writers.writeDash "to-symbols" ''
${pkgs.gnused}/bin/sed '
s/\bTri\b//;
@@ -49,8 +52,8 @@ in {
now=$(${pkgs.coreutils}/bin/date +%_H:%M | ${pkgs.gnused}/bin/sed 's/^\s*//')
date=$(${pkgs.coreutils}/bin/date +'%m %d %Y')
{
${pkgs.unstable.astrolog}/bin/astrolog -qd $date -zN Berlin -Yt -Yd -d -R Uranus Neptune Pluto "North Node"
${pkgs.unstable.astrolog}/bin/astrolog -Yt -Yd -q 10 22 1999 6:32 -zN Kassel -td $date -R Uranus Neptune Pluto "North Node"
${unstable.astrolog}/bin/astrolog -qd $date -zN Berlin -Yt -Yd -d -R Uranus Neptune Pluto "North Node"
${unstable.astrolog}/bin/astrolog -Yt -Yd -q 10 22 1999 6:32 -zN Kassel -td $date -R Uranus Neptune Pluto "North Node"
} | ${toSymbols} | ${pkgs.coreutils}/bin/sort -n | ${pkgs.gnugrep}/bin/grep "^$now" || :
'');
};

82
configs/themes.nix Normal file
View File

@@ -0,0 +1,82 @@
{
config,
lib,
pkgs,
...
}: let
switch-theme = pkgs.writers.writeDashBin "switch-theme" ''
set -efux
if [ "$1" = toggle ]; then
if [ "$(${pkgs.coreutils}/bin/cat /var/theme/current_theme)" = dark ]; then
${placeholder "out"}/bin/switch-theme light
else
${placeholder "out"}/bin/switch-theme dark
fi
elif test -e "/etc/themes/$1"; then
mkdir -p /var/theme/config
${pkgs.rsync}/bin/rsync --chown=${config.users.users.me.name}:users -a --delete "/etc/themes/$1/" /var/theme/config/
echo "$1" > /var/theme/current_theme
${pkgs.coreutils}/bin/chown ${config.users.users.me.name}:users /var/theme/current_theme
${pkgs.xorg.xrdb}/bin/xrdb -merge /var/theme/config/xresources
${pkgs.procps}/bin/pkill -HUP xsettingsd
else
echo "theme $1 not found"
fi
'';
in {
systemd.services.xsettingsd = {
wantedBy = ["multi-user.target"];
after = ["display-manager.service"];
environment.DISPLAY = ":0";
serviceConfig = {
ExecStart = "${pkgs.xsettingsd}/bin/xsettingsd -c /var/theme/config/xsettings.conf";
User = config.users.users.me.name;
Restart = "always";
RestartSec = "15s";
};
};
systemd.tmpfiles.rules = [
"d /var/theme/ 755 ${config.users.users.me.name} users"
];
environment.systemPackages = [
switch-theme
pkgs.capitaine-cursors
];
home-manager.users.me = {
home.pointerCursor = {
name = "capitaine-cursors-white";
package = pkgs.capitaine-cursors;
size = 16;
};
};
environment.etc = {
"themes/light/xsettings.conf".text = ''
Net/ThemeName "Adwaita"
'';
"themes/light/xresources".text = ''
*background: #ffffff
*foreground: #000000
'';
"themes/dark/xsettings.conf".text = ''
Net/ThemeName "Adwaita-dark"
'';
"themes/dark/xresources".text = ''
*background: #000000
*foreground: #ffffff
'';
};
system.activationScripts.theme.text = ''
export DISPLAY=:0
if test -e /var/theme/current_theme; then
${switch-theme}/bin/switch-theme "$(cat /var/theme/current_theme)" ||
${switch-theme}/bin/switch-theme dark
else
${switch-theme}/bin/switch-theme dark
fi
'';
}

View File

@@ -23,6 +23,11 @@ in {
enable = true;
platformTheme = "gtk";
};
xsession.pointerCursor = theme.cursor // {size = 16;};
home.pointerCursor =
theme.cursor
// {
size = 16;
x11.enable = true;
};
};
}

28
flake.lock generated
View File

@@ -18,20 +18,20 @@
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
"nixos-unstable"
]
},
"locked": {
"lastModified": 1651519540,
"narHash": "sha256-3k6p8VsTwwRPQjE8rrMh+o2AZACZn/eeYJ7ivdQ/Iro=",
"lastModified": 1653340164,
"narHash": "sha256-t6BPApyasx6FOv2cEVyFBXvkEDrknyUe7bngMbNSBkA=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "d93d56ab8c1c6aa575854a79b9d2f69d491db7d0",
"rev": "e66f0ff69a6c0698b35034b842c4b68814440778",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-21.11",
"ref": "master",
"repo": "home-manager",
"type": "github"
}
@@ -42,7 +42,7 @@
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
"nixos-stable"
]
},
"locked": {
@@ -107,7 +107,7 @@
"url": "https://cgit.krebsco.de/nix-writers"
}
},
"nixpkgs": {
"nixos-stable": {
"locked": {
"lastModified": 1653087707,
"narHash": "sha256-zfno3snrzZTWQ2B7K53QHrGZwrjnJLTRPalymrSsziU=",
@@ -123,18 +123,18 @@
"type": "github"
}
},
"nixpkgs-unstable": {
"nixos-unstable": {
"locked": {
"lastModified": 1653180606,
"narHash": "sha256-dYJLG7fgp4/SAhOM5d725KZtCVZuEMS6tSI098n7SA0=",
"lastModified": 1653060744,
"narHash": "sha256-kfRusllRumpt33J1hPV+CeCCylCXEU7e0gn2/cIM7cY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "af0bcde689ed5263e9a0df36116f7583163eb032",
"rev": "dfd82985c273aac6eced03625f454b334daae2e8",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "master",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
@@ -179,8 +179,8 @@
"menstruation-backend": "menstruation-backend",
"menstruation-telegram": "menstruation-telegram",
"nix-writers": "nix-writers",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable",
"nixos-stable": "nixos-stable",
"nixos-unstable": "nixos-unstable",
"recht": "recht",
"retiolum": "retiolum",
"scripts": "scripts",

View File

@@ -2,16 +2,17 @@
description = "niveum: packages, modules, systems";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/master";
nixos-stable.url = "github:NixOS/nixpkgs/nixos-21.11";
nixos-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
home-manager = {
url = "github:nix-community/home-manager/release-21.11";
inputs.nixpkgs.follows = "nixpkgs";
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixos-unstable";
};
krops = {
url = "github:Mic92/krops";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.follows = "nixos-stable";
inputs.flake-utils.follows = "flake-utils";
};
@@ -70,8 +71,8 @@
menstruation-backend,
menstruation-telegram,
nix-writers,
nixpkgs,
nixpkgs-unstable,
nixos-unstable,
nixos-stable,
recht,
retiolum,
scripts,
@@ -82,8 +83,12 @@
tuna,
} @ inputs: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
source = name:
pkgs = nixos-stable.legacyPackages.${system};
source = {
sources,
unstable,
name,
}:
{
niveum.file = toString ./.;
nixos-config.symlink = "niveum/systems/${name}/configuration.nix";
@@ -95,24 +100,32 @@
dir = toString ~/.password-store;
name = "shared";
};
nixpkgs.file = toString (
if unstable
then inputs.nixos-unstable
else inputs.nixos-stable
);
}
// nixpkgs.lib.mapAttrs' (name: value: {
// nixos-stable.lib.mapAttrs' (name: value: {
inherit name;
value.file = toString value;
}) (nixpkgs.lib.filterAttrs (name: _: !builtins.elem name ["flake-utils" "krops" "self"]) inputs);
}) (nixos-stable.lib.filterAttrs (name: _: builtins.elem name sources) inputs);
deployScriptFor = {
name,
user ? "root",
host,
}: let
inherit (import ./lib/default.nix) sshPort;
in
unstable ? false,
sshPort ? (import ./lib/default.nix).sshPort,
sources,
}:
toString (krops.packages.${system}.writeDeploy "deploy-${name}" {
source = krops.lib.evalSource [(source name)];
target = "root@${host}:${toString sshPort}";
source = krops.lib.evalSource [(source {inherit sources unstable name;})];
target = "${user}@${host}:${toString sshPort}";
});
in {
apps.${system} = let
forSystems = f: builtins.listToAttrs (map f (builtins.attrNames (builtins.readDir ./systems)));
externalNetwork = import ./lib/external-network.nix;
deployScripts = forSystems (name: {
name = "deploy-${name}";
value = {
@@ -120,9 +133,20 @@
program = deployScriptFor {
inherit name;
host =
if name != "ful"
then "${name}.r"
else "130.61.217.114";
if externalNetwork ? name
then externalNetwork.${name}
else "${name}.r";
unstable = name == "kabsa" || name == "manakish";
sources =
["nix-writers" "nixpkgs" "retiolum"]
++ {
zaatar = ["traadfri"];
ful = [];
kabsa = ["traadfri" "nixos-unstable" "home-manager" "menstruation-backend" "recht"];
manakish = ["traadfri" "nixos-unstable" "home-manager" "menstruation-backend" "recht"];
makanek = ["nixos-unstable" "menstruation-telegram" "menstruation-backend" "scripts" "telebots" "tinc-graph"];
}
.${name};
};
};
});

37
lib/colours/ayu-dark.nix Normal file
View File

@@ -0,0 +1,37 @@
{
black = {
dark = "#000000";
bright = "#323232";
};
red = {
dark = "#ff3333";
bright = "#ff6565";
};
green = {
dark = "#b8cc52";
bright = "#e9fe83";
};
yellow = {
dark = "#e6c446";
bright = "#fff778";
};
blue = {
dark = "#36a3d9";
bright = "#68d4ff";
};
magenta = {
dark = "#f07078";
bright = "#ffa3aa";
};
cyan = {
dark = "#95e5cb";
bright = "#c7fffc";
};
white = {
dark = "#ffffff";
bright = "#ffffff";
};
background = "#0e1419";
foreground = "#e5e1cf";
cursor = "#f19618";
}

37
lib/colours/ayu-light.nix Normal file
View File

@@ -0,0 +1,37 @@
{
black = {
dark = "#000000";
bright = "#323232";
};
red = {
dark = "#ff3333";
bright = "#ff6565";
};
green = {
dark = "#86b200";
bright = "#b8e532";
};
yellow = {
dark = "#f19618";
bright = "#ffc849";
};
blue = {
dark = "#41a6d9";
bright = "#73d7ff";
};
magenta = {
dark = "#f07078";
bright = "#ffa3aa";
};
cyan = {
dark = "#4cbe99";
bright = "#7ff0cb";
};
white = {
dark = "#ffffff";
bright = "#ffffff";
};
background = "#fafafa";
foreground = "#5b6673";
cursor = "#ff6900";
}

View File

@@ -1,5 +1,5 @@
pkgs: rec {
terminal = "${pkgs.alacritty}/bin/alacritty";
terminal = "alacritty";
browser = "${pkgs.brave}/bin/brave";
fileManager = "${terminal} -e ${pkgs.ranger}/bin/ranger";
}

4
lib/external-network.nix Normal file
View File

@@ -0,0 +1,4 @@
{
ful = "130.61.217.114";
makanek = "88.99.83.173";
}

View File

@@ -117,7 +117,7 @@ in
'';
tag = wrapScript {
packages = [pkgs.vorbisTools pkgs.python3Packages.eyeD3 opustags];
packages = [pkgs.vorbis-tools pkgs.python3Packages.eyeD3 opustags];
script = "${voidrice}/.local/bin/tag";
name = "tag";
};

View File

@@ -39,6 +39,12 @@
"make it stooop"
"noooo"
];
messages.neutral = [
"meh"
"i have no opinion about this song"
"idk man"
];
in
pkgs.writers.writeDashBin "pls" ''
case "$1" in
@@ -50,6 +56,9 @@ in
${pkgs.curl}/bin/curl -sS -XPOST "${playlistAPI}/skip"
echo ${lib.escapeShellArg (lib.concatStringsSep "\n" messages.bad)} | shuf -n1 | ${sendIRC}
;;
0|meh|neutral)
echo ${lib.escapeShellArg (lib.concatStringsSep "\n" messages.neutral)} | shuf -n1 | ${sendIRC}
;;
say|msg)
shift
echo "$@" | ${sendIRC}

View File

@@ -87,10 +87,6 @@ in {
useDHCP = false;
};
nixpkgs.config.packageOverrides = pkgs: {
unstable = import <nixpkgs-unstable> {inherit (config.nixpkgs) config;};
};
system.stateVersion = "20.03";
services.nginx = {

View File

@@ -68,7 +68,7 @@ in {
systemd.services.hedgedoc-backup = {
description = "Hedgedoc backup service";
script = ''
${pkgs.unstable.sqlite}/bin/sqlite3 -json ${stateLocation} "select shortid, alias, ownerId, content from Notes" \
${pkgs.sqlite}/bin/sqlite3 -json ${stateLocation} "select shortid, alias, ownerId, content from Notes" \
| ${
pkgs.writers.writePython3 "hedgedoc-json-to-fs.py" {} ''
import json

View File

@@ -25,7 +25,7 @@ in {
rm -rf "$stockholm"
}
${pkgs.git}/bin/git clone ${remote} "$stockholm"
${pkgs.git}/bin/git --git-dir "$stockholm"/.git log --pretty='"%s" by %an, %ar' --since "$(${pkgs.coreutils}/bin/date -I -d "yesterday")" \
${pkgs.git}/bin/git --git-dir "$stockholm"/.git log --pretty='"%s" by %an, %ar.' --since "$(${pkgs.coreutils}/bin/date -I -d "yesterday")" \
| ${pkgs.jq}/bin/jq -R '{text: ., from: now | todateiso8601, to: (now + (60 * 60)) | todateiso8601}' \
| ${pkgs.curl}/bin/curl -Ssfd @- http://prism.r:7999/
'';