1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

Revert "MASSIVE restructuring"

This reverts commit b94da2d550.
This commit is contained in:
Kierán Meinhardt
2019-01-30 13:16:49 +01:00
parent a6bf4a4793
commit 101e7c99d4
23 changed files with 418 additions and 504 deletions

3
.gitignore vendored
View File

@@ -1,2 +1 @@
/secrets.nix secrets.nix
/result

View File

@@ -1,12 +1,17 @@
{ config, pkgs, ... }: { config, lib, pkgs, ... }:
{ let
helpers = import ./helpers.nix;
in {
imports = [ imports = [
"${builtins.fetchTarball https://github.com/rycee/home-manager/archive/master.tar.gz}/nixos" "${builtins.fetchTarball https://github.com/rycee/home-manager/archive/master.tar.gz}/nixos"
./editors.nix ./options.nix
./networks.nix configs/hu-berlin.nix
./scripts.nix configs/shells.nix
./shells.nix configs/editors.nix
../../options.nix configs/graphics.nix
configs/packages.nix
configs/networks.nix
configs/retiolum.nix
]; ];
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
@@ -26,12 +31,6 @@
''; '';
}; };
i18n = {
defaultLocale = "en_GB.UTF-8";
consoleKeyMap = "de";
# consoleColors = with import ../theme.nix; map (c: lib.strings.removePrefix "#" c) colorPalette;
};
services.printing = { services.printing = {
enable = true; enable = true;
drivers = [ pkgs.hplipWithPlugin ]; drivers = [ pkgs.hplipWithPlugin ];
@@ -52,11 +51,31 @@
home = "/home/kfm"; home = "/home/kfm";
createHome = true; createHome = true;
group = "users"; group = "users";
extraGroups = [ "wheel" "audio" ]; extraGroups = [ "wheel" "audio" "docker" ];
hashedPassword = "$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/"; hashedPassword = "$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/";
shell = pkgs.zsh; shell = pkgs.zsh;
}; };
systemd.services.google-drive = {
description = "Google Drive synchronisation service";
wants = [ "network-online.target" ];
script = ''
${pkgs.grive2}/bin/grive -p ${config.users.users.kfm.home}/cloud/gdrive
'';
startAt = "*:0/5";
serviceConfig = {
Restart = "on-failure";
User = "kfm";
};
};
programs.tmux = {
enable = true;
extraTmuxConf = import dot/tmux.nix;
keyMode = "vi";
terminal = "screen-256color";
};
home-manager.users.kfm = { home-manager.users.kfm = {
programs.git = { programs.git = {
enable = true; enable = true;
@@ -77,63 +96,12 @@
}; };
home.file = { home.file = {
".config/htop/htoprc".text = import ../../dot/htop.nix; ".config/mpv/input.conf".text = import dot/mpv.nix;
".config/Typora/themes/base.user.css".text = import dot/typora.nix;
".ghc/ghci.conf".text = import dot/ghci.nix { inherit pkgs; };
".config/htop/htoprc".text = import dot/htop.nix;
".stack/config.yaml".text = import dot/stack.nix { user = config.constants.user; };
".zshrc".text = "# nothing to see here"; ".zshrc".text = "# nothing to see here";
}; };
}; };
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
] ++ [ # internet
aria2
w3m
wget
curl
httpie
whois
] ++ [ # media
imagemagick
] ++ [ # archive
unzip
unrar
p7zip
zip
] ++ [ # monitor
htop
iotop
iftop
lsof
psmisc
] ++ [ # shell
bat
dos2unix
fd
file
git
gitAndTools.hub
gitstats
jo
jq
manpages
patch
patchutils
posix_man_pages
most
ranger
ripgrep
rlwrap
tree
] ++ [ # hardware
pmount
usbutils
pciutils
];
programs.command-not-found.enable = true;
programs.java = {
enable = true;
package = pkgs.openjdk;
};
} }

View File

