mirror of
https://github.com/kmein/niveum
synced 2026-03-19 11:31:09 +01:00
Compare commits
28 Commits
48e2be7427
...
flakes-2
| Author | SHA1 | Date | |
|---|---|---|---|
| 248ebea28e | |||
| 2a98e680c2 | |||
| d5087c40b2 | |||
| 23fb65ce1e | |||
| c49a5a4187 | |||
| 42df2c032e | |||
| 86d6943dd2 | |||
| 6f10cd277d | |||
| 869c6e6a08 | |||
| 5b131a5a30 | |||
| 0423429e02 | |||
| f451cc5028 | |||
| 8f9e8db71e | |||
| 81e6b5c9f6 | |||
| 50d8788088 | |||
| 805b46ffb1 | |||
| bc9217ba3e | |||
| db2ec25bc1 | |||
| 33b960143b | |||
| f02225d1e9 | |||
| 9c2e2df05a | |||
| aaeef41f55 | |||
| 0787da719e | |||
| e225a7d451 | |||
| 9d3b29add2 | |||
| 5792224240 | |||
| ecadc12c9f | |||
| 4ecc34b63e |
7
.bin/elm-publish-private
Executable file
7
.bin/elm-publish-private
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#! /usr/bin/env nix-shell
|
||||||
|
#! nix-shell -p "(import <nixpkgs> { overlays = [ (import ~/work/fysiweb/engiadina-pwa/devops/pkgs) ]; }).elm-publish-private"
|
||||||
|
#! nix-shell -i bash
|
||||||
|
|
||||||
|
set -efux
|
||||||
|
|
||||||
|
exec elm-publish-private "$@"
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
{
|
{
|
||||||
"url": "https://github.com/nix-community/home-manager.git",
|
"url": "https://github.com/nix-community/home-manager.git",
|
||||||
"rev": "3e93c4e8b2b479c712b7c20a428993b459118842",
|
"rev": "697cc8c68ed6a606296efbbe9614c32537078756",
|
||||||
"date": "2021-11-30T11:10:06+01:00",
|
"date": "2021-12-19T00:59:29+01:00",
|
||||||
"path": "/nix/store/nsfhkc6gkg3wf0b87z15zd0izp8j52av-home-manager",
|
"path": "/nix/store/fb46bv10azrag2jjlzhil6j11f4x8glw-home-manager",
|
||||||
"sha256": "0wgx47fyypbzpm2sbxj8xs846wvdkw1f76a8g3lbkxpla075vrl5",
|
"sha256": "1c8gxm86zshr2zj9dvr02qs7y3m46gqavr6wyv01r09jfd99dxz9",
|
||||||
|
"fetchLFS": false,
|
||||||
"fetchSubmodules": false,
|
"fetchSubmodules": false,
|
||||||
"deepClone": false,
|
"deepClone": false,
|
||||||
"leaveDotGit": false
|
"leaveDotGit": false
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"date": "2021-03-23T22:47:37+01:00",
|
"date": "2021-03-23T22:47:37+01:00",
|
||||||
"path": "/nix/store/mz13xxnil35lwsf90hwnrm2agir7hb51-krops",
|
"path": "/nix/store/mz13xxnil35lwsf90hwnrm2agir7hb51-krops",
|
||||||
"sha256": "07mg3iaqjf1w49vmwfchi7b1w55bh7rvsbgicp2m47gnj9alwdb6",
|
"sha256": "07mg3iaqjf1w49vmwfchi7b1w55bh7rvsbgicp2m47gnj9alwdb6",
|
||||||
|
"fetchLFS": false,
|
||||||
"fetchSubmodules": false,
|
"fetchSubmodules": false,
|
||||||
"deepClone": false,
|
"deepClone": false,
|
||||||
"leaveDotGit": false
|
"leaveDotGit": false
|
||||||
|
|||||||
11
.versions/nix-writers.json
Normal file
11
.versions/nix-writers.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"url": "https://cgit.krebsco.de/nix-writers",
|
||||||
|
"rev": "c528cf970e292790b414b4c1c8c8e9d7e73b2a71",
|
||||||
|
"date": "2019-04-02T20:05:33+02:00",
|
||||||
|
"path": "/nix/store/wm5zhsha1a2iy0d582nlfi7604ayd1vz-nix-writers",
|
||||||
|
"sha256": "0xdivaca1hgbxs79jw9sv4gk4f81vy8kcyaff56hh2dgq2awyvw4",
|
||||||
|
"fetchLFS": false,
|
||||||
|
"fetchSubmodules": false,
|
||||||
|
"deepClone": false,
|
||||||
|
"leaveDotGit": false
|
||||||
|
}
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
{
|
{
|
||||||
"url": "https://github.com/mozilla/nixpkgs-mozilla",
|
"url": "https://github.com/mozilla/nixpkgs-mozilla",
|
||||||
"rev": "cbc7435f5b0b3d17b16fb1d20cf7b616eec5e093",
|
"rev": "7c1e8b1dd6ed0043fb4ee0b12b815256b0b9de6f",
|
||||||
"date": "2021-11-19T10:51:56-05:00",
|
"date": "2021-12-07T09:28:33-05:00",
|
||||||
"path": "/nix/store/bvbq377c43f6v7ndff80jdmf4m6wmn2c-nixpkgs-mozilla",
|
"path": "/nix/store/pqwcw589i2y2w2116wn3ifl834adjsa0-nixpkgs-mozilla",
|
||||||
"sha256": "1kapba23cy3y1ghyqpm0rapbrfj3qdkd7v58c6g8bhpys9qq1aic",
|
"sha256": "1a71nfw7d36vplf89fp65vgj3s66np1dc0hqnqgj5gbdnpm1bihl",
|
||||||
|
"fetchLFS": false,
|
||||||
"fetchSubmodules": false,
|
"fetchSubmodules": false,
|
||||||
"deepClone": false,
|
"deepClone": false,
|
||||||
"leaveDotGit": false
|
"leaveDotGit": false
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
{
|
{
|
||||||
"url": "https://github.com/NixOS/nixpkgs.git",
|
"url": "https://github.com/NixOS/nixpkgs.git",
|
||||||
"rev": "5d056884fbf7e5c693e17a1dbaf426e49f739b6a",
|
"rev": "f01adc7b35a8f80e82f3466e6d873b8b9c8f1b28",
|
||||||
"date": "2021-12-01T07:35:38+01:00",
|
"date": "2021-12-22T23:05:28+01:00",
|
||||||
"path": "/nix/store/iqhw5vmfqqrmnwbbz247pjycvchnvsv0-nixpkgs",
|
"path": "/nix/store/zhfrvg77dzpc3hq02v9zv20dfgqwpzk6-nixpkgs",
|
||||||
"sha256": "1kcllypk4xl9kkzqi5ylmq0hnrs200a8wyk3wlh3g4g3zma2ams8",
|
"sha256": "17iyf2iiizi7c1wr71day3wvgalbkkm2zgc9lpy7y42rl4frq9sf",
|
||||||
|
"fetchLFS": false,
|
||||||
"fetchSubmodules": false,
|
"fetchSubmodules": false,
|
||||||
"deepClone": false,
|
"deepClone": false,
|
||||||
"leaveDotGit": false
|
"leaveDotGit": false
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
{
|
{
|
||||||
"url": "https://github.com/NixOS/nixpkgs.git",
|
"url": "https://github.com/NixOS/nixpkgs.git",
|
||||||
"rev": "96b4157790fc96e70d6e6c115e3f34bba7be490f",
|
"rev": "9ab7d12287ced0e1b4c03b61c781901f178d9d77",
|
||||||
"date": "2021-11-30T21:39:06+08:00",
|
"date": "2021-12-21T10:09:48+01:00",
|
||||||
"path": "/nix/store/lcn20w73v7gcd121kr5kmmncrqkh5bw7-nixpkgs",
|
"path": "/nix/store/minmlh0avkwvvc3p7flhpbglp13kr585-nixpkgs",
|
||||||
"sha256": "05m0gn1dy0cdlamwyiq276s770bm2pw8qx6s0mfrv3khpcvv186l",
|
"sha256": "0bbd2pgcyavqn5wgq0xp8p67lha0kv9iqnh49i9w5fb5g29q7i30",
|
||||||
|
"fetchLFS": false,
|
||||||
"fetchSubmodules": false,
|
"fetchSubmodules": false,
|
||||||
"deepClone": false,
|
"deepClone": false,
|
||||||
"leaveDotGit": false
|
"leaveDotGit": false
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"url": "https://github.com/krebs/retiolum",
|
"url": "https://github.com/krebs/retiolum",
|
||||||
"rev": "108c668bba912214d5aa1cf091573e0c18d02e37",
|
"rev": "b72b0a987767b587c79cba8499b5114d69fceeef",
|
||||||
"date": "2021-12-08T13:02:16+01:00",
|
"date": "2021-12-28T19:46:45+00:00",
|
||||||
"path": "/nix/store/837jzivn8ndxaz87yx88a51myir8j7wg-retiolum",
|
"path": "/nix/store/kyaqwf89v6id9mda92x4b0hf778j987x-retiolum",
|
||||||
"sha256": "0948rcwdwimgyrjbi9h8xlh99p4di6v9rw98bnmczsjcc0avvmdb",
|
"sha256": "19hjzzlfk1m9ign33w4ppqgmg23v7c6k8l0fm7f33spq8982w7rb",
|
||||||
"fetchLFS": false,
|
"fetchLFS": false,
|
||||||
"fetchSubmodules": false,
|
"fetchSubmodules": false,
|
||||||
"deepClone": false,
|
"deepClone": false,
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"url": "https://cgit.lassul.us/stockholm",
|
"url": "https://cgit.lassul.us/stockholm",
|
||||||
"rev": "b79f5ab97db8115c4b2e66e57bb84587a31ce1e0",
|
"rev": "576c05cf3a0ceddefa29c2d0073108177c3cfa52",
|
||||||
"date": "2021-11-30T23:09:27+01:00",
|
"date": "2021-12-22T13:59:46+01:00",
|
||||||
"path": "/nix/store/ng83hpfszfnm3d80i5kv50qgqqsqgkrj-stockholm",
|
"path": "/nix/store/yx1j5pardgd9114f0cf3c4xjfq6r4yfv-stockholm",
|
||||||
"sha256": "0g70jzya62nw3w6vwjdddn2i9hlm8r1d1f1wnl2bzibwx6p97bp6",
|
"sha256": "18napi4k8i2iizrismlp9ha3ga6c3n2dvrhijy59kl1jxqrsaq9l",
|
||||||
"fetchLFS": false,
|
"fetchLFS": false,
|
||||||
"fetchSubmodules": false,
|
"fetchSubmodules": false,
|
||||||
"deepClone": false,
|
"deepClone": false,
|
||||||
|
|||||||
@@ -1,12 +1,4 @@
|
|||||||
{ config, lib, pkgs, ... }: {
|
{ config, lib, pkgs, ... }: {
|
||||||
imports = [
|
|
||||||
<niveum/modules/dropbox.nix>
|
|
||||||
];
|
|
||||||
|
|
||||||
niveum = {
|
|
||||||
dropbox.enable = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
system.activationScripts.home-symlinks = ''
|
system.activationScripts.home-symlinks = ''
|
||||||
ln -sfn ${config.users.users.me.home}/cloud/syncthing/common/mahlzeit ${config.users.users.me.home}/mahlzeit
|
ln -sfn ${config.users.users.me.home}/cloud/syncthing/common/mahlzeit ${config.users.users.me.home}/mahlzeit
|
||||||
ln -sfn ${config.users.users.me.home}/cloud/Seafile/Wiki ${config.users.users.me.home}/notes
|
ln -sfn ${config.users.users.me.home}/cloud/Seafile/Wiki ${config.users.users.me.home}/notes
|
||||||
@@ -46,7 +38,7 @@
|
|||||||
dataDir = "/home/kfm/.config/syncthing";
|
dataDir = "/home/kfm/.config/syncthing";
|
||||||
cert = toString <system-secrets/syncthing/cert.pem>;
|
cert = toString <system-secrets/syncthing/cert.pem>;
|
||||||
key = toString <system-secrets/syncthing/key.pem>;
|
key = toString <system-secrets/syncthing/key.pem>;
|
||||||
inherit ((import <niveum/lib>).syncthing) devices;
|
inherit ((import ../lib).syncthing) devices;
|
||||||
folders =
|
folders =
|
||||||
let cloud-dir = "${config.users.users.me.home}/cloud";
|
let cloud-dir = "${config.users.users.me.home}/cloud";
|
||||||
in {
|
in {
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
{ pkgs, lib, config, options, ... }:
|
{ pkgs, lib, config, options, ... }:
|
||||||
let
|
let
|
||||||
inherit (lib.strings) makeBinPath;
|
inherit (lib.strings) makeBinPath;
|
||||||
inherit (import <niveum/lib>) localAddresses kieran;
|
inherit (import ../lib) localAddresses kieran;
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
<home-manager/nixos>
|
../modules/system-dependent.nix
|
||||||
<niveum/modules/system-dependent.nix>
|
|
||||||
{
|
{
|
||||||
boot.supportedFilesystems = [ "ntfs" ];
|
boot.supportedFilesystems = [ "ntfs" ];
|
||||||
}
|
}
|
||||||
@@ -28,9 +27,8 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
overlays = [
|
overlays = [
|
||||||
(import <stockholm/krebs/5pkgs>)
|
|
||||||
(self: super: {
|
(self: super: {
|
||||||
scripts = import <niveum/packages/scripts> { pkgs = super; lib = super.lib; };
|
scripts = import ../packages/scripts { pkgs = super; lib = super.lib; };
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@@ -202,13 +200,11 @@ in {
|
|||||||
./ccc.nix
|
./ccc.nix
|
||||||
# ./kleiter.nix
|
# ./kleiter.nix
|
||||||
./khal.nix
|
./khal.nix
|
||||||
./engiadina.nix
|
|
||||||
./chromium.nix
|
./chromium.nix
|
||||||
./cloud.nix
|
./cloud.nix
|
||||||
./copyq.nix
|
./copyq.nix
|
||||||
./compton.nix
|
./compton.nix
|
||||||
./direnv.nix
|
./direnv.nix
|
||||||
./distrobump.nix
|
|
||||||
./docker.nix
|
./docker.nix
|
||||||
./dunst.nix
|
./dunst.nix
|
||||||
./flix.nix
|
./flix.nix
|
||||||
@@ -227,14 +223,13 @@ in {
|
|||||||
./nano.nix
|
./nano.nix
|
||||||
./neovim.nix
|
./neovim.nix
|
||||||
./neomutt.nix
|
./neomutt.nix
|
||||||
./nix.nix
|
|
||||||
./newsboat.nix
|
./newsboat.nix
|
||||||
./flameshot-once.nix
|
./flameshot-once.nix
|
||||||
./packages
|
./packages
|
||||||
./power-action.nix
|
# ./power-action.nix
|
||||||
./printing.nix
|
./printing.nix
|
||||||
./openweathermap.nix
|
./openweathermap.nix
|
||||||
./wallpaper.nix
|
# ./wallpaper.nix
|
||||||
./redshift.nix
|
./redshift.nix
|
||||||
./retiolum.nix
|
./retiolum.nix
|
||||||
./rofi.nix
|
./rofi.nix
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
{ lib, config, pkgs, ... }: {
|
|
||||||
imports = [
|
|
||||||
(import <stockholm/makefu/3modules/bump-distrowatch.nix> {
|
|
||||||
inherit lib config;
|
|
||||||
pkgs = pkgs // { writeDash = pkgs.writers.writeDash; };
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
makefu.distrobump.enable = false;
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
inherit (import <niveum/lib>) defaultApplications colours theme;
|
inherit (import ../lib) defaultApplications colours theme;
|
||||||
in {
|
in {
|
||||||
home-manager.users.me.services.dunst = {
|
home-manager.users.me.services.dunst = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
{ config, pkgs, ... }:
|
|
||||||
let
|
|
||||||
inherit (import <niveum/lib>) tmpfilesConfig;
|
|
||||||
cdnRoot = "/var/lib/engiadina";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [ <stockholm/krebs/3modules/permown.nix> ];
|
|
||||||
|
|
||||||
krebs.permown.${cdnRoot} = {
|
|
||||||
owner = config.users.users.me.name;
|
|
||||||
group = "users";
|
|
||||||
umask = "0002";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.nginx = {
|
|
||||||
enable = true;
|
|
||||||
virtualHosts.default = {
|
|
||||||
root = cdnRoot;
|
|
||||||
listen = [{
|
|
||||||
addr = "0.0.0.0";
|
|
||||||
port = 3333;
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.shellAliases = {
|
|
||||||
engiadina-watch = "${pkgs.findutils}/bin/find extra-src src | ${pkgs.entr}/bin/entr -s 'build-component && ${pkgs.rsync}/bin/rsync -avu dist/*.js ${cdnRoot}/'";
|
|
||||||
engiadina-edit = "$EDITOR ${cdnRoot}/index.html";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,26 +1,24 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ lib, pkgs, ... }:
|
||||||
{
|
let
|
||||||
home-manager.users.me = {
|
inherit (import <niveum/lib>) defaultApplications;
|
||||||
services.flameshot.enable = true;
|
flameshot-once = pkgs.callPackage <stockholm/krebs/5pkgs/simple/flameshot-once> {};
|
||||||
|
in {
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(self: super: {
|
||||||
|
write =
|
||||||
|
super.callPackage <stockholm/krebs/5pkgs/simple/xwaitforwindow.nix> { };
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
xdg.configFile."flameshot/flameshot.ini".source = (pkgs.formats.ini {}).generate "flameshot.ini" {
|
environment.systemPackages = [
|
||||||
General = {
|
(flameshot-once.override {
|
||||||
disabledTrayIcon = true;
|
config.imgur = {
|
||||||
checkForUpdates = false;
|
enable = true;
|
||||||
contrastOpacity = 188;
|
createUrl = "http://p.r/image";
|
||||||
savePath = "/tmp";
|
deleteUrl = "http://p.r/image/delete/%1";
|
||||||
savePathFixed = true;
|
xdg-open.browser = (defaultApplications pkgs).browser;
|
||||||
drawThickness = 0;
|
|
||||||
showStartupLaunchMessage = false;
|
|
||||||
filenamePattern = "shot_%F_%T";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.user.services.flameshot.Unit.Requires = lib.mkForce [];
|
|
||||||
systemd.user.services.flameshot.Environment = {
|
|
||||||
# IMGUR_CREATE_URL = "https://p.krebsco.de/image";
|
|
||||||
# IMGUR_DELETE_URL = "https://p.krebsco.de/image/delete/%1";
|
|
||||||
PATH = "${config.home-manager.users.me.home.profileDirectory}/bin";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
config.timeout = 1000;
|
||||||
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ pkgs, config, lib, ... }:
|
{ pkgs, config, lib, ... }:
|
||||||
let
|
let
|
||||||
inherit (import <niveum/lib>) kieran ignorePaths;
|
inherit (import ../lib) kieran ignorePaths;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{ config, pkgs, ... }: {
|
{ config, pkgs, ... }: {
|
||||||
imports = [ <niveum/modules/hledger.nix> ];
|
imports = [ ../modules/hledger.nix ];
|
||||||
|
|
||||||
niveum.hledger = {
|
niveum.hledger = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ inputs, config, pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
inherit (import <niveum/lib>) defaultApplications colours;
|
inherit (import ../lib) defaultApplications colours;
|
||||||
klem = import <niveum/packages/scripts/klem.nix> {
|
klem = import ../packages/scripts/klem.nix {
|
||||||
inherit pkgs lib;
|
inherit pkgs lib;
|
||||||
config.scripts = {
|
config.scripts = {
|
||||||
"p.r" = pkgs.writers.writeDash "p.r" ''
|
"p.r" = pkgs.writers.writeDash "p.r" ''
|
||||||
@@ -146,7 +146,7 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ${
|
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ${
|
||||||
(pkgs.formats.toml {}).generate "i3status-rust.toml" (import <niveum/lib/i3status-rust.nix> {
|
(pkgs.formats.toml {}).generate "i3status-rust.toml" (import ../lib/i3status-rust.nix {
|
||||||
inherit (config.niveum) batteryName wirelessInterface;
|
inherit (config.niveum) batteryName wirelessInterface;
|
||||||
inherit colours;
|
inherit colours;
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
@@ -233,8 +233,7 @@ in {
|
|||||||
"${modifier}+F10" = "exec ${pkgs.redshift}/bin/redshift -x";
|
"${modifier}+F10" = "exec ${pkgs.redshift}/bin/redshift -x";
|
||||||
"${modifier}+F11" = "exec ${pkgs.xcalib}/bin/xcalib -invert -alter";
|
"${modifier}+F11" = "exec ${pkgs.xcalib}/bin/xcalib -invert -alter";
|
||||||
"${modifier}+F12" = "exec ${klem}/bin/klem";
|
"${modifier}+F12" = "exec ${klem}/bin/klem";
|
||||||
|
"Print" = "exec flameshot-once";
|
||||||
"Print" = "exec flameshot gui -p /tmp";
|
|
||||||
"XF86AudioLowerVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -d 5";
|
"XF86AudioLowerVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -d 5";
|
||||||
"XF86AudioMute" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -t";
|
"XF86AudioMute" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -t";
|
||||||
"XF86AudioRaiseVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5";
|
"XF86AudioRaiseVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
{ pkgs, lib, ... }: let
|
{ pkgs, lib, ... }: let
|
||||||
swallow = command: "${pkgs.scripts.swallow}/bin/swallow ${command}";
|
swallow = command: "${pkgs.scripts.swallow}/bin/swallow ${command}";
|
||||||
nixpkgs-unstable = import <nixpkgs-unstable> { config.allowUnfree = true; };
|
|
||||||
in {
|
in {
|
||||||
environment.shellAliases.smpv = swallow "mpv";
|
environment.shellAliases.smpv = swallow "mpv";
|
||||||
|
|
||||||
@@ -22,7 +21,7 @@ in {
|
|||||||
"Alt+j" = "add video-pan-y -0.05";
|
"Alt+j" = "add video-pan-y -0.05";
|
||||||
};
|
};
|
||||||
scripts = [
|
scripts = [
|
||||||
nixpkgs-unstable.mpvScripts.youtube-quality
|
pkgs.unstable.mpvScripts.youtube-quality
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -25,18 +25,13 @@
|
|||||||
customRC = builtins.readFile <niveum/lib/vim/init.vim>;
|
customRC = builtins.readFile <niveum/lib/vim/init.vim>;
|
||||||
packages.nvim = with pkgs.vimPlugins; {
|
packages.nvim = with pkgs.vimPlugins; {
|
||||||
start = [
|
start = [
|
||||||
# cheat-sh-vim
|
|
||||||
# deoplete-nvim
|
|
||||||
# vim-abolish
|
|
||||||
ale
|
ale
|
||||||
fzf-vim
|
fzf-vim
|
||||||
fzfWrapper
|
fzfWrapper
|
||||||
goyo
|
|
||||||
supertab
|
supertab
|
||||||
undotree
|
undotree
|
||||||
tabular
|
tabular
|
||||||
vimwiki
|
vimwiki
|
||||||
vim-256noir
|
|
||||||
vim-colors-paramount
|
vim-colors-paramount
|
||||||
vim-commentary
|
vim-commentary
|
||||||
vim-css-color
|
vim-css-color
|
||||||
@@ -44,13 +39,9 @@
|
|||||||
vim-fetch
|
vim-fetch
|
||||||
vim-fugitive
|
vim-fugitive
|
||||||
vim-gitgutter
|
vim-gitgutter
|
||||||
vim-pandoc
|
|
||||||
vim-pandoc-syntax # vim-pandoc-after
|
|
||||||
vim-repeat
|
vim-repeat
|
||||||
vim-sensible
|
vim-sensible
|
||||||
# vim-startify
|
|
||||||
vim-surround
|
vim-surround
|
||||||
vim-mail
|
|
||||||
];
|
];
|
||||||
opt = [
|
opt = [
|
||||||
csv
|
csv
|
||||||
@@ -72,6 +63,9 @@
|
|||||||
vim-reason-plus
|
vim-reason-plus
|
||||||
vim-toml
|
vim-toml
|
||||||
vimtex
|
vimtex
|
||||||
|
vim-pandoc
|
||||||
|
vim-pandoc-syntax # vim-pandoc-after
|
||||||
|
vim-256noir
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
{ lib, pkgs, ... }:
|
{ lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
autowifi = pkgs.writers.writePython3Bin "autowifi" { flakeIgnore = [ "E501" ]; } <stockholm/lass/5pkgs/autowifi/autowifi.py>;
|
|
||||||
profile = name: custom: lib.recursiveUpdate {
|
profile = name: custom: lib.recursiveUpdate {
|
||||||
connection.id = name;
|
connection.id = name;
|
||||||
connection.type = "wifi";
|
connection.type = "wifi";
|
||||||
@@ -39,7 +38,7 @@ let
|
|||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ <niveum/modules/networkmanager-declarative.nix> ];
|
imports = [ ../modules/networkmanager-declarative.nix ];
|
||||||
|
|
||||||
networking.networkmanager = {
|
networking.networkmanager = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -83,18 +82,5 @@ in
|
|||||||
|
|
||||||
users.users.me.extraGroups = [ "networkmanager" ];
|
users.users.me.extraGroups = [ "networkmanager" ];
|
||||||
|
|
||||||
systemd.services.autowifi = {
|
|
||||||
enable = false;
|
|
||||||
description = "Automatic wifi connector";
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
path = [ pkgs.networkmanager ];
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "simple";
|
|
||||||
Restart = "always";
|
|
||||||
RestartSec = "10s";
|
|
||||||
ExecStart = "${autowifi}/bin/autowifi";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.speedtest-cli ];
|
environment.systemPackages = [ pkgs.speedtest-cli ];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
# enable `nix flake`
|
|
||||||
nix = {
|
|
||||||
package = pkgs.nix;
|
|
||||||
# extraOptions = ''
|
|
||||||
# experimental-features = nix-command
|
|
||||||
# '';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -6,6 +6,25 @@ let
|
|||||||
|
|
||||||
nixpkgs-unstable = import <nixpkgs-unstable> { config.allowUnfree = true; };
|
nixpkgs-unstable = import <nixpkgs-unstable> { config.allowUnfree = true; };
|
||||||
|
|
||||||
|
astrolog = nixpkgs-unstable.astrolog.overrideAttrs (old: old // {
|
||||||
|
installPhase = ''
|
||||||
|
${old.installPhase}
|
||||||
|
# set sensible defaults
|
||||||
|
sed -i '
|
||||||
|
/^-z /s/8:00W/1:00E/ # timezone
|
||||||
|
/^-zl /s/122W19:59 47N36:35/13E22:42 52N27:42/ # default location
|
||||||
|
/^-zj /s/"Current moment now"/Now/ # default name
|
||||||
|
/^-zj /s/"Seattle, WA, USA"/Berlin/ # default location
|
||||||
|
/^_k/s/_k/=k/ # use color
|
||||||
|
/^_Yd/s/_Yd/=Yd/ # sensible date format
|
||||||
|
/^_Yt/s/_Yt/=Yt/ # sensible time format
|
||||||
|
/^_Yv/s/_Yv/=Yv/ # sensible length format
|
||||||
|
/^:Xbw/s/:Xbw/:Xbn/ # set X11 bitmap format
|
||||||
|
/^:I /s/80/120/ # wider text output
|
||||||
|
' $out/astrolog/astrolog.as
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
|
||||||
recht = pkgs.callPackage (pkgs.fetchFromGitHub {
|
recht = pkgs.callPackage (pkgs.fetchFromGitHub {
|
||||||
owner = "kmein";
|
owner = "kmein";
|
||||||
repo = "recht";
|
repo = "recht";
|
||||||
@@ -107,6 +126,8 @@ in {
|
|||||||
audacity
|
audacity
|
||||||
calibre
|
calibre
|
||||||
inkscape
|
inkscape
|
||||||
|
astrolog # astrolog
|
||||||
|
anki # flashcards
|
||||||
nixpkgs-unstable.zoom-us # video conferencing
|
nixpkgs-unstable.zoom-us # video conferencing
|
||||||
pdfgrep # search in pdf
|
pdfgrep # search in pdf
|
||||||
pdftk # pdf toolkit
|
pdftk # pdf toolkit
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
inherit (import <niveum/lib>) localAddresses;
|
inherit (import ../lib) localAddresses;
|
||||||
hp-driver = pkgs.hplipWithPlugin;
|
hp-driver = pkgs.hplipWithPlugin;
|
||||||
in {
|
in {
|
||||||
services.printing = {
|
services.printing = {
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ let
|
|||||||
tinc-graph-source = pkgs.fetchFromGitHub {
|
tinc-graph-source = pkgs.fetchFromGitHub {
|
||||||
owner = "kmein";
|
owner = "kmein";
|
||||||
repo = "tinc-graph";
|
repo = "tinc-graph";
|
||||||
rev = "50593204faa663422f95d7df2931382e7301f8d6";
|
rev = "1b9c69ffdbdab82d30a23e44f739feea63d94163";
|
||||||
sha256 = "16cqsnyz6iyw8p395bmam4zvnmzvfz9lhxviscai9sa0imd7rwz2";
|
sha256 = "0bk4x9l399f80lmz4asx7s5fcsgrfdb6xyymbq884621x4z3d2vp";
|
||||||
};
|
};
|
||||||
tinc-graph = pkgs.callPackage tinc-graph-source {};
|
tinc-graph = pkgs.callPackage tinc-graph-source {};
|
||||||
in
|
in
|
||||||
@@ -25,6 +25,7 @@ in
|
|||||||
| ${tinc-graph}/bin/tinc-statistics > statistics.json
|
| ${tinc-graph}/bin/tinc-statistics > statistics.json
|
||||||
|
|
||||||
cp ${tinc-graph}/static/map.html map.html
|
cp ${tinc-graph}/static/map.html map.html
|
||||||
|
cp ${tinc-graph}/static/map.html index.html
|
||||||
cp ${tinc-graph}/static/graph.html graph.html
|
cp ${tinc-graph}/static/graph.html graph.html
|
||||||
'';
|
'';
|
||||||
startAt = "hourly";
|
startAt = "hourly";
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ config, pkgs, ... }: {
|
{ config, pkgs, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
<niveum/modules/retiolum.nix>
|
../modules/retiolum.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hosts = { "42:0:ca48:f98f:63d7:31ce:922b:245d" = [ "go" ]; };
|
networking.hosts = { "42:0:ca48:f98f:63d7:31ce:922b:245d" = [ "go" ]; };
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ pkgs, config, lib, ... }:
|
{ pkgs, config, lib, ... }:
|
||||||
let
|
let
|
||||||
inherit (import <niveum/lib>) sshPort kieran;
|
inherit (import ../lib) sshPort kieran;
|
||||||
in {
|
in {
|
||||||
services.xserver.displayManager.sessionCommands = "${pkgs.openssh}/bin/ssh-add";
|
services.xserver.displayManager.sessionCommands = "${pkgs.openssh}/bin/ssh-add";
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
inherit (import <niveum/lib>) sshPort kieran;
|
inherit (import ../lib) sshPort kieran;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
users.motd = "Welcome to ${config.networking.hostName}!";
|
users.motd = "Welcome to ${config.networking.hostName}!";
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ let
|
|||||||
};
|
};
|
||||||
tarotKey = builtins.fetchurl {
|
tarotKey = builtins.fetchurl {
|
||||||
url = "http://c.krebsco.de/tarot.pdf";
|
url = "http://c.krebsco.de/tarot.pdf";
|
||||||
sha256 = "19y0qh00qsbbxm1had6jh66d1gq57cjccsqnlwjmr001r2hgjgg8";
|
sha256 = "1n2m53kjg2vj9dbr70b9jrsbqwdfrcb48l4wswn21549fi24g6dx";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|||||||
53
configs/telegram-bots/astrology.nix
Normal file
53
configs/telegram-bots/astrology.nix
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
{ pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
nixpkgs-unstable = import <nixpkgs-unstable> {};
|
||||||
|
toSymbols = pkgs.writers.writeDash "to-symbols" ''
|
||||||
|
${pkgs.gnused}/bin/sed '
|
||||||
|
s/\bTri\b/△/;
|
||||||
|
s/\bOpp\b/☍/;
|
||||||
|
s/\bSqu\b/□/;
|
||||||
|
s/\bSex\b/⚹/;
|
||||||
|
s/\bCon\b/☌/;
|
||||||
|
s/Sun/☉/g;
|
||||||
|
s/Moon/☽/g;
|
||||||
|
s/Mercury/☿/g;
|
||||||
|
s/Venus/♀/g;
|
||||||
|
s/Mars/♂/g;
|
||||||
|
s/Jupiter/♃/g;
|
||||||
|
s/Saturn/♄/g;
|
||||||
|
s/Uranus/♅/g;
|
||||||
|
s/Neptune/♆/g;
|
||||||
|
s/Pluto/♇/g;
|
||||||
|
s/North Node/☊/g;
|
||||||
|
s/\bLeo\b/♌/g;
|
||||||
|
s/\bCan\(cer\)\?\b/♋/g;
|
||||||
|
s/\bGem\(ini\)\?\b/♊/g;
|
||||||
|
s/\bVir\(go\)\?\b/♍/g;
|
||||||
|
s/\bLib\(ra\)\?\b/♎/g;
|
||||||
|
s/\bTau\(rus\)\?\b/♉/g;
|
||||||
|
s/\bAri\(es\)\?\b/♈/g;
|
||||||
|
s/\bSco\(rpio\)\?\b/♏/g;
|
||||||
|
s/\bPis\(ces\)\?\b/♓/g;
|
||||||
|
s/\bSag\(ittarius\)\?\b/♐/g;
|
||||||
|
s/\bAqu\(arius\)\?\b/♒/g;
|
||||||
|
s/\bCap\(ricorn\)\?\b/♑/g;
|
||||||
|
s/-->/⟶/g;
|
||||||
|
s/\s\+/ /g; # replace multiple spaces by one
|
||||||
|
s/^.*\([ 0-9]\{2\}:[0-9]\{2\}\) /\1 /; # remove date at beginning of line (but not everything up to v/c X:XX)
|
||||||
|
s/^\s*//
|
||||||
|
'
|
||||||
|
'';
|
||||||
|
in {
|
||||||
|
niveum.telegramBots.transits = {
|
||||||
|
enable = true;
|
||||||
|
time = "4:00";
|
||||||
|
token = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
|
||||||
|
chatIds = [ "18980945" ];
|
||||||
|
command = toString (pkgs.writers.writeDash "common-transits" ''
|
||||||
|
{
|
||||||
|
${nixpkgs-unstable.astrolog}/bin/astrolog -n -zN Berlin -Yt -Yd -d -R Uranus Neptune Pluto
|
||||||
|
${nixpkgs-unstable.astrolog}/bin/astrolog -Yt -Yd -q 10 22 1999 6:32 -zN Kassel -td $(${pkgs.coreutils}/bin/date +'%m %d %Y') -R Uranus Neptune Pluto
|
||||||
|
} | ${toSymbols} | ${pkgs.coreutils}/bin/sort -n
|
||||||
|
'');
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -14,6 +14,7 @@ let
|
|||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./literature-quote.nix
|
./literature-quote.nix
|
||||||
|
./astrology.nix
|
||||||
./autorenkalender.nix
|
./autorenkalender.nix
|
||||||
./nachtischsatan.nix
|
./nachtischsatan.nix
|
||||||
./tlg-wotd.nix
|
./tlg-wotd.nix
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ lib, config, pkgs, ... }:
|
{ lib, config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
theme = (import <niveum/lib>).theme pkgs;
|
theme = (import ../lib).theme pkgs;
|
||||||
in {
|
in {
|
||||||
environment.systemPackages =
|
environment.systemPackages =
|
||||||
[ theme.gtk.package theme.icon.package theme.cursor.package ];
|
[ theme.gtk.package theme.icon.package theme.cursor.package ];
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ let
|
|||||||
living-room-id = 131090;
|
living-room-id = 131090;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ <niveum/modules/traadfri.nix> ];
|
imports = [ ../modules/traadfri.nix ];
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
(pkgs.writers.writeDashBin "traadfri-party" ''
|
(pkgs.writers.writeDashBin "traadfri-party" ''
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
recommendedGzipSettings = true;
|
recommendedGzipSettings = true;
|
||||||
@@ -109,4 +110,5 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,8 +50,8 @@ in {
|
|||||||
/relay add weechat 9000
|
/relay add weechat 9000
|
||||||
/set relay.network.password ${relayPassword}
|
/set relay.network.password ${relayPassword}
|
||||||
|
|
||||||
/set matrix.server.myserver.username ${nick}
|
/set matrix.server.nibbana.username ${nick}
|
||||||
/set matrix.server.myserver.password "${lib.strings.fileContents <system-secrets/matrix/nibbana>}"
|
/set matrix.server.nibbana.password "${lib.strings.fileContents <system-secrets/matrix/nibbana>}"
|
||||||
|
|
||||||
/set irc.server.oftc.command /msg nickserv IDENTIFY ${lib.strings.fileContents <system-secrets/irc/oftc>};/msg nickserv SET CLOAK ON
|
/set irc.server.oftc.command /msg nickserv IDENTIFY ${lib.strings.fileContents <system-secrets/irc/oftc>};/msg nickserv SET CLOAK ON
|
||||||
/set irc.server.oftc.autojoin "#osm,#osm-de,#home-manager"
|
/set irc.server.oftc.autojoin "#osm,#osm-de,#home-manager"
|
||||||
@@ -72,7 +72,7 @@ in {
|
|||||||
/set irc.server.news.command "/oper aids balls"
|
/set irc.server.news.command "/oper aids balls"
|
||||||
/set logger.level.irc.news 0
|
/set logger.level.irc.news 0
|
||||||
|
|
||||||
/filter addreplace zerocovid * * [kc]orona|💉|🤒|😷|[kc]ovid|virus|lockdown|va[kc][sc]in|mutante|mutation|impf|pandemi|κορ[ωο]ν[αο]ϊό|корона|expert|infe[ck]t|infizi|in[cz]iden[cz]|sars-cov|drosten|virolog|lauterbach|delta|omi[ck]ron
|
/filter addreplace zerocovid * * [kc]orona|💉|🤒|😷|[kc]ovid|virus|lockdown|va[kc][sc]in|mutante|mutation|impf|pandemi|κορ[ωο]ν[αο]ϊό|корона|expert|infe[ck]t|infizi|in[cz]iden[cz]|sars-cov|drosten|virolog|lauterbach|delta|omi[ck]ron|epidemi|booster|r-wert
|
||||||
/filter addreplace joinquit * irc_join,irc_part,irc_quit,irc_nick *
|
/filter addreplace joinquit * irc_join,irc_part,irc_quit,irc_nick *
|
||||||
/filter addreplace playlist_topic irc.*.#the_playlist irc_topic *
|
/filter addreplace playlist_topic irc.*.#the_playlist irc_topic *
|
||||||
/filter addreplace brockman_notice irc.news.* irc_notice *
|
/filter addreplace brockman_notice irc.news.* irc_notice *
|
||||||
|
|||||||
81
deploy.nix
81
deploy.nix
@@ -1,67 +1,40 @@
|
|||||||
|
{ pkgs, secrets, writeCommand, lib, nixosRebuildCommand ? "switch" }:
|
||||||
let
|
let
|
||||||
inherit (import ./lib/default.nix) sshPort;
|
sshPort = 22022;
|
||||||
|
|
||||||
gitFromJson = path:
|
# command that ensures we use flake.nix during switch
|
||||||
let object = importJson path;
|
command = targetPath:
|
||||||
in {
|
let
|
||||||
inherit (object) url;
|
commandLine = "TMPDIR=/tmp nixos-rebuild ${nixosRebuildCommand} --flake ${targetPath} -L --keep-going";
|
||||||
ref = object.rev;
|
in
|
||||||
};
|
''
|
||||||
krops = builtins.fetchGit (gitFromJson .versions/krops.json);
|
echo '${commandLine}'
|
||||||
lib = import "${krops}/lib";
|
nix-shell \
|
||||||
pkgs = import "${krops}/pkgs" { };
|
-E "with import <nixpkgs> {}; mkShell { buildInputs = [ git (nixos { nix.package = nixFlakes; }).nixos-rebuild ]; }" \
|
||||||
importJson = (import <nixpkgs> { }).lib.importJSON;
|
--run '${commandLine}'
|
||||||
|
'';
|
||||||
|
|
||||||
regularSystem = { path, name, address }: {
|
source = name: {
|
||||||
source = lib.evalSource [{
|
|
||||||
niveum.file = toString ./.;
|
niveum.file = toString ./.;
|
||||||
system.file = toString path;
|
|
||||||
nixos-config.symlink = "system/configuration.nix";
|
|
||||||
|
|
||||||
nixpkgs.git = gitFromJson .versions/nixpkgs.json // { shallow = true; };
|
|
||||||
nixpkgs-unstable.git = gitFromJson .versions/nixpkgs-unstable.json // { shallow = true; };
|
|
||||||
home-manager.git = gitFromJson .versions/home-manager.json;
|
|
||||||
stockholm.git = gitFromJson .versions/stockholm.json;
|
|
||||||
retiolum.git = gitFromJson .versions/retiolum.json;
|
|
||||||
nixpkgs-mozilla.git = gitFromJson .versions/nixpkgs-mozilla.json;
|
|
||||||
system-secrets.pass = {
|
system-secrets.pass = {
|
||||||
dir = toString ~/.password-store;
|
dir = secrets;
|
||||||
name = "systems/${name}";
|
name = "systems/${name}";
|
||||||
};
|
};
|
||||||
secrets.pass = {
|
secrets.pass = {
|
||||||
dir = toString ~/.password-store;
|
dir = secrets;
|
||||||
name = "shared";
|
name = "shared";
|
||||||
};
|
};
|
||||||
}];
|
|
||||||
target = "root@${address}:${toString sshPort}";
|
|
||||||
};
|
};
|
||||||
inherit (pkgs.krops) writeDeploy;
|
|
||||||
|
deploy = {name, host}: writeCommand "/bin/system" {
|
||||||
|
source = lib.evalSource [ (source name) ];
|
||||||
|
force = true;
|
||||||
|
target = lib.mkTarget "root@${host}:${toString sshPort}/var/krops/niveum";
|
||||||
|
inherit command;
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
zaatar = writeDeploy "deploy-zaatar" (regularSystem {
|
zaatar = deploy { name = "zaatar"; host = "zaatar.r"; };
|
||||||
path = systems/zaatar;
|
kabsa = deploy { name = "kabsa"; host = "kabsa.r"; };
|
||||||
name = "zaatar";
|
manakish = deploy { name = "manakish"; host = "manakish.r"; };
|
||||||
address = "zaatar.r";
|
makanek = deploy { name = "makanek"; host = "makanek.r"; };
|
||||||
});
|
|
||||||
kabsa = writeDeploy "deploy-kabsa" (regularSystem {
|
|
||||||
path = systems/kabsa;
|
|
||||||
name = "kabsa";
|
|
||||||
address = "kabsa.r";
|
|
||||||
});
|
|
||||||
toum = writeDeploy "deploy-toum" (regularSystem {
|
|
||||||
path = systems/toum;
|
|
||||||
name = "toum";
|
|
||||||
address = "toum.r";
|
|
||||||
}) // {
|
|
||||||
buildTarget = "${builtins.getEnv "USER"}@localhost/${builtins.getEnv "HOME"}/.cache/krops";
|
|
||||||
};
|
|
||||||
makanek = writeDeploy "deploy-makanek" (regularSystem {
|
|
||||||
path = systems/makanek;
|
|
||||||
name = "makanek";
|
|
||||||
address = "makanek.r";
|
|
||||||
});
|
|
||||||
manakish = writeDeploy "deploy-manakish" (regularSystem {
|
|
||||||
path = systems/manakish;
|
|
||||||
name = "manakish";
|
|
||||||
address = "manakish.r";
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|||||||
174
flake.lock
generated
Normal file
174
flake.lock
generated
Normal file
@@ -0,0 +1,174 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"flake-utils": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1638122382,
|
||||||
|
"narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "74f7e4319258e287b0f9cb95426c9853b282730b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1639871969,
|
||||||
|
"narHash": "sha256-6feWUnMygRzA9tzkrfAzpA5/NBYg75bkFxnqb1DtD7E=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "697cc8c68ed6a606296efbbe9614c32537078756",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"ref": "release-21.11",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"krops": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": [
|
||||||
|
"flake-utils"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1632420452,
|
||||||
|
"narHash": "sha256-ncK6vABW/Ku9XI0kqj1otarUfblryoQzSaOCnaZ0oSs=",
|
||||||
|
"owner": "Mic92",
|
||||||
|
"repo": "krops",
|
||||||
|
"rev": "0388970c568905fedcbf429e5745aacd4f7a6633",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "Mic92",
|
||||||
|
"repo": "krops",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nix-writers": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1554228333,
|
||||||
|
"narHash": "sha256-hG/PlcCvCQhNcU55NpHfATkyH9k6cZmO7uvBoJjasXU=",
|
||||||
|
"ref": "master",
|
||||||
|
"rev": "c528cf970e292790b414b4c1c8c8e9d7e73b2a71",
|
||||||
|
"revCount": 32,
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://cgit.krebsco.de/nix-writers"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://cgit.krebsco.de/nix-writers"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1640759603,
|
||||||
|
"narHash": "sha256-k4d7oC6GvDV1OKxG325JUDpKtZcDUPEiddnJMOQQ/x8=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "e101dc111ac1e5a21efca7822417acc1cb92013a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "release-21.11",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-unstable": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1640540585,
|
||||||
|
"narHash": "sha256-cCmknKFjWgam9jq+58wSd0Z4REia8mjBP65kXcL3ki8=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "ac169ec6371f0d835542db654a65e0f2feb07838",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"retiolum": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1640734423,
|
||||||
|
"narHash": "sha256-i/M1nyPnIEqV7K5dn0Q7V5mRtfzspH+AM6HbgPYGreI=",
|
||||||
|
"owner": "krebs",
|
||||||
|
"repo": "retiolum",
|
||||||
|
"rev": "0e11e0119f330ea103a44e3502149ae50c1a299d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "krebs",
|
||||||
|
"repo": "retiolum",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"krops": "krops",
|
||||||
|
"nix-writers": "nix-writers",
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
|
"retiolum": "retiolum",
|
||||||
|
"secrets": "secrets",
|
||||||
|
"stockholm": "stockholm"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"secrets": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1640701876,
|
||||||
|
"narHash": "sha256-2vQ32k/z0Jh+Ade32mRA6tENetvWI6SNNrR5DJiBuWw=",
|
||||||
|
"ref": "master",
|
||||||
|
"rev": "120635422c7fb78c94e6a182fc384c98fb5cf4ce",
|
||||||
|
"revCount": 170,
|
||||||
|
"type": "git",
|
||||||
|
"url": "file:///home/kfm/projects/sphinx"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "file:///home/kfm/projects/sphinx"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"stockholm": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1640733142,
|
||||||
|
"narHash": "sha256-HzSEyYTGPoGAfgl+lZLb/DDUCQRoZ2iN7oTLhl+1KTQ=",
|
||||||
|
"ref": "master",
|
||||||
|
"rev": "687948cfe5154e03f93886dd27dc30c7910ba754",
|
||||||
|
"revCount": 10222,
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://cgit.krebsco.de/stockholm"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://cgit.krebsco.de/stockholm"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
99
flake.nix
Normal file
99
flake.nix
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
{
|
||||||
|
description = "niveum systems";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/release-21.11";
|
||||||
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
|
secrets = {
|
||||||
|
url = "/home/kfm/.password-store";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
flake-utils = {
|
||||||
|
url = "github:numtide/flake-utils";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
url = "github:nix-community/home-manager/release-21.11";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
retiolum = {
|
||||||
|
url = "github:krebs/retiolum";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
nix-writers = {
|
||||||
|
url = "git+https://cgit.krebsco.de/nix-writers";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
stockholm = {
|
||||||
|
url = "git+https://cgit.krebsco.de/stockholm";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
krops = {
|
||||||
|
url = "github:Mic92/krops";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
inputs.flake-utils.follows = "flake-utils";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, stockholm, secrets, nixpkgs-unstable, home-manager, retiolum, krops, nix-writers, ... }@inputs:
|
||||||
|
let
|
||||||
|
system = "x86_64-linux";
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
writeCommand = krops.packages.${system}.writeCommand;
|
||||||
|
niveumSystem = configuration: nixpkgs.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules = defaultModules ++ [ configuration ];
|
||||||
|
};
|
||||||
|
defaultModules = [
|
||||||
|
{ _module.args.inputs = inputs; }
|
||||||
|
({ pkgs, ... }: {
|
||||||
|
nix = {
|
||||||
|
nixPath = [ "nixpkgs=${pkgs.path}" ];
|
||||||
|
package = pkgs.nixFlakes;
|
||||||
|
extraOptions = ''
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(_self: _super: {
|
||||||
|
unstable = nixpkgs-unstable.legacyPackages.${pkgs.system};
|
||||||
|
})
|
||||||
|
(import "${nix-writers}/pkgs")
|
||||||
|
# (import <stockholm/krebs/5pkgs>)
|
||||||
|
];
|
||||||
|
})
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
in
|
||||||
|
{
|
||||||
|
nixosConfigurations = {
|
||||||
|
kabsa = niveumSystem systems/kabsa/configuration.nix;
|
||||||
|
makanek = niveumSystem systems/makanek/configuration.nix;
|
||||||
|
manakish = niveumSystem systems/manakish/configuration.nix;
|
||||||
|
zaatar = niveumSystem systems/zaatar/configuration.nix;
|
||||||
|
};
|
||||||
|
|
||||||
|
apps.${system} = {
|
||||||
|
# nix run ".#deploy.kabsa"
|
||||||
|
deploy = pkgs.callPackage ./deploy.nix {
|
||||||
|
inherit secrets writeCommand;
|
||||||
|
inherit (krops) lib;
|
||||||
|
};
|
||||||
|
|
||||||
|
# nix run ".#test.kabsa"
|
||||||
|
test = pkgs.callPackage ./deploy.nix {
|
||||||
|
inherit secrets writeCommand;
|
||||||
|
inherit (krops) lib;
|
||||||
|
nixosRebuildCommand = "test";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -49,6 +49,14 @@ in [
|
|||||||
logo = "http://lassul.us/art/portraits/selbstportrait.jpg";
|
logo = "http://lassul.us/art/portraits/selbstportrait.jpg";
|
||||||
desc = "Diminutive from lassus (“weary, faint, tired”). A programming human. Doing superior professional art.";
|
desc = "Diminutive from lassus (“weary, faint, tired”). A programming human. Doing superior professional art.";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
stream = "https://cdn.c3voc.de/hls/abchillgleis/segment_Native.m3u8";
|
||||||
|
station = "RC3 Abchillgleis";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
stream = "https://cdn.c3voc.de/hls/c3lounge/segment_Native.m3u8";
|
||||||
|
station = "RC3 Lounge";
|
||||||
|
}
|
||||||
{
|
{
|
||||||
stream = "https://radio.kmein.de/lyrik/listen.ogg";
|
stream = "https://radio.kmein.de/lyrik/listen.ogg";
|
||||||
station = "Lyrik";
|
station = "Lyrik";
|
||||||
|
|||||||
@@ -132,6 +132,7 @@ if has("autocmd")
|
|||||||
autocmd bufnewfile,bufread *.jq packadd jq.vim
|
autocmd bufnewfile,bufread *.jq packadd jq.vim
|
||||||
autocmd bufnewfile,bufread *.re packadd vim-reason-plus | set filetype=reason
|
autocmd bufnewfile,bufread *.re packadd vim-reason-plus | set filetype=reason
|
||||||
autocmd bufnewfile,bufread *.journal packadd vim-ledger | set filetype=ledger shiftwidth=4
|
autocmd bufnewfile,bufread *.journal packadd vim-ledger | set filetype=ledger shiftwidth=4
|
||||||
|
autocmd bufnewfile,bufread *.md packadd vim-pandoc | packadd vim-pandoc-syntax
|
||||||
autocmd bufnewfile,bufread urls,config set filetype=conf
|
autocmd bufnewfile,bufread urls,config set filetype=conf
|
||||||
autocmd bufnewfile,bufread *.elm packadd elm-vim | set filetype=elm shiftwidth=4
|
autocmd bufnewfile,bufread *.elm packadd elm-vim | set filetype=elm shiftwidth=4
|
||||||
autocmd bufnewfile,bufread *.dhall packadd dhall-vim | set filetype=dhall
|
autocmd bufnewfile,bufread *.dhall packadd dhall-vim | set filetype=dhall
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./constants.nix
|
./constants.nix
|
||||||
./dropbox.nix
|
|
||||||
./retiolum.nix
|
./retiolum.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
{ pkgs, lib, config, ... }:
|
|
||||||
with lib;
|
|
||||||
let cfg = config.niveum.dropbox;
|
|
||||||
in {
|
|
||||||
options.niveum.dropbox = { enable = mkEnableOption "Dropbox"; };
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
environment.systemPackages = [ pkgs.dropbox-cli ];
|
|
||||||
|
|
||||||
networking.firewall = {
|
|
||||||
allowedTCPPorts = [ 17500 ];
|
|
||||||
allowedUDPPorts = [ 17500 ];
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.user.services.dropbox = {
|
|
||||||
description = "Dropbox synchronisation service";
|
|
||||||
wantedBy = [ "graphical-session.target" ];
|
|
||||||
serviceConfig = {
|
|
||||||
ExecStart = "${pkgs.dropbox.out}/bin/dropbox";
|
|
||||||
ExecReload = "${pkgs.coreutils.out}/bin/kill -HUP $MAINPID";
|
|
||||||
KillMode = "control-group"; # upstream recommends process
|
|
||||||
Restart = "on-failure";
|
|
||||||
PrivateTmp = true;
|
|
||||||
ProtectSystem = "full";
|
|
||||||
Nice = 10;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ inputs, config, pkgs, lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
netname = "retiolum";
|
netname = "retiolum";
|
||||||
cfg = config.networking.retiolum;
|
cfg = config.networking.retiolum;
|
||||||
|
inherit (inputs) retiolum;
|
||||||
in {
|
in {
|
||||||
options = {
|
options = {
|
||||||
networking.retiolum.ipv4 = mkOption {
|
networking.retiolum.ipv4 = mkOption {
|
||||||
@@ -31,16 +32,17 @@ in {
|
|||||||
services.tinc.networks.${netname} = {
|
services.tinc.networks.${netname} = {
|
||||||
name = cfg.nodename;
|
name = cfg.nodename;
|
||||||
hosts = builtins.mapAttrs
|
hosts = builtins.mapAttrs
|
||||||
(name: _: builtins.readFile "${<retiolum/hosts>}/${name}")
|
(name: _: builtins.readFile "${retiolum}/hosts/${name}")
|
||||||
(builtins.readDir <retiolum/hosts>);
|
(builtins.readDir "${retiolum}/hosts");
|
||||||
rsaPrivateKeyFile = toString <system-secrets/retiolum.key>;
|
rsaPrivateKeyFile = toString <system-secrets/retiolum.key>;
|
||||||
|
ed25519PrivateKeyFile = toString <system-secrets/retiolum.ed25519>;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
LocalDiscovery = yes
|
LocalDiscovery = yes
|
||||||
AutoConnect = yes
|
AutoConnect = yes
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.extraHosts = builtins.readFile (toString <retiolum/etc.hosts>);
|
networking.extraHosts = builtins.readFile (toString "${retiolum}/etc.hosts");
|
||||||
|
|
||||||
environment.systemPackages = [ config.services.tinc.networks.${netname}.package ];
|
environment.systemPackages = [ config.services.tinc.networks.${netname}.package ];
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ let
|
|||||||
traadfri-package = pkgs.fetchFromGitHub {
|
traadfri-package = pkgs.fetchFromGitHub {
|
||||||
owner = "kmein";
|
owner = "kmein";
|
||||||
repo = "traadfri";
|
repo = "traadfri";
|
||||||
rev = "a55b778cf4c7f124e75070b056c90f5a8043bc45";
|
rev = "cf46bd09cd3263b90a09b0ca979aa705a4c3671c";
|
||||||
sha256 = "10ggqksdbgmcwc2f3xs6abjf9zpvv554xfl3b3bblmfijgr6srv9";
|
sha256 = "0az9q38pl8fqk00488blhn6rhvwsw2wky3dbdlyz7945ggvxnbyd";
|
||||||
};
|
};
|
||||||
in pkgs.callPackage traadfri-package {
|
in pkgs.callPackage traadfri-package {
|
||||||
libcoap = pkgs.callPackage <niveum/packages/libcoap.nix> { tls = true; };
|
libcoap = pkgs.callPackage <niveum/packages/libcoap.nix> { tls = true; };
|
||||||
|
|||||||
27
packages/daybook.nix
Normal file
27
packages/daybook.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{ lib, stdenv, makeWrapper, pandoc, fetchFromGitHub }:
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "daybook";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "kmein";
|
||||||
|
repo = "daybook";
|
||||||
|
rev = "db2c34830e09183c80f3381bf5e4c44d52f05d53";
|
||||||
|
sha256 = "0nbsv8f12qh5spq7zhimhdf3p7msk33xrb0ilqvlc6jmlkpislmv";
|
||||||
|
};
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
buildInputs = [ pandoc ];
|
||||||
|
buildPhase = ''
|
||||||
|
mkdir -p $out/man/man1
|
||||||
|
pandoc --standalone --to man daybook.1.md -o $out/man/man1/daybook.1
|
||||||
|
'';
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
install daybook $out/bin
|
||||||
|
wrapProgram $out/bin/daybook --prefix PATH ":" ${pandoc}/bin ;
|
||||||
|
'';
|
||||||
|
meta = with lib; {
|
||||||
|
homepage = https://github.com/kmein/daybook;
|
||||||
|
description = "A diary writing utility in sh";
|
||||||
|
license = licenses.mit;
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
||||||
29
packages/depp.nix
Normal file
29
packages/depp.nix
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{ lib, writeShellScriptBin }:
|
||||||
|
let
|
||||||
|
aliasFlag = name: value: "-c alias.${name}=${lib.escapeShellArg value}";
|
||||||
|
aliases = {
|
||||||
|
eroeffne = "init";
|
||||||
|
machnach = "clone";
|
||||||
|
zieh = "pull";
|
||||||
|
fueghinzu = "add";
|
||||||
|
drueck = "push";
|
||||||
|
pfusch = "push --force";
|
||||||
|
zweig = "branch";
|
||||||
|
verzweige = "branch";
|
||||||
|
uebergib = "commit";
|
||||||
|
erde = "rebase";
|
||||||
|
unterscheide = "diff";
|
||||||
|
vereinige = "merge";
|
||||||
|
bunkere = "stash";
|
||||||
|
markiere = "tag";
|
||||||
|
nimm = "checkout";
|
||||||
|
tagebuch = "log";
|
||||||
|
zustand = "status";
|
||||||
|
};
|
||||||
|
in writeShellScriptBin "depp" ''
|
||||||
|
if [ $# -gt 0 ]; then
|
||||||
|
git ${lib.concatStringsSep " " (lib.attrsets.mapAttrsToList aliasFlag aliases)} "$@"
|
||||||
|
else
|
||||||
|
printf "${lib.concatStringsSep "\n" (lib.attrsets.mapAttrsToList (n: v: n + " " + v) aliases)}\n"
|
||||||
|
fi
|
||||||
|
''
|
||||||
28
packages/devour.nix
Normal file
28
packages/devour.nix
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{ lib, stdenv, xdo, makeWrapper, fetchFromGitHub }:
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "devour";
|
||||||
|
version = "master";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "salman-abedin";
|
||||||
|
repo = "devour";
|
||||||
|
rev = "ceb871c3046ce290c27e2887365b9a19ca38113c";
|
||||||
|
sha256 = "0f2jb8knx7lqy6wmf3rchgq2n2dj496lm8vgcs58rppzrmsk59d5";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
buildInputs = [ xdo ];
|
||||||
|
|
||||||
|
DESTDIR="$(out)";
|
||||||
|
|
||||||
|
fixupPhase = ''
|
||||||
|
wrapProgram $out/bin/devour --prefix PATH ":" ${xdo}/bin ;
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
homepage = "https://github.com/salman-abedin/devour";
|
||||||
|
description = "Window Manager agnostic swallowing feature for terminal emulators";
|
||||||
|
license = licenses.gpl3;
|
||||||
|
platforms = platforms.all;
|
||||||
|
};
|
||||||
|
}
|
||||||
30
packages/mahlzeit.nix
Normal file
30
packages/mahlzeit.nix
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{ lib, fetchFromGitHub, mkDerivation, ansi-terminal, base, directory, doctest, filepath
|
||||||
|
, megaparsec, optparse-applicative, prettyprinter, process
|
||||||
|
, raw-strings-qq, stdenv, tasty, tasty-hunit, text, yaml
|
||||||
|
}:
|
||||||
|
mkDerivation {
|
||||||
|
pname = "mahlzeit";
|
||||||
|
version = "0.1.0";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "kmein";
|
||||||
|
repo = "mahlzeit";
|
||||||
|
rev = "954c0fb3f45815999bc65d003794af6a850b069c";
|
||||||
|
sha256 = "046yrr40hjmxkjmwzcvmwb39fxx2v2i6hgdxrjfiwilzvhikarrg";
|
||||||
|
};
|
||||||
|
isLibrary = true;
|
||||||
|
isExecutable = true;
|
||||||
|
libraryHaskellDepends = [
|
||||||
|
ansi-terminal base directory filepath megaparsec prettyprinter text
|
||||||
|
yaml
|
||||||
|
];
|
||||||
|
executableHaskellDepends = [
|
||||||
|
ansi-terminal base directory filepath optparse-applicative process
|
||||||
|
text yaml
|
||||||
|
];
|
||||||
|
testHaskellDepends = [
|
||||||
|
base doctest megaparsec raw-strings-qq tasty tasty-hunit
|
||||||
|
];
|
||||||
|
homepage = "https://github.com/kmein/mahlzeit";
|
||||||
|
description = "Recipe toolkit";
|
||||||
|
license = lib.licenses.mit;
|
||||||
|
}
|
||||||
26
packages/opustags.nix
Normal file
26
packages/opustags.nix
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{ lib, stdenv, cmake, pkgconfig, libogg, fetchFromGitHub }:
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "opustags";
|
||||||
|
version = "1.3.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "fmang";
|
||||||
|
repo = "opustags";
|
||||||
|
rev = version;
|
||||||
|
sha256 = "09z0cdg20algaj2yyhfz3hxh1biwjjvzx1pc2vdc64n8lkswqsc1";
|
||||||
|
};
|
||||||
|
|
||||||
|
cmakeFlags = [
|
||||||
|
"-DCMAKE_INSTALL_PREFIX=$out"
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [ libogg ];
|
||||||
|
|
||||||
|
nativeBuildInputs = [ cmake pkgconfig ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
homepage = "https://github.com/fmang/opustags";
|
||||||
|
description = "Ogg Opus tags editor";
|
||||||
|
platforms = platforms.all;
|
||||||
|
};
|
||||||
|
}
|
||||||
12
packages/python3Packages/betacode/default.nix
Normal file
12
packages/python3Packages/betacode/default.nix
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{ fetchPypi, buildPythonPackage, pygtrie, ... }:
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "betacode";
|
||||||
|
version = "0.2";
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "08fnjzjvnm9m6p4ddyr8qgfb9bs2nipv4ls50784v0xazgxx7siv";
|
||||||
|
};
|
||||||
|
preBuild = ''echo > README.rst'';
|
||||||
|
propagatedBuildInputs = [ pygtrie ];
|
||||||
|
doCheck = false;
|
||||||
|
}
|
||||||
14
packages/python3Packages/indic-transliteration/default.nix
Normal file
14
packages/python3Packages/indic-transliteration/default.nix
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{ fetchFromGitHub, buildPythonPackage, backports_functools_lru_cache, selenium, regex, ... }:
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "indic_transliteration";
|
||||||
|
version = "unstable-2020-12-15";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
repo = pname;
|
||||||
|
owner = "sanskrit-coders";
|
||||||
|
rev = "2ea25a03af15937916b6768835e056166986c567";
|
||||||
|
sha256 = "1pcf800hl0zkcffc47mkjq9mizsxdi0hwxlnij5bvbqdshd3w9ll";
|
||||||
|
};
|
||||||
|
patches = [ ./regex-version.patch ];
|
||||||
|
propagatedBuildInputs = [ backports_functools_lru_cache selenium regex ];
|
||||||
|
doCheck = false;
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
diff --git a/requirements.txt b/requirements.txt
|
||||||
|
index 76b12d7..27fdc79 100644
|
||||||
|
--- a/requirements.txt
|
||||||
|
+++ b/requirements.txt
|
||||||
|
@@ -1,3 +1,3 @@
|
||||||
|
backports.functools_lru_cache==1.6.1
|
||||||
|
selenium==3.141.0
|
||||||
|
-regex==2020.10.11
|
||||||
|
+regex>=2020.7.14
|
||||||
12
packages/python3Packages/instaloader/default.nix
Normal file
12
packages/python3Packages/instaloader/default.nix
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{ buildPythonApplication, fetchPypi, requests }:
|
||||||
|
let
|
||||||
|
in buildPythonApplication rec {
|
||||||
|
pname = "instaloader";
|
||||||
|
version = "4.2.4";
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "02zqb02idk2pzks7dv42vigcmmpjpfhfdyjp911yr0ix7dy3q0b9";
|
||||||
|
};
|
||||||
|
propagatedBuildInputs = [ requests ];
|
||||||
|
doCheck = false;
|
||||||
|
}
|
||||||
10
packages/python3Packages/pygtrie/default.nix
Normal file
10
packages/python3Packages/pygtrie/default.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{ fetchPypi, buildPythonPackage, ... }:
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "pygtrie";
|
||||||
|
version = "2.3";
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "00x7q4p9r75zdnw3a8vd0d0w0i5l28w408g5bsfl787yv6b1h9i8";
|
||||||
|
};
|
||||||
|
doCheck = false;
|
||||||
|
}
|
||||||
23
packages/python3Packages/spotify-cli-linux/default.nix
Normal file
23
packages/python3Packages/spotify-cli-linux/default.nix
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{ buildPythonPackage, buildPythonApplication, fetchPypi, pytestrunner, six, beautifulsoup4, requests, dbus-python }:
|
||||||
|
let
|
||||||
|
lyricwikia = buildPythonPackage rec {
|
||||||
|
pname = "lyricwikia";
|
||||||
|
version = "0.1.9";
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "0sa5wkbgp5bpgkl8hgn7byyz9zj0786647ikf2l0k8m4fimq623y";
|
||||||
|
};
|
||||||
|
buildInputs = [ pytestrunner ];
|
||||||
|
propagatedBuildInputs = [ six beautifulsoup4 requests ];
|
||||||
|
doCheck = false;
|
||||||
|
};
|
||||||
|
in buildPythonApplication rec {
|
||||||
|
pname = "spotify-cli-linux";
|
||||||
|
version = "1.4.2";
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "1gxich3v2i4lmh60abbw3mw15399afvvqflv8g6plvvbmvxmbgp0";
|
||||||
|
};
|
||||||
|
propagatedBuildInputs = [ lyricwikia dbus-python ];
|
||||||
|
doCheck = false;
|
||||||
|
}
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
nur = import <niveum/submodules/nur-packages> {};
|
|
||||||
kpaste = pkgs.callPackage <stockholm/krebs/5pkgs/simple/kpaste> { };
|
kpaste = pkgs.callPackage <stockholm/krebs/5pkgs/simple/kpaste> { };
|
||||||
|
opustags = pkgs.callPackage <niveum/packages/opustags.nix> { };
|
||||||
|
betacode = pkgs.callPackage <niveum/packages/python3Packages/betacode.nix> { };
|
||||||
wrapScript = { packages ? [ ], name, script }:
|
wrapScript = { packages ? [ ], name, script }:
|
||||||
pkgs.writers.writeDashBin name ''
|
pkgs.writers.writeDashBin name ''
|
||||||
PATH=$PATH:${
|
PATH=$PATH:${
|
||||||
@@ -98,7 +99,7 @@ in rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
tag = wrapScript {
|
tag = wrapScript {
|
||||||
packages = [ pkgs.vorbisTools pkgs.python3Packages.eyeD3 nur.opustags ];
|
packages = [ pkgs.vorbisTools pkgs.python3Packages.eyeD3 opustags ];
|
||||||
script = "${voidrice}/.local/bin/tag";
|
script = "${voidrice}/.local/bin/tag";
|
||||||
name = "tag";
|
name = "tag";
|
||||||
};
|
};
|
||||||
@@ -296,7 +297,7 @@ in rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
betacode = pkgs.writers.writePython3Bin "betacode" {
|
betacode = pkgs.writers.writePython3Bin "betacode" {
|
||||||
libraries = [ nur.python3Packages.betacode ];
|
libraries = [ betacode ];
|
||||||
} ''
|
} ''
|
||||||
import betacode.conv
|
import betacode.conv
|
||||||
import sys
|
import sys
|
||||||
@@ -405,4 +406,12 @@ in rec {
|
|||||||
curl -L "https://github.com/Mic92/nix-index-database/releases/download/$tag/files" -o $XDG_RUNTIME_DIR/files-$tag
|
curl -L "https://github.com/Mic92/nix-index-database/releases/download/$tag/files" -o $XDG_RUNTIME_DIR/files-$tag
|
||||||
mv $XDG_RUNTIME_DIR/files-$tag $HOME/.cache/nix-index/files
|
mv $XDG_RUNTIME_DIR/files-$tag $HOME/.cache/nix-index/files
|
||||||
'';
|
'';
|
||||||
} // nur
|
} // {
|
||||||
|
devour = pkgs.callPackage <niveum/packages/devour.nix> { };
|
||||||
|
depp = pkgs.callPackage <niveum/packages/depp.nix> { };
|
||||||
|
text2pdf = pkgs.callPackage <niveum/packages/text2pdf.nix> { };
|
||||||
|
vimv = pkgs.callPackage <niveum/packages/vimv.nix> { };
|
||||||
|
when = pkgs.callPackage <niveum/packages/when.nix> { };
|
||||||
|
mahlzeit = pkgs.haskellPackages.callPackage <niveum/packages/mahlzeit.nix> { };
|
||||||
|
inherit opustags;
|
||||||
|
}
|
||||||
|
|||||||
22
packages/sncli.nix
Normal file
22
packages/sncli.nix
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{ buildPythonPackage, buildPythonApplication, fetchPypi, requests, urwid }:
|
||||||
|
let
|
||||||
|
Simperium3 = buildPythonPackage rec {
|
||||||
|
pname = "Simperium3";
|
||||||
|
version = "0.1.3";
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "1j1w4dji39v44l96qq9kbrxpcjkjmika8065gwy8bf847f9fa76p";
|
||||||
|
};
|
||||||
|
propagatedBuildInputs = [ requests ];
|
||||||
|
};
|
||||||
|
in buildPythonApplication rec {
|
||||||
|
pname = "sncli";
|
||||||
|
version = "0.3.0";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "18s5a6s2z7k14cbiyfdf98kw92r2hf1xwaavx67dxhadxm18xr4v";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ requests urwid Simperium3 ];
|
||||||
|
}
|
||||||
15
packages/text2pdf.nix
Normal file
15
packages/text2pdf.nix
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{ stdenv, fetchurl }:
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "${pname}-${version}";
|
||||||
|
pname = "text2pdf";
|
||||||
|
version = "1.1";
|
||||||
|
src = fetchurl {
|
||||||
|
url = "http://www.eprg.org/pdfcorner/text2pdf/text2pdf.c";
|
||||||
|
sha256 = "002nyky12vf1paj7az6j6ra7lljwkhqzz238v7fyp7sfgxw0f7d1";
|
||||||
|
};
|
||||||
|
phases = [ "buildPhase" ];
|
||||||
|
buildPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
gcc -o $out/bin/text2pdf $src
|
||||||
|
'';
|
||||||
|
}
|
||||||
22
packages/vimv.nix
Normal file
22
packages/vimv.nix
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{ lib, stdenv, bash, fetchFromGitHub }:
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "vimv";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "thameera";
|
||||||
|
repo = "vimv";
|
||||||
|
rev = "4152496c1946f68a13c648fb7e583ef23dac4eb8";
|
||||||
|
sha256 = "1fsrfx2gs6bqx7wk7pgcji2i2x4alqpsi66aif4kqvnpqfhcfzjd";
|
||||||
|
};
|
||||||
|
phases = [ "installPhase" ];
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
sed 's:#!/bin/bash:#!${bash}/bin/bash:' $src/vimv > $out/bin/vimv
|
||||||
|
chmod 755 $out/bin/vimv
|
||||||
|
'';
|
||||||
|
meta = with lib; {
|
||||||
|
homepage = https://github.com/thameera/vimv;
|
||||||
|
description = "Batch-rename files using Vim";
|
||||||
|
license = licenses.mit;
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
||||||
23
packages/when.nix
Normal file
23
packages/when.nix
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{ lib, stdenv, perl, which }:
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "when";
|
||||||
|
version = "1.1.40";
|
||||||
|
|
||||||
|
src = builtins.fetchTarball {
|
||||||
|
url = "http://www.lightandmatter.com/when/when.tar.gz";
|
||||||
|
sha256 = "12d0zmvg66lwzr7q8zky0kz1x3w6q8dvyzm4x7lf1vy2z4pm4cvx";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ which ];
|
||||||
|
buildInputs = [ perl ];
|
||||||
|
|
||||||
|
installFlags = [ "prefix=$(out)" ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
homepage = "http://www.lightandmatter.com/when/when.html";
|
||||||
|
description = "An extremely simple personal calendar program";
|
||||||
|
longDescription = "When is an extremely simple personal calendar program, aimed at the Unix geek who wants something minimalistic.";
|
||||||
|
license = licenses.gpl2;
|
||||||
|
platforms = platforms.all;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -15,6 +15,11 @@ let
|
|||||||
url = "https://github.com/NixOS/nixpkgs.git";
|
url = "https://github.com/NixOS/nixpkgs.git";
|
||||||
path = toString .versions/nixpkgs-unstable.json;
|
path = toString .versions/nixpkgs-unstable.json;
|
||||||
};
|
};
|
||||||
|
nix-writers = {
|
||||||
|
ref = "refs/heads/master";
|
||||||
|
url = "https://cgit.krebsco.de/nix-writers";
|
||||||
|
path = toString .versions/nix-writers.json;
|
||||||
|
};
|
||||||
home-manager = {
|
home-manager = {
|
||||||
ref = "refs/heads/release-${release}";
|
ref = "refs/heads/release-${release}";
|
||||||
url = "https://github.com/nix-community/home-manager.git";
|
url = "https://github.com/nix-community/home-manager.git";
|
||||||
@@ -62,7 +67,7 @@ in pkgs.mkShell {
|
|||||||
else
|
else
|
||||||
dependencies="${lib.concatStringsSep " " (lib.attrNames dependencies)}"
|
dependencies="${lib.concatStringsSep " " (lib.attrNames dependencies)}"
|
||||||
fi
|
fi
|
||||||
${pkgs.parallel}/bin/parallel --line-buffer --rpl '{color} $_="\033[30;3".(++$::1+color%8)."m"' --tagstring '{color}{}' -q ${updateCommand} '{1}' ::: $dependencies
|
${pkgs.parallel}/bin/parallel --line-buffer --tagstring '{}' -q ${updateCommand} '{1}' ::: $dependencies
|
||||||
'')
|
'')
|
||||||
|
|
||||||
(let
|
(let
|
||||||
@@ -110,7 +115,7 @@ in pkgs.mkShell {
|
|||||||
else
|
else
|
||||||
systems="$(ls ${toString ./.}/systems)"
|
systems="$(ls ${toString ./.}/systems)"
|
||||||
fi
|
fi
|
||||||
${pkgs.parallel}/bin/parallel --line-buffer --rpl '{color} $_="\033[30;3".(++$::1+color%8)."m"' --tagstring '{color}{}' -q ${statusCommand} '{1}' ::: $systems
|
${pkgs.parallel}/bin/parallel --line-buffer --tagstring '{}' -q ${statusCommand} '{1}' ::: $systems
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Submodule submodules/nur-packages updated: 263ae79441...8468cfbc06
@@ -1,13 +1,13 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
nixpkgs-unstable = import <nixpkgs-unstable> { config.allowUnfree = true; };
|
nixpkgs-unstable = import <nixpkgs-unstable> { config.allowUnfree = true; };
|
||||||
inherit (import <niveum/lib>) retiolumAddresses;
|
inherit (import ../../lib) retiolumAddresses;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
<niveum/configs/default.nix>
|
../../configs/default.nix
|
||||||
<niveum/configs/battery.nix>
|
../../configs/battery.nix
|
||||||
<niveum/configs/networkmanager.nix>
|
../../configs/networkmanager.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
# <stockholm/krebs/2configs/hw/x220.nix>
|
# <stockholm/krebs/2configs/hw/x220.nix>
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{ config, lib, pkgs, ... }: {
|
{ config, lib, pkgs, modulesPath, ... }: {
|
||||||
imports = [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> ];
|
imports = [ "${modulesPath}/installer/scan/not-detected.nix" ];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "xhci_pci" "usb_storage" "sd_mod" "sdhci_pci" ];
|
boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "xhci_pci" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
zramSwap.enable = true;
|
zramSwap.enable = false;
|
||||||
|
|
||||||
nix.maxJobs = lib.mkDefault 4;
|
nix.maxJobs = lib.mkDefault 4;
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||||
|
|||||||
@@ -4,48 +4,6 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
{
|
|
||||||
systemd.services.praesenzlehre = {
|
|
||||||
description = "Live Ticker zu praesenzlehre-berlin.org";
|
|
||||||
wants = [ "network.target" ];
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
startAt = "daily";
|
|
||||||
path = [ pkgs.curl pkgs.pup pkgs.bc ];
|
|
||||||
environment.BOT_TOKEN = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
|
|
||||||
script = ''
|
|
||||||
set -efu
|
|
||||||
|
|
||||||
count_file=/tmp/praesenzlehre-berlin.org
|
|
||||||
|
|
||||||
set_count() {
|
|
||||||
echo $* > "$count_file"
|
|
||||||
}
|
|
||||||
|
|
||||||
get_count() {
|
|
||||||
cat "$count_file"
|
|
||||||
}
|
|
||||||
|
|
||||||
notify() {
|
|
||||||
curl -sSL -X POST -H 'Content-Type: application/json' \
|
|
||||||
-d "{\"chat_id\": \"@praesenzlehre_berlin\", \"text\": \"$*\"}" \
|
|
||||||
"https://api.telegram.org/bot$BOT_TOKEN/sendMessage"
|
|
||||||
}
|
|
||||||
|
|
||||||
test -f "$count_file" || set_count 0
|
|
||||||
|
|
||||||
count="$(get_count)"
|
|
||||||
|
|
||||||
new_count="$(curl -sSL https://praesenzlehre-berlin.org/ | pup '.dk-speakout-signature-count span text{}' | tr -dc 0-9)"
|
|
||||||
|
|
||||||
if [ "$new_count" -gt "$count" ]; then
|
|
||||||
diff="$(echo "$new_count - $count" | bc)"
|
|
||||||
echo "$new_count (+ $diff)"
|
|
||||||
notify "$new_count Unterzeichner:innen! (+ $diff)"
|
|
||||||
set_count "$new_count"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
<niveum/configs/hedgedoc.nix>
|
<niveum/configs/hedgedoc.nix>
|
||||||
<niveum/configs/spacetime.nix>
|
<niveum/configs/spacetime.nix>
|
||||||
@@ -62,6 +20,7 @@ in
|
|||||||
<niveum/configs/names.nix>
|
<niveum/configs/names.nix>
|
||||||
<niveum/configs/menstruation.nix>
|
<niveum/configs/menstruation.nix>
|
||||||
<niveum/configs/telegram-bots>
|
<niveum/configs/telegram-bots>
|
||||||
|
<niveum/configs/nix.nix>
|
||||||
<niveum/configs/weechat.nix>
|
<niveum/configs/weechat.nix>
|
||||||
<niveum/configs/urlwatch.nix>
|
<niveum/configs/urlwatch.nix>
|
||||||
<niveum/configs/matterbridge.nix>
|
<niveum/configs/matterbridge.nix>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ in
|
|||||||
<niveum/configs/keyboard.nix>
|
<niveum/configs/keyboard.nix>
|
||||||
<niveum/modules/retiolum.nix>
|
<niveum/modules/retiolum.nix>
|
||||||
<niveum/configs/spacetime.nix>
|
<niveum/configs/spacetime.nix>
|
||||||
|
<niveum/configs/nix.nix>
|
||||||
<niveum/configs/tuna.nix>
|
<niveum/configs/tuna.nix>
|
||||||
<niveum/configs/sshd.nix>
|
<niveum/configs/sshd.nix>
|
||||||
<niveum/configs/version.nix>
|
<niveum/configs/version.nix>
|
||||||
@@ -60,7 +61,7 @@ in
|
|||||||
user = config.users.extraUsers.kiosk.name;
|
user = config.users.extraUsers.kiosk.name;
|
||||||
extraArguments = [ "-s" ]; # allow vt switching
|
extraArguments = [ "-s" ]; # allow vt switching
|
||||||
program =
|
program =
|
||||||
let startUrls = [ "https://open.spotify.com" "http://localhost:${toString config.services.tuna.webPort}" "http://bvg.kmein.r" ];
|
let startUrls = [ "https://open.spotify.com" "https://youtube.com" "http://bvg.kmein.r" ];
|
||||||
in pkgs.writers.writeDash "kiosk-browser" ''
|
in pkgs.writers.writeDash "kiosk-browser" ''
|
||||||
while true; do
|
while true; do
|
||||||
${pkgs.chromium}/bin/chromium \
|
${pkgs.chromium}/bin/chromium \
|
||||||
|
|||||||
Reference in New Issue
Block a user