2021-05-29 17:58:13 +02:00
|
|
|
{ lib, config, options, pkgs, ... }:
|
2021-05-23 17:31:52 +02:00
|
|
|
let
|
2022-04-11 11:38:39 +02:00
|
|
|
y-firefox = pkgs.wrapFirefox pkgs.latest.firefox-bin.unwrapped {
|
2021-05-23 17:31:52 +02:00
|
|
|
forceWayland = true;
|
2021-10-06 17:18:46 +02:00
|
|
|
applicationName = "firefox";
|
2021-05-23 17:31:52 +02:00
|
|
|
};
|
2021-05-29 18:32:09 +02:00
|
|
|
thefuck-alias = shell: pkgs.runCommand "thefuck-alias" {
|
|
|
|
TF_SHELL = shell;
|
2022-01-17 20:35:48 +01:00
|
|
|
HOME = "/build";
|
2021-05-29 18:32:09 +02:00
|
|
|
} "${pkgs.thefuck}/bin/thefuck -a > $out";
|
2021-05-29 18:05:31 +02:00
|
|
|
in {
|
2021-06-06 15:14:27 +02:00
|
|
|
imports = [ ./arbtt.nix ./desktop.nix ];
|
2021-05-29 17:58:13 +02:00
|
|
|
nixpkgs = {
|
|
|
|
config.allowUnfree = true;
|
|
|
|
inherit (import /home/yorick/dotfiles/config.nix) overlays;
|
|
|
|
};
|
|
|
|
home = {
|
|
|
|
stateVersion = "20.09";
|
|
|
|
username = "yorick";
|
|
|
|
homeDirectory = "/home/yorick";
|
|
|
|
};
|
2018-04-07 20:04:20 +02:00
|
|
|
programs = {
|
2021-06-06 15:40:00 +02:00
|
|
|
starship = {
|
|
|
|
enable = true;
|
|
|
|
settings.nix_shell.disabled = false;
|
|
|
|
};
|
2021-06-06 15:57:47 +02:00
|
|
|
# todo: .aws/config default region
|
2021-05-23 17:31:52 +02:00
|
|
|
gh = {
|
|
|
|
enable = true;
|
2021-11-15 13:34:51 +01:00
|
|
|
settings.aliases.co = "pr checkout";
|
2021-05-23 17:31:52 +02:00
|
|
|
};
|
|
|
|
direnv.enable = true;
|
2018-04-07 20:04:20 +02:00
|
|
|
home-manager = {
|
|
|
|
enable = true;
|
2021-05-29 17:58:13 +02:00
|
|
|
path = toString /home/yorick/dotfiles;
|
2021-05-23 17:31:52 +02:00
|
|
|
};
|
|
|
|
emacs = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.emacsPgtkGcc;
|
2021-05-29 18:05:31 +02:00
|
|
|
extraPackages = _:
|
|
|
|
let epkgs = pkgs.emacsPackagesFor pkgs.emacsPgtkGcc;
|
|
|
|
in (with epkgs.melpaPackages; [
|
|
|
|
reason-mode
|
|
|
|
evil
|
|
|
|
counsel
|
|
|
|
ivy
|
|
|
|
ivy-hydra
|
|
|
|
swiper
|
|
|
|
magit
|
2021-08-08 17:22:04 +02:00
|
|
|
#forge # todo: doesn't build
|
2021-05-29 18:05:31 +02:00
|
|
|
avy
|
2021-08-08 17:22:04 +02:00
|
|
|
lsp-mode
|
|
|
|
(lsp-ui.overrideAttrs (o: {
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "emacs-lsp";
|
|
|
|
repo = "lsp-ui";
|
|
|
|
rev = "240a7de26400cf8b13312c3f9acf7ce653bdaa8a";
|
|
|
|
sha256 = "1zscdjlnkx43i4kw2qmlvji23xfpw7n5y4v99ld33205dg905fsy";
|
|
|
|
};
|
|
|
|
}))
|
|
|
|
lsp-haskell
|
|
|
|
flycheck
|
|
|
|
lsp-ivy
|
2021-05-29 18:05:31 +02:00
|
|
|
]) ++ (with epkgs.melpaPackages; [
|
|
|
|
epkgs.undo-tree
|
|
|
|
epkgs.notmuch
|
|
|
|
epkgs.rust-mode
|
2022-01-13 20:36:30 +01:00
|
|
|
pkgs.emacsPackagesNg.crdt
|
2021-05-29 18:05:31 +02:00
|
|
|
company
|
|
|
|
projectile
|
|
|
|
counsel-projectile
|
|
|
|
ggtags
|
|
|
|
use-package
|
|
|
|
org-bullets
|
|
|
|
solarized-theme
|
|
|
|
evil-leader
|
|
|
|
evil-surround # evil-magit
|
|
|
|
epkgs.evil-goggles
|
|
|
|
epkgs.ox-mediawiki
|
|
|
|
nix-buffer
|
|
|
|
which-key
|
|
|
|
git-gutter-fringe
|
|
|
|
all-the-icons
|
|
|
|
epkgs.org-cliplink
|
|
|
|
pandoc-mode
|
|
|
|
markdown-mode
|
2021-05-29 21:44:48 +02:00
|
|
|
#interleave
|
2021-05-29 18:05:31 +02:00
|
|
|
org-ref
|
|
|
|
haskell-mode
|
|
|
|
request # intero
|
|
|
|
weechat
|
|
|
|
s
|
|
|
|
elixir-mode
|
|
|
|
htmlize
|
|
|
|
linum-relative
|
|
|
|
terraform-mode
|
|
|
|
direnv
|
|
|
|
vue-mode
|
|
|
|
solarized-theme
|
|
|
|
#wlrctl
|
2021-08-08 17:22:04 +02:00
|
|
|
nix-mode
|
|
|
|
# (epkgs.melpaBuild {
|
|
|
|
# pname = "nix-mode";
|
|
|
|
# version = "1.4.0";
|
|
|
|
# packageRequires = [ json-mode epkgs.mmm-mode company ];
|
|
|
|
# recipe = pkgs.writeText "recipe" ''
|
|
|
|
# (nix-mode
|
|
|
|
# :repo "nixos/nix-mode" :fetcher github
|
|
|
|
# :files ("nix*.el"))
|
|
|
|
# '';
|
|
|
|
# src = pkgs.fetchFromGitHub {
|
|
|
|
# owner = "nixos";
|
|
|
|
# repo = "nix-mode";
|
|
|
|
# rev = "ddf091708b9069f1fe0979a7be4e719445eed918";
|
|
|
|
# sha256 = "0s8ljr4d7kys2xqrhkvj75l7babvk60kxgy4vmyqfwj6xmcxi3ad";
|
|
|
|
# };
|
|
|
|
# })
|
2021-05-29 18:05:31 +02:00
|
|
|
]);
|
2018-04-07 20:04:20 +02:00
|
|
|
};
|
|
|
|
git = {
|
2022-01-13 20:36:50 +01:00
|
|
|
#lfs.enable = true;
|
2018-04-07 20:04:20 +02:00
|
|
|
enable = true;
|
|
|
|
userName = "Yorick van Pelt";
|
|
|
|
userEmail = "yorick@yorickvanpelt.nl";
|
|
|
|
signing.key = "A36E70F9DC014A15";
|
2021-05-23 17:31:52 +02:00
|
|
|
signing.signByDefault = true;
|
2018-04-07 20:04:20 +02:00
|
|
|
extraConfig.help.autocorrect = 5;
|
|
|
|
extraConfig.push.default = "simple";
|
2021-05-23 17:31:52 +02:00
|
|
|
extraConfig.pull.ff = "only";
|
2021-05-29 18:05:31 +02:00
|
|
|
extraConfig."includeIf \"gitdir:~/serokell/\"".path =
|
|
|
|
"~/serokell/.gitconfig";
|
2018-04-07 20:04:20 +02:00
|
|
|
aliases = {
|
2021-05-29 18:05:31 +02:00
|
|
|
lg =
|
|
|
|
"log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative";
|
2018-04-07 20:04:20 +02:00
|
|
|
st = "status";
|
|
|
|
remotes = "remote -v";
|
|
|
|
branches = "branch -a";
|
|
|
|
tags = "tag";
|
|
|
|
stashes = "stash list";
|
|
|
|
unstage = "reset -q HEAD --";
|
|
|
|
discard = "checkout --";
|
|
|
|
uncommit = "reset --mixed HEAD~";
|
2021-05-29 18:05:31 +02:00
|
|
|
graph =
|
|
|
|
"log --graph -10 --branches --remotes --tags --format=format:'%Cgreen%h %Creset• %<(75,trunc)%s (%cN, %cr) %Cred%d' --date-order ";
|
2018-04-07 20:04:20 +02:00
|
|
|
dad = "!curl https://icanhazdadjoke.com/ && git add";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-04-07 20:20:22 +02:00
|
|
|
ssh = {
|
|
|
|
enable = true;
|
|
|
|
compression = true;
|
|
|
|
serverAliveInterval = 120;
|
|
|
|
controlMaster = "auto";
|
2021-05-29 18:32:09 +02:00
|
|
|
matchBlocks = let
|
|
|
|
lumigod = hostname: {
|
|
|
|
inherit hostname;
|
|
|
|
port = 2233;
|
|
|
|
user = "yorick.van.pelt";
|
|
|
|
};
|
|
|
|
lumivpn = {
|
|
|
|
user = "yorick.van.pelt";
|
|
|
|
# verified by wireguard key
|
|
|
|
extraOptions.StrictHostKeyChecking = "no";
|
|
|
|
};
|
|
|
|
in rec {
|
2018-04-07 20:20:22 +02:00
|
|
|
"pub.yori.cc" = {
|
|
|
|
user = "public";
|
|
|
|
identityFile = "~/.ssh/id_rsa_pub";
|
|
|
|
identitiesOnly = true;
|
|
|
|
};
|
2021-05-29 18:05:31 +02:00
|
|
|
phassa = {
|
|
|
|
hostname = "karpenoktem.nl";
|
|
|
|
port = 33933;
|
|
|
|
};
|
|
|
|
athena = {
|
|
|
|
hostname = "athena.lumi.guide";
|
|
|
|
user = "yorick.van.pelt";
|
|
|
|
};
|
|
|
|
rpibuild3 = {
|
|
|
|
hostname = "10.110.0.3";
|
|
|
|
user = "yorick.van.pelt";
|
|
|
|
port = 4222;
|
|
|
|
};
|
2021-10-06 17:18:46 +02:00
|
|
|
rpibuild4 = {
|
|
|
|
hostname = "rpibuild4.lumi.guide";
|
|
|
|
user = "yorick.van.pelt";
|
|
|
|
port = 4222;
|
|
|
|
};
|
2021-05-29 18:32:09 +02:00
|
|
|
styx = lumigod "10.110.0.1";
|
2021-05-29 18:05:31 +02:00
|
|
|
"*.lumi.guide" = { user = "yorick.van.pelt"; };
|
2021-05-29 18:32:09 +02:00
|
|
|
zeus = lumigod "zeus.lumi.guide";
|
|
|
|
ponos = lumigod "ponos.lumi.guide";
|
|
|
|
medusa = lumigod "lumi.guide";
|
2021-05-23 17:31:52 +02:00
|
|
|
# signs
|
2021-05-29 18:32:09 +02:00
|
|
|
"10.108.0.*" = lumivpn // { port = 4222; };
|
|
|
|
"10.109.0.*" = lumivpn;
|
|
|
|
"10.110.0.*" = lumivpn // { port = 2233; };
|
|
|
|
"10.111.0.*" = lumivpn;
|
2021-05-23 17:31:52 +02:00
|
|
|
"192.168.42.*" = {
|
|
|
|
user = "yorick.van.pelt";
|
|
|
|
};
|
2022-03-20 15:27:00 +01:00
|
|
|
"karpenoktem.nl" = {
|
|
|
|
user = "root";
|
|
|
|
};
|
|
|
|
sankhara = {
|
|
|
|
user = "infra";
|
|
|
|
port = 33931;
|
|
|
|
hostname = "sankhara.karpenoktem.nl";
|
|
|
|
};
|
2021-05-23 17:31:52 +02:00
|
|
|
# "192.168.178.*" = {
|
2021-05-29 18:32:09 +02:00
|
|
|
# only if wired
|
2021-05-23 17:31:52 +02:00
|
|
|
# extraOptions.Compression = "no";
|
|
|
|
# };
|
|
|
|
};
|
|
|
|
extraConfig = ''
|
|
|
|
Match host "192.168.*.*" exec "ip route get %h | grep -v -q via"
|
|
|
|
Compression no
|
|
|
|
Match host "192.168.42.*" exec "ip route get %h | grep -q via"
|
|
|
|
ProxyJump athena
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
fish = {
|
|
|
|
enable = true;
|
|
|
|
shellAliases = {
|
|
|
|
l = "ls";
|
|
|
|
ls = "exa";
|
2021-05-29 18:05:31 +02:00
|
|
|
nr = ''nix repl "<nixpkgs>"'';
|
2021-05-23 17:31:52 +02:00
|
|
|
nsp = "nix-shell -p";
|
2021-06-06 18:15:35 +02:00
|
|
|
lumi = "pushd ~/engineering/lumi; cached-nix-shell; popd";
|
2018-04-07 20:20:22 +02:00
|
|
|
};
|
2021-05-23 17:31:52 +02:00
|
|
|
interactiveShellInit = ''
|
2021-11-15 13:34:51 +01:00
|
|
|
set fish_greeting
|
2021-05-29 18:32:09 +02:00
|
|
|
source ${thefuck-alias "fish"}
|
2021-05-29 18:05:31 +02:00
|
|
|
source ~/dotfiles/nr.fish
|
2021-05-23 17:31:52 +02:00
|
|
|
'';
|
2018-04-07 20:20:22 +02:00
|
|
|
};
|
2018-04-07 20:27:44 +02:00
|
|
|
bash = {
|
|
|
|
enable = true;
|
|
|
|
historyControl = [ "erasedups" "ignoredups" "ignorespace" ];
|
|
|
|
shellAliases = {
|
2021-05-29 18:05:31 +02:00
|
|
|
nr = ''nix repl "<nixpkgs>"'';
|
2018-04-07 20:27:44 +02:00
|
|
|
nsp = "nix-shell -p";
|
|
|
|
};
|
2021-05-23 17:31:52 +02:00
|
|
|
initExtra = ''
|
2021-05-30 11:20:35 +02:00
|
|
|
source ${thefuck-alias "bash"}
|
2021-05-29 18:32:09 +02:00
|
|
|
eval "$(broot --print-shell-function bash)"
|
2021-06-06 18:15:35 +02:00
|
|
|
if [ "$IN_CACHED_NIX_SHELL" ]; then
|
|
|
|
eval "$shellHook"
|
|
|
|
unset shellHook
|
|
|
|
fi
|
2021-05-29 18:32:09 +02:00
|
|
|
'';
|
2018-04-07 20:27:44 +02:00
|
|
|
};
|
2018-04-07 20:04:20 +02:00
|
|
|
};
|
2021-05-29 18:05:31 +02:00
|
|
|
home.file.".emacs.d/init.el" = {
|
|
|
|
source = (toString /home/yorick/dotfiles/emacs/.emacs.d/init.el);
|
|
|
|
};
|
2021-05-30 12:55:27 +02:00
|
|
|
xdg.configFile."nixpkgs/config.nix".text = ''
|
|
|
|
import "${toString ../config.nix}"
|
|
|
|
'';
|
|
|
|
xdg.configFile."nixpkgs/overlays.nix".text = ''
|
|
|
|
import "${toString ../overlays.nix}"
|
|
|
|
'';
|
2018-04-07 20:20:22 +02:00
|
|
|
xdg.configFile."streamlink/config".text = ''
|
|
|
|
player = mpv --cache 2048
|
|
|
|
default-stream = best
|
|
|
|
'';
|
2018-04-07 20:57:37 +02:00
|
|
|
services = {
|
2021-05-23 17:31:52 +02:00
|
|
|
lorri.enable = true;
|
|
|
|
#arbtt.enable = true;
|
|
|
|
gpg-agent = {
|
2018-04-07 20:57:37 +02:00
|
|
|
enable = true;
|
2021-05-23 17:31:52 +02:00
|
|
|
enableSshSupport = true;
|
|
|
|
};
|
|
|
|
};
|
2021-05-29 18:05:31 +02:00
|
|
|
home.packages = with pkgs.envs;
|
2021-05-29 18:32:09 +02:00
|
|
|
[ apps code games pdf media misc scripts coins js ] ++ (with pkgs; [
|
2021-05-29 18:05:31 +02:00
|
|
|
github-cli
|
|
|
|
nix-tree
|
|
|
|
virt-manager
|
|
|
|
watchman
|
2022-03-16 17:12:11 +01:00
|
|
|
gcr.out # alacritty
|
2021-05-29 18:05:31 +02:00
|
|
|
notmuch
|
|
|
|
gmailieer
|
2021-05-30 11:47:17 +02:00
|
|
|
git-absorb
|
2022-01-17 20:35:48 +01:00
|
|
|
#afew
|
2021-05-29 18:05:31 +02:00
|
|
|
broot
|
|
|
|
fd
|
|
|
|
htop
|
|
|
|
kcachegrind
|
|
|
|
lm_sensors
|
|
|
|
niv
|
|
|
|
nixfmt
|
|
|
|
linuxPackages.perf
|
|
|
|
pssh
|
|
|
|
smartmontools
|
|
|
|
vim
|
|
|
|
xdg_utils
|
|
|
|
nix-top
|
|
|
|
nix-diff
|
|
|
|
ltrace
|
|
|
|
asciinema
|
|
|
|
cargo
|
|
|
|
minecraft
|
|
|
|
unzip
|
|
|
|
exa
|
|
|
|
cachix
|
|
|
|
y-firefox
|
2021-06-06 18:15:35 +02:00
|
|
|
cached-nix-shell
|
2021-05-29 18:05:31 +02:00
|
|
|
]); # qtwayland
|
2021-05-23 17:31:52 +02:00
|
|
|
# systemd.user.services.gmi = {
|
|
|
|
# Unit = {
|
|
|
|
# Description = "gmi";
|
|
|
|
# };
|
|
|
|
# Service = {
|
|
|
|
# CPUSchedulingPolicy = "idle";
|
|
|
|
# IOSchedulingClass = "idle";
|
|
|
|
# WorkingDirectory = "/home/yorick/mail/account.gmail";
|
|
|
|
# ExecStart = "${pkgs.writeScript "gmi-pull" ''
|
|
|
|
# #!/usr/bin/env bash
|
|
|
|
# gmi pull
|
|
|
|
# notmuch new
|
|
|
|
# ''}";
|
|
|
|
# };
|
|
|
|
# };
|
|
|
|
# systemd.user.timers.gmi = {
|
|
|
|
# Timer = {
|
|
|
|
# OnCalendar = "*:0/5";
|
|
|
|
# Unit = "gmi.service";
|
|
|
|
# };
|
|
|
|
# Install.WantedBy = [ "timers.target" ];
|
|
|
|
# };
|
|
|
|
|
|
|
|
home.file.".gnupg/gpg.conf".text = ''
|
|
|
|
no-greeting
|
|
|
|
require-cross-certification
|
|
|
|
charset utf-8
|
|
|
|
keyserver hkps://keys.openpgp.org
|
|
|
|
#keyserver-options auto-key-retrieve
|
|
|
|
'';
|
2021-05-29 17:05:05 +02:00
|
|
|
home.file.".mutt" = {
|
|
|
|
source = /home/yorick/dotfiles/mutt/.mutt;
|
|
|
|
recursive = true;
|
|
|
|
};
|
2021-05-23 17:31:52 +02:00
|
|
|
manual.manpages.enable = false;
|
2021-05-30 11:47:17 +02:00
|
|
|
home.sessionVariables = {
|
|
|
|
HOME_MANAGER_CONFIG = toString ./home.nix; # unused, but checked for existence
|
|
|
|
};
|
2018-04-07 20:04:20 +02:00
|
|
|
}
|