@@ -1,57 +0,0 @@
{ pkgs, config, lib, ... }:
let
sshPort = 22022;
sshKey = {
homeros = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDn13Y6CznabMvKJPIrr/dj1TX4boe8F98yc3FDElJeprQo2RXlDzjg/po9/lHTHaoC5yQUjlRg/AnI4vizYkn2sqJebAeSPahmpS+l0eFnjZgsqds2cCFqSPB6Qc5YEkGRhN4aq/ABz0jdFJLBYOYGxuuXowYxyNrqrItxDR7tF7upG+kVjYiDoP/qFm8C7zv6Zy8aoehNbzf8HlIJd0ITbMr/vUftNsQ8C84QmbZljReHmchPgE8GUfVLTlCORkhndbvNX3jXo+75y7JOIZZ6193FZHM4seg/VSDWYLJtpnhttD1w6qmiLrlimqbJB9ihoXq2eDmQ+4zo6hxQ6pFH6P0xQClJ0hxVWn6hEM3rkMwoMfbq4v54gKJsYxcGdnwjAX6d9DQv/QVjmVZffKWsGGoC7uz7bdmc0akVKi+GLSPOx8sJwXqvyvFStfqLaweVcuikUqQ72JLK7pZyliA7na6KuQ1PE3LTpfSr0lbBJ73xtS2rU1nF/Oe5zwA4LX5s/QeDVmS86D8acUrSCO62pBB3Yv8go0KR4mEvfxLiUWV6gR2uTeIPXvo4ouYFZqyABAGybjUATlGCXJaeHd/y/VWkpIB8ocqNESlRMCEe4TrYjw91AEmYBL6kWIeop3dyhovm3dTB3fQvC97kbL16wuXBrOcN4lEc+56ShhmvdQ== kieran.meinhardt@gmail.com";
scardanelli = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC19H0FhSNWcfBRPKzbTVSMJikIWZl0CoM8zCm+/3fdMgoaLRpeZWe/AfDK6b4qOjk/sez/J0JUFCGr+JbMwjsduoazsuQowu9L9DLP9Q5UkJje4BD7MHznaeu9/XfVng/MvyaEWArA/VUJeKQesHe76tR511/+n3+bdzlIh8Zw/3wfFxmg1OTNA99/vLkXrQzHDTuV/yj1pxykL4xFtN0OIssW1IKncJeKtkO/OHGT55ypz52Daj6bNKqvxiTuzeEhv5M+5ppyIPcRf1uj/7IaPKttCgZAntEqBTIR9MbyXFeAZVayzaFnLl2okeam5XreeZbj+Y1h2ZjxiIuWoab3MLndSekVfLtfa63gtcWIf8CIvZO2wJoH8v73y0U78JsfWVaTM09ZCfFlHHA/bWqZ6laAjW+mWLO/c77DcYkB3IBzaMVNfc6mfTcGFIC+biWeYpKgA0zC6rByUPbmbIoMueP9zqJwqUaM90Nwd6559inBB107/BK3Ktb3b+37mMCstetIPB9e4EFpGMjhmnL/G81jS53ACWLXJYzt7mKU/fEsiW93MtaB+Le46OEC18y/4G8F7p/nnH7i0kO74ukxbnc4PlpiM7iWT6ra2Cyy+nzEgdXCNXywIxr05TbCQDwX6/NY8k7Hokgdfyz+1Pq3sX0yCcWRPaoB26YF12KYFQ== kieran.meinhardt@gmail.com";
};
in {
networking.hosts = lib.mapAttrs (_: value: [ (value + ".local") ]) {
"192.168.178.1" = "router";
"192.168.178.21" = "scardanelli";
"192.168.178.22" = "homeros";
"192.168.178.24" = "catullus";
"192.168.178.27" = "printer";
};
home-manager.users.kfm = {
programs.ssh = {
enable = true;
matchBlocks = {
catullus = {
hostname = "catullus.local";
user = "kfm";
port = sshPort;
};
scardanelli = {
hostname = "scardanelli.local";
user = "kfm";
port = sshPort;
};
homeros = {
hostname = "homeros.local";
user = "kfm";
port = sshPort;
};
};
};
};
programs.ssh = {
startAgent = true;
forwardX11 = true;
};
services.openssh = {
ports = [ sshPort ];
enable = true;
forwardX11 = true;
passwordAuthentication = false;
};
users.users.kfm.openssh.authorizedKeys.keys = [
sshKey.homeros
sshKey.scardanelli
];
}

