mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
MASSIVE restructuring
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1 +1,2 @@
|
||||
secrets.nix
|
||||
/secrets.nix
|
||||
/result
|
||||
|
||||
@@ -1,17 +1,12 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
helpers = import ./helpers.nix;
|
||||
in {
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
"${builtins.fetchTarball https://github.com/rycee/home-manager/archive/master.tar.gz}/nixos"
|
||||
./options.nix
|
||||
configs/hu-berlin.nix
|
||||
configs/shells.nix
|
||||
configs/editors.nix
|
||||
configs/graphics.nix
|
||||
configs/packages.nix
|
||||
configs/networks.nix
|
||||
configs/retiolum.nix
|
||||
./editors.nix
|
||||
./networks.nix
|
||||
./scripts.nix
|
||||
./shells.nix
|
||||
../../options.nix
|
||||
];
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
@@ -31,6 +26,12 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
i18n = {
|
||||
defaultLocale = "en_GB.UTF-8";
|
||||
consoleKeyMap = "de";
|
||||
# consoleColors = with import ../theme.nix; map (c: lib.strings.removePrefix "#" c) colorPalette;
|
||||
};
|
||||
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = [ pkgs.hplipWithPlugin ];
|
||||
@@ -51,31 +52,11 @@ in {
|
||||
home = "/home/kfm";
|
||||
createHome = true;
|
||||
group = "users";
|
||||
extraGroups = [ "wheel" "audio" "docker" ];
|
||||
extraGroups = [ "wheel" "audio" ];
|
||||
hashedPassword = "$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/";
|
||||
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 = {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
@@ -96,12 +77,63 @@ in {
|
||||
};
|
||||
|
||||
home.file = {
|
||||
".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; };
|
||||
".config/htop/htoprc".text = import ../../dot/htop.nix;
|
||||
".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;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
{ pkgs, config, ... }:
|
||||
with import ../helpers.nix;
|
||||
let vim_conf = ''
|
||||
" if tabular
|
||||
vmap a= :Tabularize /=<CR>
|
||||
@@ -16,7 +15,7 @@ let vim_conf = ''
|
||||
set number
|
||||
set path=$PWD/**
|
||||
set completeopt=menu,longest
|
||||
set wildmode=list:full wildignore+=${commaSep config.constants.ignore}
|
||||
set wildmode=list:full wildignore+=${builtins.concatStringsSep "," config.constants.ignore}
|
||||
set shortmess+=aI
|
||||
set nowritebackup noswapfile
|
||||
set mouse=a
|
||||
57
configs/base/networks.nix
Normal file
57
configs/base/networks.nix
Normal file
@@ -0,0 +1,57 @@
|
||||
{ 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
|
||||
];
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{ pkgs, lib }:
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
theme = import ../theme.nix;
|
||||
theme = import ../../theme.nix;
|
||||
unstable = import <nixos-unstable> {};
|
||||
bingWallpaper = unstable.writers.writeBash "bing-wallpaper.sh" ''
|
||||
PICTURE_DIR="$HOME/pictures/external/bing/"
|
||||
@@ -496,4 +496,6 @@ let
|
||||
wait
|
||||
${q-todo}
|
||||
'';
|
||||
in lib.attrsets.attrValues scripts
|
||||
in {
|
||||
users.users.kfm.packages = lib.attrsets.attrValues scripts;
|
||||
}
|
||||
@@ -52,4 +52,10 @@
|
||||
enableCompletion = true;
|
||||
};
|
||||
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
extraTmuxConf = import ../../dot/tmux.nix;
|
||||
keyMode = "vi";
|
||||
terminal = "screen-256color";
|
||||
};
|
||||
}
|
||||
5
configs/docker.nix
Normal file
5
configs/docker.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
virtualisation.docker.enable = true;
|
||||
users.users.kfm.extraGroups = [ "docker" ];
|
||||
}
|
||||
15
configs/google-drive.nix
Normal file
15
configs/google-drive.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ 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";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
services.xserver = with import ../helpers.nix; with import ../theme.nix; {
|
||||
services.xserver = let commaSep = builtins.concatStringsSep ","; in with import ../theme.nix; {
|
||||
enable = true;
|
||||
layout = commaSep [ "de" "gr" "ru" ];
|
||||
xkbVariant = commaSep [ "T3" "polytonic" "phonetic_winkeys" ];
|
||||
@@ -37,12 +37,6 @@
|
||||
}.${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 = {
|
||||
enable = true;
|
||||
shadow = true;
|
||||
@@ -63,30 +57,78 @@
|
||||
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 = {
|
||||
gtk = {
|
||||
enable = true;
|
||||
# font = with import ../theme.nix; { package = pkgs.noto-fonts; name = uiFont.name; };
|
||||
iconTheme = config.constants.theme.icon;
|
||||
theme = config.constants.theme.gtk;
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
useGtkTheme = true;
|
||||
};
|
||||
|
||||
xsession.pointerCursor = config.constants.theme.cursor // { size = 16; };
|
||||
|
||||
xsession.windowManager.i3 = {
|
||||
enable = true;
|
||||
config = import ../dot/i3.nix { inherit lib pkgs config; };
|
||||
};
|
||||
|
||||
xresources.properties = import ../dot/xresources.nix { inherit lib; };
|
||||
programs.rofi = import ../dot/rofi.nix { inherit config; };
|
||||
services.dunst = import ../dot/dunst.nix { inherit pkgs config; };
|
||||
programs.urxvt = import ../dot/urxvt.nix { inherit pkgs; };
|
||||
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;
|
||||
};
|
||||
};
|
||||
}
|
||||
36
configs/haskell.nix
Normal file
36
configs/haskell.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{ 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}
|
||||
'';
|
||||
};
|
||||
}
|
||||
15
configs/kdeconnect.nix
Normal file
15
configs/kdeconnect.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ 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;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,92 +0,0 @@
|
||||
{ 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";
|
||||
};
|
||||
}
|
||||
@@ -1,181 +0,0 @@
|
||||
{ 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
|
||||
];
|
||||
}
|
||||
@@ -1,72 +1,25 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
netname = "retiolum";
|
||||
cfg = config.networking.retiolum;
|
||||
{ config, pkgs, ... }:
|
||||
let retiolumKey = (import ../secrets.nix).retiolum.privateKey;
|
||||
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
|
||||
'';
|
||||
};
|
||||
imports = [ ../modules/retiolum.nix ];
|
||||
|
||||
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
|
||||
'';
|
||||
};
|
||||
networking.hosts = {
|
||||
"42:0:ca48:f98f:63d7:31ce:922b:245d" = [ "go" ];
|
||||
};
|
||||
|
||||
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";
|
||||
};
|
||||
}
|
||||
|
||||
13
configs/wifi.nix
Normal file
13
configs/wifi.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{ 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
10
dot/ghci.nix
@@ -1,10 +0,0 @@
|
||||
{ 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"
|
||||
@@ -1,9 +0,0 @@
|
||||
{ user }:
|
||||
''
|
||||
templates:
|
||||
params:
|
||||
author-name: ${user.name}
|
||||
author-email: ${user.email}
|
||||
copyright: 'Copyright: (c) 2018 ${user.name}'
|
||||
github-username: ${user.github}
|
||||
''
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
commaSep = builtins.concatStringsSep ",";
|
||||
}
|
||||
72
modules/retiolum.nix
Normal file
72
modules/retiolum.nix
Normal file
@@ -0,0 +1,72 @@
|
||||
{ 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
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
13
systems/homeros/config.nix
Normal file
13
systems/homeros/config.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports =
|
||||
[ ../regular.nix
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "homeros";
|
||||
|
||||
system.stateVersion = "19.03";
|
||||
}
|
||||
32
systems/homeros/physical.nix
Normal file
32
systems/homeros/physical.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
# 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";
|
||||
}
|
||||
82
systems/regular.nix
Normal file
82
systems/regular.nix
Normal file
@@ -0,0 +1,82 @@
|
||||
{ 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
|
||||
];
|
||||
}
|
||||
6
systems/slim.nix
Normal file
6
systems/slim.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../configs/base
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user