mirror of
https://github.com/kmein/niveum
synced 2026-03-30 01:01:10 +02:00
Compare commits
19 Commits
5b3aea782b
...
04a2c83eb8
| Author | SHA1 | Date | |
|---|---|---|---|
| 04a2c83eb8 | |||
| 0e43cee95f | |||
| 1405c2ca98 | |||
| 072c0a09df | |||
| a0fdfbef2b | |||
| a6792399f1 | |||
| 12cd6230fe | |||
| e800cca766 | |||
| b7646b0500 | |||
| 749582bc9b | |||
| e9ae2ddd59 | |||
| e6462e0c34 | |||
| 127cb41e60 | |||
| a77cbcf919 | |||
| 62fbad949a | |||
| 087c9c0b94 | |||
| 74a437af22 | |||
| e431a89ab2 | |||
| 0d6c540143 |
14
.github/workflows/niveum.yml
vendored
Normal file
14
.github/workflows/niveum.yml
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
name: CI
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
system: [makanek,manakish,kabsa,zaatar]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: cachix/install-nix-action@v16
|
||||||
|
- run: nix run .#build-${{matrix.system}}
|
||||||
9
.gitmodules
vendored
9
.gitmodules
vendored
@@ -1,9 +0,0 @@
|
|||||||
[submodule "submodules/menstruation-telegram"]
|
|
||||||
path = submodules/menstruation-telegram
|
|
||||||
url = https://github.com/kmein/menstruation-telegram
|
|
||||||
[submodule "submodules/menstruation-backend"]
|
|
||||||
path = submodules/menstruation-backend
|
|
||||||
url = https://github.com/kmein/menstruation.rs
|
|
||||||
[submodule "submodules/nur-packages"]
|
|
||||||
path = submodules/nur-packages
|
|
||||||
url = git@github.com:kmein/nur-packages.git
|
|
||||||
69
ci.nix
Normal file
69
ci.nix
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
{ inputs, system, name }:
|
||||||
|
let
|
||||||
|
inherit (inputs) nixpkgs;
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
ensureFiles = paths: pkgs.runCommand "directory" {} ''
|
||||||
|
set -efu
|
||||||
|
mkdir $out
|
||||||
|
cd $out
|
||||||
|
${nixpkgs.lib.concatMapStringsSep "\n" (path: ''
|
||||||
|
mkdir -p "$(dirname ${nixpkgs.lib.escapeShellArg path})"
|
||||||
|
echo foo > ${nixpkgs.lib.escapeShellArg path}
|
||||||
|
'') paths}
|
||||||
|
'';
|
||||||
|
nixPath = nixpkgs.lib.concatStringsSep ":" ([
|
||||||
|
"niveum=${toString ./.}"
|
||||||
|
"nixos-config=${toString ./.}/systems/${name}/configuration.nix"
|
||||||
|
"system-secrets=${systemSecrets}"
|
||||||
|
"secrets=${sharedSecrets}"
|
||||||
|
] ++ nixpkgs.lib.mapAttrsToList (name: value: "${name}=${value}") inputs);
|
||||||
|
# cd ~/.password-store/shared && find * -type f | sed 's/.gpg$//'
|
||||||
|
sharedSecrets = ensureFiles [
|
||||||
|
"di.fm/key"
|
||||||
|
"eduroam/identity"
|
||||||
|
"eduroam/password"
|
||||||
|
"fritznas.smb"
|
||||||
|
"mail/cock"
|
||||||
|
"mail/fastmail"
|
||||||
|
"mail/gmail/amroplay"
|
||||||
|
"mail/gmail/kieran.meinhardt"
|
||||||
|
"mail/meinhaki"
|
||||||
|
"mail/meinhaki.cert"
|
||||||
|
"mail/posteo"
|
||||||
|
"nextcloud-fysi/password"
|
||||||
|
"nextcloud/password"
|
||||||
|
"openweathermap.key"
|
||||||
|
"posteo/password"
|
||||||
|
"spotify/password"
|
||||||
|
"spotify/username"
|
||||||
|
"traadfri.key"
|
||||||
|
"wifi/Aether.psk"
|
||||||
|
];
|
||||||
|
systemSecrets = let basic = [ "retiolum.ed25519" "retiolum.key" "syncthing/cert.pem" "syncthing/key.pem"]; in {
|
||||||
|
zaatar = ensureFiles ([ "moodle.token" "telegram/moodle-dl.token" ] ++ basic);
|
||||||
|
kabsa = ensureFiles basic;
|
||||||
|
manakish = ensureFiles basic;
|
||||||
|
makanek = ensureFiles ([
|
||||||
|
"irc/retiolum"
|
||||||
|
"irc/hackint"
|
||||||
|
"irc/libera"
|
||||||
|
"irc/oftc"
|
||||||
|
"matrix/nibbana"
|
||||||
|
"maxmind/license.key"
|
||||||
|
"moodle-dl/faye.token"
|
||||||
|
"nextcloud/admin"
|
||||||
|
"nextcloud/database"
|
||||||
|
"telegram/nachtischsatan.token"
|
||||||
|
"telegram/reverse.token"
|
||||||
|
"telegram/odyssey.token"
|
||||||
|
"telegram/betacode.token"
|
||||||
|
"telegram/moodle-dl.token"
|
||||||
|
"telegram/proverb.token"
|
||||||
|
"telegram/menstruation.token"
|
||||||
|
"telegram/cool_village.token"
|
||||||
|
"telegram/kmein.token"
|
||||||
|
"telegram/prometheus.token"
|
||||||
|
"weechat/relay"
|
||||||
|
] ++ basic);
|
||||||
|
}.${name};
|
||||||
|
in toString (pkgs.writers.writeDash "build" "NIX_PATH=${nixPath} nix-build '<nixpkgs/nixos>' -A system --dry-run")
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.chromium pkgs.brave ];
|
environment.systemPackages = [ pkgs.brave ];
|
||||||
|
|
||||||
environment.variables.BROWSER = "brave";
|
environment.variables.BROWSER = "brave";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -224,7 +224,8 @@ in {
|
|||||||
./nix.nix
|
./nix.nix
|
||||||
./newsboat.nix
|
./newsboat.nix
|
||||||
./flameshot-once.nix
|
./flameshot-once.nix
|
||||||
./packages
|
./packages.nix
|
||||||
|
./stardict.nix
|
||||||
./power-action.nix
|
./power-action.nix
|
||||||
./printing.nix
|
./printing.nix
|
||||||
./openweathermap.nix
|
./openweathermap.nix
|
||||||
|
|||||||
@@ -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";
|
||||||
@@ -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 ];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,33 @@ let
|
|||||||
hc = pkgs.callPackage <stockholm/tv/5pkgs/simple/hc.nix> {};
|
hc = pkgs.callPackage <stockholm/tv/5pkgs/simple/hc.nix> {};
|
||||||
worldradio = pkgs.callPackage <niveum/packages/worldradio.nix> {};
|
worldradio = pkgs.callPackage <niveum/packages/worldradio.nix> {};
|
||||||
menstruation = pkgs.callPackage <menstruation-backend> {};
|
menstruation = pkgs.callPackage <menstruation-backend> {};
|
||||||
|
pandoc-doc = pkgs.callPackage <niveum/packages/man/pandoc.nix> {};
|
||||||
|
|
||||||
nixpkgs-unstable = import <nixpkgs-unstable> { config.allowUnfree = true; };
|
nixpkgs-unstable = import <nixpkgs-unstable> { config.allowUnfree = true; };
|
||||||
|
|
||||||
|
zoteroStyle = { name, sha256 }: {
|
||||||
|
name = "${name}.csl";
|
||||||
|
path = pkgs.fetchurl {
|
||||||
|
url = "https://www.zotero.org/styles/${name}";
|
||||||
|
inherit sha256;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
cslDirectory = pkgs.linkFarm "citation-styles" [
|
||||||
|
(zoteroStyle {
|
||||||
|
name = "chicago-author-date-de";
|
||||||
|
sha256 = "0fz0xn46rkciblr34a7x2v60j0lbq9l3fmzi43iphph27m0czn6s";
|
||||||
|
})
|
||||||
|
(zoteroStyle {
|
||||||
|
name = "din-1505-2";
|
||||||
|
sha256 = "1pvy1b7qm13mnph7z365rrz1j082bl2y8ih73rhzd0zd6dz1jyjq";
|
||||||
|
})
|
||||||
|
(zoteroStyle {
|
||||||
|
name = "apa";
|
||||||
|
sha256 = "1878vxp0y0h05yzaghnd51n981623mxskw3lsdyzmffqhihvv111";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
astrolog = nixpkgs-unstable.astrolog.overrideAttrs (old: old // {
|
astrolog = nixpkgs-unstable.astrolog.overrideAttrs (old: old // {
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
${old.installPhase}
|
${old.installPhase}
|
||||||
@@ -25,42 +49,13 @@ let
|
|||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
|
|
||||||
recht = pkgs.callPackage (pkgs.fetchFromGitHub {
|
recht = pkgs.callPackage <recht> {};
|
||||||
owner = "kmein";
|
|
||||||
repo = "recht";
|
|
||||||
rev = "0.6.2";
|
|
||||||
sha256 = "08gnrnz3lwh8h6fyga56yfy9qryzm89xbshm7wpxfyxf2pmp1qfx";
|
|
||||||
}) {};
|
|
||||||
|
|
||||||
in {
|
in {
|
||||||
imports = [
|
home-manager.users.me.home.file = {
|
||||||
./writing.nix
|
".csl".source = cslDirectory;
|
||||||
./python.nix
|
".local/share/pandoc/csl".source = cslDirectory; # as of pandoc 2.11, it includes citeproc
|
||||||
./haskell
|
};
|
||||||
{
|
|
||||||
environment.systemPackages = let
|
|
||||||
# nightly = pkgs.rustChannelOf {
|
|
||||||
# date = "2019-12-27";
|
|
||||||
# channel = "nightly";
|
|
||||||
# };
|
|
||||||
in with pkgs; [
|
|
||||||
htmlTidy
|
|
||||||
nodePackages.csslint
|
|
||||||
nodePackages.jsonlint
|
|
||||||
nodePackages.prettier
|
|
||||||
nodePackages.typescript
|
|
||||||
nodePackages.yarn
|
|
||||||
nodejs
|
|
||||||
nodePackages.javascript-typescript-langserver
|
|
||||||
|
|
||||||
tokei # count lines of code
|
|
||||||
gnumake
|
|
||||||
binutils # for strip, ld, ...
|
|
||||||
# nightly.rust
|
|
||||||
shellcheck
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# INTERNET
|
# INTERNET
|
||||||
@@ -70,9 +65,7 @@ in {
|
|||||||
w3m
|
w3m
|
||||||
wget
|
wget
|
||||||
whois
|
whois
|
||||||
ix
|
|
||||||
dnsutils
|
dnsutils
|
||||||
# mtr # my traceroute
|
|
||||||
# FILE MANAGERS
|
# FILE MANAGERS
|
||||||
ranger
|
ranger
|
||||||
pcmanfm
|
pcmanfm
|
||||||
@@ -80,7 +73,6 @@ in {
|
|||||||
ffmpeg
|
ffmpeg
|
||||||
imagemagick
|
imagemagick
|
||||||
exiftool
|
exiftool
|
||||||
scrot
|
|
||||||
# ARCHIVE TOOLS
|
# ARCHIVE TOOLS
|
||||||
unzip
|
unzip
|
||||||
unrar
|
unrar
|
||||||
@@ -106,14 +98,12 @@ in {
|
|||||||
xmlstarlet # xml toolkit
|
xmlstarlet # xml toolkit
|
||||||
manpages
|
manpages
|
||||||
posix_man_pages
|
posix_man_pages
|
||||||
# moreutils # for parallel, sponge, combine
|
|
||||||
tree
|
tree
|
||||||
fuse_exfat # to mount windows drives
|
fuse_exfat # to mount windows drives
|
||||||
parallel # for parallel, since moreutils shadows task spooler
|
parallel # for parallel, since moreutils shadows task spooler
|
||||||
ripgrep # better grep
|
ripgrep # better grep
|
||||||
rlwrap
|
rlwrap
|
||||||
progress # display progress bars for pipes
|
progress # display progress bars for pipes
|
||||||
up # universal plumber (piping tool)
|
|
||||||
# HARDWARE TOOLS
|
# HARDWARE TOOLS
|
||||||
usbutils # for lsusb
|
usbutils # for lsusb
|
||||||
pciutils # for lspci
|
pciutils # for lspci
|
||||||
@@ -126,7 +116,7 @@ in {
|
|||||||
audacity
|
audacity
|
||||||
calibre
|
calibre
|
||||||
inkscape
|
inkscape
|
||||||
astrolog # astrolog
|
astrolog
|
||||||
anki # flashcards
|
anki # flashcards
|
||||||
nixpkgs-unstable.zoom-us # video conferencing
|
nixpkgs-unstable.zoom-us # video conferencing
|
||||||
pdfgrep # search in pdf
|
pdfgrep # search in pdf
|
||||||
@@ -158,11 +148,8 @@ in {
|
|||||||
recht
|
recht
|
||||||
scripts.vimv
|
scripts.vimv
|
||||||
scripts.swallow # window swallowing
|
scripts.swallow # window swallowing
|
||||||
scripts.genius
|
|
||||||
scripts.instaget
|
|
||||||
scripts.literature-quote
|
scripts.literature-quote
|
||||||
scripts.nav # json navigation
|
scripts.nav # json navigation
|
||||||
scripts.n
|
|
||||||
scripts.notetags
|
scripts.notetags
|
||||||
scripts.booksplit
|
scripts.booksplit
|
||||||
scripts.dmenurandr
|
scripts.dmenurandr
|
||||||
@@ -192,7 +179,6 @@ in {
|
|||||||
nixfmt
|
nixfmt
|
||||||
par
|
par
|
||||||
qrencode
|
qrencode
|
||||||
wtf
|
|
||||||
|
|
||||||
menstruation
|
menstruation
|
||||||
|
|
||||||
@@ -222,6 +208,53 @@ in {
|
|||||||
irc-announce
|
irc-announce
|
||||||
git-preview
|
git-preview
|
||||||
ircaids
|
ircaids
|
||||||
|
|
||||||
|
(python3.withPackages (py: [
|
||||||
|
py.black
|
||||||
|
# py.python-language-server
|
||||||
|
# py.pyls-mypy
|
||||||
|
# py.pyls-black
|
||||||
|
# py.pyls-isort
|
||||||
|
py.flake8
|
||||||
|
py.pygments
|
||||||
|
py.schema
|
||||||
|
]))
|
||||||
|
python3Packages.poetry
|
||||||
|
|
||||||
|
htmlTidy
|
||||||
|
nodePackages.csslint
|
||||||
|
nodePackages.jsonlint
|
||||||
|
nodePackages.prettier
|
||||||
|
nodePackages.typescript
|
||||||
|
nodePackages.yarn
|
||||||
|
nodejs
|
||||||
|
nodePackages.javascript-typescript-langserver
|
||||||
|
texlive.combined.scheme-full
|
||||||
|
latexrun
|
||||||
|
(aspellWithDicts (dict: [ dict.de dict.en dict.en-computers ]))
|
||||||
|
# haskellPackages.pandoc-citeproc
|
||||||
|
scripts.text2pdf
|
||||||
|
lowdown
|
||||||
|
glow # markdown to term
|
||||||
|
libreoffice
|
||||||
|
# gnumeric
|
||||||
|
dia
|
||||||
|
pandoc
|
||||||
|
pandoc-doc
|
||||||
|
# proselint
|
||||||
|
asciidoctor
|
||||||
|
wordnet
|
||||||
|
tokei # count lines of code
|
||||||
|
gnumake
|
||||||
|
binutils # for strip, ld, ...
|
||||||
|
# nightly.rust
|
||||||
|
shellcheck
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
home-manager.users.me.xdg.configFile."pycodestyle".text = ''
|
||||||
|
[pycodestyle]
|
||||||
|
max-line-length = 110
|
||||||
|
'';
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
{ config, pkgs, ... }: {
|
|
||||||
home-manager.users.me.home.file = {
|
|
||||||
".ghc/ghci.conf".text = ''
|
|
||||||
:set editor vim
|
|
||||||
:def hoogle \s -> return $ ":!${pkgs.haskellPackages.hoogle}/bin/hoogle search --color -l --count=15 \"" ++ s ++ "\""
|
|
||||||
:def doc \s -> return $ ":!${pkgs.haskellPackages.hoogle}/bin/hoogle search --color -l --info \"" ++ s ++ "\""
|
|
||||||
:set prompt "\o033[1m%s\o033[1;34m λ\o033[0m "
|
|
||||||
:set -Wall
|
|
||||||
:set -XOverloadedStrings
|
|
||||||
'';
|
|
||||||
# :def unpl \x -> return $ ":!${pkgs.haskellPackages.pointful}/bin/pointful \"" ++ x ++ "\""
|
|
||||||
# :def pl \x -> return $ ":!${pkgs.haskellPackages.pointfree}/bin/pointfree -v \"" ++ x ++ "\""
|
|
||||||
".stack/config.yaml".source =
|
|
||||||
let inherit (import <niveum/lib>) kieran;
|
|
||||||
in (pkgs.formats.yaml {}).generate "config.yaml" {
|
|
||||||
templates.params = {
|
|
||||||
author-name = kieran.name;
|
|
||||||
author-email = kieran.email;
|
|
||||||
copyright = "Copyright: (c) 2020 ${kieran.name}";
|
|
||||||
github-username = kieran.github;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.hoogle = {
|
|
||||||
enable = false;
|
|
||||||
packages = import ./packages.nix;
|
|
||||||
port = 8091;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs;
|
|
||||||
[
|
|
||||||
cabal2nix
|
|
||||||
cabal-install
|
|
||||||
hlint
|
|
||||||
haskellPackages.ormolu
|
|
||||||
(haskellPackages.ghcWithHoogle (import ./packages.nix))
|
|
||||||
] ++ map haskell.lib.justStaticExecutables [
|
|
||||||
haskellPackages.ghcid
|
|
||||||
haskellPackages.hasktags
|
|
||||||
# haskellPackages.hindent
|
|
||||||
# haskellPackages.pointfree
|
|
||||||
# haskellPackages.pointful
|
|
||||||
haskellPackages.hpack
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,100 +0,0 @@
|
|||||||
haskellPackages:
|
|
||||||
with haskellPackages; [
|
|
||||||
HTTP
|
|
||||||
HUnit
|
|
||||||
MissingH
|
|
||||||
QuickCheck
|
|
||||||
ad
|
|
||||||
adjunctions
|
|
||||||
aeson
|
|
||||||
# algebra
|
|
||||||
ansi-terminal
|
|
||||||
async
|
|
||||||
attoparsec
|
|
||||||
base-orphans
|
|
||||||
bifunctors
|
|
||||||
binary
|
|
||||||
blaze-html
|
|
||||||
blaze-markup
|
|
||||||
brick
|
|
||||||
bytes
|
|
||||||
bytestring
|
|
||||||
case-insensitive
|
|
||||||
cassava
|
|
||||||
cereal
|
|
||||||
clock
|
|
||||||
comonad
|
|
||||||
comonad-transformers
|
|
||||||
conduit
|
|
||||||
conduit-extra
|
|
||||||
constraints
|
|
||||||
containers
|
|
||||||
contravariant
|
|
||||||
criterion
|
|
||||||
data-default
|
|
||||||
diagrams
|
|
||||||
directory
|
|
||||||
dlist
|
|
||||||
either
|
|
||||||
edit-distance
|
|
||||||
exceptions
|
|
||||||
extra
|
|
||||||
filepath
|
|
||||||
foundation
|
|
||||||
free
|
|
||||||
haskeline
|
|
||||||
hedgehog
|
|
||||||
hourglass
|
|
||||||
hspec
|
|
||||||
http-client
|
|
||||||
http-conduit
|
|
||||||
kan-extensions
|
|
||||||
lens
|
|
||||||
linear
|
|
||||||
lucid
|
|
||||||
megaparsec
|
|
||||||
microlens
|
|
||||||
monad-logger
|
|
||||||
monad-memo
|
|
||||||
mono-traversable
|
|
||||||
mtl
|
|
||||||
network
|
|
||||||
parallel
|
|
||||||
parsec
|
|
||||||
persistent
|
|
||||||
pipes
|
|
||||||
pointed
|
|
||||||
pretty
|
|
||||||
pretty-show
|
|
||||||
prettyprinter
|
|
||||||
primitive
|
|
||||||
process
|
|
||||||
profunctors
|
|
||||||
regex-tdfa
|
|
||||||
safe
|
|
||||||
scalpel
|
|
||||||
semigroupoids
|
|
||||||
semigroups
|
|
||||||
servant
|
|
||||||
servant-blaze
|
|
||||||
servant-client
|
|
||||||
servant-docs
|
|
||||||
servant-server
|
|
||||||
servant-swagger
|
|
||||||
split
|
|
||||||
stm
|
|
||||||
tagsoup
|
|
||||||
tasty
|
|
||||||
text
|
|
||||||
time
|
|
||||||
transformers
|
|
||||||
turtle
|
|
||||||
unix-time
|
|
||||||
unordered-containers
|
|
||||||
vector
|
|
||||||
void
|
|
||||||
vty
|
|
||||||
warp
|
|
||||||
wreq
|
|
||||||
yaml
|
|
||||||
]
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
{ pkgs, ... }: {
|
|
||||||
environment.systemPackages = [
|
|
||||||
(pkgs.python3.withPackages (py: [
|
|
||||||
py.black
|
|
||||||
# py.python-language-server
|
|
||||||
# py.pyls-mypy
|
|
||||||
# py.pyls-black
|
|
||||||
# py.pyls-isort
|
|
||||||
py.flake8
|
|
||||||
py.pygments
|
|
||||||
py.schema
|
|
||||||
]))
|
|
||||||
pkgs.python3Packages.poetry
|
|
||||||
];
|
|
||||||
|
|
||||||
home-manager.users.me.xdg.configFile."pycodestyle".text = ''
|
|
||||||
[pycodestyle]
|
|
||||||
max-line-length = 110
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
{ pkgs, lib, config, ... }:
|
|
||||||
let
|
|
||||||
pandoc-doc = pkgs.callPackage <niveum/packages/man/pandoc.nix> {};
|
|
||||||
|
|
||||||
zoteroStyle = { name, sha256 }: {
|
|
||||||
name = "${name}.csl";
|
|
||||||
path = pkgs.fetchurl {
|
|
||||||
url = "https://www.zotero.org/styles/${name}";
|
|
||||||
inherit sha256;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
cslDirectory = pkgs.linkFarm "citation-styles" [
|
|
||||||
(zoteroStyle {
|
|
||||||
name = "chicago-author-date-de";
|
|
||||||
sha256 = "0fz0xn46rkciblr34a7x2v60j0lbq9l3fmzi43iphph27m0czn6s";
|
|
||||||
})
|
|
||||||
(zoteroStyle {
|
|
||||||
name = "din-1505-2";
|
|
||||||
sha256 = "1pvy1b7qm13mnph7z365rrz1j082bl2y8ih73rhzd0zd6dz1jyjq";
|
|
||||||
})
|
|
||||||
(zoteroStyle {
|
|
||||||
name = "apa";
|
|
||||||
sha256 = "1878vxp0y0h05yzaghnd51n981623mxskw3lsdyzmffqhihvv111";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
makeStardictDataDir = dicts:
|
|
||||||
pkgs.linkFarm "dictionaries" (map ({ name, path }: {
|
|
||||||
name = "dic/${name}";
|
|
||||||
inherit path;
|
|
||||||
}) dicts);
|
|
||||||
in {
|
|
||||||
environment.variables.STARDICT_DATA_DIR = toString (makeStardictDataDir [
|
|
||||||
{
|
|
||||||
name = "gr-de";
|
|
||||||
path = pkgs.fetchurl {
|
|
||||||
url = "http://tovotu.de/data/stardict/pape_gr-de.zip";
|
|
||||||
sha256 = "1d705y47b40vp0mg79vbwasw4y0i8fmnlwvf4x4ri0dkfqng9sky";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "la-de";
|
|
||||||
path = pkgs.fetchurl {
|
|
||||||
url = "http://tovotu.de/data/stardict/georges_lat-de.zip";
|
|
||||||
sha256 = "12n26nzwg28wn4zwv45mv0wkgy1jh1d8p0k6haamz9601cqq7hkj";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "de-la";
|
|
||||||
path = pkgs.fetchurl {
|
|
||||||
url = "http://tovotu.de/data/stardict/georges_de-lat.zip";
|
|
||||||
sha256 = "0inm6xn1lcnb851cj329n0v2vbfc1z1bxwhgsd8fnm0zxy3f3ifq";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
]);
|
|
||||||
|
|
||||||
home-manager.users.me.home.file = {
|
|
||||||
".csl".source = cslDirectory;
|
|
||||||
".local/share/pandoc/csl".source = cslDirectory; # as of pandoc 2.11, it includes citeproc
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
texlive.combined.scheme-full
|
|
||||||
latexrun
|
|
||||||
(aspellWithDicts (dict: [ dict.de dict.en dict.en-computers ]))
|
|
||||||
# haskellPackages.pandoc-citeproc
|
|
||||||
scripts.text2pdf
|
|
||||||
lowdown
|
|
||||||
glow # markdown to term
|
|
||||||
libreoffice
|
|
||||||
# gnumeric
|
|
||||||
dia
|
|
||||||
pandoc
|
|
||||||
pandoc-doc
|
|
||||||
# proselint
|
|
||||||
asciidoctor
|
|
||||||
wordnet
|
|
||||||
# sdcv # stardict cli
|
|
||||||
];
|
|
||||||
}
|
|
||||||
162
configs/stardict.nix
Normal file
162
configs/stardict.nix
Normal file
@@ -0,0 +1,162 @@
|
|||||||
|
{ pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
classicsDictionaries = {
|
||||||
|
Pape = "${pkgs.fetchzip {
|
||||||
|
url = "http://chaerephon.e-monsite.com/medias/files/pape.zip";
|
||||||
|
sha256 = "0cm1z35bc47lx3709f4042kvd2zqkcqmn8q9fcw9dflikl6kgbij";
|
||||||
|
stripRoot = false;
|
||||||
|
}}/Pape";
|
||||||
|
Woodhouse = pkgs.fetchzip {
|
||||||
|
url = "https://c.krebsco.de/Woodhouse.zip";
|
||||||
|
sha256 = "1dvnc2679yb048q2f3hr2h34acvhan0n3iir6h9ajlrdzz48mlkq";
|
||||||
|
stripRoot = false;
|
||||||
|
};
|
||||||
|
LSJ = pkgs.fetchzip {
|
||||||
|
url = "https://github.com/nikita-moor/latin-dictionary/releases/download/2020-02-14/LiddellScott1940-stardict.zip";
|
||||||
|
sha256 = "13rprgd9jvnhxk9735c91xr6ywr0j5jiwkjnpm3qpvy93isyjbys";
|
||||||
|
};
|
||||||
|
GreekMorphology = pkgs.fetchzip {
|
||||||
|
url = "https://github.com/latin-dict/Morphologia-Graeca/releases/download/v0.5/morphology-mobile-goldendict.oxia.zip";
|
||||||
|
sha256 = "0m75cppjjjmvv18cs7yh9f4p7ckqzxfznnndgkiw3yrfd50k8p96";
|
||||||
|
};
|
||||||
|
Frisk = pkgs.fetchzip {
|
||||||
|
url = "https://github.com/latin-dict/Frisk1960/releases/download/v1.1/Frisk1960-stardict.zip";
|
||||||
|
sha256 = "1rk5a3n3fpfdcmg4bc5945m88s6ldxql8cjn4jqs33rgklh7n046";
|
||||||
|
};
|
||||||
|
Georges-De-Lat = builtins.fetchTarball {
|
||||||
|
url = "http://download.huzheng.org/de/stardict-georges_de-lat-2.4.2.tar.bz2";
|
||||||
|
sha256 = "023n55fcbx0jm92198am600h9pv4n3iymkz2ixqn2ka4fj6dhw9g";
|
||||||
|
};
|
||||||
|
SmithBiographyMythology = pkgs.fetchzip {
|
||||||
|
url = "https://github.com/latin-dict/Smith1873/releases/download/v1.0/Smith1873-stardict.zip";
|
||||||
|
sha256 = "01h5fxacp2m60xir8kzslkfy772vs3vmz07zhdwfhcwdaxif2af2";
|
||||||
|
};
|
||||||
|
SmithAntiquities = pkgs.fetchzip {
|
||||||
|
url = "https://github.com/latin-dict/Smith1890/releases/download/v1.0/Smith1890-stardict.zip";
|
||||||
|
sha256 = "0vpsv62p2lrzmgys4d1swpnc6lqhdi7rxwkj2ngy3lz5dk3fysyb";
|
||||||
|
};
|
||||||
|
LewisShort = pkgs.fetchzip {
|
||||||
|
url = "https://github.com/latin-dict/LewisShort1879/releases/download/v1.3/LewisShort1879-stardict.zip";
|
||||||
|
sha256 = "1y3ans47iv8bzzb1paimdqvcid8ms04ikjbqy3iw077i2js3qbjk";
|
||||||
|
};
|
||||||
|
DoederleinSynonymes = pkgs.fetchzip {
|
||||||
|
url = "https://github.com/latin-dict/Doederlein1874/releases/download/v1.1/Doederlein1875-stardict.zip";
|
||||||
|
sha256 = "0mhik7gjxl8ncr9g5z2l4pfk60k1c5n0gc1w0cnp2x1v6lqvb57h";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
englishGermanDictionaries = {
|
||||||
|
Etymonline = pkgs.fetchzip {
|
||||||
|
url = "http://tovotu.de/data/stardict/etymonline.zip";
|
||||||
|
sha256 = "1bjja3n3layfd08xa1r0a6375dxh5zi6hlv7chkhgnx800cx7hxn";
|
||||||
|
};
|
||||||
|
Roget = builtins.fetchTarball {
|
||||||
|
url = "http://download.huzheng.org/bigdict/stardict-Roget_s_II_The_New_Thesaurus_3th_Ed-2.4.2.tar.bz2";
|
||||||
|
sha256 = "1szyny9497bpyyccf9l5kr3bnw0wvl4cnsd0n1zscxpyzlsrqqbz";
|
||||||
|
};
|
||||||
|
OED1 = builtins.fetchTarball {
|
||||||
|
url = "http://download.huzheng.org/bigdict/stardict-Oxford_English_Dictionary_2nd_Ed._P1-2.4.2.tar.bz2";
|
||||||
|
sha256 = "0i5vv1rv44yfwyf9bfbdrb9brzhhpvz2jnh39fv8hh107nkv2vcf";
|
||||||
|
};
|
||||||
|
OED2 = builtins.fetchTarball {
|
||||||
|
url = "http://download.huzheng.org/bigdict/stardict-Oxford_English_Dictionary_2nd_Ed._P2-2.4.2.tar.bz2";
|
||||||
|
sha256 = "1pk234pbq4pk55d8sjk0pp9j5sajm82f8804kf2xm2x5p387q1rg";
|
||||||
|
};
|
||||||
|
JargonFile = builtins.fetchTarball {
|
||||||
|
url = "http://download.huzheng.org/dict.org/stardict-dictd-jargon-2.4.2.tar.bz2";
|
||||||
|
sha256 = "096phar9qpmm0fnaqv5nz8x9lpxwnfj78g4vjfcfyd7kqp7iqla4";
|
||||||
|
};
|
||||||
|
Oxford-Collocations = builtins.fetchTarball {
|
||||||
|
url = "http://download.huzheng.org/bigdict/stardict-Oxford_Collocations_Dictionary_2nd_Ed-2.4.2.tar.bz2";
|
||||||
|
sha256 = "1zkfs0zxkcn21z2lhcabrs77v4ma9hpv7qm119hpyi1d8ajcw07q";
|
||||||
|
};
|
||||||
|
Langenscheidt-Deu-En = builtins.fetchTarball {
|
||||||
|
url = "http://download.huzheng.org/babylon/german/stardict-Handw_rterbuch_Deutsch_Englisc-2.4.2.tar.bz2";
|
||||||
|
sha256 = "12q9i5azq7ylyrpb6jqbaf1rxalc3kzcwjvbinvb0yabdxb80y30";
|
||||||
|
};
|
||||||
|
Langenscheidt-En-Deu = builtins.fetchTarball {
|
||||||
|
url = "http://download.huzheng.org/babylon/german/stardict-Handw_rterbuch_Englisch_Deutsc-2.4.2.tar.bz2";
|
||||||
|
sha256 = "087b05h155j5ldshfgx91pz81h6ijq2zaqjirg7ma8ig3l96zb59";
|
||||||
|
};
|
||||||
|
Duden_Das_Fremdworterbuch = builtins.fetchTarball {
|
||||||
|
url = "http://download.huzheng.org/babylon/german/stardict-Duden_Das_Fremdworterbuch-2.4.2.tar.bz2";
|
||||||
|
sha256 = "1zrcay54ccl031s6dvjwsah5slhanmjab87d81rxlcy8fx0xd8wq";
|
||||||
|
};
|
||||||
|
Duden_De_De = builtins.fetchTarball {
|
||||||
|
url = "http://download.huzheng.org/babylon/german/stardict-Duden_De_De-2.4.2.tar.bz2";
|
||||||
|
sha256 = "1fhay04w5aaj83axfmla2ql34nb60gb05dgv0k94ig7p8x4yxxlf";
|
||||||
|
};
|
||||||
|
# Duden_Rechtschreibung = builtins.fetchTarball {
|
||||||
|
# url = "http://download.huzheng.org/babylon/german/stardict-Duden_Rechtschreibung-2.4.2.tar.bz2";
|
||||||
|
# sha256 = "0xiprb45s88w62rn8rlbjrsagbiliay9hszsiy20glwabf6zsfji";
|
||||||
|
# };
|
||||||
|
Duden_Synonym = builtins.fetchTarball {
|
||||||
|
url = "http://download.huzheng.org/babylon/german/stardict-Duden_Synonym-2.4.2.tar.bz2";
|
||||||
|
sha256 = "0cx086zvb86bmz7i8vnsch4cj4fb0cp165g4hig4982zakj6f2jd";
|
||||||
|
};
|
||||||
|
# Duden = builtins.fetchTarball {
|
||||||
|
# url = "http://download.huzheng.org/de/stardict-duden-2.4.2.tar.bz2";
|
||||||
|
# sha256 = "049i4ynfqqxykv1nlkyks94mvn14s22qdax5gg7hx1ks5y4xw64j";
|
||||||
|
# };
|
||||||
|
# ConciseOED = builtins.fetchTarball {
|
||||||
|
# url = "http://download.huzheng.org/bigdict/stardict-Concise_Oxford_English_Dictionary-2.4.2.tar.bz2";
|
||||||
|
# sha256 = "19kpcxbhqzpmhi94mp48nalgmsh6s7rsx1gb4kwkhirp2pbjcyl7";
|
||||||
|
# };
|
||||||
|
# FreeOnlineDictionaryOfComputing = builtins.fetchTarball {
|
||||||
|
# url = "http://download.huzheng.org/dict.org/stardict-dictd_www.dict.org_foldoc-2.4.2.tar.bz2";
|
||||||
|
# sha256 = "1lw2i8dzxpx929cpgvv0x366dnh4drr10wzqmrhcd0kvwglqawgm";
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
|
||||||
|
sanskritDictionaries = {
|
||||||
|
BoehtlingkRoth = pkgs.fetchzip {
|
||||||
|
url = "https://c.krebsco.de/Bohtlingk-and-Roth-Grosses-Petersburger-Worterbuch.zip";
|
||||||
|
sha256 = "13414a8rgd7hd5ffar6nl68nk3ys60wjkgb7m11hp0ahaasmf6ly";
|
||||||
|
stripRoot = false;
|
||||||
|
};
|
||||||
|
MonierWilliams = pkgs.fetchzip {
|
||||||
|
url = "https://c.krebsco.de/mw-cologne.zip";
|
||||||
|
sha256 = "0p99ybxwxmmd94hf035hvm2hhnfy84av7qq79xf28bh2rbx6s9ng";
|
||||||
|
stripRoot = false;
|
||||||
|
};
|
||||||
|
MonierWilliamsEnglish = pkgs.fetchzip {
|
||||||
|
url = "https://c.krebsco.de/mw-english-sanskrit.zip";
|
||||||
|
sha256 = "09a61hhii4b1m2fkrlh4rm2xnlgwrllh84iypbc6wyj00w9jkl3x";
|
||||||
|
stripRoot = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
makeStardictDataDir = dicts: pkgs.linkFarm "dictionaries" (lib.mapAttrsToList (name: path: { inherit name path; }) dicts);
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# https://github.com/latin-dict/Georges1910/releases/download/v1.0/Georges1910-stardict.zip
|
||||||
|
# https://github.com/nikita-moor/latin-dictionary/releases/download/2020-02-14/LiddellScott1940-stardict.zip
|
||||||
|
# http://download.huzheng.org/bigdict/stardict-Cambridge_Dictionary_of_American_Idioms-2.4.2.tar.bz2
|
||||||
|
# http://download.huzheng.org/bigdict/stardict-Concise_Oxford_Thesaurus_2nd_Ed-2.4.2.tar.bz2
|
||||||
|
# http://download.huzheng.org/bigdict/stardict-Urban_Dictionary_P1-2.4.2.tar.bz2
|
||||||
|
# http://download.huzheng.org/bigdict/stardict-Urban_Dictionary_P2-2.4.2.tar.bz2
|
||||||
|
environment.etc.stardict.source = toString (makeStardictDataDir (classicsDictionaries // {
|
||||||
|
Georges-Lat-De = builtins.fetchTarball { # TODO find out why this does not work with sdcv
|
||||||
|
url = "http://download.huzheng.org/de/stardict-georges_lat-de-2.4.2.tar.bz2";
|
||||||
|
sha256 = "0n9jkr17q8amldw7ndy3ji6nnadjfmxl4v8clqqicbdfd1w44yj2";
|
||||||
|
};
|
||||||
|
} // sanskritDictionaries // englishGermanDictionaries));
|
||||||
|
|
||||||
|
environment.variables = {
|
||||||
|
SDCV_PAGER = "${pkgs.w3m}/bin/w3m -T text/html -dump";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
home-manager.users.me = {
|
||||||
|
home.file.".goldendict/config".text = import <niveum/lib/goldendict-config.nix> {
|
||||||
|
path = "/etc/stardict";
|
||||||
|
inherit pkgs;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.goldendict
|
||||||
|
(pkgs.writers.writeDashBin "sd-classics" ''${pkgs.sdcv}/bin/sdcv --data-dir ${makeStardictDataDir classicsDictionaries} "$@"'')
|
||||||
|
(pkgs.writers.writeDashBin "sd-sanskrit" ''${pkgs.sdcv}/bin/sdcv --data-dir ${makeStardictDataDir sanskritDictionaries} "$@"'')
|
||||||
|
(pkgs.writers.writeDashBin "sd" ''${pkgs.sdcv}/bin/sdcv --data-dir ${makeStardictDataDir englishGermanDictionaries} "$@"'')
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,13 +1,6 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
telebots = let
|
telebots = pkgs.callPackage <telebots> {};
|
||||||
telebots-package = pkgs.fetchFromGitHub {
|
|
||||||
owner = "kmein";
|
|
||||||
repo = "telebots";
|
|
||||||
rev = "22931c9457e092c4e413555dbe61819d77844246";
|
|
||||||
sha256 = "0byp3w6li3fin7ry0ki4rmgkaajdil424y5pc1j7ci9mpws0s5ik";
|
|
||||||
};
|
|
||||||
in pkgs.callPackage telebots-package {};
|
|
||||||
reverseDirectory = "/run/telegram-reverse";
|
reverseDirectory = "/run/telegram-reverse";
|
||||||
proverbDirectory = "/run/telegram-proverb";
|
proverbDirectory = "/run/telegram-proverb";
|
||||||
inherit (import <niveum/lib>) tmpfilesConfig;
|
inherit (import <niveum/lib>) tmpfilesConfig;
|
||||||
|
|||||||
148
flake.lock
generated
148
flake.lock
generated
@@ -15,21 +15,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1597053966,
|
|
||||||
"narHash": "sha256-f9lbPS/GJ1His8fsDqM6gfa8kSqREU4eKiMCS5hrKg4=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "ec20f52e2ff61e9c36c2b894b62fc1b4bd04c71b",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -53,7 +38,9 @@
|
|||||||
},
|
},
|
||||||
"krops": {
|
"krops": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_2",
|
"flake-utils": [
|
||||||
|
"flake-utils"
|
||||||
|
],
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
@@ -136,22 +123,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-mozilla": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1638887313,
|
|
||||||
"narHash": "sha256-FMYV6rVtvSIfthgC1sK1xugh3y7muoQcvduMdriz4ag=",
|
|
||||||
"owner": "mozilla",
|
|
||||||
"repo": "nixpkgs-mozilla",
|
|
||||||
"rev": "7c1e8b1dd6ed0043fb4ee0b12b815256b0b9de6f",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "mozilla",
|
|
||||||
"repo": "nixpkgs-mozilla",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1640874390,
|
"lastModified": 1640874390,
|
||||||
@@ -168,6 +139,22 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"recht": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1619583518,
|
||||||
|
"narHash": "sha256-3eFw6xWue9cvPxXq1ROq32ecvPOmqOedgQhyOr7N9iE=",
|
||||||
|
"owner": "kmein",
|
||||||
|
"repo": "recht",
|
||||||
|
"rev": "d551afed23122bb3106e59eb2274394ec5555048",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "kmein",
|
||||||
|
"repo": "recht",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"retiolum": {
|
"retiolum": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
@@ -193,20 +180,41 @@
|
|||||||
"menstruation-telegram": "menstruation-telegram",
|
"menstruation-telegram": "menstruation-telegram",
|
||||||
"nix-writers": "nix-writers",
|
"nix-writers": "nix-writers",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-mozilla": "nixpkgs-mozilla",
|
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
|
"recht": "recht",
|
||||||
"retiolum": "retiolum",
|
"retiolum": "retiolum",
|
||||||
"stockholm": "stockholm"
|
"scripts": "scripts",
|
||||||
|
"stockholm": "stockholm",
|
||||||
|
"telebots": "telebots",
|
||||||
|
"tinc-graph": "tinc-graph",
|
||||||
|
"traadfri": "traadfri",
|
||||||
|
"tuna": "tuna"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1639436812,
|
||||||
|
"narHash": "sha256-6CajvfDo7t4ANgjc7DxqH7lI3WRE4MK8q3mBKAjk80k=",
|
||||||
|
"owner": "kmein",
|
||||||
|
"repo": "scripts",
|
||||||
|
"rev": "d34a8161ba11135a45d3141dc9af482db945d63c",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "kmein",
|
||||||
|
"repo": "scripts",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"stockholm": {
|
"stockholm": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1640830960,
|
"lastModified": 1640965242,
|
||||||
"narHash": "sha256-GnsHDNvDbOkyZ4j6ynFi+ZDAoJ1PmveCye47aR5WUmY=",
|
"narHash": "sha256-7T92w2+IfSRlbJw4mbkUs3jVEOe9f4NxVk1AUqWXeP0=",
|
||||||
"ref": "master",
|
"ref": "master",
|
||||||
"rev": "e652f40200e5d86240be8f6cea0b9d1ddbbd0ad6",
|
"rev": "c2bfb7b6418de9fe363c12672eb99f8bb05690d3",
|
||||||
"revCount": 10234,
|
"revCount": 10235,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://cgit.lassul.us/stockholm"
|
"url": "https://cgit.lassul.us/stockholm"
|
||||||
},
|
},
|
||||||
@@ -214,6 +222,70 @@
|
|||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://cgit.lassul.us/stockholm"
|
"url": "https://cgit.lassul.us/stockholm"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"telebots": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1623510321,
|
||||||
|
"narHash": "sha256-MxYNNL81RXZkYLd4IgiNTSo1X80kTuDzsdGNSA0f1y8=",
|
||||||
|
"owner": "kmein",
|
||||||
|
"repo": "telebots",
|
||||||
|
"rev": "22931c9457e092c4e413555dbe61819d77844246",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "kmein",
|
||||||
|
"repo": "telebots",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tinc-graph": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1639820904,
|
||||||
|
"narHash": "sha256-d4s2PulBGIIQXtX7blZz+Wnmij5dK/IrBcilNGjqZC4=",
|
||||||
|
"owner": "kmein",
|
||||||
|
"repo": "tinc-graph",
|
||||||
|
"rev": "1b9c69ffdbdab82d30a23e44f739feea63d94163",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "kmein",
|
||||||
|
"repo": "tinc-graph",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"traadfri": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1640451803,
|
||||||
|
"narHash": "sha256-zS/b93uFpPM9basNP7ngmm+YjYV0IUQAmNghetHA6Ss=",
|
||||||
|
"owner": "kmein",
|
||||||
|
"repo": "traadfri",
|
||||||
|
"rev": "cf46bd09cd3263b90a09b0ca979aa705a4c3671c",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "kmein",
|
||||||
|
"repo": "traadfri",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tuna": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1627117248,
|
||||||
|
"narHash": "sha256-OfqbWLblJY4BJlrCpn8EkHoP3baNJSDTbw45SPaX+0Q=",
|
||||||
|
"owner": "kmein",
|
||||||
|
"repo": "tuna",
|
||||||
|
"rev": "1cbed44069a3009738afdafecefe0a05316039a6",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "kmein",
|
||||||
|
"repo": "tuna",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|||||||
113
flake.nix
113
flake.nix
@@ -12,31 +12,21 @@
|
|||||||
krops = {
|
krops = {
|
||||||
url = "github:Mic92/krops";
|
url = "github:Mic92/krops";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
inputs.flake-utils.follows = "flake-utils";
|
||||||
};
|
};
|
||||||
stockholm = {
|
|
||||||
url = "git+https://cgit.lassul.us/stockholm";
|
# legacy
|
||||||
flake = false;
|
menstruation-backend = { url = "github:kmein/menstruation.rs"; flake = false; };
|
||||||
};
|
menstruation-telegram = { url = "github:kmein/menstruation-telegram"; flake = false; };
|
||||||
nix-writers = {
|
nix-writers = { url = "git+https://cgit.krebsco.de/nix-writers"; flake = false; };
|
||||||
url = "git+https://cgit.krebsco.de/nix-writers";
|
recht = { url = "github:kmein/recht"; flake = false; };
|
||||||
flake = false;
|
retiolum = { url = "github:krebs/retiolum"; flake = false; };
|
||||||
};
|
scripts = { url = "github:kmein/scripts"; flake = false; };
|
||||||
retiolum = {
|
stockholm = { url = "git+https://cgit.lassul.us/stockholm"; flake = false; };
|
||||||
url = "github:krebs/retiolum";
|
telebots = { url = "github:kmein/telebots"; flake = false; };
|
||||||
flake = false;
|
tinc-graph = { url = "github:kmein/tinc-graph"; flake = false; };
|
||||||
};
|
traadfri = { url = "github:kmein/traadfri"; flake = false; };
|
||||||
nixpkgs-mozilla = {
|
tuna = { url = "github:kmein/tuna"; flake = false; };
|
||||||
url = "github:mozilla/nixpkgs-mozilla";
|
|
||||||
flake = false;
|
|
||||||
};
|
|
||||||
menstruation-telegram = {
|
|
||||||
url = "github:kmein/menstruation-telegram";
|
|
||||||
flake = false;
|
|
||||||
};
|
|
||||||
menstruation-backend = {
|
|
||||||
url = "github:kmein/menstruation.rs";
|
|
||||||
flake = false;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
@@ -48,28 +38,22 @@
|
|||||||
, menstruation-telegram
|
, menstruation-telegram
|
||||||
, nix-writers
|
, nix-writers
|
||||||
, nixpkgs
|
, nixpkgs
|
||||||
, nixpkgs-mozilla
|
|
||||||
, nixpkgs-unstable
|
, nixpkgs-unstable
|
||||||
|
, recht
|
||||||
, retiolum
|
, retiolum
|
||||||
|
, scripts
|
||||||
, stockholm
|
, stockholm
|
||||||
}:
|
, telebots
|
||||||
|
, tinc-graph
|
||||||
|
, traadfri
|
||||||
|
, tuna
|
||||||
|
}@inputs:
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
# having to declare the git upstream urls here is suboptimal, but the inputs don't remember where they're from
|
|
||||||
source = name: {
|
source = name: {
|
||||||
niveum.file = toString ./.;
|
niveum.file = toString ./.;
|
||||||
nixos-config.symlink = "niveum/systems/${name}/configuration.nix";
|
nixos-config.symlink = "niveum/systems/${name}/configuration.nix";
|
||||||
nixpkgs.git = { url = "https://github.com/NixOS/nixpkgs"; ref = nixpkgs.rev; shallow = true; };
|
|
||||||
nixpkgs-unstable.git = { url = "https://github.com/NixOS/nixpkgs"; ref = nixpkgs-unstable.rev; shallow = true; };
|
|
||||||
home-manager.git = { url = "https://github.com/nix-community/home-manager"; ref = home-manager.rev; };
|
|
||||||
stockholm.git = { url = "https://cgit.lassul.us/stockholm"; ref = stockholm.rev; };
|
|
||||||
nix-writers.git = { url = "https://cgit.krebsco.de/nix-writers"; ref = nix-writers.rev; };
|
|
||||||
retiolum.git = { url = "https://github.com/krebs/retiolum"; ref = retiolum.rev; };
|
|
||||||
nixpkgs-mozilla.git = { url = "https://github.com/mozilla/nixpkgs-mozilla"; ref = nixpkgs-mozilla.rev; };
|
|
||||||
menstruation-telegram.git = { url = "https://github.com/kmein/menstruation-telegram"; ref = menstruation-telegram.rev; };
|
|
||||||
menstruation-backend.git = { url = "https://github.com/kmein/menstruation.rs"; ref = menstruation-backend.rev; };
|
|
||||||
|
|
||||||
system-secrets.pass = {
|
system-secrets.pass = {
|
||||||
dir = toString ~/.password-store;
|
dir = toString ~/.password-store;
|
||||||
name = "systems/${name}";
|
name = "systems/${name}";
|
||||||
@@ -78,32 +62,51 @@
|
|||||||
dir = toString ~/.password-store;
|
dir = toString ~/.password-store;
|
||||||
name = "shared";
|
name = "shared";
|
||||||
};
|
};
|
||||||
};
|
} // nixpkgs.lib.mapAttrs' (name: value: {
|
||||||
|
inherit name;
|
||||||
|
value.git = {
|
||||||
|
url = {
|
||||||
|
# having to declare the git upstream urls here is suboptimal, but the inputs don't remember where they're from
|
||||||
|
home-manager = "https://github.com/nix-community/home-manager";
|
||||||
|
menstruation-backend = "https://github.com/kmein/menstruation.rs";
|
||||||
|
menstruation-telegram = "https://github.com/kmein/menstruation-telegram";
|
||||||
|
nix-writers = "https://cgit.krebsco.de/nix-writers";
|
||||||
|
nixpkgs = "https://github.com/NixOS/nixpkgs";
|
||||||
|
nixpkgs-unstable = "https://github.com/NixOS/nixpkgs";
|
||||||
|
recht = "https://github.com/kmein/recht";
|
||||||
|
retiolum = "https://github.com/krebs/retiolum";
|
||||||
|
scripts = "https://github.com/kmein/scripts";
|
||||||
|
stockholm = "https://cgit.lassul.us/stockholm";
|
||||||
|
telebots = "https://github.com/kmein/telebots";
|
||||||
|
tinc-graph = "https://github.com/kmein/tinc-graph";
|
||||||
|
traadfri = "https://github.com/kmein/traadfri";
|
||||||
|
tuna = "https://github.com/kmein/tuna";
|
||||||
|
}.${name};
|
||||||
|
ref = value.rev;
|
||||||
|
shallow = true;
|
||||||
|
};
|
||||||
|
}) (nixpkgs.lib.filterAttrs (name: _: !builtins.elem name [ "flake-utils" "krops" "self" ]) inputs);
|
||||||
deployScriptFor = {name, host}: let inherit (import ./lib/default.nix) sshPort; in toString (krops.packages.${system}.writeDeploy "deploy-${name}" {
|
deployScriptFor = {name, host}: let inherit (import ./lib/default.nix) sshPort; in toString (krops.packages.${system}.writeDeploy "deploy-${name}" {
|
||||||
source = krops.lib.evalSource [ (source name) ];
|
source = krops.lib.evalSource [ (source name) ];
|
||||||
target = "root@${host}:${toString sshPort}";
|
target = "root@${host}:${toString sshPort}";
|
||||||
});
|
});
|
||||||
in {
|
in {
|
||||||
apps.${system} = let
|
apps.${system} = let
|
||||||
deployScripts = builtins.listToAttrs (map (system: {
|
forSystems = f: builtins.listToAttrs (map f (builtins.attrNames (builtins.readDir ./systems)));
|
||||||
name = "deploy-${system}";
|
deployScripts = forSystems (name: {
|
||||||
|
name = "deploy-${name}";
|
||||||
value = {
|
value = {
|
||||||
type = "app";
|
type = "app";
|
||||||
program = deployScriptFor { name = system; host = "${system}.r"; };
|
program = deployScriptFor { inherit name; host = "${name}.r"; };
|
||||||
};
|
};
|
||||||
}) (builtins.attrNames (builtins.readDir ./systems)));
|
});
|
||||||
in deployScripts // {
|
ciScripts = forSystems (name: {
|
||||||
deploy-all = {
|
name = "build-${name}";
|
||||||
type = "app";
|
value = {
|
||||||
program = toString (pkgs.writers.writeDash "deploy-all"
|
type = "app";
|
||||||
(nixpkgs.lib.concatMapStringsSep "\n" (script: script.program) (builtins.attrValues deployScripts)));
|
program = import ./ci.nix { inherit name system inputs; };
|
||||||
};
|
};
|
||||||
};
|
});
|
||||||
|
in deployScripts // ciScripts;
|
||||||
nixosConfigurations = {};
|
|
||||||
hydraJobs =
|
|
||||||
nixpkgs.lib.mapAttrs'
|
|
||||||
(name: config: nixpkgs.lib.nameValuePair "nixos-${name}" config.config.system.build.toplevel)
|
|
||||||
self.nixosConfigurations;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
179
lib/goldendict-config.nix
Normal file
179
lib/goldendict-config.nix
Normal file
@@ -0,0 +1,179 @@
|
|||||||
|
{pkgs, path}: ''
|
||||||
|
<config>
|
||||||
|
<paths>
|
||||||
|
<path recursive="1">${path}</path>
|
||||||
|
</paths>
|
||||||
|
<sounddirs/>
|
||||||
|
<dictionaryOrder name="" id="0">
|
||||||
|
<mutedDictionaries/>
|
||||||
|
</dictionaryOrder>
|
||||||
|
<inactiveDictionaries name="" id="0">
|
||||||
|
<mutedDictionaries/>
|
||||||
|
</inactiveDictionaries>
|
||||||
|
<groups nextId="1"/>
|
||||||
|
<hunspell dictionariesPath=""/>
|
||||||
|
<transliteration>
|
||||||
|
<enableRussianTransliteration>0</enableRussianTransliteration>
|
||||||
|
<enableGermanTransliteration>0</enableGermanTransliteration>
|
||||||
|
<enableGreekTransliteration>0</enableGreekTransliteration>
|
||||||
|
<enableBelarusianTransliteration>0</enableBelarusianTransliteration>
|
||||||
|
<chinese>
|
||||||
|
<enable>0</enable>
|
||||||
|
<enableSCToTWConversion>1</enableSCToTWConversion>
|
||||||
|
<enableSCToHKConversion>1</enableSCToHKConversion>
|
||||||
|
<enableTCToSCConversion>1</enableTCToSCConversion>
|
||||||
|
</chinese>
|
||||||
|
<romaji>
|
||||||
|
<enable>0</enable>
|
||||||
|
<enableHepburn>1</enableHepburn>
|
||||||
|
<enableNihonShiki>0</enableNihonShiki>
|
||||||
|
<enableKunreiShiki>0</enableKunreiShiki>
|
||||||
|
<enableHiragana>1</enableHiragana>
|
||||||
|
<enableKatakana>1</enableKatakana>
|
||||||
|
</romaji>
|
||||||
|
</transliteration>
|
||||||
|
<forvo>
|
||||||
|
<enable>0</enable>
|
||||||
|
<apiKey></apiKey>
|
||||||
|
<languageCodes></languageCodes>
|
||||||
|
</forvo>
|
||||||
|
<mediawikis>
|
||||||
|
<mediawiki enabled="0" name="English Wikipedia" icon="" id="ae6f89aac7151829681b85f035d54e48" url="https://en.wikipedia.org/w"/>
|
||||||
|
<mediawiki enabled="0" name="English Wiktionary" icon="" id="affcf9678e7bfe701c9b071f97eccba3" url="https://en.wiktionary.org/w"/>
|
||||||
|
<mediawiki enabled="0" name="German Wikipedia" icon="" id="a8a66331a1242ca2aeb0b4aed361c41d" url="https://de.wikipedia.org/w"/>
|
||||||
|
<mediawiki enabled="0" name="German Wiktionary" icon="" id="21c64bca5ec10ba17ff19f3066bc962a" url="https://de.wiktionary.org/w"/>
|
||||||
|
</mediawikis>
|
||||||
|
<websites>
|
||||||
|
<website enabled="0" name="Google En-En (Oxford)" icon="" id="b88cb2898e634c6638df618528284c2d" url="https://www.google.com/search?q=define:%GDWORD%&hl=en" inside_iframe="1"/>
|
||||||
|
<website enabled="0" name="Urban Dictionary" icon="" id="f376365a0de651fd7505e7e5e683aa45" url="https://www.urbandictionary.com/define.php?term=%GDWORD%" inside_iframe="1"/>
|
||||||
|
<website enabled="0" name="Multitran (En)" icon="" id="324ca0306187df7511b26d3847f4b07c" url="https://multitran.ru/c/m.exe?CL=1&l1=1&s=%GD1251%" inside_iframe="1"/>
|
||||||
|
<website enabled="0" name="Lingvo (En-Ru)" icon="" id="924db471b105299c82892067c0f10787" url="http://lingvopro.abbyyonline.com/en/Search/en-ru/%GDWORD%" inside_iframe="1"/>
|
||||||
|
<website enabled="0" name="Michaelis (Pt-En)" icon="" id="087a6d65615fb047f4c80eef0a9465db" url="http://michaelis.uol.com.br/moderno/ingles/index.php?lingua=portugues-ingles&palavra=%GDISO1%" inside_iframe="1"/>
|
||||||
|
</websites>
|
||||||
|
<dictservers/>
|
||||||
|
<programs>
|
||||||
|
<program enabled="0" name="Espeak" icon="" id="2cf8b3a60f27e1ac812de0b57c148340" commandLine="${pkgs.espeak}/bin/espeak %GDWORD%" type="0"/>
|
||||||
|
<program enabled="0" name="Manpages" icon="" id="4f898f7582596cea518c6b0bfdceb8b3" commandLine="${pkgs.man_db}/bin/man -a --html=/bin/cat %GDWORD%" type="2"/>
|
||||||
|
</programs>
|
||||||
|
<voiceEngines/>
|
||||||
|
<mutedDictionaries/>
|
||||||
|
<popupMutedDictionaries>
|
||||||
|
<mutedDictionary>ae6f89aac7151829681b85f035d54e48</mutedDictionary>
|
||||||
|
</popupMutedDictionaries>
|
||||||
|
<preferences>
|
||||||
|
<interfaceLanguage></interfaceLanguage>
|
||||||
|
<helpLanguage></helpLanguage>
|
||||||
|
<displayStyle>modern</displayStyle>
|
||||||
|
<newTabsOpenAfterCurrentOne>0</newTabsOpenAfterCurrentOne>
|
||||||
|
<newTabsOpenInBackground>1</newTabsOpenInBackground>
|
||||||
|
<hideSingleTab>0</hideSingleTab>
|
||||||
|
<mruTabOrder>0</mruTabOrder>
|
||||||
|
<hideMenubar>0</hideMenubar>
|
||||||
|
<enableTrayIcon>0</enableTrayIcon>
|
||||||
|
<startToTray>0</startToTray>
|
||||||
|
<closeToTray>0</closeToTray>
|
||||||
|
<autoStart>0</autoStart>
|
||||||
|
<doubleClickTranslates>1</doubleClickTranslates>
|
||||||
|
<selectWordBySingleClick>0</selectWordBySingleClick>
|
||||||
|
<escKeyHidesMainWindow>0</escKeyHidesMainWindow>
|
||||||
|
<zoomFactor>1</zoomFactor>
|
||||||
|
<helpZoomFactor>1</helpZoomFactor>
|
||||||
|
<wordsZoomLevel>0</wordsZoomLevel>
|
||||||
|
<enableMainWindowHotkey>1</enableMainWindowHotkey>
|
||||||
|
<mainWindowHotkey>Ctrl+F11, Ctrl+F11</mainWindowHotkey>
|
||||||
|
<enableClipboardHotkey>1</enableClipboardHotkey>
|
||||||
|
<clipboardHotkey>Ctrl+C, Ctrl+C</clipboardHotkey>
|
||||||
|
<enableScanPopup>1</enableScanPopup>
|
||||||
|
<startWithScanPopupOn>0</startWithScanPopupOn>
|
||||||
|
<enableScanPopupModifiers>0</enableScanPopupModifiers>
|
||||||
|
<scanPopupModifiers>0</scanPopupModifiers>
|
||||||
|
<scanPopupAltMode>0</scanPopupAltMode>
|
||||||
|
<scanPopupAltModeSecs>3</scanPopupAltModeSecs>
|
||||||
|
<ignoreOwnClipboardChanges>0</ignoreOwnClipboardChanges>
|
||||||
|
<scanToMainWindow>0</scanToMainWindow>
|
||||||
|
<ignoreDiacritics>0</ignoreDiacritics>
|
||||||
|
<showScanFlag>0</showScanFlag>
|
||||||
|
<scanPopupUseUIAutomation>1</scanPopupUseUIAutomation>
|
||||||
|
<scanPopupUseIAccessibleEx>1</scanPopupUseIAccessibleEx>
|
||||||
|
<scanPopupUseGDMessage>1</scanPopupUseGDMessage>
|
||||||
|
<scanPopupUnpinnedWindowFlags>0</scanPopupUnpinnedWindowFlags>
|
||||||
|
<scanPopupUnpinnedBypassWMHint>0</scanPopupUnpinnedBypassWMHint>
|
||||||
|
<pronounceOnLoadMain>0</pronounceOnLoadMain>
|
||||||
|
<pronounceOnLoadPopup>0</pronounceOnLoadPopup>
|
||||||
|
<useInternalPlayer>1</useInternalPlayer>
|
||||||
|
<internalPlayerBackend>FFmpeg+libao</internalPlayerBackend>
|
||||||
|
<audioPlaybackProgram>mplayer</audioPlaybackProgram>
|
||||||
|
<alwaysOnTop>1</alwaysOnTop>
|
||||||
|
<searchInDock>1</searchInDock>
|
||||||
|
<historyStoreInterval>0</historyStoreInterval>
|
||||||
|
<favoritesStoreInterval>0</favoritesStoreInterval>
|
||||||
|
<confirmFavoritesDeletion>1</confirmFavoritesDeletion>
|
||||||
|
<proxyserver enabled="0" useSystemProxy="0">
|
||||||
|
<type>0</type>
|
||||||
|
<host></host>
|
||||||
|
<port>3128</port>
|
||||||
|
<user></user>
|
||||||
|
<password></password>
|
||||||
|
<systemProxyUser></systemProxyUser>
|
||||||
|
<systemProxyPassword></systemProxyPassword>
|
||||||
|
</proxyserver>
|
||||||
|
<disallowContentFromOtherSites>0</disallowContentFromOtherSites>
|
||||||
|
<enableWebPlugins>0</enableWebPlugins>
|
||||||
|
<hideGoldenDictHeader>0</hideGoldenDictHeader>
|
||||||
|
<maxNetworkCacheSize>50</maxNetworkCacheSize>
|
||||||
|
<clearNetworkCacheOnExit>1</clearNetworkCacheOnExit>
|
||||||
|
<maxStringsInHistory>500</maxStringsInHistory>
|
||||||
|
<storeHistory>1</storeHistory>
|
||||||
|
<alwaysExpandOptionalParts>0</alwaysExpandOptionalParts>
|
||||||
|
<addonStyle></addonStyle>
|
||||||
|
<collapseBigArticles>0</collapseBigArticles>
|
||||||
|
<articleSizeLimit>2000</articleSizeLimit>
|
||||||
|
<limitInputPhraseLength>0</limitInputPhraseLength>
|
||||||
|
<inputPhraseLengthLimit>1000</inputPhraseLengthLimit>
|
||||||
|
<maxDictionaryRefsInContextMenu>20</maxDictionaryRefsInContextMenu>
|
||||||
|
<trackClipboardChanges>0</trackClipboardChanges>
|
||||||
|
<synonymSearchEnabled>1</synonymSearchEnabled>
|
||||||
|
<fullTextSearch>
|
||||||
|
<searchMode>0</searchMode>
|
||||||
|
<matchCase>0</matchCase>
|
||||||
|
<maxArticlesPerDictionary>100</maxArticlesPerDictionary>
|
||||||
|
<maxDistanceBetweenWords>2</maxDistanceBetweenWords>
|
||||||
|
<useMaxArticlesPerDictionary>0</useMaxArticlesPerDictionary>
|
||||||
|
<useMaxDistanceBetweenWords>1</useMaxDistanceBetweenWords>
|
||||||
|
<dialogGeometry></dialogGeometry>
|
||||||
|
<disabledTypes></disabledTypes>
|
||||||
|
<enabled>1</enabled>
|
||||||
|
<ignoreWordsOrder>0</ignoreWordsOrder>
|
||||||
|
<ignoreDiacritics>0</ignoreDiacritics>
|
||||||
|
<maxDictionarySize>0</maxDictionarySize>
|
||||||
|
</fullTextSearch>
|
||||||
|
</preferences>
|
||||||
|
<lastMainGroupId>0</lastMainGroupId>
|
||||||
|
<lastPopupGroupId>0</lastPopupGroupId>
|
||||||
|
<popupWindowState>AAAA/wAAAAH9AAAAAAAAAg0AAAGTAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAQAAAAEAAAAaAGQAaQBjAHQAaQBvAG4AYQByAHkAQgBhAHIDAAAAAP////8AAAAAAAAAAA==</popupWindowState>
|
||||||
|
<popupWindowGeometry>AdnQywADAAAAAAC6AAABEgAAAuYAAAKkAAAAugAAARIAAALmAAACpAAAAAAAAAAABVYAAAC6AAABEgAAAuYAAAKk</popupWindowGeometry>
|
||||||
|
<pinPopupWindow>0</pinPopupWindow>
|
||||||
|
<popupWindowAlwaysOnTop>0</popupWindowAlwaysOnTop>
|
||||||
|
<mainWindowState>AAAA/wAAAAH9AAAAAgAAAAAAAADMAAAC0PwCAAAAAfsAAAAUAHMAZQBhAHIAYwBoAFAAYQBuAGUBAAAAFAAAAtAAAAB9AP///wAAAAEAAADMAAAC0PwCAAAAA/sAAAASAGQAaQBjAHQAcwBQAGEAbgBlAQAAABQAAAFvAAAAYQD////7AAAAGgBmAGEAdgBvAHIAaQB0AGUAcwBQAGEAbgBlAAAAABQAAALQAAAAYQD////7AAAAFgBoAGkAcwB0AG8AcgB5AFAAYQBuAGUBAAABhAAAAWAAAABhAP///wAAA7QAAALQAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAIAAAAUAG4AYQB2AFQAbwBvAGwAYgBhAHIAAAAAAP////8AAAAAAAAAAAAAABoAZABpAGMAdABpAG8AbgBhAHIAeQBCAGEAcgAAAAAA/////wAAAAAAAAAA</mainWindowState>
|
||||||
|
<mainWindowGeometry>AdnQywADAAAAAAAEAAAAGAAABVEAAAL7AAAABAAAABgAAAVRAAAC+wAAAAAAAAAABVYAAAAEAAAAGAAABVEAAAL7</mainWindowGeometry>
|
||||||
|
<helpWindowGeometry>AdnQywADAAAAAAF3AAAAgwAAA9AAAAJGAAABeAAAAIQAAAPPAAACRQAAAAAAAAAABVYAAAF4AAAAhAAAA88AAAJF</helpWindowGeometry>
|
||||||
|
<helpSplitterState>AAAA/wAAAAEAAAACAAABBAAABAAB/////wEAAAABAA==</helpSplitterState>
|
||||||
|
<dictInfoGeometry>AdnQywADAAAAAAF1AAAAmgAAA84AAAIrAAABdgAAAJsAAAPNAAACKgAAAAAAAAAABVYAAAF2AAAAmwAAA80AAAIq</dictInfoGeometry>
|
||||||
|
<inspectorGeometry></inspectorGeometry>
|
||||||
|
<timeForNewReleaseCheck></timeForNewReleaseCheck>
|
||||||
|
<skippedRelease></skippedRelease>
|
||||||
|
<showingDictBarNames>1</showingDictBarNames>
|
||||||
|
<usingSmallIconsInToolbars>1</usingSmallIconsInToolbars>
|
||||||
|
<editDictionaryCommandLine></editDictionaryCommandLine>
|
||||||
|
<maxPictureWidth>0</maxPictureWidth>
|
||||||
|
<maxHeadwordSize>256</maxHeadwordSize>
|
||||||
|
<maxHeadwordsToExpand>0</maxHeadwordsToExpand>
|
||||||
|
<headwordsDialog>
|
||||||
|
<searchMode>0</searchMode>
|
||||||
|
<matchCase>0</matchCase>
|
||||||
|
<autoApply>0</autoApply>
|
||||||
|
<headwordsExportPath></headwordsExportPath>
|
||||||
|
<headwordsDialogGeometry></headwordsDialogGeometry>
|
||||||
|
</headwordsDialog>
|
||||||
|
</config>
|
||||||
|
''
|
||||||
@@ -105,7 +105,6 @@ in {
|
|||||||
import astral
|
import astral
|
||||||
import astral.moon
|
import astral.moon
|
||||||
import astral.sun
|
import astral.sun
|
||||||
import math
|
|
||||||
|
|
||||||
moon_phases = {
|
moon_phases = {
|
||||||
0: "🌑",
|
0: "🌑",
|
||||||
@@ -121,12 +120,10 @@ in {
|
|||||||
current_phase = astral.moon.phase()
|
current_phase = astral.moon.phase()
|
||||||
closest_phase = min(moon_phases.keys(), key=lambda x: abs(current_phase - x))
|
closest_phase = min(moon_phases.keys(), key=lambda x: abs(current_phase - x))
|
||||||
|
|
||||||
moon_percentage = round(100 * math.sin(current_phase / 28 * math.pi), 1)
|
|
||||||
|
|
||||||
city = astral.LocationInfo("Berlin", "Germany", "${spacetime.time.timeZone}", ${toString spacetime.location.latitude}, ${toString spacetime.location.longitude})
|
city = astral.LocationInfo("Berlin", "Germany", "${spacetime.time.timeZone}", ${toString spacetime.location.latitude}, ${toString spacetime.location.longitude})
|
||||||
sun = astral.sun.sun(city.observer, date=astral.today(), tzinfo=city.timezone)
|
sun = astral.sun.sun(city.observer, date=astral.today(), tzinfo=city.timezone)
|
||||||
|
|
||||||
print("🌅 {} 🌇 {} {} {}%".format(sun["sunrise"].strftime("%R"), sun["sunset"].strftime("%R"), moon_phases[closest_phase], moon_percentage))
|
print("🌅 {} 🌇 {} {} {}".format(sun["sunrise"].strftime("%R"), sun["sunset"].strftime("%R"), moon_phases[closest_phase], round(current_phase, 1)))
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,14 +2,7 @@
|
|||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.niveum.traadfri;
|
cfg = config.niveum.traadfri;
|
||||||
traadfri = let
|
traadfri = pkgs.callPackage <traadfri> {
|
||||||
traadfri-package = pkgs.fetchFromGitHub {
|
|
||||||
owner = "kmein";
|
|
||||||
repo = "traadfri";
|
|
||||||
rev = "cf46bd09cd3263b90a09b0ca979aa705a4c3671c";
|
|
||||||
sha256 = "0az9q38pl8fqk00488blhn6rhvwsw2wky3dbdlyz7945ggvxnbyd";
|
|
||||||
};
|
|
||||||
in pkgs.callPackage traadfri-package {
|
|
||||||
libcoap = pkgs.callPackage <niveum/packages/libcoap.nix> { tls = true; };
|
libcoap = pkgs.callPackage <niveum/packages/libcoap.nix> { tls = true; };
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
|
|||||||
@@ -1,13 +1,7 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
tuna-src = pkgs.fetchFromGitHub {
|
tuna = pkgs.callPackage <tuna> {};
|
||||||
owner = "kmein";
|
|
||||||
repo = "tuna";
|
|
||||||
rev = "1cbed44069a3009738afdafecefe0a05316039a6";
|
|
||||||
sha256 = "0i7vjzv4hf8fdz9j09cdnvfhyylh0izsdhjs4q0qw9g5nrc9pyir";
|
|
||||||
};
|
|
||||||
tuna = pkgs.callPackage tuna-src {};
|
|
||||||
cfg = config.services.tuna;
|
cfg = config.services.tuna;
|
||||||
in {
|
in {
|
||||||
imports = [];
|
imports = [];
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
import <nixpkgs-mozilla>
|
|
||||||
@@ -394,17 +394,12 @@ in rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
nix-index-update = pkgs.writers.writeDashBin "nix-index-update" ''
|
nix-index-update = pkgs.writers.writeDashBin "nix-index-update" ''
|
||||||
mkdir -p $HOME/.cache/nix-index
|
filename="index-x86_64-$(uname | tr A-Z a-z)"
|
||||||
tag=$(git -c 'versionsort.suffix=-' \
|
mkdir -p ~/.cache/nix-index
|
||||||
ls-remote \
|
cd ~/.cache/nix-index
|
||||||
--exit-code \
|
# -N will only download a new version if there is an update.
|
||||||
--refs \
|
${pkgs.wget}/bin/wget -q -N https://github.com/Mic92/nix-index-database/releases/latest/download/$filename
|
||||||
--tags \
|
ln -f $filename files
|
||||||
--sort='v:refname' \
|
|
||||||
https://github.com/Mic92/nix-index-database \
|
|
||||||
| awk 'END {match($2, /([^/]+)$/, m); print m[0]}')
|
|
||||||
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
|
|
||||||
'';
|
'';
|
||||||
} // {
|
} // {
|
||||||
devour = pkgs.callPackage <niveum/packages/devour.nix> { };
|
devour = pkgs.callPackage <niveum/packages/devour.nix> { };
|
||||||
|
|||||||
120
shell.nix
120
shell.nix
@@ -1,120 +0,0 @@
|
|||||||
{ pkgs ? import <nixpkgs> { }
|
|
||||||
, lib ? import <nixpkgs/lib>
|
|
||||||
, release ? "21.11"
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
dependencies = {
|
|
||||||
nixpkgs = {
|
|
||||||
ref = "refs/heads/nixos-${release}";
|
|
||||||
url = "https://github.com/NixOS/nixpkgs.git";
|
|
||||||
path = toString .versions/nixpkgs.json;
|
|
||||||
};
|
|
||||||
nixpkgs-unstable = {
|
|
||||||
ref = "refs/heads/master";
|
|
||||||
url = "https://github.com/NixOS/nixpkgs.git";
|
|
||||||
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 = {
|
|
||||||
ref = "refs/heads/release-${release}";
|
|
||||||
url = "https://github.com/nix-community/home-manager.git";
|
|
||||||
path = toString .versions/home-manager.json;
|
|
||||||
};
|
|
||||||
krops = {
|
|
||||||
ref = "refs/tags/1.26.2";
|
|
||||||
url = "https://cgit.krebsco.de/krops";
|
|
||||||
path = toString .versions/krops.json;
|
|
||||||
};
|
|
||||||
stockholm = {
|
|
||||||
ref = "refs/heads/master";
|
|
||||||
url = "https://cgit.lassul.us/stockholm";
|
|
||||||
path = toString .versions/stockholm.json;
|
|
||||||
};
|
|
||||||
retiolum = {
|
|
||||||
ref = "refs/heads/master";
|
|
||||||
url = "https://github.com/krebs/retiolum";
|
|
||||||
path = toString .versions/retiolum.json;
|
|
||||||
};
|
|
||||||
nixpkgs-mozilla = {
|
|
||||||
ref = "refs/heads/master";
|
|
||||||
url = "https://github.com/mozilla/nixpkgs-mozilla";
|
|
||||||
path = toString .versions/nixpkgs-mozilla.json;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in pkgs.mkShell {
|
|
||||||
buildInputs = [
|
|
||||||
(let
|
|
||||||
updateCommand = pkgs.writers.writeDash "niveum-update-one" ''
|
|
||||||
[ $# -eq 1 ] || {
|
|
||||||
echo "Please provide a dependency to update." >&2
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
case "$1" in
|
|
||||||
${lib.concatStringsSep "\n" (lib.mapAttrsToList (name: dependency: ''
|
|
||||||
${name})
|
|
||||||
${pkgs.nix-prefetch-git}/bin/nix-prefetch-git --url "${dependency.url}" --rev "${dependency.ref}" > "${dependency.path}";;
|
|
||||||
'') dependencies)}
|
|
||||||
esac
|
|
||||||
'';
|
|
||||||
in pkgs.writers.writeDashBin "niveum-update" ''
|
|
||||||
if [ $# -gt 0 ]; then
|
|
||||||
dependencies="$@"
|
|
||||||
else
|
|
||||||
dependencies="${lib.concatStringsSep " " (lib.attrNames dependencies)}"
|
|
||||||
fi
|
|
||||||
${pkgs.parallel}/bin/parallel --line-buffer --tagstring '{}' -q ${updateCommand} '{1}' ::: $dependencies
|
|
||||||
'')
|
|
||||||
|
|
||||||
(let
|
|
||||||
deployCommand = pkgs.writers.writeDash "niveum-deploy-one" ''
|
|
||||||
${pkgs.git}/bin/git diff $(${pkgs.openssh}/bin/ssh "$1" cat /etc/niveum/version)
|
|
||||||
eval "$(${pkgs.nixUnstable}/bin/nix-build --no-out-link "${toString ./.}/deploy.nix" -A "$1")"
|
|
||||||
'';
|
|
||||||
in pkgs.writers.writeDashBin "niveum-deploy" ''
|
|
||||||
deploy() {
|
|
||||||
${pkgs.parallel}/bin/parallel --line-buffer --tagstring '{}' -q ${deployCommand} '{1}' ::: "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ -z "$(${pkgs.git}/bin/git status --porcelain)" ]; then
|
|
||||||
deploy "$@"
|
|
||||||
else
|
|
||||||
if [ "$1" = --force ]; then
|
|
||||||
shift
|
|
||||||
deploy "$@"
|
|
||||||
else
|
|
||||||
echo Working directory is dirty. Not deploying.
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
'')
|
|
||||||
|
|
||||||
(let
|
|
||||||
statusCommand = pkgs.writers.writeDash "niveum-status-one" ''
|
|
||||||
[ $# -eq 1 ] || {
|
|
||||||
echo "Please provide a niveum system hostname." >&2
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
hostname="$1"
|
|
||||||
version_file=/etc/niveum/version
|
|
||||||
|
|
||||||
if commit_id="$(${pkgs.coreutils}/bin/timeout 2s ${pkgs.openssh}/bin/ssh "$hostname" cat $version_file 2>/dev/null)"; then
|
|
||||||
${pkgs.git}/bin/git log -1 --oneline "$commit_id"
|
|
||||||
else
|
|
||||||
echo offline
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
in pkgs.writers.writeDashBin "niveum-status" ''
|
|
||||||
if [ $# -gt 0 ]; then
|
|
||||||
systems="$@"
|
|
||||||
else
|
|
||||||
systems="$(ls ${toString ./.}/systems)"
|
|
||||||
fi
|
|
||||||
${pkgs.parallel}/bin/parallel --line-buffer --tagstring '{}' -q ${statusCommand} '{1}' ::: $systems
|
|
||||||
'')
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -23,6 +23,7 @@ in
|
|||||||
<niveum/configs/save-space.nix>
|
<niveum/configs/save-space.nix>
|
||||||
<niveum/configs/spacetime.nix>
|
<niveum/configs/spacetime.nix>
|
||||||
<niveum/configs/sshd.nix>
|
<niveum/configs/sshd.nix>
|
||||||
|
<niveum/configs/tmux.nix>
|
||||||
<niveum/configs/telegram-bots>
|
<niveum/configs/telegram-bots>
|
||||||
<niveum/modules/retiolum.nix>
|
<niveum/modules/retiolum.nix>
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,13 +1,7 @@
|
|||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
port = 5703;
|
port = 5703;
|
||||||
geogen = (pkgs.fetchFromGitHub {
|
geogen = pkgs.callPackage "${<scripts>}/onomastics" {};
|
||||||
owner = "kmein";
|
|
||||||
repo = "scripts";
|
|
||||||
rev = "8945430f27a8c6fd632dd35382cb094abe3543ff";
|
|
||||||
sha256 = "1djyxkynypxsrmdf6idgjszqpcgqyq607rrsvl58p2bpymmwibzb";
|
|
||||||
}) + "/onomastics";
|
|
||||||
inherit (pkgs.callPackage geogen {}) dependencyEnv;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
systemd.services.names = {
|
systemd.services.names = {
|
||||||
@@ -20,7 +14,7 @@ in
|
|||||||
script = ''
|
script = ''
|
||||||
cd $(mktemp -d)
|
cd $(mktemp -d)
|
||||||
ln -s "${geogen}/wsgi.py" wsgi.py
|
ln -s "${geogen}/wsgi.py" wsgi.py
|
||||||
${dependencyEnv}/bin/gunicorn wsgi:app -b :${toString port}
|
${geogen.dependencyEnv}/bin/gunicorn wsgi:app -b :${toString port}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -7,13 +7,7 @@ let
|
|||||||
geo-ip-database = "${lib.head config.services.geoipupdate.settings.EditionIDs}.mmdb";
|
geo-ip-database = "${lib.head config.services.geoipupdate.settings.EditionIDs}.mmdb";
|
||||||
geo-ip-database-path = "${config.services.geoipupdate.settings.DatabaseDirectory}/${geo-ip-database}";
|
geo-ip-database-path = "${config.services.geoipupdate.settings.DatabaseDirectory}/${geo-ip-database}";
|
||||||
|
|
||||||
tinc-graph-source = pkgs.fetchFromGitHub {
|
tinc-graph = pkgs.callPackage <tinc-graph> {};
|
||||||
owner = "kmein";
|
|
||||||
repo = "tinc-graph";
|
|
||||||
rev = "1b9c69ffdbdab82d30a23e44f739feea63d94163";
|
|
||||||
sha256 = "0bk4x9l399f80lmz4asx7s5fcsgrfdb6xyymbq884621x4z3d2vp";
|
|
||||||
};
|
|
||||||
tinc-graph = pkgs.callPackage tinc-graph-source {};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
systemd.services.retiolum-index = {
|
systemd.services.retiolum-index = {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ in
|
|||||||
};
|
};
|
||||||
wireless.interfaces = [ "wlp3s0" ];
|
wireless.interfaces = [ "wlp3s0" ];
|
||||||
retiolum = retiolumAddresses.manakish;
|
retiolum = retiolumAddresses.manakish;
|
||||||
networking.hostName = "manakish";
|
hostName = "manakish";
|
||||||
};
|
};
|
||||||
|
|
||||||
system.stateVersion = "20.09"; # Did you read the comment?
|
system.stateVersion = "20.09"; # Did you read the comment?
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ in
|
|||||||
<niveum/configs/spacetime.nix>
|
<niveum/configs/spacetime.nix>
|
||||||
<niveum/configs/sshd.nix>
|
<niveum/configs/sshd.nix>
|
||||||
<niveum/configs/traadfri.nix>
|
<niveum/configs/traadfri.nix>
|
||||||
|
<niveum/configs/tmux.nix>
|
||||||
<niveum/configs/wpa_supplicant.nix>
|
<niveum/configs/wpa_supplicant.nix>
|
||||||
<niveum/modules/retiolum.nix>
|
<niveum/modules/retiolum.nix>
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
let startUrls = [ "https://open.spotify.com" "https://youtube.com" "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.brave}/bin/brave \
|
||||||
--no-first-run --no-message-box --noerrdialogs \
|
--no-first-run --no-message-box --noerrdialogs \
|
||||||
--default-browser --no-default-browser-check \
|
--default-browser --no-default-browser-check \
|
||||||
--start-maximized ${lib.escapeShellArgs startUrls}
|
--start-maximized ${lib.escapeShellArgs startUrls}
|
||||||
|
|||||||
Reference in New Issue
Block a user