View File

@@ -1,5 +0,0 @@
{ config, pkgs, ... }:
{
virtualisation.docker.enable = true;
users.users.kfm.extraGroups = [ "docker" ];
}

View File

@@ -1,4 +1,5 @@
{ pkgs, config, ... }: { pkgs, config, ... }:
with import ../helpers.nix;
let vim_conf = '' let vim_conf = ''
" if tabular " if tabular
vmap a= :Tabularize /=<CR> vmap a= :Tabularize /=<CR>
@@ -15,7 +16,7 @@ let vim_conf = ''
set number set number
set path=$PWD/** set path=$PWD/**
set completeopt=menu,longest set completeopt=menu,longest
set wildmode=list:full wildignore+=${builtins.concatStringsSep "," config.constants.ignore} set wildmode=list:full wildignore+=${commaSep config.constants.ignore}
set shortmess+=aI set shortmess+=aI
set nowritebackup noswapfile set nowritebackup noswapfile
set mouse=a set mouse=a

View File

@@ -1,15 +0,0 @@
{ config, pkgs, ... }:
{
systemd.services.google-drive = {
description = "Google Drive synchronisation service";
wants = [ "network-online.target" ];
script = ''
${pkgs.grive2}/bin/grive -p ${config.users.users.kfm.home}/cloud/gdrive
'';
startAt = "*:0/5";
serviceConfig = {
Restart = "on-failure";
User = "kfm";
};
};
}

View File

@@ -1,6 +1,6 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
{ {
services.xserver = let commaSep = builtins.concatStringsSep ","; in with import ../theme.nix; { services.xserver = with import ../helpers.nix; with import ../theme.nix; {
enable = true; enable = true;
layout = commaSep [ "de" "gr" "ru" ]; layout = commaSep [ "de" "gr" "ru" ];
xkbVariant = commaSep [ "T3" "polytonic" "phonetic_winkeys" ]; xkbVariant = commaSep [ "T3" "polytonic" "phonetic_winkeys" ];
@@ -37,6 +37,12 @@
}.${config.networking.hostName}; }.${config.networking.hostName};
}; };
i18n = {
defaultLocale = "en_GB.UTF-8";
consoleKeyMap = "de";
consoleColors = with import ../theme.nix; map (c: lib.strings.removePrefix "#" c) colorPalette;
};
services.compton = { services.compton = {
enable = true; enable = true;
shadow = true; shadow = true;
@@ -57,78 +63,30 @@
timeout = 10; timeout = 10;
}; };
fonts.enableDefaultFonts = true;
fonts.fonts = with pkgs; [
cantarell-fonts
corefonts
eb-garamond
fira
libertine
lmodern
noto-fonts
powerline-fonts
roboto
xlibs.fontschumachermisc
ubuntu_font_family
];
# packages for X
environment.systemPackages = with pkgs; [
config.constants.theme.gtk.package
config.constants.theme.icon.package
config.constants.theme.cursor.package
arandr
libnotify
xclip
xorg.xkill
wpa_supplicant_gui
] ++ [ # office
abiword
gnumeric
# typora
] ++ [ # internet
chromium
firefox
tor-browser-bundle-bin
thunderbird
] ++ [ # media
ffmpeg
mpv
pamixer
pavucontrol
gthumb
sxiv
blueman
zathura
];
services.urxvtd.enable = true;
services.dbus.packages = [ pkgs.gnome3.dconf ];
home-manager.users.kfm = { home-manager.users.kfm = {
gtk = { gtk = {
enable = true; enable = true;
# font = with import ../theme.nix; { package = pkgs.noto-fonts; name = uiFont.name; };
iconTheme = config.constants.theme.icon; iconTheme = config.constants.theme.icon;
theme = config.constants.theme.gtk; theme = config.constants.theme.gtk;
}; };
qt = { qt = {
enable = true; enable = true;
useGtkTheme = true; useGtkTheme = true;
}; };
xsession.pointerCursor = config.constants.theme.cursor // { size = 16; }; xsession.pointerCursor = config.constants.theme.cursor // { size = 16; };
xsession.windowManager.i3 = { xsession.windowManager.i3 = {
enable = true; enable = true;
config = import ../dot/i3.nix { inherit lib pkgs config; }; config = import ../dot/i3.nix { inherit lib pkgs config; };
}; };
xresources.properties = import ../dot/xresources.nix { inherit lib; }; xresources.properties = import ../dot/xresources.nix { inherit lib; };
programs.rofi = import ../dot/rofi.nix { inherit config; }; programs.rofi = import ../dot/rofi.nix { inherit config; };
services.dunst = import ../dot/dunst.nix { inherit pkgs config; }; services.dunst = import ../dot/dunst.nix { inherit pkgs config; };
programs.urxvt = import ../dot/urxvt.nix { inherit pkgs; }; programs.urxvt = import ../dot/urxvt.nix { inherit pkgs; };
programs.zathura = import ../dot/zathura.nix; programs.zathura = import ../dot/zathura.nix;
home.file = {
".config/mpv/input.conf".text = import ../dot/mpv.nix;
# ".config/Typora/themes/base.user.css".text = import ../dot/typora.nix;
};
}; };
} }

View File

@@ -1,36 +0,0 @@
{ config, pkgs, ... }:
let
executables = pkgs.haskell.lib.justStaticExecutables;
haskells = import ../dot/haskells.nix;
in {
users.users.kfm.packages = with pkgs; [
(haskellPackages.ghcWithHoogle haskells)
(executables haskellPackages.cabal-install)
(executables haskellPackages.ghcid)
(executables haskellPackages.hasktags)
(executables haskellPackages.hindent)
(executables haskellPackages.pointfree)
(executables haskellPackages.pointful)
(executables haskellPackages.hlint)
(executables haskellPackages.hpack)
];
home-manager.users.kfm.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 ++ "\""
:def pl \x -> return $ ":!${pkgs.haskellPackages.pointfree}/bin/pointfree -v \"" ++ x ++ "\""
:def unpl \x -> return $ ":!${pkgs.haskellPackages.pointful}/bin/pointful \"" ++ x ++ "\""
:set prompt "\o033[1m%s\o033[1;34m λ\o033[0m "
'';
".stack/config.yaml".text = let user = config.constants.user; in ''
templates:
params:
author-name: ${user.name}
author-email: ${user.email}
copyright: 'Copyright: (c) 2018 ${user.name}'
github-username: ${user.github}
'';
};
}

View File

@@ -1,15 +0,0 @@
{ config, pkgs, ... }:
{
# for kdeconnect
networking.firewall = {
allowedTCPPortRanges = [ { from = 1714; to = 1764; } ];
allowedUDPPortRanges = [ { from = 1714; to = 1764; } ];
};
home-manager.users.kfm = {
services.kdeconnect = {
enable = true;
indicator = true;
};
};
}

92
configs/networks.nix Normal file
View File

@@ -0,0 +1,92 @@
{ pkgs, config, lib, ... }:
let
sshPort = 22022;
secrets = import ../secrets.nix;
in {
networking.hosts = lib.mapAttrs (_: value: [ (value + ".local") ]) {
"192.168.178.1" = "router";
"192.168.178.21" = "scardanelli";
"192.168.178.22" = "homeros";
"192.168.178.24" = "lestrade";
"192.168.178.27" = "printer";
} // {
"42:0:ca48:f98f:63d7:31ce:922b:245d" = [ "go" ];
};
networking.wireless = {
enable = true;
userControlled.enable = true;
networks = {
Aether = { pskRaw = "e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a"; };
EasyBox-927376 = { pskRaw = "dbd490ab69b39bd67cfa06daf70fc3ef3ee90f482972a668ed758f90f5577c22"; };
"Asoziales Netzwerk" = { pskRaw = "8e234041ec5f0cd1b6a14e9adeee9840ed51b2f18856a52137485523e46b0cb6"; };
c-base-public = {};
};
};
# for kdeconnect
networking.firewall = {
allowedTCPPortRanges = [ { from = 1714; to = 1764; } ];
allowedUDPPortRanges = [ { from = 1714; to = 1764; } ];
};
home-manager.users.kfm = {
services.kdeconnect = {
enable = true;
indicator = true;
};
programs.ssh = {
enable = true;
matchBlocks = {
lestrade = {
hostname = "lestrade.local";
user = "pi";
};
scardanelli = {
hostname = "scardanelli.local";
user = "kfm";
port = sshPort;
};
homeros = {
hostname = "homeros.local";
user = "kfm";
port = sshPort;
};
};
};
};
programs.ssh = {
startAgent = true;
forwardX11 = true;
};
services.openssh = {
ports = [ sshPort ];
enable = true;
forwardX11 = true;
passwordAuthentication = false;
};
users.users.kfm.openssh.authorizedKeys.keys = let sshKey = secrets.ssh.publicKey; in [
sshKey.homeros
sshKey.scardanelli
];
networking.retiolum = {
scardanelli = {
ipv4 = "10.243.2.2";
ipv6 = "42:0:3c46:4007:5bce:f1bc:606b:2b18";
};
homeros = {
ipv4 = "10.243.2.1";
ipv6 = "42:0:3c46:53e:e63d:e62a:56ea:c705";
};
}.${config.networking.hostName};
environment.etc."tinc/retiolum/rsa_key.priv" = {
text = secrets.retiolum.privateKey.${config.networking.hostName};
mode = "400";
};
}

181
configs/packages.nix Normal file
View File

@@ -0,0 +1,181 @@
{ config, pkgs, lib, ... }:
let
scripts = import ../dot/scripts.nix { inherit pkgs lib; };
daybook = pkgs.callPackage ../packages/daybook.nix {};
iolanguage = pkgs.callPackage ../packages/iolanguage.nix {};
todoist = pkgs.callPackage ../packages/todoist {};
haskells = import ../dot/haskells.nix;
unstable = import <nixos-unstable> {};
executables = pkgs.haskell.lib.justStaticExecutables;
in with pkgs;
{
nixpkgs.config.allowUnfree = true;
fonts.enableDefaultFonts = true;
fonts.fonts = [
cantarell-fonts
corefonts
eb-garamond
fira
libertine
lmodern
noto-fonts
powerline-fonts
roboto
xlibs.fontschumachermisc
ubuntu_font_family
];
environment.systemPackages = [
] ++ [ # office
abiword
gnumeric
# typora
] ++ [ # theme
config.constants.theme.gtk.package
config.constants.theme.icon.package
config.constants.theme.cursor.package
] ++ [ # internet
aria2
chromium
firefox
tor-browser-bundle-bin
thunderbird
w3m
wget
httpie
whois
] ++ [ # media
ffmpeg
mpv
pamixer
pavucontrol
gthumb
imagemagick
sxiv
blueman
zathura
] ++ [ # archive
unzip
unrar
p7zip
zip
] ++ [ # monitor
htop
iotop
iftop
lsof
psmisc
] ++ [ # shell
bat
dos2unix
fd
file
git
gitAndTools.hub
gitstats
manpages
patch
patchutils
posix_man_pages
most
ranger
ripgrep
rlwrap
tree
] ++ [ # hardware
pmount
usbutils
pciutils
] ++ [ # graphical
arandr
libnotify
xclip
xorg.xkill
wpa_supplicant_gui
];
programs.command-not-found.enable = true;
programs.java = {
enable = true;
package = pkgs.openjdk;
};
virtualisation.docker.enable = true;
services.urxvtd.enable = true;
services.dbus.packages = [ pkgs.gnome3.dconf ];
users.users.kfm.packages = scripts ++ [
] ++ [ # typesetting
(texlive.combine {
inherit (pkgs.texlive) scheme-full texdoc latex2e-help-texinfo;
pkgFilter = pkg: pkg.tlType == "run" || pkg.tlType == "bin" || pkg.pname == "latex2e-help-texinfo";
})
pandoc
(executables haskellPackages.pandoc-citeproc)
asciidoctor
] ++ [ # programming
tokei
gnumake
cabal2nix
chicken
clojure
gcc
(haskellPackages.ghcWithHoogle haskells)
(executables haskellPackages.cabal-install)
(executables haskellPackages.ghcid)
(executables haskellPackages.hakyll)
(executables haskellPackages.hasktags)
(executables haskellPackages.hindent)
(executables haskellPackages.pointfree)
(executables haskellPackages.pointful)
(executables haskellPackages.hlint)
(executables haskellPackages.hpack)
htmlTidy
iolanguage
lua
mypy
nix-prefetch-git
nodejs
nodePackages.eslint
nodePackages.csslint
nodePackages.prettier
ocaml
python3
python36Packages.black
python36Packages.flake8
ruby
rustup
scala
shellcheck
] ++ [ # media
audacity
calibre
inkscape
poppler_utils
spotify
youtubeDL
] ++ [ # cloud
dropbox-cli
grive2
seafile-client
] ++ [ # math
bc
graphviz
maxima
] ++ [ # shell
# todoist
aspell
aspellDicts.de
aspellDicts.en
aspellDicts.la
daybook
jo
jq
memo
par
qrencode
unstable.hledger
wordnet
xsv
];
}

View File

@@ -1,25 +1,72 @@
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
let retiolumKey = (import ../secrets.nix).retiolum.privateKey; with lib;
let
netname = "retiolum";
cfg = config.networking.retiolum;
in { in {
imports = [ ../modules/retiolum.nix ]; options = {
networking.retiolum.ipv4 = mkOption {
type = types.str;
description = ''
own ipv4 address
'';
};
networking.retiolum.ipv6 = mkOption {
type = types.str;
description = ''
own ipv6 address
'';
};
networking.retiolum.nodename = mkOption {
type = types.str;
default = config.networking.hostName;
description = ''
tinc network name
'';
};
};
config = {
services.tinc.networks.${netname} = {
name = cfg.nodename;
extraConfig = ''
LocalDiscovery = yes
ConnectTo = gum
ConnectTo = ni
ConnectTo = prism
ConnectTo = eve
AutoConnect = yes
'';
};
networking.hosts = { networking.extraHosts = builtins.readFile (pkgs.fetchurl {
"42:0:ca48:f98f:63d7:31ce:922b:245d" = [ "go" ]; name = "retiolum.hosts";
url = "https://lassul.us/retiolum.hosts";
# FIXME
sha256 = "0q8f5gw12hf9dhwcs4fni8jrvb2a1g6jskz28qcbd10p2xlkja58";
});
environment.systemPackages = [ config.services.tinc.networks.${netname}.package ];
systemd.services."tinc.${netname}" = {
path = with pkgs; [ curl gnutar bzip2 ];
preStart = ''
curl https://lassul.us/retiolum-hosts.tar.bz2 | tar -xjvf - -C /etc/tinc/${netname}/ || true
'';
};
networking.firewall.allowedTCPPorts = [ 655 ];
networking.firewall.allowedUDPPorts = [ 655 ];
systemd.network.enable = true;
systemd.network.networks = {
"${netname}".extraConfig = ''
[Match]
Name = tinc.${netname}
[Network]
Address=${cfg.ipv4}/12
Address=${cfg.ipv6}/16
'';
};
}; };
networking.retiolum = {
scardanelli = {
ipv4 = "10.243.2.2";
ipv6 = "42:0:3c46:4007:5bce:f1bc:606b:2b18";
};
homeros = {
ipv4 = "10.243.2.1";
ipv6 = "42:0:3c46:53e:e63d:e62a:56ea:c705";
};
}.${config.networking.hostName};
environment.etc."tinc/retiolum/rsa_key.priv" = {
text = retiolumKey.${config.networking.hostName};
mode = "400";
};
} }

View File

@@ -52,10 +52,4 @@
enableCompletion = true; enableCompletion = true;
}; };
programs.tmux = {
enable = true;
extraTmuxConf = import ../../dot/tmux.nix;
keyMode = "vi";
terminal = "screen-256color";
};
} }

View File

@@ -1,13 +0,0 @@
{ config, ... }:
{
networking.wireless = {
enable = true;
userControlled.enable = true;
networks = {
Aether = { pskRaw = "e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a"; };
EasyBox-927376 = { pskRaw = "dbd490ab69b39bd67cfa06daf70fc3ef3ee90f482972a668ed758f90f5577c22"; };
"Asoziales Netzwerk" = { pskRaw = "8e234041ec5f0cd1b6a14e9adeee9840ed51b2f18856a52137485523e46b0cb6"; };
c-base-public = {};
};
};
}

10
dot/ghci.nix Normal file
View File

@@ -0,0 +1,10 @@
{ pkgs }:
''
: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 ++ "\""
:def pl \x -> return $ ":!${pkgs.haskellPackages.pointfree}/bin/pointfree -v \"" ++ x ++ "\""
:def unpl \x -> return $ ":!${pkgs.haskellPackages.pointful}/bin/pointful \"" ++ x ++ "\""
:set prompt "\o033[1m%s\o033[1;34m λ\o033[0m "
''
# :def djinn \x -> return $ ":!echo \"" ++ x ++ "\" | ${pkgs.haskell.packages.ghc7102.djinn}/bin/djinn /dev/stdin"

View File

@@ -1,6 +1,6 @@
{ pkgs, lib, ... }: { pkgs, lib }:
let let
theme = import ../../theme.nix; theme = import ../theme.nix;
unstable = import <nixos-unstable> {}; unstable = import <nixos-unstable> {};
bingWallpaper = unstable.writers.writeBash "bing-wallpaper.sh" '' bingWallpaper = unstable.writers.writeBash "bing-wallpaper.sh" ''
PICTURE_DIR="$HOME/pictures/external/bing/" PICTURE_DIR="$HOME/pictures/external/bing/"
@@ -496,6 +496,4 @@ let
wait wait
${q-todo} ${q-todo}
''; '';
in { in lib.attrsets.attrValues scripts
users.users.kfm.packages = lib.attrsets.attrValues scripts;
}

9
dot/stack.nix Normal file
View File

@@ -0,0 +1,9 @@
{ user }:
''
templates:
params:
author-name: ${user.name}
author-email: ${user.email}
copyright: 'Copyright: (c) 2018 ${user.name}'
github-username: ${user.github}
''

3
helpers.nix Normal file
View File

@@ -0,0 +1,3 @@
{
commaSep = builtins.concatStringsSep ",";
}

View File

@@ -1,72 +0,0 @@
{ config, pkgs, lib, ... }:
with lib;
let
netname = "retiolum";
cfg = config.networking.retiolum;
in {
options = {
networking.retiolum.ipv4 = mkOption {
type = types.str;
description = ''
own ipv4 address
'';
};
networking.retiolum.ipv6 = mkOption {
type = types.str;
description = ''
own ipv6 address
'';
};
networking.retiolum.nodename = mkOption {
type = types.str;
default = config.networking.hostName;
description = ''
tinc network name
'';
};
};
config = {
services.tinc.networks.${netname} = {
name = cfg.nodename;
extraConfig = ''
LocalDiscovery = yes
ConnectTo = gum
ConnectTo = ni
ConnectTo = prism
ConnectTo = eve
AutoConnect = yes
'';
};
networking.extraHosts = builtins.readFile (pkgs.fetchurl {
name = "retiolum.hosts";
url = "https://lassul.us/retiolum.hosts";
# FIXME
sha256 = "0q8f5gw12hf9dhwcs4fni8jrvb2a1g6jskz28qcbd10p2xlkja58";
});
environment.systemPackages = [ config.services.tinc.networks.${netname}.package ];
systemd.services."tinc.${netname}" = {
path = with pkgs; [ curl gnutar bzip2 ];
preStart = ''
curl https://lassul.us/retiolum-hosts.tar.bz2 | tar -xjvf - -C /etc/tinc/${netname}/ || true
'';
};
networking.firewall.allowedTCPPorts = [ 655 ];
networking.firewall.allowedUDPPorts = [ 655 ];
systemd.network.enable = true;
systemd.network.networks = {
"${netname}".extraConfig = ''
[Match]
Name = tinc.${netname}
[Network]
Address=${cfg.ipv4}/12
Address=${cfg.ipv6}/16
'';
};
};
}

View File

@@ -1,13 +0,0 @@
{ config, pkgs, ... }:
{
imports =
[ ../regular.nix
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "homeros";
system.stateVersion = "19.03";
}

View File

@@ -1,32 +0,0 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }:
{
imports =
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
./config.nix
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" "rtsx_usb_sdmmc" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/83544ad3-1d23-4c2d-82bc-fafef13a996f";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/8F9E-7556";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/5ea3a65e-8fdb-45fb-ad32-3759d991a83a"; }
];
nix.maxJobs = lib.mkDefault 4;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
}

View File

@@ -1,82 +0,0 @@
{ config, lib, pkgs, ... }:
let
executables = pkgs.haskell.lib.justStaticExecutables;
unstable = import <nixos-unstable> {};
todoist = pkgs.callPackage ../packages/todoist {};
daybook = pkgs.callPackage ../packages/daybook.nix {};
iolanguage = pkgs.callPackage ../packages/iolanguage.nix {};
in {
imports = [
../configs/base
../configs/docker.nix
../configs/google-drive.nix
../configs/graphical.nix
../configs/haskell.nix
../configs/hu-berlin.nix
../configs/retiolum.nix
../configs/wifi.nix
];
users.users.kfm.packages = with pkgs; [
] ++ [ # typesetting
(texlive.combine {
inherit (pkgs.texlive) scheme-full texdoc latex2e-help-texinfo;
pkgFilter = pkg: pkg.tlType == "run" || pkg.tlType == "bin" || pkg.pname == "latex2e-help-texinfo";
})
pandoc
(executables haskellPackages.pandoc-citeproc)
(executables haskellPackages.hakyll)
asciidoctor
] ++ [ # programming
tokei
gnumake
cabal2nix
chicken
clojure
gcc
htmlTidy
iolanguage
lua
mypy
nix-prefetch-git
nodejs
nodePackages.eslint
nodePackages.csslint
nodePackages.prettier
ocaml
python3
python36Packages.black
python36Packages.flake8
ruby
rustup
scala
shellcheck
] ++ [ # media
audacity
calibre
inkscape
poppler_utils
spotify
youtubeDL
] ++ [ # cloud
dropbox-cli
grive2
seafile-client
] ++ [ # math
bc
graphviz
maxima
] ++ [ # shell
# todoist
aspell
aspellDicts.de
aspellDicts.en
aspellDicts.la
daybook
memo
qrencode
unstable.hledger
wordnet
xsv
];
}

View File

@@ -1,6 +0,0 @@
{ config, lib, pkgs, ... }:
{
imports = [
../configs/base
];
}