mirror of
https://github.com/kmein/niveum
synced 2026-03-22 12:51:08 +01:00
modularize
This commit is contained in:
9
configs/bash.nix
Normal file
9
configs/bash.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
programs.bash = {
|
||||||
|
promptInit = ''PS1="$(tput bold)\w \$([[ \$? == 0 ]] && echo \"\[\033[1;32m\]\" || echo \"\[\033[1;31m\]\")\$$(tput sgr0) "'';
|
||||||
|
interactiveShellInit = ''
|
||||||
|
set -o vi
|
||||||
|
'';
|
||||||
|
enableCompletion = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
12
configs/bluetooth.nix
Normal file
12
configs/bluetooth.nix
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
hardware.bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = ''
|
||||||
|
[General]
|
||||||
|
Enable=Source,Sink,Media,Socket
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = [ pkgs.blueman ];
|
||||||
|
}
|
||||||
34
configs/cloud.nix
Normal file
34
configs/cloud.nix
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
<modules/seafile.nix>
|
||||||
|
<modules/google-drive.nix>
|
||||||
|
<modules/dropbox.nix>
|
||||||
|
];
|
||||||
|
|
||||||
|
niveum.dropbox.enable = true;
|
||||||
|
|
||||||
|
niveum.seafile.enable = true;
|
||||||
|
|
||||||
|
niveum.google-drive = {
|
||||||
|
enable = true;
|
||||||
|
directory = "${config.users.users.me.home}/cloud/gdrive";
|
||||||
|
user = config.users.users.me;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.syncthing = rec {
|
||||||
|
enable = true;
|
||||||
|
# user = config.users.users.me.name;
|
||||||
|
# dataDir = "${config.users.users.me.home}/.config/syncthing";
|
||||||
|
user = "kfm";
|
||||||
|
dataDir = "/home/${user}/.config/syncthing";
|
||||||
|
openDefaultPorts = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users.me = {
|
||||||
|
services.syncthing = {
|
||||||
|
enable = true;
|
||||||
|
tray = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
8
configs/compton.nix
Normal file
8
configs/compton.nix
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
services.compton = {
|
||||||
|
enable = true;
|
||||||
|
shadow = true;
|
||||||
|
menuOpacity = "0.9";
|
||||||
|
shadowOpacity = "0.3";
|
||||||
|
};
|
||||||
|
}
|
||||||
368
configs/default.nix
Normal file
368
configs/default.nix
Normal file
@@ -0,0 +1,368 @@
|
|||||||
|
{ pkgs, lib, config, ... }:
|
||||||
|
let
|
||||||
|
theme = import <dot/theme.nix>;
|
||||||
|
unstable = import <nixos-unstable> {};
|
||||||
|
in {
|
||||||
|
imports = [
|
||||||
|
<modules/constants.nix>
|
||||||
|
{
|
||||||
|
services.dbus.packages = [ pkgs.gnome3.dconf ];
|
||||||
|
}
|
||||||
|
<home-manager/nixos>
|
||||||
|
<configs/bash.nix>
|
||||||
|
<configs/cloud.nix>
|
||||||
|
<configs/compton.nix>
|
||||||
|
<configs/docker.nix>
|
||||||
|
<configs/vscode.nix>
|
||||||
|
<configs/htop.nix>
|
||||||
|
<configs/dunst.nix>
|
||||||
|
<configs/python.nix>
|
||||||
|
<configs/haskell.nix>
|
||||||
|
<configs/hu-berlin.nix>
|
||||||
|
<configs/i3.nix>
|
||||||
|
<configs/mpv.nix>
|
||||||
|
<configs/kdeconnect.nix>
|
||||||
|
<configs/git.nix>
|
||||||
|
<configs/keyboard.nix>
|
||||||
|
<configs/nano.nix>
|
||||||
|
<configs/neovim.nix>
|
||||||
|
<configs/printing.nix>
|
||||||
|
<configs/redshift.nix>
|
||||||
|
<configs/retiolum.nix>
|
||||||
|
<configs/rofi.nix>
|
||||||
|
<configs/ssh.nix>
|
||||||
|
<configs/unclutter.nix>
|
||||||
|
<configs/urxvt.nix>
|
||||||
|
<configs/xautolock.nix>
|
||||||
|
<configs/xresources.nix>
|
||||||
|
<configs/zsh.nix>
|
||||||
|
<configs/bluetooth.nix>
|
||||||
|
<configs/theming.nix>
|
||||||
|
<configs/tmux.nix>
|
||||||
|
{
|
||||||
|
niveum.user = {
|
||||||
|
github = "kmein";
|
||||||
|
email = "kieran.meinhardt@gmail.com";
|
||||||
|
name = "Kierán Meinhardt";
|
||||||
|
};
|
||||||
|
|
||||||
|
niveum.applications = rec {
|
||||||
|
terminal = "${pkgs.rxvt_unicode-with-plugins}/bin/urxvtc";
|
||||||
|
browser = "${pkgs.chromium}/bin/chromium";
|
||||||
|
fileManager = "${terminal} -e ${pkgs.ranger}/bin/ranger";
|
||||||
|
};
|
||||||
|
|
||||||
|
niveum.theme = {
|
||||||
|
gtk = { name = "Arc"; package = pkgs.arc-theme; };
|
||||||
|
icon = { name = "Arc"; package = pkgs.arc-icon-theme; };
|
||||||
|
cursor = { name = "capitaine-cursors"; package = pkgs.capitaine-cursors; };
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
nixpkgs.overlays = [ (import <nix-writers/pkgs>) ];
|
||||||
|
nixpkgs.config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
packageOverrides = pkgs: {
|
||||||
|
autorenkalender = pkgs.callPackage <packages/autorenkalender.nix> {};
|
||||||
|
bvg = pkgs.callPackage <packages/bvg.nix> {};
|
||||||
|
daybook = pkgs.callPackage <packages/daybook.nix> {};
|
||||||
|
font-size = pkgs.callPackage <packages/font-size.nix> { font = theme.terminalFont; };
|
||||||
|
genius = pkgs.callPackage <packages/genius.nix> {};
|
||||||
|
instaget = pkgs.callPackage <packages/instaget.nix> {};
|
||||||
|
instaloader = pkgs.python3Packages.callPackage <packages/instaloader.nix> {};
|
||||||
|
iolanguage = pkgs.callPackage <packages/iolanguage.nix> {};
|
||||||
|
literature-quote = pkgs.callPackage <packages/literature-quote.nix> {};
|
||||||
|
nix-git = pkgs.callPackage <packages/nix-git.nix> {};
|
||||||
|
sncli = pkgs.python3Packages.callPackage <packages/sncli.nix> {};
|
||||||
|
spotify-cli-linux = pkgs.python3Packages.callPackage <packages/spotify-cli-linux.nix> {};
|
||||||
|
todoist = pkgs.callPackage <packages/todoist> {};
|
||||||
|
wttr = pkgs.callPackage <packages/wttr.nix> {};
|
||||||
|
n = pkgs.callPackage <packages/n.nix> {};
|
||||||
|
|
||||||
|
dic = pkgs.callPackage <stockholm/krebs/5pkgs/simple/dic> {};
|
||||||
|
yt-next = pkgs.callPackage <stockholm/lass/5pkgs/yt-next> {};
|
||||||
|
acronym = pkgs.callPackage <stockholm/lass/5pkgs/acronym> {};
|
||||||
|
urban = pkgs.callPackage <stockholm/lass/5pkgs/urban> {};
|
||||||
|
mpv-poll = pkgs.callPackage <stockholm/lass/5pkgs/mpv-poll> {};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
boot.cleanTmpDir = true;
|
||||||
|
boot.loader.timeout = 1;
|
||||||
|
boot.extraModulePackages = [ config.boot.kernelPackages.exfat-nofuse ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
time.timeZone = "Europe/Berlin";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
security.sudo = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = ''
|
||||||
|
Defaults pwfeedback
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
home-manager.users.me = {
|
||||||
|
services.random-background = {
|
||||||
|
enable = true;
|
||||||
|
imageDirectory = toString <art>;
|
||||||
|
interval = "2h";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
home-manager.users.me = {
|
||||||
|
programs.zathura = {
|
||||||
|
enable = true;
|
||||||
|
options.selection-clipboard = "clipboard";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
users.mutableUsers = false;
|
||||||
|
|
||||||
|
users.users.me = {
|
||||||
|
name = "kfm";
|
||||||
|
description = "Kierán Meinhardt";
|
||||||
|
home = "/home/kfm";
|
||||||
|
createHome = true;
|
||||||
|
group = "users";
|
||||||
|
extraGroups = [ "wheel" ];
|
||||||
|
hashedPassword = "$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/";
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
sound.enable = true;
|
||||||
|
|
||||||
|
hardware.pulseaudio = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.pulseaudioFull; # for bluetooth sound output
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users.me.extraGroups = [ "audio" ];
|
||||||
|
|
||||||
|
environment.systemPackages = [ pkgs.pavucontrol pkgs.pamixer ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
environment.interactiveShellInit = "export PATH=$PATH:$HOME/.local/bin:$HOME/.cargo/bin";
|
||||||
|
environment.shellAliases = {
|
||||||
|
clipboard = "${pkgs.xclip}/bin/xclip -se c";
|
||||||
|
o = "${pkgs.xdg_utils}/bin/xdg-open";
|
||||||
|
tmux = "${pkgs.tmux}/bin/tmux -2";
|
||||||
|
ip = "${pkgs.iproute}/bin/ip -c";
|
||||||
|
ns = "nix-shell --run zsh";
|
||||||
|
nixi = ''nix repl "<nixpkgs>"'';
|
||||||
|
grep = "grep --color=auto";
|
||||||
|
rm = "rm -i";
|
||||||
|
cp = "cp -i";
|
||||||
|
mv = "mv -i";
|
||||||
|
l = "${pkgs.exa}/bin/exa -a";
|
||||||
|
ls = "${pkgs.exa}/bin/exa";
|
||||||
|
ll = "${pkgs.exa}/bin/exa -l";
|
||||||
|
la = "${pkgs.exa}/bin/exa -la";
|
||||||
|
niveum-update = "nix-prefetch-git --url https://github.com/NixOS/nixpkgs-channels --rev refs/heads/nixos-18.09 > ~niveum/nixpkgs.json";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
networking.wireless = {
|
||||||
|
enable = true;
|
||||||
|
userControlled.enable = true;
|
||||||
|
networks = {
|
||||||
|
Aether.pskRaw = "e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a";
|
||||||
|
EasyBox-927376.pskRaw = "dbd490ab69b39bd67cfa06daf70fc3ef3ee90f482972a668ed758f90f5577c22";
|
||||||
|
"Asoziales Netzwerk".pskRaw = "8e234041ec5f0cd1b6a14e9adeee9840ed51b2f18856a52137485523e46b0cb6";
|
||||||
|
c-base-public = {};
|
||||||
|
security-by-obscurity.psk = "44629828256481964386";
|
||||||
|
discord.psk = "baraustrinken";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = [ pkgs.wpa_supplicant_gui ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
networking.hosts = {
|
||||||
|
"192.168.178.1" = [ "fritz.box" ];
|
||||||
|
"192.168.178.21" = [ "scardanelli" ];
|
||||||
|
"192.168.178.22" = [ "homeros" ];
|
||||||
|
"192.168.178.24" = [ "catullus" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
i18n.defaultLocale = "en_GB.UTF-8";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
services.illum.enable = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
displayManager.lightdm.greeters.gtk = {
|
||||||
|
enable = true;
|
||||||
|
indicators = [ "~spacer" "~host" "~spacer" "~session" "~power" ];
|
||||||
|
};
|
||||||
|
desktopManager.xterm.enable = false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
fonts = {
|
||||||
|
enableDefaultFonts = true;
|
||||||
|
fonts = with pkgs; [ corefonts eb-garamond fira libertine lmodern noto-fonts roboto ubuntu_font_family ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
security.wrappers = {
|
||||||
|
pmount.source = "${pkgs.pmount}/bin/pmount";
|
||||||
|
pumount.source = "${pkgs.pmount}/bin/pumount";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
programs.command-not-found.enable = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
programs.java = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.openjdk;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
home-manager.users.me = {
|
||||||
|
programs.browserpass.enable = true;
|
||||||
|
programs.chromium = {
|
||||||
|
enable = true;
|
||||||
|
extensions = [
|
||||||
|
"gighmmpiobklfepjocnamgkkbiglidom" # AdBlock
|
||||||
|
"hdokiejnpimakedhajhdlcegeplioahd" # LastPass
|
||||||
|
"jldhpllghnbhlbpcmnajkpdmadaolakh" # Todoist
|
||||||
|
"dbepggeogbaibhgnhhndojpepiihcmeb" # Vimium
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
] ++ [ # office
|
||||||
|
libreoffice
|
||||||
|
] ++ [ # internet
|
||||||
|
aria2
|
||||||
|
chromium
|
||||||
|
firefox
|
||||||
|
tor-browser-bundle-bin
|
||||||
|
thunderbird
|
||||||
|
tdesktop
|
||||||
|
w3m
|
||||||
|
wget
|
||||||
|
httpie
|
||||||
|
whois
|
||||||
|
ddgr
|
||||||
|
instaloader
|
||||||
|
] ++ [ # media
|
||||||
|
ffmpeg
|
||||||
|
imagemagick
|
||||||
|
sxiv
|
||||||
|
] ++ [ # archive
|
||||||
|
unzip
|
||||||
|
unrar
|
||||||
|
p7zip
|
||||||
|
zip
|
||||||
|
] ++ [ # monitor
|
||||||
|
htop
|
||||||
|
iotop
|
||||||
|
iftop
|
||||||
|
lsof
|
||||||
|
psmisc
|
||||||
|
] ++ [ # shell
|
||||||
|
bat
|
||||||
|
dos2unix
|
||||||
|
du-dust
|
||||||
|
fd
|
||||||
|
file
|
||||||
|
jq
|
||||||
|
manpages
|
||||||
|
moreutils
|
||||||
|
posix_man_pages
|
||||||
|
ranger
|
||||||
|
ripgrep
|
||||||
|
rlwrap
|
||||||
|
tree
|
||||||
|
] ++ [ # hardware
|
||||||
|
usbutils
|
||||||
|
pciutils
|
||||||
|
] ++ [ # graphical
|
||||||
|
arandr
|
||||||
|
libnotify
|
||||||
|
xclip
|
||||||
|
xorg.xkill
|
||||||
|
] ++ [ # 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
|
||||||
|
haskellPackages.pandoc-citeproc
|
||||||
|
haskellPackages.patat
|
||||||
|
asciidoctor
|
||||||
|
proselint
|
||||||
|
] ++ [ # programming
|
||||||
|
tokei
|
||||||
|
gnumake
|
||||||
|
gcc
|
||||||
|
binutils-unwrapped
|
||||||
|
htmlTidy
|
||||||
|
iolanguage
|
||||||
|
nix-prefetch-git
|
||||||
|
nodePackages.csslint
|
||||||
|
nodePackages.prettier
|
||||||
|
nodePackages.jsonlint
|
||||||
|
ruby
|
||||||
|
rubocop
|
||||||
|
rustup
|
||||||
|
shellcheck
|
||||||
|
] ++ [ # media
|
||||||
|
audacity
|
||||||
|
calibre
|
||||||
|
inkscape
|
||||||
|
xpdf
|
||||||
|
pdfgrep
|
||||||
|
pdftk
|
||||||
|
spotify
|
||||||
|
spotify-cli-linux
|
||||||
|
youtubeDL
|
||||||
|
] ++ [ # math
|
||||||
|
bc
|
||||||
|
] ++ [ # shell
|
||||||
|
# todoist
|
||||||
|
(aspellWithDicts (dict: [dict.de dict.en dict.la]))
|
||||||
|
bvg
|
||||||
|
autorenkalender
|
||||||
|
literature-quote
|
||||||
|
dic
|
||||||
|
yt-next
|
||||||
|
acronym
|
||||||
|
urban
|
||||||
|
daybook
|
||||||
|
gnupg
|
||||||
|
jo
|
||||||
|
memo
|
||||||
|
par
|
||||||
|
fzf
|
||||||
|
(pass.withExtensions (ext: [ext.pass-otp]))
|
||||||
|
qrencode
|
||||||
|
sncli
|
||||||
|
tmuxp
|
||||||
|
unstable.hledger
|
||||||
|
unstable.hledger-web
|
||||||
|
unstable.zola
|
||||||
|
wordnet
|
||||||
|
xsv
|
||||||
|
wttr
|
||||||
|
instaget
|
||||||
|
genius
|
||||||
|
nix-git
|
||||||
|
n
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
4
configs/docker.nix
Normal file
4
configs/docker.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
virtualisation.docker.enable = true;
|
||||||
|
users.users.me.extraGroups = [ "docker" ];
|
||||||
|
}
|
||||||
62
configs/dunst.nix
Normal file
62
configs/dunst.nix
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
let theme = import <dot/theme.nix>;
|
||||||
|
in {
|
||||||
|
home-manager.users.me.services.dunst = {
|
||||||
|
enable = true;
|
||||||
|
iconTheme = config.niveum.theme.icon;
|
||||||
|
settings = {
|
||||||
|
global = {
|
||||||
|
transparency = 10;
|
||||||
|
font = "${theme.terminalFont.name} ${toString theme.terminalFont.size}";
|
||||||
|
geometry = "200x5-30+20";
|
||||||
|
frame_color = theme.invertedColorScheme.background;
|
||||||
|
follow = "mouse";
|
||||||
|
indicate_hidden = true;
|
||||||
|
notification_height = 0;
|
||||||
|
separator_height = 2;
|
||||||
|
padding = 8;
|
||||||
|
horizontal_padding = 8;
|
||||||
|
separator_color = "auto";
|
||||||
|
sort = true;
|
||||||
|
markup = "full";
|
||||||
|
format = ''%a\n<b>%s</b>\n%b'';
|
||||||
|
alignment = "left";
|
||||||
|
show_age_threshold = 60;
|
||||||
|
bounce_freq = 0;
|
||||||
|
word_wrap = true;
|
||||||
|
ellipsize = "middle";
|
||||||
|
ignore_newline = false;
|
||||||
|
stack_duplicates = true;
|
||||||
|
hide_duplicate_count = false;
|
||||||
|
max_icon_size = 32;
|
||||||
|
sticky_history = true;
|
||||||
|
history_length = 20;
|
||||||
|
dmenu = "${pkgs.rofi}/bin/rofi -display-run dunst -show run";
|
||||||
|
browser = config.niveum.applications.browser;
|
||||||
|
verbosity = "mesg";
|
||||||
|
corner_radius = 0;
|
||||||
|
mouse_left_click = "do_action";
|
||||||
|
mouse_right_click = "close_current";
|
||||||
|
mouse_middle_click = "close_all";
|
||||||
|
};
|
||||||
|
urgency_low = {
|
||||||
|
frame_color = theme.invertedColorScheme.background;
|
||||||
|
background = theme.invertedColorScheme.background;
|
||||||
|
foreground = theme.invertedColorScheme.foreground;
|
||||||
|
timeout = 5;
|
||||||
|
};
|
||||||
|
urgency_normal = {
|
||||||
|
frame_color = theme.invertedColorScheme.background;
|
||||||
|
background = theme.invertedColorScheme.background;
|
||||||
|
foreground = theme.invertedColorScheme.foreground;
|
||||||
|
timeout = 10;
|
||||||
|
};
|
||||||
|
urgency_critical = {
|
||||||
|
frame_color = theme.invertedColorScheme.red.dark;
|
||||||
|
background = theme.invertedColorScheme.red.dark;
|
||||||
|
foreground = theme.invertedColorScheme.foreground;
|
||||||
|
timeout = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
31
configs/git.nix
Normal file
31
configs/git.nix
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
{ pkgs, config, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.git
|
||||||
|
pkgs.gitAndTools.hub
|
||||||
|
pkgs.gitAndTools.git-extras
|
||||||
|
pkgs.gitstats
|
||||||
|
pkgs.patch
|
||||||
|
pkgs.patchutils
|
||||||
|
];
|
||||||
|
|
||||||
|
home-manager.users.me.programs.git = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.gitAndTools.gitFull;
|
||||||
|
userName = config.niveum.user.name;
|
||||||
|
userEmail = config.niveum.user.email;
|
||||||
|
aliases = {
|
||||||
|
br = "branch";
|
||||||
|
co = "checkout";
|
||||||
|
ci = "commit";
|
||||||
|
cm = "commit -m";
|
||||||
|
amend = "commit --amend";
|
||||||
|
st = "status";
|
||||||
|
unstage = "reset HEAD --";
|
||||||
|
diffs = "diff --staged";
|
||||||
|
last = "log -1 HEAD";
|
||||||
|
logs = "log --pretty=oneline";
|
||||||
|
};
|
||||||
|
ignores = config.niveum.ignore;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,94 +0,0 @@
|
|||||||
{ pkgs, lib, config, ... }:
|
|
||||||
{
|
|
||||||
services.xserver = with import <lib>; with import <dot/theme.nix>; {
|
|
||||||
enable = true;
|
|
||||||
layout = commaSep [ "de" "gr" "ru" ];
|
|
||||||
xkbVariant = commaSep [ "T3" "polytonic" "phonetic_winkeys" ];
|
|
||||||
xkbOptions = commaSep [ "compose:caps" "terminate:ctrl_alt_bksp" "grp:ctrls_toggle" ];
|
|
||||||
libinput = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
xautolock = {
|
|
||||||
enable = true;
|
|
||||||
killer = "${pkgs.systemd}/bin/systemctl suspend";
|
|
||||||
locker = config.defaultApplications.locker;
|
|
||||||
nowlocker = config.defaultApplications.locker;
|
|
||||||
enableNotifier = true;
|
|
||||||
notifier = ''${pkgs.libnotify}/bin/notify-send -u normal -a xautolock "Locking soon" "The screen will lock in 10 seconds."'';
|
|
||||||
};
|
|
||||||
displayManager.sessionCommands = ''
|
|
||||||
${pkgs.feh}/bin/feh --bg-fill $(find ${<art>} -type f | shuf -n 1) &
|
|
||||||
${pkgs.dropbox-cli}/bin/dropbox start &
|
|
||||||
${pkgs.seafile-client}/bin/seafile-applet &
|
|
||||||
${pkgs.systemd}/bin/systemctl --user import-environment XDG_SESSION_PATH
|
|
||||||
${pkgs.lightlocker}/bin/light-locker &
|
|
||||||
${pkgs.openssh}/bin/ssh-add
|
|
||||||
'';
|
|
||||||
displayManager.lightdm.greeters.gtk = {
|
|
||||||
enable = true;
|
|
||||||
theme = { name = config.constants.theme.gtk.name; package = config.constants.theme.gtk.package; };
|
|
||||||
iconTheme = { name = config.constants.theme.icon.name; package = config.constants.theme.icon.package; };
|
|
||||||
indicators = [ "~spacer" "~host" "~spacer" "~session" "~power" ];
|
|
||||||
};
|
|
||||||
desktopManager.xterm.enable = false;
|
|
||||||
desktopManager.xfce.enable = true;
|
|
||||||
windowManager.default = "i3";
|
|
||||||
windowManager.i3.enable = true;
|
|
||||||
xrandrHeads = {
|
|
||||||
homeros = [ "LVDS1" { output = "HDMI1"; primary = true; } ];
|
|
||||||
scardanelli = [ "eDP1" ];
|
|
||||||
}.${config.networking.hostName};
|
|
||||||
};
|
|
||||||
|
|
||||||
i18n = {
|
|
||||||
defaultLocale = "en_GB.UTF-8";
|
|
||||||
consoleKeyMap = "de";
|
|
||||||
consoleColors = with import <dot/theme.nix>; map (c: lib.strings.removePrefix "#" c) colorPalette;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.compton = {
|
|
||||||
enable = true;
|
|
||||||
shadow = true;
|
|
||||||
menuOpacity = "0.9";
|
|
||||||
shadowOpacity = "0.3";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.redshift = {
|
|
||||||
enable = true;
|
|
||||||
latitude = "52";
|
|
||||||
longitude = "13";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.illum.enable = true;
|
|
||||||
|
|
||||||
services.unclutter = {
|
|
||||||
enable = true;
|
|
||||||
timeout = 10;
|
|
||||||
};
|
|
||||||
|
|
||||||
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 config; };
|
|
||||||
};
|
|
||||||
}
|
|
||||||
40
configs/haskell.nix
Normal file
40
configs/haskell.nix
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{ 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 ++ "\""
|
||||||
|
: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 "
|
||||||
|
:set -Wall
|
||||||
|
'';
|
||||||
|
".stack/config.yaml".text = let user = config.niveum.user; in ''
|
||||||
|
templates:
|
||||||
|
params:
|
||||||
|
author-name: ${user.name}
|
||||||
|
author-email: ${user.email}
|
||||||
|
copyright: 'Copyright: (c) 2019 ${user.name}'
|
||||||
|
github-username: ${user.github}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
cabal2nix
|
||||||
|
stack2nix
|
||||||
|
cabal-install
|
||||||
|
hlint
|
||||||
|
(haskellPackages.ghcWithHoogle (import <dot/haskells.nix>))
|
||||||
|
] ++ map haskell.lib.justStaticExecutables [
|
||||||
|
haskellPackages.ghcid
|
||||||
|
haskellPackages.hakyll
|
||||||
|
haskellPackages.brittany
|
||||||
|
haskellPackages.hfmt
|
||||||
|
haskellPackages.hasktags
|
||||||
|
haskellPackages.hindent
|
||||||
|
haskellPackages.pointfree
|
||||||
|
haskellPackages.pointful
|
||||||
|
haskellPackages.hpack
|
||||||
|
];
|
||||||
|
}
|
||||||
35
configs/htop.nix
Normal file
35
configs/htop.nix
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
home-manager.users.me = {
|
||||||
|
programs.htop = {
|
||||||
|
enable = true;
|
||||||
|
colorScheme = 0;
|
||||||
|
accountGuestInCpuMeter = true;
|
||||||
|
cpuCountFromZero = false;
|
||||||
|
delay = 15;
|
||||||
|
detailedCpuTime = false;
|
||||||
|
headerMargin = true;
|
||||||
|
hideKernelThreads = true;
|
||||||
|
hideThreads = false;
|
||||||
|
hideUserlandThreads = false;
|
||||||
|
highlightBaseName = true;
|
||||||
|
highlightMegabytes = true;
|
||||||
|
highlightThreads = true;
|
||||||
|
shadowOtherUsers = true;
|
||||||
|
showProgramPath = false;
|
||||||
|
showThreadNames = true;
|
||||||
|
sortDescending = true;
|
||||||
|
sortKey = "PERCENT_CPU";
|
||||||
|
treeView = true;
|
||||||
|
updateProcessNames = false;
|
||||||
|
meters = {
|
||||||
|
left = [
|
||||||
|
{ kind = "LeftCPUs2"; mode = 1; }
|
||||||
|
{ kind = "RightCPUs2"; mode = 1; }
|
||||||
|
{ kind = "Memory"; mode = 1; }
|
||||||
|
{ kind = "Swap"; mode = 1; }
|
||||||
|
];
|
||||||
|
right = [ "Uptime" "Tasks" "LoadAverage" "Battery" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
175
configs/i3.nix
Normal file
175
configs/i3.nix
Normal file
@@ -0,0 +1,175 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
theme = import <dot/theme.nix>;
|
||||||
|
new-workspace = pkgs.writeDash "new-workspace" ''
|
||||||
|
i3-msg workspace $(($(i3-msg -t get_workspaces | tr , '\n' | grep '"num":' | cut -d : -f 2 | sort -rn | head -1) + 1))
|
||||||
|
'';
|
||||||
|
move-to-new-workspace = pkgs.writeDash "new-workspace" ''
|
||||||
|
i3-msg move container to workspace $(($(i3-msg -t get_workspaces | tr , '\n' | grep '"num":' | cut -d : -f 2 | sort -rn | head -1) + 1))
|
||||||
|
'';
|
||||||
|
wifi-interface = { scardanelli = "wlp2s0"; homeros = "wlp3s0"; }.${config.networking.hostName};
|
||||||
|
in {
|
||||||
|
services.xserver = {
|
||||||
|
windowManager.default = "i3";
|
||||||
|
windowManager.i3.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users.me.xsession.windowManager.i3 = {
|
||||||
|
enable = true;
|
||||||
|
config = rec {
|
||||||
|
fonts = [ "${theme.uiFont.name} ${toString theme.uiFont.size}" ];
|
||||||
|
modifier = "Mod4";
|
||||||
|
window = {
|
||||||
|
titlebar = false;
|
||||||
|
border = 1;
|
||||||
|
hideEdgeBorders = "smart";
|
||||||
|
};
|
||||||
|
floating = {
|
||||||
|
titlebar = false;
|
||||||
|
border = 1;
|
||||||
|
};
|
||||||
|
colors =
|
||||||
|
let scheme = { background = theme.colorScheme.background; text = theme.colorScheme.foreground; };
|
||||||
|
in {
|
||||||
|
focused = scheme // {
|
||||||
|
border = theme.colorScheme.background;
|
||||||
|
indicator = theme.colorScheme.background;
|
||||||
|
childBorder = theme.colorScheme.background;
|
||||||
|
};
|
||||||
|
focusedInactive = scheme // {
|
||||||
|
border = theme.colorScheme.background;
|
||||||
|
indicator = theme.colorScheme.background;
|
||||||
|
childBorder = theme.colorScheme.background;
|
||||||
|
};
|
||||||
|
unfocused = scheme // {
|
||||||
|
border = theme.colorScheme.background;
|
||||||
|
indicator = theme.colorScheme.background;
|
||||||
|
childBorder = theme.colorScheme.background;
|
||||||
|
};
|
||||||
|
urgent = scheme // {
|
||||||
|
border = theme.colorScheme.red.light;
|
||||||
|
indicator = theme.colorScheme.red.light;
|
||||||
|
childBorder = theme.colorScheme.red.light;
|
||||||
|
};
|
||||||
|
placeholder = scheme // {
|
||||||
|
border = theme.colorScheme.green.light;
|
||||||
|
indicator = theme.colorScheme.green.light;
|
||||||
|
childBorder = theme.colorScheme.green.light;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
bars = [{
|
||||||
|
workspaceButtons = false;
|
||||||
|
fonts = [ "${theme.terminalFont.name} ${toString theme.terminalFont.size}" ];
|
||||||
|
mode = "hide";
|
||||||
|
colors = {
|
||||||
|
background = theme.colorScheme.background;
|
||||||
|
separator = theme.colorScheme.background;
|
||||||
|
statusline = theme.colorScheme.foreground;
|
||||||
|
bindingMode = {
|
||||||
|
background = theme.colorScheme.red.light;
|
||||||
|
border = theme.colorScheme.background;
|
||||||
|
text = theme.colorScheme.foreground;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
statusCommand = "${pkgs.i3status}/bin/i3status -c ${pkgs.writeText "i3status.conf" ''
|
||||||
|
general {
|
||||||
|
colors = true
|
||||||
|
color_good = "${theme.colorScheme.green.dark}"
|
||||||
|
color_bad = "${theme.colorScheme.red.dark}"
|
||||||
|
color_degraded = "${theme.colorScheme.black.light}"
|
||||||
|
interval = 5
|
||||||
|
separator = " "
|
||||||
|
}
|
||||||
|
|
||||||
|
order += "run_watch retiolum"
|
||||||
|
order += "path_exists openvpn"
|
||||||
|
order += "wireless ${wifi-interface}"
|
||||||
|
order += "battery all"
|
||||||
|
order += "volume master"
|
||||||
|
order += "load"
|
||||||
|
order += "tztime local"
|
||||||
|
|
||||||
|
wireless ${wifi-interface} {
|
||||||
|
format_up = "%essid"
|
||||||
|
format_down = "offline"
|
||||||
|
}
|
||||||
|
|
||||||
|
run_watch retiolum {
|
||||||
|
pidfile = "/var/run/tinc.retiolum.pid"
|
||||||
|
format = "%title"
|
||||||
|
}
|
||||||
|
|
||||||
|
path_exists openvpn {
|
||||||
|
path = "/proc/sys/net/ipv4/conf/tun0"
|
||||||
|
format = "%title"
|
||||||
|
}
|
||||||
|
|
||||||
|
battery all {
|
||||||
|
format = "%status%percentage"
|
||||||
|
format_down = "No battery"
|
||||||
|
status_chr = "↑"
|
||||||
|
status_bat = "↓"
|
||||||
|
status_unk = ""
|
||||||
|
status_full = "↯"
|
||||||
|
path = "/sys/class/power_supply/BAT%d/uevent"
|
||||||
|
low_threshold = 15
|
||||||
|
threshold_type = "percentage"
|
||||||
|
integer_battery_capacity = true
|
||||||
|
}
|
||||||
|
|
||||||
|
volume master {
|
||||||
|
format = "%volume"
|
||||||
|
format_muted = "%volume"
|
||||||
|
device = "default"
|
||||||
|
mixer = "Master"
|
||||||
|
mixer_idx = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
tztime local {
|
||||||
|
format = "%Y-%m-%d %H:%M"
|
||||||
|
}
|
||||||
|
|
||||||
|
load {
|
||||||
|
format = "%1min"
|
||||||
|
}''}";
|
||||||
|
}];
|
||||||
|
keybindings = {
|
||||||
|
"${modifier}+Down" = "focus down";
|
||||||
|
"${modifier}+Left" = "focus left";
|
||||||
|
"${modifier}+Return" = "exec ${config.niveum.applications.terminal}";
|
||||||
|
"${modifier}+Right" = "focus right";
|
||||||
|
"${modifier}+Shift+Down" = "move down";
|
||||||
|
"${modifier}+Shift+Left" = "move left";
|
||||||
|
"${modifier}+Shift+Right" = "move right";
|
||||||
|
"${modifier}+Shift+Up" = "move up";
|
||||||
|
"${modifier}+Shift+c" = "reload";
|
||||||
|
"${modifier}+Shift+n" = "move window to workspace next";
|
||||||
|
"${modifier}+Shift+b" = "move window to workspace prev";
|
||||||
|
"${modifier}+Shift+q" = "kill";
|
||||||
|
"${modifier}+Shift+r" = "restart";
|
||||||
|
"${modifier}+Shift+w" = "exec ${pkgs.xautolock}/bin/xautolock -locknow";
|
||||||
|
"${modifier}+Shift+x" = "exec --no-startup-id ${move-to-new-workspace}";
|
||||||
|
"${modifier}+Shift+z" = "floating toggle";
|
||||||
|
"${modifier}+Up" = "focus up";
|
||||||
|
"${modifier}+a" = "exec ${pkgs.rofi}/bin/rofi -display-window — -show window";
|
||||||
|
"${modifier}+d" = "exec ${pkgs.rofi}/bin/rofi -display-run — -show run";
|
||||||
|
"${modifier}+e" = "layout toggle split";
|
||||||
|
"${modifier}+f" = "fullscreen toggle";
|
||||||
|
"${modifier}+h" = "split h";
|
||||||
|
"${modifier}+n" = "workspace next";
|
||||||
|
"${modifier}+b" = "workspace prev";
|
||||||
|
"${modifier}+p" = "exec ${pkgs.rofi-pass}/bin/rofi-pass";
|
||||||
|
"${modifier}+r" = "mode resize";
|
||||||
|
"${modifier}+s" = "layout stacking";
|
||||||
|
"${modifier}+t" = "exec ${config.niveum.applications.fileManager}";
|
||||||
|
"${modifier}+v" = "split v";
|
||||||
|
"${modifier}+w" = "layout tabbed";
|
||||||
|
"${modifier}+x" = "exec --no-startup-id ${new-workspace}";
|
||||||
|
"${modifier}+y" = "exec ${config.niveum.applications.browser}";
|
||||||
|
"XF86AudioLowerVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -d 5 && pkill -RTMIN+3 i3blocks";
|
||||||
|
"XF86AudioMute" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -t && pkill -RTMIN+3 i3blocks";
|
||||||
|
"XF86AudioRaiseVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5 && pkill -RTMIN+3 i3blocks";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
13
configs/kdeconnect.nix
Normal file
13
configs/kdeconnect.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
networking.firewall = {
|
||||||
|
allowedTCPPortRanges = [ { from = 1714; to = 1764; } ];
|
||||||
|
allowedUDPPortRanges = [ { from = 1714; to = 1764; } ];
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users.me = {
|
||||||
|
services.kdeconnect = {
|
||||||
|
enable = true;
|
||||||
|
indicator = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
11
configs/keyboard.nix
Normal file
11
configs/keyboard.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
with import <lib>;
|
||||||
|
{
|
||||||
|
services.xserver = {
|
||||||
|
layout = commaSep [ "de" "gr" "ru" ];
|
||||||
|
xkbVariant = commaSep [ "T3" "polytonic" "phonetic_winkeys" ];
|
||||||
|
xkbOptions = commaSep [ "compose:caps" "terminate:ctrl_alt_bksp" "grp:ctrls_toggle" ];
|
||||||
|
libinput.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
i18n.consoleKeyMap = "de";
|
||||||
|
}
|
||||||
17
configs/mpv.nix
Normal file
17
configs/mpv.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = [ pkgs.mpv pkgs.mpv-poll ];
|
||||||
|
|
||||||
|
home-manager.users.me.xdg.configFile = {
|
||||||
|
"mpv/input.conf".text = ''
|
||||||
|
Alt+RIGHT add video-rotate 90
|
||||||
|
Alt+LEFT add video-rotate -90
|
||||||
|
Alt+- add video-zoom -0.25
|
||||||
|
Alt+= add video-zoom 0.25
|
||||||
|
Alt+l add video-pan-x -0.05
|
||||||
|
Alt+h add video-pan-x 0.05
|
||||||
|
Alt+k add video-pan-y 0.05
|
||||||
|
Alt+j add video-pan-y -0.05
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
10
configs/nano.nix
Normal file
10
configs/nano.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
programs.nano.nanorc = ''
|
||||||
|
set autoindent
|
||||||
|
set boldtext
|
||||||
|
set morespace
|
||||||
|
set smarthome
|
||||||
|
set tabsize 4
|
||||||
|
set tabstospaces
|
||||||
|
'';
|
||||||
|
}
|
||||||
@@ -1,23 +1,12 @@
|
|||||||
{ pkgs, config, ... }:
|
{ pkgs, ... }:
|
||||||
let vimConfig = import <dot/vim.nix> { inherit config pkgs; };
|
{
|
||||||
in {
|
|
||||||
programs.nano.nanorc = ''
|
|
||||||
set autoindent
|
|
||||||
set boldtext
|
|
||||||
set morespace
|
|
||||||
set smarthome
|
|
||||||
set tabsize 4
|
|
||||||
set tabstospaces
|
|
||||||
'';
|
|
||||||
|
|
||||||
environment.variables.EDITOR = pkgs.lib.mkForce "nvim";
|
environment.variables.EDITOR = pkgs.lib.mkForce "nvim";
|
||||||
environment.shellAliases.vi = "nvim";
|
environment.shellAliases.vi = "nvim";
|
||||||
environment.shellAliases.vim = "nvim";
|
environment.shellAliases.vim = "nvim";
|
||||||
environment.shellAliases.view = "nvim -R";
|
environment.shellAliases.view = "nvim -R";
|
||||||
environment.systemPackages = [pkgs.nvim];
|
|
||||||
|
|
||||||
nixpkgs.config.packageOverrides = pkgs: {
|
environment.systemPackages = [
|
||||||
nvim = pkgs.neovim.override {
|
(pkgs.neovim.override {
|
||||||
configure = {
|
configure = {
|
||||||
customRC = builtins.readFile <dot/vimrc>;
|
customRC = builtins.readFile <dot/vimrc>;
|
||||||
packages.nvim = with pkgs.vimPlugins; {
|
packages.nvim = with pkgs.vimPlugins; {
|
||||||
@@ -38,28 +27,6 @@ in {
|
|||||||
vim-sensible
|
vim-sensible
|
||||||
vim-startify
|
vim-startify
|
||||||
vim-surround
|
vim-surround
|
||||||
# (pkgs.vimUtils.buildVimPlugin rec {
|
|
||||||
# name = "connermcd";
|
|
||||||
# src = pkgs.fetchFromGitHub {
|
|
||||||
# owner = "connermcd";
|
|
||||||
# repo = "dotfiles";
|
|
||||||
# rev = "3a2788cc94e5e51144adcad4da4f9489ccd3e341";
|
|
||||||
# sha256 = "1p0r4nd4syhy62mkz1iji6kwsg2hvcr7q5qzaqv6p52dkm7ffx52";
|
|
||||||
# };
|
|
||||||
# buildPhase = ''
|
|
||||||
# mkdir -p $out/share/vim-plugins/${name}/colors
|
|
||||||
# mv .vim/colors/*.vim $out/share/vim-plugins/${name}/colors/
|
|
||||||
# '';
|
|
||||||
# })
|
|
||||||
# (pkgs.vimUtils.buildVimPluginFrom2Nix {
|
|
||||||
# name = "apprentice";
|
|
||||||
# src = pkgs.fetchFromGitHub {
|
|
||||||
# owner = "romainl";
|
|
||||||
# repo = "Apprentice";
|
|
||||||
# rev = "0ca2038758f9d7dfdf51733db8d22665663382f7";
|
|
||||||
# sha256 = "1jdfn3wm46ndc24lkzxy3akjbqwglrdy7qqyypbwwsq7vp0s5051";
|
|
||||||
# };
|
|
||||||
# })
|
|
||||||
(pkgs.vimUtils.buildVimPluginFrom2Nix rec {
|
(pkgs.vimUtils.buildVimPluginFrom2Nix rec {
|
||||||
name = "vim-colors-paramount";
|
name = "vim-colors-paramount";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
@@ -112,6 +79,6 @@ in {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
})
|
||||||
};
|
];
|
||||||
}
|
}
|
||||||
@@ -1,101 +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";
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.wireless = {
|
|
||||||
enable = true;
|
|
||||||
userControlled.enable = true;
|
|
||||||
networks = {
|
|
||||||
Aether.pskRaw = "e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a";
|
|
||||||
EasyBox-927376.pskRaw = "dbd490ab69b39bd67cfa06daf70fc3ef3ee90f482972a668ed758f90f5577c22";
|
|
||||||
"Asoziales Netzwerk".pskRaw = "8e234041ec5f0cd1b6a14e9adeee9840ed51b2f18856a52137485523e46b0cb6";
|
|
||||||
c-base-public = {};
|
|
||||||
security-by-obscurity.psk = "44629828256481964386";
|
|
||||||
discord.psk = "baraustrinken";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# 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 = {
|
|
||||||
scardanelli = {
|
|
||||||
hostname = "scardanelli.local";
|
|
||||||
user = "kfm";
|
|
||||||
port = sshPort;
|
|
||||||
};
|
|
||||||
homeros = {
|
|
||||||
hostname = "homeros.local";
|
|
||||||
user = "kfm";
|
|
||||||
port = sshPort;
|
|
||||||
};
|
|
||||||
catullus = {
|
|
||||||
hostname = "catullus.local";
|
|
||||||
user = "root";
|
|
||||||
};
|
|
||||||
menstruation-logs = {
|
|
||||||
user = "root";
|
|
||||||
hostname = "v22017123717457389.megasrv.de";
|
|
||||||
port = 49123;
|
|
||||||
};
|
|
||||||
irc = {
|
|
||||||
user = "kmein";
|
|
||||||
hostname = "prism.r";
|
|
||||||
extraOptions.RemoteCommand = "tmux a";
|
|
||||||
};
|
|
||||||
"gitlab.peixdev.net".port = 999;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.ssh.startAgent = true;
|
|
||||||
|
|
||||||
services.openssh = {
|
|
||||||
ports = [ sshPort ];
|
|
||||||
enable = true;
|
|
||||||
forwardX11 = true;
|
|
||||||
passwordAuthentication = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.syncthing = rec {
|
|
||||||
enable = true;
|
|
||||||
# user = config.users.users.kfm.name;
|
|
||||||
# dataDir = "${config.users.users.kfm.home}/.config/syncthing";
|
|
||||||
user = "kfm";
|
|
||||||
dataDir = "/home/${user}/.config/syncthing";
|
|
||||||
openDefaultPorts = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users.root.openssh.authorizedKeys.keys = [
|
|
||||||
sshKey.homeros
|
|
||||||
sshKey.scardanelli
|
|
||||||
];
|
|
||||||
|
|
||||||
users.users.kfm.openssh.authorizedKeys.keys = [
|
|
||||||
sshKey.homeros
|
|
||||||
sshKey.scardanelli
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,234 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
let
|
|
||||||
unstable = import <nixos-unstable> {};
|
|
||||||
executables = pkgs.haskell.lib.justStaticExecutables;
|
|
||||||
haskells = import <dot/haskells.nix>;
|
|
||||||
in with pkgs;
|
|
||||||
{
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
(import <stockholm/nix-writers/pkgs>)
|
|
||||||
];
|
|
||||||
|
|
||||||
nixpkgs.config.packageOverrides = pkgs: {
|
|
||||||
bvg = pkgs.callPackage <packages/bvg.nix> {};
|
|
||||||
daybook = pkgs.callPackage <packages/daybook.nix> {};
|
|
||||||
iolanguage = pkgs.callPackage <packages/iolanguage.nix> {};
|
|
||||||
sncli = pkgs.python3Packages.callPackage <packages/sncli.nix> {};
|
|
||||||
todoist = pkgs.callPackage <packages/todoist> {};
|
|
||||||
spotify-cli-linux = pkgs.python3Packages.callPackage <packages/spotify-cli-linux.nix> {};
|
|
||||||
instaloader = pkgs.python3Packages.callPackage <packages/instaloader.nix> {};
|
|
||||||
autorenkalender = pkgs.callPackage <packages/autorenkalender.nix> {};
|
|
||||||
literature-quote = pkgs.callPackage <packages/literature-quote.nix> {};
|
|
||||||
dic = pkgs.callPackage <stockholm/krebs/5pkgs/simple/dic/default.nix> {};
|
|
||||||
yt-next = pkgs.callPackage <stockholm/lass/5pkgs/yt-next/default.nix> {};
|
|
||||||
acronym = pkgs.callPackage <stockholm/lass/5pkgs/acronym/default.nix> {};
|
|
||||||
urban = pkgs.callPackage <stockholm/lass/5pkgs/urban/default.nix> {};
|
|
||||||
mpv-poll = pkgs.callPackage <stockholm/lass/5pkgs/mpv-poll/default.nix> {};
|
|
||||||
};
|
|
||||||
|
|
||||||
fonts.enableDefaultFonts = true;
|
|
||||||
fonts.fonts = [
|
|
||||||
corefonts
|
|
||||||
eb-garamond
|
|
||||||
fira
|
|
||||||
libertine
|
|
||||||
lmodern
|
|
||||||
noto-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
|
|
||||||
tdesktop
|
|
||||||
w3m
|
|
||||||
wget
|
|
||||||
httpie
|
|
||||||
whois
|
|
||||||
ddgr
|
|
||||||
instaloader
|
|
||||||
] ++ [ # media
|
|
||||||
ffmpeg
|
|
||||||
mpv
|
|
||||||
pamixer
|
|
||||||
pavucontrol
|
|
||||||
gthumb
|
|
||||||
imagemagick
|
|
||||||
sxiv
|
|
||||||
blueman
|
|
||||||
zathura
|
|
||||||
] ++ [ # archive
|
|
||||||
unzip
|
|
||||||
unrar
|
|
||||||
p7zip
|
|
||||||
zip
|
|
||||||
] ++ [ # monitor
|
|
||||||
htop
|
|
||||||
iotop
|
|
||||||
iftop
|
|
||||||
lsof
|
|
||||||
psmisc
|
|
||||||
] ++ [ # shell
|
|
||||||
bat
|
|
||||||
dos2unix
|
|
||||||
du-dust
|
|
||||||
exa
|
|
||||||
fd
|
|
||||||
file
|
|
||||||
git
|
|
||||||
gitAndTools.hub
|
|
||||||
gitAndTools.git-extras
|
|
||||||
gitstats
|
|
||||||
jq
|
|
||||||
manpages
|
|
||||||
moreutils
|
|
||||||
patch
|
|
||||||
patchutils
|
|
||||||
posix_man_pages
|
|
||||||
ranger
|
|
||||||
ripgrep
|
|
||||||
rlwrap
|
|
||||||
tree
|
|
||||||
] ++ [ # hardware
|
|
||||||
pmount
|
|
||||||
usbutils
|
|
||||||
pciutils
|
|
||||||
] ++ [ # graphical
|
|
||||||
arandr
|
|
||||||
libnotify
|
|
||||||
xclip
|
|
||||||
xorg.xkill
|
|
||||||
wpa_supplicant_gui
|
|
||||||
];
|
|
||||||
|
|
||||||
security.wrappers = {
|
|
||||||
pmount.source = "${pkgs.pmount}/bin/pmount";
|
|
||||||
pumount.source = "${pkgs.pmount}/bin/pumount";
|
|
||||||
};
|
|
||||||
|
|
||||||
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 = [
|
|
||||||
] ++ [ # 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.patat)
|
|
||||||
asciidoctor
|
|
||||||
proselint
|
|
||||||
] ++ [ # programming
|
|
||||||
vscode
|
|
||||||
tokei
|
|
||||||
gnumake
|
|
||||||
cabal2nix
|
|
||||||
chicken
|
|
||||||
clojure
|
|
||||||
gcc
|
|
||||||
binutils-unwrapped
|
|
||||||
(haskellPackages.ghcWithHoogle haskells)
|
|
||||||
(executables haskellPackages.cabal-install)
|
|
||||||
(executables haskellPackages.ghcid)
|
|
||||||
(executables haskellPackages.hakyll)
|
|
||||||
(haskellPackages.brittany)
|
|
||||||
(executables haskellPackages.hfmt)
|
|
||||||
(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.csslint
|
|
||||||
nodePackages.prettier
|
|
||||||
nodePackages.jsonlint
|
|
||||||
ocaml
|
|
||||||
python3
|
|
||||||
python3Packages.black
|
|
||||||
python3Packages.python-language-server
|
|
||||||
python3Packages.pyls-mypy
|
|
||||||
python3Packages.flake8
|
|
||||||
# python3Packages.jedi
|
|
||||||
ruby
|
|
||||||
rubocop
|
|
||||||
rustup
|
|
||||||
# rustracer
|
|
||||||
scala
|
|
||||||
shellcheck
|
|
||||||
] ++ [ # media
|
|
||||||
audacity
|
|
||||||
calibre
|
|
||||||
inkscape
|
|
||||||
xpdf
|
|
||||||
pdfgrep
|
|
||||||
pdftk
|
|
||||||
spotify
|
|
||||||
spotify-cli-linux
|
|
||||||
youtubeDL
|
|
||||||
] ++ [ # cloud
|
|
||||||
dropbox-cli
|
|
||||||
grive2
|
|
||||||
seafile-client
|
|
||||||
] ++ [ # math
|
|
||||||
bc
|
|
||||||
graphviz
|
|
||||||
maxima
|
|
||||||
] ++ [ # shell
|
|
||||||
# todoist
|
|
||||||
aspell
|
|
||||||
aspellDicts.de
|
|
||||||
aspellDicts.en
|
|
||||||
aspellDicts.la
|
|
||||||
bvg
|
|
||||||
autorenkalender
|
|
||||||
literature-quote
|
|
||||||
dic
|
|
||||||
yt-next
|
|
||||||
acronym
|
|
||||||
urban
|
|
||||||
mpv-poll
|
|
||||||
daybook
|
|
||||||
gnupg
|
|
||||||
jo
|
|
||||||
memo
|
|
||||||
par
|
|
||||||
fzf
|
|
||||||
(pass.withExtensions (ext: [ext.pass-otp]))
|
|
||||||
qrencode
|
|
||||||
sncli
|
|
||||||
tmuxp
|
|
||||||
unstable.hledger
|
|
||||||
wordnet
|
|
||||||
xsv
|
|
||||||
] ++ (if config.networking.hostName == "homeros" then [ unstable.zeroad ] else []);
|
|
||||||
}
|
|
||||||
9
configs/printing.nix
Normal file
9
configs/printing.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
services.printing = {
|
||||||
|
enable = true;
|
||||||
|
drivers = [ pkgs.hplipWithPlugin ];
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.hosts."192.168.178.27" = [ "officejet" ];
|
||||||
|
}
|
||||||
18
configs/python.nix
Normal file
18
configs/python.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = [
|
||||||
|
(pkgs.python3.withPackages
|
||||||
|
(py: [
|
||||||
|
py.black
|
||||||
|
py.python-language-server
|
||||||
|
py.pyls-mypy
|
||||||
|
py.flake8
|
||||||
|
])
|
||||||
|
)
|
||||||
|
];
|
||||||
|
|
||||||
|
home-manager.users.me.xdg.configFile."pycodestyle".text = ''
|
||||||
|
[pycodestyle]
|
||||||
|
max-line-length = 110
|
||||||
|
'';
|
||||||
|
}
|
||||||
7
configs/redshift.nix
Normal file
7
configs/redshift.nix
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
services.redshift = {
|
||||||
|
enable = true;
|
||||||
|
latitude = "52";
|
||||||
|
longitude = "13";
|
||||||
|
};
|
||||||
|
}
|
||||||
40
configs/rofi.nix
Normal file
40
configs/rofi.nix
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{ config, ... }:
|
||||||
|
let theme = import <dot/theme.nix>;
|
||||||
|
in {
|
||||||
|
home-manager.users.me.programs.rofi = {
|
||||||
|
enable = true;
|
||||||
|
separator = "solid";
|
||||||
|
scrollbar = false;
|
||||||
|
terminal = config.niveum.applications.terminal;
|
||||||
|
borderWidth = 0;
|
||||||
|
lines = 5;
|
||||||
|
font = "${theme.terminalFont.name} ${toString (theme.terminalFont.size + 1)}";
|
||||||
|
colors = rec {
|
||||||
|
window = {
|
||||||
|
background = theme.invertedColorScheme.background;
|
||||||
|
border = theme.invertedColorScheme.background;
|
||||||
|
separator = theme.invertedColorScheme.black.light;
|
||||||
|
};
|
||||||
|
rows = {
|
||||||
|
normal = {
|
||||||
|
background = window.background;
|
||||||
|
backgroundAlt = window.background;
|
||||||
|
foreground = theme.invertedColorScheme.foreground;
|
||||||
|
highlight = { foreground = theme.invertedColorScheme.cyan.dark; inherit (window) background; };
|
||||||
|
};
|
||||||
|
active = {
|
||||||
|
background = window.background;
|
||||||
|
backgroundAlt = window.background;
|
||||||
|
foreground = theme.invertedColorScheme.yellow.dark;
|
||||||
|
highlight = { foreground = theme.invertedColorScheme.green.dark; inherit (window) background; };
|
||||||
|
};
|
||||||
|
urgent = {
|
||||||
|
background = window.background;
|
||||||
|
backgroundAlt = window.background;
|
||||||
|
foreground = theme.invertedColorScheme.red.dark;
|
||||||
|
highlight = { foreground = theme.invertedColorScheme.magenta.dark; inherit (window) background; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,122 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
let
|
|
||||||
theme = import <dot/theme.nix>;
|
|
||||||
unstable = import <nixos-unstable> {};
|
|
||||||
scripts.instaget = unstable.writers.writeDashBin "instaget" ''
|
|
||||||
for url in "$@"; do
|
|
||||||
${pkgs.curl}/bin/curl -s "$url" \
|
|
||||||
| grep display_url \
|
|
||||||
| grep -o '{.*}' \
|
|
||||||
| ${pkgs.jq}/bin/jq -r '
|
|
||||||
.entry_data.PostPage
|
|
||||||
| .[].graphql.shortcode_media.edge_sidecar_to_children.edges
|
|
||||||
| .[].node.display_url' \
|
|
||||||
| xargs ${pkgs.wget}/bin/wget
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
bingWallpaper = unstable.writers.writeBash "bing-wallpaper.sh" ''
|
|
||||||
PICTURE_DIR="$HOME/pictures/external/bing/"
|
|
||||||
|
|
||||||
mkdir -p $PICTURE_DIR
|
|
||||||
|
|
||||||
urls=( $(${pkgs.curl}/bin/curl -s http://www.bing.com \
|
|
||||||
| grep -Eo "url:'.*?'" \
|
|
||||||
| sed -e "s/url:'\([^']*\)'.*/http:\/\/bing.com\1/" \
|
|
||||||
| sed -e "s/\\\//g") )
|
|
||||||
|
|
||||||
for p in ''${urls[@]}; do
|
|
||||||
filename=$(echo $p | sed -e "s/.*\/\(.*\)/\1/")
|
|
||||||
if [ ! -f $PICTURE_DIR/$filename ]; then
|
|
||||||
${pkgs.curl}/bin/curl -Lo "$PICTURE_DIR/$filename" $p
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
scripts.pull-all = unstable.writers.writeDashBin "pull-all" ''
|
|
||||||
CUR_DIR=$(pwd)
|
|
||||||
echo -e "\n\033[1mPulling in latest changes for all repositories...\033[0m\n"
|
|
||||||
for i in $(find . -name ".git" | cut -c 3-); do
|
|
||||||
echo ""
|
|
||||||
echo -e "\033[33m"+$i+"\033[0m"
|
|
||||||
cd "$i"
|
|
||||||
cd ..
|
|
||||||
git pull origin master
|
|
||||||
cd $CUR_DIR
|
|
||||||
done
|
|
||||||
echo -e "\n\033[32mComplete!\033[0m\n"
|
|
||||||
'';
|
|
||||||
scripts.genius = unstable.writers.writeDashBin "genius" ''
|
|
||||||
test $# -eq 2 || (
|
|
||||||
echo "usage: $0 <artist> <song>"
|
|
||||||
exit 1
|
|
||||||
)
|
|
||||||
|
|
||||||
normalize() {
|
|
||||||
tr -d -c '0-9A-Za-z ' | tr ' ' - | tr '[:upper:]' '[:lower:]'
|
|
||||||
}
|
|
||||||
|
|
||||||
ARTIST=$(echo "$1" | normalize | ${pkgs.gnused}/bin/sed 's/./\U&/')
|
|
||||||
TITLE=$(echo "$2" | normalize)
|
|
||||||
GENIUS_URL="https://genius.com/$ARTIST-$TITLE-lyrics"
|
|
||||||
|
|
||||||
${pkgs.curl}/bin/curl -s "$GENIUS_URL" \
|
|
||||||
| ${pkgs.gnused}/bin/sed -ne '/class="lyrics"/,/<\/p>/p' \
|
|
||||||
| ${pkgs.pandoc}/bin/pandoc -f html -s -t plain \
|
|
||||||
| ${pkgs.gnused}/bin/sed 's/^_/\x1b[3m/g;s/_$/\x1b[0m/g;s/^\[/\n\x1b\[1m\[/g;s/\]$/\]\x1b[0m/g'
|
|
||||||
|
|
||||||
printf "\n(source: $GENIUS_URL)\n" >/dev/stderr
|
|
||||||
'';
|
|
||||||
scripts.generate-shell-nix =
|
|
||||||
let repository = pkgs.fetchFromGitHub {
|
|
||||||
owner = "kmein";
|
|
||||||
repo = "generate-shell-nix";
|
|
||||||
rev = "1e6aed53701b5276d065f0dc70ba5479d2c6d041";
|
|
||||||
sha256 = "1532w34p46mjqnm2bx72f98gacgb3ncd00rflxr54pq94klh26is";
|
|
||||||
};
|
|
||||||
in pkgs.writeScriptBin "generate-shell-nix" (builtins.readFile "${repository.out}/generate-shell-nix");
|
|
||||||
scripts.font-size = unstable.writers.writeDashBin "font-size" ''
|
|
||||||
set -efu
|
|
||||||
|
|
||||||
# set_font NORMAL_FONT BOLD_FONT
|
|
||||||
set_font() {
|
|
||||||
printf '\033]710;%s\007' "$1"
|
|
||||||
printf '\033]711;%s\007' "$2"
|
|
||||||
}
|
|
||||||
|
|
||||||
case ''${1-} in
|
|
||||||
'''|0|--reset)
|
|
||||||
set_font \
|
|
||||||
"xft:${theme.terminalFont.name}:size=${toString theme.terminalFont.size}" \
|
|
||||||
"xft:${theme.terminalFont.name}:size=${toString theme.terminalFont.size}:bold" \
|
|
||||||
;;
|
|
||||||
[2-9]|[1-9][0-9]|[1-9][0-9][0-9])
|
|
||||||
set_font \
|
|
||||||
"xft:${theme.terminalFont.name}:size=$1" \
|
|
||||||
"xft:${theme.terminalFont.name}:size=$1:bold" \
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "$0: bad argument: $1" >&2
|
|
||||||
exit 1
|
|
||||||
esac
|
|
||||||
'';
|
|
||||||
scripts.wttr = unstable.writers.writeDashBin "wttr" ''
|
|
||||||
${pkgs.curl}/bin/curl -s -H "Accept-Language: ''${LANG%_*}" --compressed "wttr.in/''${1-"@$(${pkgs.curl}/bin/curl -s ipinfo.io | ${pkgs.jq}/bin/jq -r .ip)"}?0"
|
|
||||||
'';
|
|
||||||
scripts.nix-git = unstable.writers.writeDashBin "nix-git" ''
|
|
||||||
${pkgs.nix-prefetch-git}/bin/nix-prefetch-git "$@" 2> /dev/null | ${pkgs.jq}/bin/jq -r '"rev = \"\(.rev)\";\nsha256 = \"\(.sha256)\";"'
|
|
||||||
'';
|
|
||||||
scripts.n = unstable.writers.writeDashBin "n" ''
|
|
||||||
nix-shell -p "''${2:-$1}" --run "$1"
|
|
||||||
'';
|
|
||||||
in {
|
|
||||||
environment.shellAliases =
|
|
||||||
let rlwrap = cmd: "${pkgs.rlwrap}/bin/rlwrap ${cmd}";
|
|
||||||
in {
|
|
||||||
o = "${pkgs.xdg_utils}/bin/xdg-open";
|
|
||||||
clipboard = "${pkgs.xclip}/bin/xclip -se c";
|
|
||||||
ip = "${pkgs.iproute}/bin/ip -c";
|
|
||||||
ocaml = rlwrap "${pkgs.ocaml}/bin/ocaml";
|
|
||||||
tmux = "${pkgs.tmux}/bin/tmux -2";
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = lib.attrsets.attrValues scripts;
|
|
||||||
}
|
|
||||||
59
configs/ssh.nix
Normal file
59
configs/ssh.nix
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
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 {
|
||||||
|
services.xserver.displayManager.sessionCommands = "${pkgs.openssh}/bin/ssh-add";
|
||||||
|
|
||||||
|
programs.ssh.startAgent = true;
|
||||||
|
|
||||||
|
services.openssh = {
|
||||||
|
ports = [ sshPort ];
|
||||||
|
enable = true;
|
||||||
|
passwordAuthentication = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users.root.openssh.authorizedKeys.keys = [
|
||||||
|
sshKey.homeros
|
||||||
|
sshKey.scardanelli
|
||||||
|
];
|
||||||
|
|
||||||
|
users.users.me.openssh.authorizedKeys.keys = [
|
||||||
|
sshKey.homeros
|
||||||
|
sshKey.scardanelli
|
||||||
|
];
|
||||||
|
|
||||||
|
home-manager.users.me.programs.ssh = {
|
||||||
|
enable = true;
|
||||||
|
matchBlocks = {
|
||||||
|
scardanelli = {
|
||||||
|
hostname = "scardanelli.local";
|
||||||
|
user = "kfm";
|
||||||
|
port = sshPort;
|
||||||
|
};
|
||||||
|
homeros = {
|
||||||
|
hostname = "homeros.local";
|
||||||
|
user = "kfm";
|
||||||
|
port = sshPort;
|
||||||
|
};
|
||||||
|
catullus = {
|
||||||
|
hostname = "catullus.local";
|
||||||
|
user = "root";
|
||||||
|
};
|
||||||
|
menstruation-logs = {
|
||||||
|
user = "root";
|
||||||
|
hostname = "v22017123717457389.megasrv.de";
|
||||||
|
port = 49123;
|
||||||
|
};
|
||||||
|
irc = {
|
||||||
|
user = "kmein";
|
||||||
|
hostname = "prism.r";
|
||||||
|
extraOptions.RemoteCommand = "tmux a";
|
||||||
|
};
|
||||||
|
"gitlab.peixdev.net".port = 999;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
35
configs/theming.nix
Normal file
35
configs/theming.nix
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
i18n.consoleColors = with import <dot/theme.nix>; map (c: lib.strings.removePrefix "#" c) colorPalette;
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
config.niveum.theme.gtk.package
|
||||||
|
config.niveum.theme.icon.package
|
||||||
|
config.niveum.theme.cursor.package
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
services.xserver.displayManager.lightdm.greeters.gtk = {
|
||||||
|
theme = {
|
||||||
|
name = config.niveum.theme.gtk.name;
|
||||||
|
package = config.niveum.theme.gtk.package;
|
||||||
|
};
|
||||||
|
iconTheme = {
|
||||||
|
name = config.niveum.theme.icon.name;
|
||||||
|
package = config.niveum.theme.icon.package;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users.me = {
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
iconTheme = config.niveum.theme.icon;
|
||||||
|
theme = config.niveum.theme.gtk;
|
||||||
|
};
|
||||||
|
qt = {
|
||||||
|
enable = true;
|
||||||
|
useGtkTheme = true;
|
||||||
|
};
|
||||||
|
xsession.pointerCursor = config.niveum.theme.cursor // { size = 16; };
|
||||||
|
};
|
||||||
|
}
|
||||||
33
configs/tmux.nix
Normal file
33
configs/tmux.nix
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
programs.tmux = {
|
||||||
|
enable = true;
|
||||||
|
keyMode = "vi";
|
||||||
|
terminal = "screen-256color";
|
||||||
|
extraTmuxConf = ''
|
||||||
|
set -g status-interval 2
|
||||||
|
set -g status-left-length 32
|
||||||
|
set -g status-right-length 150
|
||||||
|
|
||||||
|
set -g status-bg default
|
||||||
|
|
||||||
|
setw -g window-status-format "#[fg=colour12,bg=colour233] #I #[fg=white,bg=colour237] #W "
|
||||||
|
setw -g window-status-current-format "#[fg=colour12,bg=colour233] * #[fg=white,bg=colour237,bold] #W "
|
||||||
|
|
||||||
|
set -g status-left ""
|
||||||
|
set -g status-right "# [fg=colour255,bg=colour237,bold] %Y-%m-%d #[default]#[fg=colour12,bg=colour233] %H:%M "
|
||||||
|
set -g status-justify left
|
||||||
|
|
||||||
|
set -g pane-active-border-fg colour237
|
||||||
|
set -g pane-border-fg colour237
|
||||||
|
set -g pane-active-border-bg default
|
||||||
|
set -g pane-border-bg default
|
||||||
|
|
||||||
|
set -g status-position bottom
|
||||||
|
|
||||||
|
set -g mouse on
|
||||||
|
|
||||||
|
unbind *
|
||||||
|
bind * list-clients
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
6
configs/unclutter.nix
Normal file
6
configs/unclutter.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
services.unclutter = {
|
||||||
|
enable = true;
|
||||||
|
timeout = 10;
|
||||||
|
};
|
||||||
|
}
|
||||||
27
configs/urxvt.nix
Normal file
27
configs/urxvt.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{ pkgs, config, ... }:
|
||||||
|
let theme = import <dot/theme.nix>;
|
||||||
|
in {
|
||||||
|
services.urxvtd.enable = true;
|
||||||
|
|
||||||
|
home-manager.users.me.programs.urxvt = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.rxvt_unicode-with-plugins;
|
||||||
|
keybindings = {
|
||||||
|
"Shift-Control-C" = "eval:selection_to_clipboard";
|
||||||
|
"Shift-Control-V" = "eval:paste_clipboard";
|
||||||
|
};
|
||||||
|
scroll.bar.enable = false;
|
||||||
|
extraConfig = {
|
||||||
|
perl-ext = "default,url-select";
|
||||||
|
"url-select.launcher" = "/usr/bin/env chromium";
|
||||||
|
"url-select.underline" = true;
|
||||||
|
"colorUL" = theme.colorScheme.blue.light;
|
||||||
|
"perl-lib" = "${pkgs.urxvt_perls}/lib/urxvt/perl";
|
||||||
|
urlLauncher = "/usr/bin/env chromium";
|
||||||
|
fading = 20;
|
||||||
|
iso14755 = false;
|
||||||
|
urgentOnBell = true;
|
||||||
|
reverseVideo = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
10
configs/vscode.nix
Normal file
10
configs/vscode.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = [
|
||||||
|
(pkgs.vscode-with-extensions.override {
|
||||||
|
vscodeExtensions = [
|
||||||
|
pkgs.vscode-extensions.bbenoist.Nix
|
||||||
|
];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
16
configs/xautolock.nix
Normal file
16
configs/xautolock.nix
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
services.xserver.displayManager.sessionCommands = ''
|
||||||
|
${pkgs.systemd}/bin/systemctl --user import-environment XDG_SESSION_PATH
|
||||||
|
${pkgs.lightlocker}/bin/light-locker &
|
||||||
|
'';
|
||||||
|
|
||||||
|
services.xserver.xautolock = {
|
||||||
|
enable = true;
|
||||||
|
killer = "${pkgs.systemd}/bin/systemctl suspend";
|
||||||
|
locker = "${pkgs.lightlocker}/bin/light-locker-command -l";
|
||||||
|
nowlocker = "${pkgs.lightlocker}/bin/light-locker-command -l";
|
||||||
|
enableNotifier = true;
|
||||||
|
notifier = ''${pkgs.libnotify}/bin/notify-send -u normal -a xautolock "Locking soon" "The screen will lock in 10 seconds."'';
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,17 +1,13 @@
|
|||||||
{ lib }:
|
{ lib, ... }:
|
||||||
let theme = import <dot/theme.nix>;
|
let theme = import <dot/theme.nix>;
|
||||||
in with lib; lists.foldr
|
in {
|
||||||
(i: cs: cs // { "*color${toString i}" = builtins.elemAt theme.colorPalette i; })
|
home-manager.users.me.xresources.properties = {
|
||||||
{
|
|
||||||
"*background" = theme.colorScheme.background;
|
"*background" = theme.colorScheme.background;
|
||||||
"*foreground" = theme.colorScheme.foreground;
|
"*foreground" = theme.colorScheme.foreground;
|
||||||
"*fadeColor" = theme.colorScheme.background;
|
"*fadeColor" = theme.colorScheme.background;
|
||||||
"*cursorColor" = theme.colorScheme.cursorColor;
|
"*cursorColor" = theme.colorScheme.cursorColor;
|
||||||
|
|
||||||
# "URxvt*font" = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1";
|
|
||||||
# "URxvt*boldFont" = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1";
|
|
||||||
"*.font" = "xft:${theme.terminalFont.name}:size=${toString theme.terminalFont.size}";
|
"*.font" = "xft:${theme.terminalFont.name}:size=${toString theme.terminalFont.size}";
|
||||||
"*.boldFont" = "xft:${theme.terminalFont.name}:style=Bold:size=${toString theme.terminalFont.size}";
|
"*.boldFont" = "xft:${theme.terminalFont.name}:style=Bold:size=${toString theme.terminalFont.size}";
|
||||||
"*.italicFont" = "xft:${theme.terminalFont.name}:style=Italic:size=${toString theme.terminalFont.size}";
|
"*.italicFont" = "xft:${theme.terminalFont.name}:style=Italic:size=${toString theme.terminalFont.size}";
|
||||||
}
|
} // lib.lists.foldr (i: cs: cs // { "*color${toString i}" = builtins.elemAt theme.colorPalette i; }) {} (lib.lists.range 0 15);
|
||||||
(lists.range 0 15)
|
}
|
||||||
@@ -1,45 +1,6 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, ... }:
|
||||||
let
|
{
|
||||||
zsh-plugins-file =
|
home-manager.users.me.home.file.".zshrc".text = "# nothing to see here";
|
||||||
pkgs.writeText "zsh_plugins.txt" (lib.concatStringsSep "\n" [
|
|
||||||
"sharat87/zsh-vim-mode"
|
|
||||||
"Tarrasch/zsh-mcd"
|
|
||||||
"mafredri/zsh-async"
|
|
||||||
"zsh-users/zsh-completions"
|
|
||||||
"caarlos0/ports kind:path"
|
|
||||||
"Tarrasch/zsh-functional"
|
|
||||||
"zsh-users/zsh-history-substring-search"
|
|
||||||
]);
|
|
||||||
zsh-plugins =
|
|
||||||
let package = {pkgs}:
|
|
||||||
pkgs.stdenv.mkDerivation rec {
|
|
||||||
name = "zsh-plugins";
|
|
||||||
phases = [ "configurePhase" "installPhase" ];
|
|
||||||
buildInputs = with pkgs; [ antibody git ];
|
|
||||||
configurePhase = ''
|
|
||||||
export GIT_SSL_CAINFO=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt
|
|
||||||
export SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt
|
|
||||||
'';
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/.cache
|
|
||||||
XDG_CACHE_HOME=$out/.cache antibody bundle < ${zsh-plugins-file} > $out/zsh_plugins.sh
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in pkgs.callPackage package {};
|
|
||||||
in {
|
|
||||||
environment.shellAliases = {
|
|
||||||
ns = "nix-shell --run zsh";
|
|
||||||
# niveum-switch = "sudo -i nixos-rebuild --fast switch";
|
|
||||||
# niveum-upgrade = "sudo -i nix-channel --update && sudo -i nixos-rebuild switch";
|
|
||||||
nixi = ''nix repl "<nixpkgs>"'';
|
|
||||||
grep = "grep --color=auto";
|
|
||||||
rm = "rm -i";
|
|
||||||
cp = "cp -i";
|
|
||||||
mv = "mv -i";
|
|
||||||
niveum-update = "nix-prefetch-git --url https://github.com/NixOS/nixpkgs-channels --rev refs/heads/nixos-18.09 > ~niveum/nixpkgs.json";
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.interactiveShellInit = "export PATH=$PATH:$HOME/.local/bin:$HOME/.cargo/bin";
|
|
||||||
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -70,7 +31,7 @@ in {
|
|||||||
|
|
||||||
export KEYTIMEOUT=1
|
export KEYTIMEOUT=1
|
||||||
|
|
||||||
hash -d nixos=/etc/nixos niveum=${config.users.users.kfm.home}/prog/git/niveum
|
hash -d nixos=/etc/nixos niveum=${config.users.users.me.home}/prog/git/niveum
|
||||||
|
|
||||||
autoload -U zmv run-help
|
autoload -U zmv run-help
|
||||||
|
|
||||||
@@ -117,13 +78,4 @@ in {
|
|||||||
zle -N zle-keymap-select
|
zle -N zle-keymap-select
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.bash = {
|
|
||||||
promptInit = ''PS1="$(tput bold)\w \$([[ \$? == 0 ]] && echo \"\[\033[1;32m\]\" || echo \"\[\033[1;31m\]\")\$$(tput sgr0) "'';
|
|
||||||
interactiveShellInit = ''
|
|
||||||
set -o vi
|
|
||||||
'';
|
|
||||||
enableCompletion = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
16
deploy.nix
16
deploy.nix
@@ -11,18 +11,26 @@ let
|
|||||||
importJson = (import <nixpkgs> {}).lib.importJSON;
|
importJson = (import <nixpkgs> {}).lib.importJSON;
|
||||||
|
|
||||||
source = {path, other ? {}}: lib.evalSource [({
|
source = {path, other ? {}}: lib.evalSource [({
|
||||||
home-manager.git = {
|
|
||||||
url = https://github.com/rycee/home-manager;
|
|
||||||
ref = "2ccbf43";
|
|
||||||
};
|
|
||||||
nixpkgs.git = {
|
nixpkgs.git = {
|
||||||
url = https://github.com/NixOS/nixpkgs-channels;
|
url = https://github.com/NixOS/nixpkgs-channels;
|
||||||
ref = (importJson ./nixpkgs.json).rev;
|
ref = (importJson ./nixpkgs.json).rev;
|
||||||
};
|
};
|
||||||
|
nixos-unstable.git = {
|
||||||
|
url = https://github.com/NixOS/nixpkgs-channels;
|
||||||
|
ref = "nixos-unstable";
|
||||||
|
};
|
||||||
|
home-manager.git = {
|
||||||
|
url = https://github.com/rycee/home-manager;
|
||||||
|
ref = "2ccbf43";
|
||||||
|
};
|
||||||
stockholm.git = {
|
stockholm.git = {
|
||||||
url = https://cgit.krebsco.de/stockholm;
|
url = https://cgit.krebsco.de/stockholm;
|
||||||
ref = "7e1b197dab13d024ba491c96dc959306324943c0";
|
ref = "7e1b197dab13d024ba491c96dc959306324943c0";
|
||||||
};
|
};
|
||||||
|
nix-writers.git = {
|
||||||
|
url = https://cgit.krebsco.de/nix-writers;
|
||||||
|
ref = "c528cf970e292790b414b4c1c8c8e9d7e73b2a71";
|
||||||
|
};
|
||||||
system.file = toString path;
|
system.file = toString path;
|
||||||
art.file = toString ./art;
|
art.file = toString ./art;
|
||||||
lib.file = toString ./lib;
|
lib.file = toString ./lib;
|
||||||
|
|||||||
@@ -1,45 +0,0 @@
|
|||||||
{ config, pkgs }:
|
|
||||||
with import <dot/theme.nix>;
|
|
||||||
{
|
|
||||||
enable = true;
|
|
||||||
iconTheme = config.constants.theme.icon;
|
|
||||||
settings = {
|
|
||||||
global = {
|
|
||||||
transparency = 10;
|
|
||||||
font = "${terminalFont.name} ${toString terminalFont.size}";
|
|
||||||
geometry = "200x5-30+20";
|
|
||||||
frame_color = invertedColorScheme.background;
|
|
||||||
follow = "mouse";
|
|
||||||
indicate_hidden = true;
|
|
||||||
notification_height = 0;
|
|
||||||
separator_height = 2;
|
|
||||||
padding = 8;
|
|
||||||
horizontal_padding = 8;
|
|
||||||
separator_color = "auto";
|
|
||||||
sort = true;
|
|
||||||
markup = "full";
|
|
||||||
format = ''%a\n<b>%s</b>\n%b'';
|
|
||||||
alignment = "left";
|
|
||||||
show_age_threshold = 60;
|
|
||||||
bounce_freq = 0;
|
|
||||||
word_wrap = true;
|
|
||||||
ellipsize = "middle";
|
|
||||||
ignore_newline = false;
|
|
||||||
stack_duplicates = true;
|
|
||||||
hide_duplicate_count = false;
|
|
||||||
max_icon_size = 32;
|
|
||||||
sticky_history = true;
|
|
||||||
history_length = 20;
|
|
||||||
dmenu = "${pkgs.rofi}/bin/rofi -display-run dunst -show run";
|
|
||||||
browser = "${pkgs.xdg_utils}/bin/xdg-open";
|
|
||||||
verbosity = "mesg";
|
|
||||||
corner_radius = 0;
|
|
||||||
mouse_left_click = "do_action";
|
|
||||||
mouse_right_click = "close_current";
|
|
||||||
mouse_middle_click = "close_all";
|
|
||||||
};
|
|
||||||
urgency_low = { frame_color = invertedColorScheme.background; background = invertedColorScheme.background; foreground = invertedColorScheme.foreground; timeout = 5; };
|
|
||||||
urgency_normal = { frame_color = invertedColorScheme.background; background = invertedColorScheme.background; foreground = invertedColorScheme.foreground; timeout = 10; };
|
|
||||||
urgency_critical = { frame_color = invertedColorScheme.red.dark; background = invertedColorScheme.red.dark; foreground = invertedColorScheme.foreground; timeout = 0; };
|
|
||||||
};
|
|
||||||
}
|
|
||||||
11
dot/ghci.nix
11
dot/ghci.nix
@@ -1,11 +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 "
|
|
||||||
:set -Wall
|
|
||||||
''
|
|
||||||
# :def djinn \x -> return $ ":!echo \"" ++ x ++ "\" | ${pkgs.haskell.packages.ghc7102.djinn}/bin/djinn /dev/stdin"
|
|
||||||
177
dot/i3.nix
177
dot/i3.nix
@@ -1,177 +0,0 @@
|
|||||||
{ pkgs, config, lib }:
|
|
||||||
let
|
|
||||||
unstable = import <nixos-unstable> {};
|
|
||||||
i3blocks_conf = import <dot/i3blocks.nix> { inherit pkgs; };
|
|
||||||
new-workspace = unstable.writers.writeDash "new-workspace" ''
|
|
||||||
i3-msg workspace $(($(i3-msg -t get_workspaces | tr , '\n' | grep '"num":' | cut -d : -f 2 | sort -rn | head -1) + 1))
|
|
||||||
'';
|
|
||||||
move-to-new-workspace = unstable.writers.writeDash "new-workspace" ''
|
|
||||||
i3-msg move container to workspace $(($(i3-msg -t get_workspaces | tr , '\n' | grep '"num":' | cut -d : -f 2 | sort -rn | head -1) + 1))
|
|
||||||
'';
|
|
||||||
wifi-interface = {
|
|
||||||
scardanelli = "wlp2s0";
|
|
||||||
homeros = "wlp3s0";
|
|
||||||
}.${config.networking.hostName};
|
|
||||||
in with import <dot/theme.nix>;
|
|
||||||
rec {
|
|
||||||
fonts = [ "${uiFont.name} ${toString uiFont.size}" ];
|
|
||||||
modifier = "Mod4";
|
|
||||||
window = {
|
|
||||||
titlebar = false;
|
|
||||||
border = 1;
|
|
||||||
hideEdgeBorders = "smart";
|
|
||||||
};
|
|
||||||
floating = {
|
|
||||||
titlebar = false;
|
|
||||||
border = 1;
|
|
||||||
};
|
|
||||||
colors =
|
|
||||||
let scheme = { background = colorScheme.background; text = colorScheme.foreground; };
|
|
||||||
in {
|
|
||||||
focused = scheme // {
|
|
||||||
border = colorScheme.background;
|
|
||||||
indicator = colorScheme.background;
|
|
||||||
childBorder = colorScheme.background;
|
|
||||||
};
|
|
||||||
focusedInactive = scheme // {
|
|
||||||
border = colorScheme.background;
|
|
||||||
indicator = colorScheme.background;
|
|
||||||
childBorder = colorScheme.background;
|
|
||||||
};
|
|
||||||
unfocused = scheme // {
|
|
||||||
border = colorScheme.background;
|
|
||||||
indicator = colorScheme.background;
|
|
||||||
childBorder = colorScheme.background;
|
|
||||||
};
|
|
||||||
urgent = scheme // {
|
|
||||||
border = colorScheme.red.light;
|
|
||||||
indicator = colorScheme.red.light;
|
|
||||||
childBorder = colorScheme.red.light;
|
|
||||||
};
|
|
||||||
placeholder = scheme // {
|
|
||||||
border = colorScheme.green.light;
|
|
||||||
indicator = colorScheme.green.light;
|
|
||||||
childBorder = colorScheme.green.light;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
bars = [{
|
|
||||||
workspaceButtons = false;
|
|
||||||
fonts = [ "${terminalFont.name} ${toString terminalFont.size}" ];
|
|
||||||
mode = "hide";
|
|
||||||
colors = {
|
|
||||||
background = colorScheme.background;
|
|
||||||
separator = colorScheme.background;
|
|
||||||
statusline = colorScheme.foreground;
|
|
||||||
bindingMode = {
|
|
||||||
background = colorScheme.red.light;
|
|
||||||
border = colorScheme.background;
|
|
||||||
text = colorScheme.foreground;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# position = "top";
|
|
||||||
statusCommand =
|
|
||||||
let
|
|
||||||
i3status-config = pkgs.writeText "i3status.conf" ''
|
|
||||||
general {
|
|
||||||
colors = true
|
|
||||||
color_good = "${colorScheme.green.dark}"
|
|
||||||
color_bad = "${colorScheme.red.dark}"
|
|
||||||
color_degraded = "${colorScheme.black.light}"
|
|
||||||
interval = 5
|
|
||||||
separator = " "
|
|
||||||
}
|
|
||||||
|
|
||||||
order += "run_watch retiolum"
|
|
||||||
order += "path_exists openvpn"
|
|
||||||
order += "wireless ${wifi-interface}"
|
|
||||||
order += "battery all"
|
|
||||||
order += "volume master"
|
|
||||||
order += "load"
|
|
||||||
order += "tztime local"
|
|
||||||
|
|
||||||
wireless ${wifi-interface} {
|
|
||||||
format_up = "%essid"
|
|
||||||
format_down = "offline"
|
|
||||||
}
|
|
||||||
|
|
||||||
run_watch retiolum {
|
|
||||||
pidfile = "/var/run/tinc.retiolum.pid"
|
|
||||||
format = "%title"
|
|
||||||
}
|
|
||||||
|
|
||||||
path_exists openvpn {
|
|
||||||
path = "/proc/sys/net/ipv4/conf/tun0"
|
|
||||||
format = "%title"
|
|
||||||
}
|
|
||||||
|
|
||||||
battery all {
|
|
||||||
format = "%status%percentage"
|
|
||||||
format_down = "No battery"
|
|
||||||
status_chr = "↑"
|
|
||||||
status_bat = "↓"
|
|
||||||
status_unk = ""
|
|
||||||
status_full = "↯"
|
|
||||||
path = "/sys/class/power_supply/BAT%d/uevent"
|
|
||||||
low_threshold = 15
|
|
||||||
threshold_type = "percentage"
|
|
||||||
integer_battery_capacity = true
|
|
||||||
}
|
|
||||||
|
|
||||||
volume master {
|
|
||||||
format = "%volume"
|
|
||||||
format_muted = "%volume"
|
|
||||||
device = "default"
|
|
||||||
mixer = "Master"
|
|
||||||
mixer_idx = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
tztime local {
|
|
||||||
format = "%Y-%m-%d %H:%M"
|
|
||||||
}
|
|
||||||
|
|
||||||
load {
|
|
||||||
format = "%1min"
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
in ''
|
|
||||||
${pkgs.i3status}/bin/i3status -c ${i3status-config}
|
|
||||||
'';
|
|
||||||
}];
|
|
||||||
keybindings = {
|
|
||||||
"${modifier}+Down" = "focus down";
|
|
||||||
"${modifier}+Left" = "focus left";
|
|
||||||
"${modifier}+Return" = "exec ${config.defaultApplications.terminal}";
|
|
||||||
"${modifier}+Right" = "focus right";
|
|
||||||
"${modifier}+Shift+Down" = "move down";
|
|
||||||
"${modifier}+Shift+Left" = "move left";
|
|
||||||
"${modifier}+Shift+Right" = "move right";
|
|
||||||
"${modifier}+Shift+Up" = "move up";
|
|
||||||
"${modifier}+Shift+c" = "reload";
|
|
||||||
"${modifier}+Shift+n" = "move window to workspace next";
|
|
||||||
"${modifier}+Shift+b" = "move window to workspace prev";
|
|
||||||
"${modifier}+Shift+q" = "kill";
|
|
||||||
"${modifier}+Shift+r" = "restart";
|
|
||||||
"${modifier}+Shift+w" = "exec ${pkgs.xautolock}/bin/xautolock -locknow";
|
|
||||||
"${modifier}+Shift+x" = "exec --no-startup-id ${move-to-new-workspace}";
|
|
||||||
"${modifier}+Shift+z" = "floating toggle";
|
|
||||||
"${modifier}+Up" = "focus up";
|
|
||||||
"${modifier}+a" = "exec ${pkgs.rofi}/bin/rofi -display-window — -show window";
|
|
||||||
"${modifier}+d" = "exec ${pkgs.rofi}/bin/rofi -display-run — -show run";
|
|
||||||
"${modifier}+e" = "layout toggle split";
|
|
||||||
"${modifier}+f" = "fullscreen toggle";
|
|
||||||
"${modifier}+h" = "split h";
|
|
||||||
"${modifier}+n" = "workspace next";
|
|
||||||
"${modifier}+b" = "workspace prev";
|
|
||||||
"${modifier}+p" = "exec ${pkgs.rofi-pass}/bin/rofi-pass";
|
|
||||||
"${modifier}+r" = "mode resize";
|
|
||||||
"${modifier}+s" = "layout stacking";
|
|
||||||
"${modifier}+t" = "exec ${config.defaultApplications.fileManager}";
|
|
||||||
"${modifier}+v" = "split v";
|
|
||||||
"${modifier}+w" = "layout tabbed";
|
|
||||||
"${modifier}+x" = "exec --no-startup-id ${new-workspace}";
|
|
||||||
"${modifier}+y" = "exec ${config.defaultApplications.browser}";
|
|
||||||
"XF86AudioLowerVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -d 5 && pkill -RTMIN+3 i3blocks";
|
|
||||||
"XF86AudioMute" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -t && pkill -RTMIN+3 i3blocks";
|
|
||||||
"XF86AudioRaiseVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5 && pkill -RTMIN+3 i3blocks";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
10
dot/mpv.nix
10
dot/mpv.nix
@@ -1,10 +0,0 @@
|
|||||||
''
|
|
||||||
Alt+RIGHT add video-rotate 90
|
|
||||||
Alt+LEFT add video-rotate -90
|
|
||||||
Alt+- add video-zoom -0.25
|
|
||||||
Alt+= add video-zoom 0.25
|
|
||||||
Alt+l add video-pan-x -0.05
|
|
||||||
Alt+h add video-pan-x 0.05
|
|
||||||
Alt+k add video-pan-y 0.05
|
|
||||||
Alt+j add video-pan-y -0.05
|
|
||||||
''
|
|
||||||
38
dot/rofi.nix
38
dot/rofi.nix
@@ -1,38 +0,0 @@
|
|||||||
{ config }:
|
|
||||||
with import <dot/theme.nix>;
|
|
||||||
{
|
|
||||||
enable = true;
|
|
||||||
separator = "solid";
|
|
||||||
scrollbar = false;
|
|
||||||
terminal = config.defaultApplications.terminal;
|
|
||||||
borderWidth = 0;
|
|
||||||
lines = 5;
|
|
||||||
font = "${terminalFont.name} ${toString (terminalFont.size + 1)}";
|
|
||||||
colors = rec {
|
|
||||||
window = {
|
|
||||||
background = invertedColorScheme.background;
|
|
||||||
border = invertedColorScheme.background;
|
|
||||||
separator = invertedColorScheme.black.light;
|
|
||||||
};
|
|
||||||
rows = {
|
|
||||||
normal = {
|
|
||||||
background = window.background;
|
|
||||||
backgroundAlt = window.background;
|
|
||||||
foreground = invertedColorScheme.foreground;
|
|
||||||
highlight = { foreground = invertedColorScheme.cyan.dark; inherit (window) background; };
|
|
||||||
};
|
|
||||||
active = {
|
|
||||||
background = window.background;
|
|
||||||
backgroundAlt = window.background;
|
|
||||||
foreground = invertedColorScheme.yellow.dark;
|
|
||||||
highlight = { foreground = invertedColorScheme.green.dark; inherit (window) background; };
|
|
||||||
};
|
|
||||||
urgent = {
|
|
||||||
background = window.background;
|
|
||||||
backgroundAlt = window.background;
|
|
||||||
foreground = invertedColorScheme.red.dark;
|
|
||||||
highlight = { foreground = invertedColorScheme.magenta.dark; inherit (window) background; };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{ user }:
|
|
||||||
''
|
|
||||||
templates:
|
|
||||||
params:
|
|
||||||
author-name: ${user.name}
|
|
||||||
author-email: ${user.email}
|
|
||||||
copyright: 'Copyright: (c) 2019 ${user.name}'
|
|
||||||
github-username: ${user.github}
|
|
||||||
''
|
|
||||||
27
dot/tmux.nix
27
dot/tmux.nix
@@ -1,27 +0,0 @@
|
|||||||
''
|
|
||||||
set -g status-interval 2
|
|
||||||
set -g status-left-length 32
|
|
||||||
set -g status-right-length 150
|
|
||||||
|
|
||||||
set -g status-bg default
|
|
||||||
|
|
||||||
setw -g window-status-format "#[fg=colour12,bg=colour233] #I #[fg=white,bg=colour237] #W "
|
|
||||||
setw -g window-status-current-format "#[fg=colour12,bg=colour233] * #[fg=white,bg=colour237,bold] #W "
|
|
||||||
|
|
||||||
set -g status-left ""
|
|
||||||
set -g status-right "# [fg=colour255,bg=colour237,bold] %Y-%m-%d #[default]#[fg=colour12,bg=colour233] %H:%M "
|
|
||||||
set -g status-justify left
|
|
||||||
|
|
||||||
set -g pane-active-border-fg colour237
|
|
||||||
set -g pane-border-fg colour237
|
|
||||||
set -g pane-active-border-bg default
|
|
||||||
set -g pane-border-bg default
|
|
||||||
|
|
||||||
set -g status-position bottom
|
|
||||||
|
|
||||||
set -g mouse on
|
|
||||||
|
|
||||||
# displays *
|
|
||||||
unbind *
|
|
||||||
bind * list-clients
|
|
||||||
''
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
{ config, pkgs }:
|
|
||||||
let theme = import <dot/theme.nix>;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.rxvt_unicode-with-plugins;
|
|
||||||
keybindings = {
|
|
||||||
"Shift-Control-C" = "eval:selection_to_clipboard";
|
|
||||||
"Shift-Control-V" = "eval:paste_clipboard";
|
|
||||||
};
|
|
||||||
scroll.bar.enable = false;
|
|
||||||
extraConfig = {
|
|
||||||
perl-ext = "default,url-select";
|
|
||||||
"url-select.launcher" = "/usr/bin/env chromium";
|
|
||||||
"url-select.underline" = true;
|
|
||||||
"colorUL" = theme.colorScheme.blue.light;
|
|
||||||
"perl-lib" = "${pkgs.urxvt_perls}/lib/urxvt/perl";
|
|
||||||
urlLauncher = "/usr/bin/env chromium";
|
|
||||||
fading = 20;
|
|
||||||
iso14755 = false;
|
|
||||||
urgentOnBell = true;
|
|
||||||
reverseVideo = false;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -112,7 +112,7 @@ if has("autocmd")
|
|||||||
autocmd bufnewfile,bufread *.conf set filetype=conf
|
autocmd bufnewfile,bufread *.conf set filetype=conf
|
||||||
autocmd bufnewfile,bufread *.fs packadd vim-fsharp | set filetype=fsharp
|
autocmd bufnewfile,bufread *.fs packadd vim-fsharp | set filetype=fsharp
|
||||||
autocmd bufnewfile,bufread *.h set keywordprg=man\ 3
|
autocmd bufnewfile,bufread *.h set keywordprg=man\ 3
|
||||||
autocmd bufnewfile,bufread *.nix packadd vim-nix | set filetype=nix
|
autocmd bufnewfile,bufread *.nix packadd vim-nix | set filetype=nix | set path+=/var/src
|
||||||
autocmd bufnewfile,bufread *.rust packadd rust-vim " | packadd deoplete-rust
|
autocmd bufnewfile,bufread *.rust packadd rust-vim " | packadd deoplete-rust
|
||||||
autocmd bufnewfile,bufread *.csv packadd csv-vim | set filetype=csv
|
autocmd bufnewfile,bufread *.csv packadd csv-vim | set filetype=csv
|
||||||
autocmd bufnewfile,bufread *.tex packadd vimtex | set filetype=tex
|
autocmd bufnewfile,bufread *.tex packadd vimtex | set filetype=tex
|
||||||
|
|||||||
39
modules/constants.nix
Normal file
39
modules/constants.nix
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
with lib;
|
||||||
|
with import <dot/theme.nix>;
|
||||||
|
let
|
||||||
|
stringOption = mkOption { type = types.string; };
|
||||||
|
themeOption = mkOption {
|
||||||
|
type = types.submodule {
|
||||||
|
options = {
|
||||||
|
name = mkOption { type = types.string; };
|
||||||
|
package = mkOption { type = types.package; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
options.niveum = {
|
||||||
|
applications = {
|
||||||
|
terminal = stringOption;
|
||||||
|
browser = stringOption;
|
||||||
|
fileManager = stringOption;
|
||||||
|
};
|
||||||
|
|
||||||
|
user = {
|
||||||
|
github = stringOption;
|
||||||
|
name = stringOption;
|
||||||
|
email = stringOption;
|
||||||
|
};
|
||||||
|
|
||||||
|
ignore = mkOption {
|
||||||
|
type = types.listOf types.string;
|
||||||
|
default = [ "*~" ".stack-work/" "__pycache__/" ".mypy_cache/" "*.py[co]" "*.o" "*.hi" "*.aux" "*.bbl" "*.bcf" "*.blg" "*.fdb_latexmk" "*.fls" "*.out" "*.run.xml" "*.toc" "*.bbl" "*.class" "*.dyn_hi" "*.dyn_o" "dist/" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
theme = {
|
||||||
|
gtk = themeOption;
|
||||||
|
icon = themeOption;
|
||||||
|
cursor = themeOption;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
9
modules/default.nix
Normal file
9
modules/default.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
<modules/constants.nix>
|
||||||
|
<modules/dropbox.nix>
|
||||||
|
<modules/google-drive.nix>
|
||||||
|
<modules/retiolum.nix>
|
||||||
|
<modules/seafile.nix>
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
with lib;
|
|
||||||
with import <dot/theme.nix>;
|
|
||||||
let
|
|
||||||
unstable = import <nixos-unstable> {};
|
|
||||||
stringOption = def: mkOption { type = types.string; default = def; };
|
|
||||||
themeOption = def: mkOption {
|
|
||||||
type = types.submodule {
|
|
||||||
options = {
|
|
||||||
name = mkOption { type = types.string; default = def.name; };
|
|
||||||
package = mkOption { type = types.package; default = def.package; };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
default = def;
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
options.defaultApplications = mapAttrs (const stringOption) rec {
|
|
||||||
terminal = "${pkgs.rxvt_unicode-with-plugins}/bin/urxvtc";
|
|
||||||
browser = "${pkgs.chromium}/bin/chromium";
|
|
||||||
fileManager = "${terminal} -e ${pkgs.ranger}/bin/ranger";
|
|
||||||
# locker = "${pkgs.i3lock}/bin/i3lock -u -c ${strings.removePrefix "#" colorScheme.background}";
|
|
||||||
locker = "${pkgs.lightlocker}/bin/light-locker-command -l";
|
|
||||||
};
|
|
||||||
|
|
||||||
options.constants = {
|
|
||||||
user = mapAttrs (const stringOption) {
|
|
||||||
github = "kmein";
|
|
||||||
name = "Kierán Meinhardt";
|
|
||||||
email = "kieran.meinhardt@gmail.com";
|
|
||||||
};
|
|
||||||
|
|
||||||
ignore = mkOption {
|
|
||||||
type = types.listOf types.string;
|
|
||||||
default = [ "*~" ".stack-work/" "__pycache__/" ".mypy_cache/" "*.py[co]" "*.o" "*.hi" "*.aux" "*.bbl" "*.bcf" "*.blg" "*.fdb_latexmk" "*.fls" "*.out" "*.run.xml" "*.toc" "*.bbl" "*.class" "*.dyn_hi" "*.dyn_o" "dist/" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
theme = mapAttrs (const themeOption) {
|
|
||||||
gtk = { name = "Arc"; package = pkgs.arc-theme; };
|
|
||||||
icon = { name = "Arc"; package = pkgs.arc-icon-theme; };
|
|
||||||
cursor = { name = "capitaine-cursors"; package = pkgs.capitaine-cursors; };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
15
modules/dropbox.nix
Normal file
15
modules/dropbox.nix
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{ pkgs, lib, config, ... }:
|
||||||
|
with lib;
|
||||||
|
let cfg = config.niveum.dropbox;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.niveum.dropbox = {
|
||||||
|
enable = mkEnableOption "Dropbox";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services.xserver.displayManager.sessionCommands = "${pkgs.dropbox}/bin/dropbox &";
|
||||||
|
|
||||||
|
environment.systemPackages = [ pkgs.dropbox-cli ];
|
||||||
|
};
|
||||||
|
}
|
||||||
31
modules/google-drive.nix
Normal file
31
modules/google-drive.nix
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
{ pkgs, config, lib, ... }:
|
||||||
|
with lib;
|
||||||
|
let cfg = config.niveum.google-drive;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.niveum.google-drive = {
|
||||||
|
enable = mkEnableOption "Google Drive";
|
||||||
|
directory = mkOption { type = types.path; };
|
||||||
|
user = mkOption { type = types.attrs; };
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.grive2
|
||||||
|
];
|
||||||
|
|
||||||
|
systemd.services.google-drive = {
|
||||||
|
description = "Google Drive synchronisation service";
|
||||||
|
wants = [ "network-online.target" ];
|
||||||
|
script = ''
|
||||||
|
${pkgs.grive2}/bin/grive -p ${cfg.directory}
|
||||||
|
'';
|
||||||
|
startAt = "*:0/5";
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
User = cfg.user.name;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
14
modules/seafile.nix
Normal file
14
modules/seafile.nix
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{ pkgs, config, lib, ... }:
|
||||||
|
with lib;
|
||||||
|
let cfg = config.niveum.seafile;
|
||||||
|
in {
|
||||||
|
options.niveum.seafile = {
|
||||||
|
enable = mkEnableOption "Seafile";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.xserver.displayManager.sessionCommands = "${pkgs.seafile-client}/bin/seafile-applet &";
|
||||||
|
|
||||||
|
environment.systemPackages = [ pkgs.seafile-client pkgs.seafile-shared ];
|
||||||
|
};
|
||||||
|
}
|
||||||
26
packages/font-size.nix
Normal file
26
packages/font-size.nix
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{ writeDashBin, font }:
|
||||||
|
writeDashBin "font-size" ''
|
||||||
|
set -efu
|
||||||
|
|
||||||
|
# set_font NORMAL_FONT BOLD_FONT
|
||||||
|
set_font() {
|
||||||
|
printf '\033]710;%s\007' "$1"
|
||||||
|
printf '\033]711;%s\007' "$2"
|
||||||
|
}
|
||||||
|
|
||||||
|
case ''${1-} in
|
||||||
|
'''|0|--reset)
|
||||||
|
set_font \
|
||||||
|
"xft:${font.name}:size=${toString font.size}" \
|
||||||
|
"xft:${font.name}:size=${toString font.size}:bold" \
|
||||||
|
;;
|
||||||
|
[2-9]|[1-9][0-9]|[1-9][0-9][0-9])
|
||||||
|
set_font \
|
||||||
|
"xft:${font.name}:size=$1" \
|
||||||
|
"xft:${font.name}:size=$1:bold" \
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "$0: bad argument: $1" >&2
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
''
|
||||||
22
packages/genius.nix
Normal file
22
packages/genius.nix
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{ writeDashBin, gnused, curl, pandoc }:
|
||||||
|
writeDashBin "genius" ''
|
||||||
|
test $# -eq 2 || (
|
||||||
|
echo "usage: $0 <artist> <song>"
|
||||||
|
exit 1
|
||||||
|
)
|
||||||
|
|
||||||
|
normalize() {
|
||||||
|
tr -d -c '0-9A-Za-z ' | tr ' ' - | tr '[:upper:]' '[:lower:]'
|
||||||
|
}
|
||||||
|
|
||||||
|
ARTIST=$(echo "$1" | normalize | ${gnused}/bin/sed 's/./\U&/')
|
||||||
|
TITLE=$(echo "$2" | normalize)
|
||||||
|
GENIUS_URL="https://genius.com/$ARTIST-$TITLE-lyrics"
|
||||||
|
|
||||||
|
${curl}/bin/curl -s "$GENIUS_URL" \
|
||||||
|
| ${gnused}/bin/sed -ne '/class="lyrics"/,/<\/p>/p' \
|
||||||
|
| ${pandoc}/bin/pandoc -f html -s -t plain \
|
||||||
|
| ${gnused}/bin/sed 's/^_/\x1b[3m/g;s/_$/\x1b[0m/g;s/^\[/\n\x1b\[1m\[/g;s/\]$/\]\x1b[0m/g'
|
||||||
|
|
||||||
|
printf "\n(source: $GENIUS_URL)\n" >/dev/stderr
|
||||||
|
''
|
||||||
13
packages/instaget.nix
Normal file
13
packages/instaget.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{ writeDashBin, wget, curl, jq }:
|
||||||
|
writeDashBin "instaget" ''
|
||||||
|
for url in "$@"; do
|
||||||
|
${curl}/bin/curl -s "$url" \
|
||||||
|
| grep display_url \
|
||||||
|
| grep -o '{.*}' \
|
||||||
|
| ${jq}/bin/jq -r '
|
||||||
|
.entry_data.PostPage
|
||||||
|
| .[].graphql.shortcode_media.edge_sidecar_to_children.edges
|
||||||
|
| .[].node.display_url' \
|
||||||
|
| xargs ${wget}/bin/wget
|
||||||
|
done
|
||||||
|
''
|
||||||
2
packages/n.nix
Normal file
2
packages/n.nix
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
{ writeDashBin }:
|
||||||
|
writeDashBin "n" ''nix-shell -p "$1" --run "''${2:-$1}"''
|
||||||
4
packages/nix-git.nix
Normal file
4
packages/nix-git.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{ writeDashBin, nix-prefetch-git, jq }:
|
||||||
|
writeDashBin "nix-git" ''
|
||||||
|
${nix-prefetch-git}/bin/nix-prefetch-git "$@" 2> /dev/null | ${jq}/bin/jq -r '"rev = \"\(.rev)\";\nsha256 = \"\(.sha256)\";"'
|
||||||
|
''
|
||||||
4
packages/wttr.nix
Normal file
4
packages/wttr.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{ writeDashBin, curl, jq }:
|
||||||
|
writeDashBin "wttr" ''
|
||||||
|
${curl}/bin/curl -s -H "Accept-Language: ''${LANG%_*}" --compressed "wttr.in/''${1-"@$(${curl}/bin/curl -s ipinfo.io | ${jq}/bin/jq -r .ip)"}?0"
|
||||||
|
''
|
||||||
@@ -1,121 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
let
|
|
||||||
helpers = import <lib>;
|
|
||||||
in {
|
|
||||||
imports = [
|
|
||||||
<home-manager/nixos>
|
|
||||||
<modules/defaultApplications.nix>
|
|
||||||
<configs/hu-berlin.nix>
|
|
||||||
<configs/shells.nix>
|
|
||||||
<configs/editors.nix>
|
|
||||||
<configs/graphics.nix>
|
|
||||||
<configs/packages.nix>
|
|
||||||
<configs/networks.nix>
|
|
||||||
<configs/scripts.nix>
|
|
||||||
<configs/retiolum.nix>
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.cleanTmpDir = true;
|
|
||||||
boot.loader.timeout = 1;
|
|
||||||
boot.extraModulePackages = [ config.boot.kernelPackages.exfat-nofuse ];
|
|
||||||
|
|
||||||
time.timeZone = "Europe/Berlin";
|
|
||||||
|
|
||||||
sound.enable = true;
|
|
||||||
|
|
||||||
hardware.pulseaudio = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.pulseaudioFull; # for bluetooth sound output
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.bluetooth = {
|
|
||||||
enable = true;
|
|
||||||
extraConfig = ''
|
|
||||||
[General]
|
|
||||||
Enable=Source,Sink,Media,Socket
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
services.printing = {
|
|
||||||
enable = true;
|
|
||||||
drivers = [ pkgs.hplipWithPlugin ];
|
|
||||||
};
|
|
||||||
|
|
||||||
security.sudo = {
|
|
||||||
enable = true;
|
|
||||||
extraConfig = ''
|
|
||||||
Defaults pwfeedback
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
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 = {
|
|
||||||
Type = "oneshot";
|
|
||||||
User = config.users.users.kfm.name;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.tmux = {
|
|
||||||
enable = true;
|
|
||||||
extraTmuxConf = import <dot/tmux.nix>;
|
|
||||||
keyMode = "vi";
|
|
||||||
terminal = "screen-256color";
|
|
||||||
};
|
|
||||||
|
|
||||||
users.mutableUsers = false;
|
|
||||||
|
|
||||||
users.users.kfm = {
|
|
||||||
name = "kfm";
|
|
||||||
description = config.constants.user.name;
|
|
||||||
home = "/home/kfm";
|
|
||||||
createHome = true;
|
|
||||||
group = "users";
|
|
||||||
extraGroups = [ "wheel" "audio" "docker" ];
|
|
||||||
hashedPassword = "$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/";
|
|
||||||
shell = pkgs.zsh;
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager.users.kfm = {
|
|
||||||
programs.git = {
|
|
||||||
enable = true;
|
|
||||||
userName = config.constants.user.name;
|
|
||||||
userEmail = config.constants.user.email;
|
|
||||||
aliases = {
|
|
||||||
br = "branch";
|
|
||||||
co = "checkout";
|
|
||||||
ci = "commit";
|
|
||||||
cm = "commit -m";
|
|
||||||
amend = "commit --amend";
|
|
||||||
st = "status";
|
|
||||||
unstage = "reset HEAD --";
|
|
||||||
diffs = "diff --staged";
|
|
||||||
last = "log -1 HEAD";
|
|
||||||
logs = "log --pretty=oneline";
|
|
||||||
pull-all = "!pull-all"; # from dot/scripts.nix
|
|
||||||
};
|
|
||||||
ignores = config.constants.ignore;
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.configFile = {
|
|
||||||
"mpv/input.conf".text = import <dot/mpv.nix>;
|
|
||||||
"htop/htoprc".text = builtins.readFile <dot/htoprc>;
|
|
||||||
"zathura/zathurarc".text = "set selection-clipboard clipboard";
|
|
||||||
"pycodestyle".text = ''
|
|
||||||
[pycodestyle]
|
|
||||||
max-line-length = 110
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
home.file = {
|
|
||||||
".ghc/ghci.conf".text = import <dot/ghci.nix> { inherit pkgs; };
|
|
||||||
".stack/config.yaml".text = import <dot/stack.nix> { user = config.constants.user; };
|
|
||||||
".zshrc".text = "# nothing to see here";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,14 +1,22 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports =
|
imports = [
|
||||||
[ <systems/generic.nix>
|
<configs>
|
||||||
./hardware-configuration.nix
|
{
|
||||||
];
|
services.xserver.xrandrHeads = [ "LVDS1" { output = "HDMI1"; primary = true; } ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
environment.systemPackages =
|
||||||
|
let unstable = import <nixos-unstable> {};
|
||||||
|
in [ unstable.zeroad ];
|
||||||
|
}
|
||||||
|
./hardware-configuration.nix
|
||||||
|
];
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
networking.hostName = "homeros";
|
networking.hostName = "homeros";
|
||||||
|
|
||||||
system.stateVersion = "19.03";
|
system.stateVersion = "18.09";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,17 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports =
|
imports = [
|
||||||
[ <systems/generic.nix>
|
<configs>
|
||||||
./hardware-configuration.nix
|
{
|
||||||
];
|
services.xserver.xrandrHeads = [ "eDP1" ];
|
||||||
|
}
|
||||||
|
./hardware-configuration.nix
|
||||||
|
];
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
networking.hostName = "scardanelli";
|
networking.hostName = "scardanelli";
|
||||||
|
|
||||||
system.stateVersion = "19.03";
|
system.stateVersion = "18.09";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user