move old nixos-config over here

This commit is contained in:
Daniel Lundin 2024-08-02 14:09:42 +02:00
parent 346d80ae7e
commit 54baace7c1
No known key found for this signature in database
35 changed files with 850 additions and 44 deletions

40
home/common/atuin.nix Normal file
View file

@ -0,0 +1,40 @@
{ pkgs, ... }:
{
programs.atuin = {
enable = true;
enableFishIntegration = true;
settings = {
ctrl_n_shortcuts = true;
enter_accept = true;
filter_mode_shell_up_key_binding = "session";
history_filter = [ ];
inline_height = 8;
prefers_reduced_motion = true;
search_mode_shell_up_key_binding = "prefix";
show_help = false;
style = "compact";
sync_address = "https://atuin.aarn.shelman.io";
sync.records = true;
stats.common_subcommands = [
"cargo"
"git"
"go"
"jj"
"just"
"kubectl"
"nix"
"npm"
"pnpm"
"talosctl"
"task"
"yarn"
];
stats.common_prefix = [
"doas"
"sudo"
];
};
};
}

63
home/common/broot.nix Normal file
View file

@ -0,0 +1,63 @@
{
config,
lib,
pkgs,
...
}:
{
programs.broot = {
enable = true;
enableFishIntegration = true;
settings = {
content_search_max_file_size = "10MB";
enable_kitty_keyboard = lib.mkForce true;
icon_theme = "nerdfont";
lines_before_match_in_preview = 1;
lines_after_match_in_preview = 1;
quit_on_last_cancel = true;
show_selection_mark = true;
special_paths = {
"~/media" = {
list = "never";
sum = "never";
};
"~/.config" = {
show = "always";
};
"trav" = {
show = "always";
list = "always";
sum = "never";
};
};
true_colors = true;
verbs = [
{
invocation = "broot_home";
key = "ctrl-7";
external = "br $HOME";
from_shell = true;
leave_broot = true;
}
{
invocation = "edit";
key = "enter";
shortcut = "e";
external = "edit {file}";
apply_to = "text_file";
from_shell = true;
leave_broot = true;
}
{
invocation = "nvim";
key = "enter";
apply_to = "text_file";
external = "edit {file}";
from_shell = true;
leave_broot = true;
}
];
};
};
}

21
home/common/default.nix Normal file
View file

@ -0,0 +1,21 @@
{ lib, ... }:
{
imports = [
./atuin.nix
./broot.nix
./devel.nix
./fish.nix
./gnome.nix
./k8s.nix
./nix.nix
./nvim.nix
./scripts.nix
./ssh.nix
./utils.nix
./vcs.nix
./web.nix
./wezterm.nix
];
options.shelman.desktop.enable = lib.mkEnableOption "Desktop environment";
}

24
home/common/devel.nix Normal file
View file

@ -0,0 +1,24 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
bacon
cargo
clang
codeium
gnumake
go
just
ldns
nixfmt-rfc-style
nodejs_22
passage
rage
prettierd
rust-analyzer
rustc
sqlite
stylua
tree-sitter
zig
];
}

122
home/common/fish.nix Normal file
View file

@ -0,0 +1,122 @@
{ lib, pkgs, ... }:
{
programs.fish = {
enable = true;
plugins = [
{
name = "transient-fish";
src = pkgs.fetchFromGitHub {
owner = "zzhaolei";
repo = "transient.fish";
rev = "deb35c4d07ea6acc56b073d7ba84f8ed76356abd";
sha256 = "sha256-BQvuqY7D+9fTDeLb7Fz9Ll/7uIlqrmRmn0S+G9v+2Uc=";
};
}
];
functions = {
edit = {
description = "Open a file in already running nvim and switch tab";
argumentNames = [ "file" ];
body = ''
set _file (readlink -f "$file")
if test -z "$file"
set _root (vcs_root)
set _file (fd --type f . "$_root" | sed -e "s#^$_root/##" | fzf --no-sort --layout=reverse)
set _file "$_root/$_file"
end
nvim --server "$XDG_RUNTIME_DIR/nvim-persistent.sock" --remote "$_file" &>/dev/null
or return 1
# Wezterm: switch tab to nvim
printf "\033]1337;SetUserVar=nvim_activate=\007"
'';
};
__zoxide_zi_repaint.body = ''
__zoxide_zi
commandline -f repaint
'';
fish_jj_prompt.body = ''
# Is jj installed?
if not command -sq jj
return 1
end
# Are we in a jj repo?
if not jj root --quiet &>/dev/null
return 1
end
# Generate prompt
jj log --ignore-working-copy --no-graph --color always -r @ -T '
separate(
" ",
change_id.shortest(),
coalesce(
surround(
"\"",
"\"",
if(
description.first_line().substr(0, 24).starts_with(description.first_line()),
description.first_line().substr(0, 24),
description.first_line().substr(0, 23) ++ ""
)
),
"(no description set)"
),
branches.join(", "),
commit_id.shortest(),
if(conflict, "(conflict)"),
if(empty, "(empty)"),
if(divergent, "(divergent)"),
if(hidden, "(hidden)"),
)
'
'';
fish_prompt.body = ''
echo
string join "" -- (set_color --italics) (prompt_hostname) ':' (prompt_pwd) (set_color green) ' ' (set_color normal)
'';
fish_right_prompt.body = ''
fish_jj_prompt || fish_vcs_prompt
'';
transient_prompt_func.body = ''
echo
string join "" -- (set_color green) ' ' (set_color normal)
'';
rg.body = ''
if status is-interactive
command rg -p $argv | bat
else
command rg $argv
end
'';
};
interactiveShellInit = lib.concatStringsSep "\n" [
(builtins.readFile ../../files/config/fish/config.fish)
(builtins.readFile ../../files/config/fish/semantic-prompt.fish)
(builtins.readFile ../../files/config/fish/go-task.fish)
(builtins.readFile ../../files/config/fish/jj.fish)
(builtins.readFile ../../files/config/fish/vcs.fish)
];
shellAbbrs = {
e = "edit";
l = "bat";
ls = "eza";
tree = "eza --tree";
top = "btm --basic --enable_cache_memory --enable_gpu_memory --battery";
ts = "TZ=Z date '+%Y%m%dT%H%M%SZ'";
w = "viddy -n1 $history[1]";
xc = "fish_clipboard_copy";
};
};
}

194
home/common/gnome.nix Normal file
View file

@ -0,0 +1,194 @@
{
config,
lib,
pkgs,
...
}:
with lib.hm.gvariant;
{
config = lib.mkIf config.shelman.desktop.enable {
home.packages = with pkgs; [
gnome-tweaks
gnome-pomodoro
gnomeExtensions.desktop-clock
gnomeExtensions.just-perfection
gnomeExtensions.vitals
];
dconf.settings = {
"org/gnome/desktop/background" = {
color-shading-type = "solid";
picture-options = "zoom";
picture-uri = "file:///run/current-system/sw/share/backgrounds/gnome/vnc-l.png";
picture-uri-dark = "file:///run/current-system/sw/share/backgrounds/gnome/vnc-d.png";
primary-color = "#77767B";
secondary-color = "#000000";
};
"org/gnome/desktop/screensaver" = {
color-shading-type = "solid";
picture-options = "zoom";
picture-uri = "file:///run/current-system/sw/share/backgrounds/gnome/vnc-l.png";
primary-color = "#77767B";
secondary-color = "#000000";
};
"org/gnome/desktop/wm/keybindings" = {
close = [ "<Super>q" ];
toggle-on-all-workspaces = [ "<Super>s" ];
toggle-maximized = [ "<Super>m" ];
maximize-vertically = [ "<Super>Up" ];
minimize = [ "<Super>comma" ];
move-to-center = [ "<Super>c" ];
switch-applications = [ "<Super>Tab" ];
switch-windows = [ "<Alt>Tab" ];
move-to-workspace-1 = [ "<Shift>F1" ];
move-to-workspace-2 = [ "<Shift>F2" ];
move-to-workspace-3 = [ "<Shift>F3" ];
move-to-workspace-4 = [ "<Shift>F4" ];
move-to-workspace-5 = [ "<Shift>F5" ];
move-to-workspace-6 = [ "<Shift>F6" ];
move-to-workspace-7 = [ "<Shift>F7" ];
move-to-workspace-8 = [ "<Shift>F8" ];
move-to-workspace-9 = [ "<Shift>F9" ];
switch-to-workspace-1 = [ "F1" ];
switch-to-workspace-2 = [ "F2" ];
switch-to-workspace-3 = [ "F3" ];
switch-to-workspace-4 = [ "F4" ];
switch-to-workspace-5 = [ "F5" ];
switch-to-workspace-6 = [ "F6" ];
switch-to-workspace-7 = [ "F7" ];
switch-to-workspace-8 = [ "F8" ];
switch-to-workspace-9 = [ "F9" ];
};
"org/gnome/desktop/input-sources" = {
mru-sources = [
(mkTuple [
"xkb"
"us"
])
];
sources = [
(mkTuple [
"xkb"
"se+us"
])
];
xkb-options = [ "caps:ctrl_modifier" ];
};
"org/gnome/desktop/interface" = {
enable-animations = false;
enable-hot-corners = false;
show-battery-percentage = true;
font-antialiasing = "grayscale";
font-hinting = "slight";
font-name = "Inter Variable 11";
document-font-name = "Inter Variable 11";
monospace-font-name = "BerkeleyMono Nerd Font 11";
toolkit-accessibility = false;
};
"org/gnome/desktop/search-providers" = {
disabled = [
"org.gnome.Contacts.desktop"
"org.gnome.Nautilus.desktop"
"org.gnome.Calendar.desktop"
"org.gnome.clocks.desktop"
"org.gnome.Epiphany.desktop"
];
sort-order = [
"org.gnome.Contacts.desktop"
"org.gnome.Documents.desktop"
"org.gnome.Nautilus.desktop"
"org.gnome.Settings.desktop"
"org.gnome.Calculator.desktop"
"org.gnome.Calendar.desktop"
"org.gnome.clocks.desktop"
"org.gnome.seahorse.Application.desktop"
"org.gnome.Weather.desktop"
"org.gnome.Characters.desktop"
];
};
"org/gnome/desktop/wm/preferences" = {
focus-mode = "sloppy";
num-workspaces = 10;
resize-with-right-button = true;
};
"org/gnome/GWeather4" = {
temperature-unit = "centigrade";
};
"org/gnome/Weather" = {
locations = [
(mkVariant (mkTuple [
(mkUint32 2)
(mkVariant (mkTuple [
"Stockholm-Arlanda Airport"
"ESSA"
false
[
(mkTuple [
1.0410888988146176
0.31328660073298215
])
]
[
(mkTuple [
1.0410888988146176
0.31328660073298215
])
]
]))
]))
];
};
"org/gnome/desktop/calendar" = {
show-weekdate = true;
};
"org/gnome/mutter" = {
center-new-windows = true;
edge-tiling = true;
};
"org/gnome/settings-daemon/plugins/color" = {
night-light-schedule-automatic = false;
night-light-schedule-from = 0.0;
night-light-schedule-to = 0.0;
night-light-temperature = mkUint32 3575;
};
"org/gnome/shell" = {
enabled-extensions = [
"just-perfection-desktop@just-perfection"
"Vitals@CoreCoding.com"
];
};
"org/gnome/shell/extensions/just-perfection" = {
animation = 0;
notification-banner-position = 2;
osd-position = 6;
panel = false;
panel-in-overview = true;
startup-status = 0;
switcher-popup-delay = false;
top-panel-position = 0;
};
"org/gnome/shell/extensions/vitals" = {
update-time = 15;
};
"org/gnome/tweaks" = {
show-extensions-notice = false;
};
};
};
}

176
home/common/k8s.nix Normal file
View file

@ -0,0 +1,176 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
kail
kapp
krew
kubectl
kubectl-cnpg
kubectl-neat
kubectl-view-secret
kubectx
kubelogin-oidc
kubernetes-helm
kustomize
];
programs.k9s = {
enable = true;
settings.k9s = {
liveViewAutoRefresh = false;
refreshRate = 2;
maxConnRetry = 5;
readOnly = false;
noExitOnCtrlC = false;
skipLatestRevCheck = false;
disablePodCounting = false;
imageScans.enable = false;
logger = {
tail = 100;
buffer = 5000;
sinceSeconds = -1;
textWrap = false;
showTime = false;
};
shellPod.image = "alpine:3";
thresholds = {
cpu = {
critical = 90;
warn = 70;
};
memory = {
critical = 90;
warn = 70;
};
};
ui = {
crumbsless = true;
defaultsToFullScreen = true;
enableMouse = false;
headless = true;
logoless = true;
noIcons = false;
reactive = false;
skin = "dieter";
};
};
views = {
views = {
"v1/pods" = {
columns = [
"NAME"
"PF"
"READY"
"STATUS"
"NODE"
"AGE"
"RESTARTS"
"IP"
"CPU"
"MEM"
"CPU/R:L"
"MEM/R:L"
"%CPU/R"
"%CPU/L"
"%MEM/R"
"%MEM/L"
];
};
};
};
skins.dieter.k9s = {
body = {
fgColor = "default";
bgColor = "default";
logoColor = "default";
};
prompt = {
fgColor = "default";
bgColor = "default";
suggestColor = "default";
};
info = {
fgColor = "default";
sectionColor = "default";
};
dialog = {
fgColor = "default";
bgColor = "default";
buttonFgColor = "default";
buttonBgColor = "default";
buttonFocusFgColor = "white";
buttonFocusBgColor = "darkblue";
labelFgColor = "default";
fieldFgColor = "default";
};
frame = {
border = {
fgColor = "default";
focusColor = "default";
};
menu = {
fgColor = "default";
keyColor = "default";
numKeyColor = "default";
};
crumbs = {
fgColor = "default";
bgColor = "default";
activeColor = "default";
};
status = {
newColor = "default";
modifyColor = "default";
addColor = "default";
errorColor = "red";
highlightColor = "default";
killColor = "default";
completedColor = "default";
};
title = {
fgColor = "default";
bgColor = "default";
highlightColor = "default";
counterColor = "default";
filterColor = "default";
};
};
views = {
table = {
fgColor = "default";
bgColor = "default";
cursorFgColor = "teal";
cursorBgColor = "darkblue";
header = {
fgColor = "default";
bgColor = "default";
sorterColor = "blue";
};
};
xray = {
fgColor = "default";
bgColor = "default";
cursorColor = "blue";
graphicColor = "blue";
};
yaml = {
keyColor = "default";
colonColor = "default";
valueColor = "default";
};
logs = {
fgColor = "default";
bgColor = "default";
indicator = {
fgColor = "default";
bgColor = "default";
toggleOnColor = "default";
toggleOffColor = "default";
};
};
};
};
};
}

15
home/common/nix.nix Normal file
View file

@ -0,0 +1,15 @@
{ outputs, ... }:
{
nixpkgs = {
config.allowUnfree = true;
overlays = [
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
];
};
programs.home-manager.enable = true;
systemd.user.startServices = "sd-switch";
}

19
home/common/nvim.nix Normal file
View file

@ -0,0 +1,19 @@
{ ... }:
{
programs.neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
withNodeJs = false;
withPython3 = false;
withRuby = false;
};
xdg.configFile = {
"nvim" = {
recursive = true;
source = ./../../files/config/nvim;
};
};
}

17
home/common/scripts.nix Normal file
View file

@ -0,0 +1,17 @@
{
config,
lib,
pkgs,
...
}:
{
home.file = {
".local/bin" = {
recursive = true;
source = ./../../files/scripts;
};
};
home.sessionPath = [ "$HOME/.local/bin" ];
}

14
home/common/ssh.nix Normal file
View file

@ -0,0 +1,14 @@
{ ... }:
{
programs.ssh = {
enable = true;
addKeysToAgent = "yes";
compression = false;
controlMaster = "auto";
controlPath = "\${XDG_RUNTIME_DIR}/ssh_control:%h:%p:%r";
controlPersist = "15m";
extraConfig = ''
PreferredAuthentications publickey
'';
};
}

60
home/common/utils.nix Normal file
View file

@ -0,0 +1,60 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
dust
jless
procs
viddy
];
programs = {
bat = {
enable = true;
config = {
italic-text = "always";
paging = "auto";
style = "plain";
theme = "ansi";
};
};
bottom.enable = true;
direnv = {
enable = true;
nix-direnv.enable = true;
silent = false;
};
eza = {
enable = true;
enableFishIntegration = true;
};
fd.enable = true;
fzf = {
enable = true;
enableFishIntegration = true;
};
jq.enable = true;
less.enable = true;
lesspipe.enable = true;
tmux.enable = true;
ripgrep = {
enable = true;
arguments = [
"--glob=!.git/*"
"--glob=!.jj/*"
];
};
zoxide = {
enable = true;
enableFishIntegration = true;
options = [ "--cmd=cd" ];
};
};
}

166
home/common/vcs.nix Normal file
View file

@ -0,0 +1,166 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
delta
diffedit3
difftastic
git-graph
git-town
lazyjj
tea
];
programs.gh = {
enable = true;
};
programs.git = {
enable = true;
aliases = {
b = "branch -va";
cl = "clone --filter=blob:none";
co = "checkout";
d = "diff --stat -p -C --color-words";
ds = "diff --staged --stat -p -C --color-words";
g = "graph -S -m simple -s round";
guilt = "!f(){ git log --pretty='format:%an <%ae>' $@ | sort | uniq -c | sort -rn; }; f";
lla = "log --graph --all --topo-order --pretty='format:\t%x1B[0;3;36m%as %x1B[0;95;3m%<(12)%al %x1B[3;32m %h%x1B[0;1;92m%d%x1B[0m %s'";
ll = "log --pretty='format:%x1B[0;3;36m%as %G? %x1B[0;95;3m%<(12,trunc)%al %x1B[3;32m %h%x1B[0;1;92m%(decorate:prefix= [,suffix=]%n)%>|(35)%Creset %s'";
patch = "!git --no-pager diff --no-color";
pullr = "pull --rebase --autostash";
sh = "show --stat -p -C --color-words --show-signature";
st = "status -sb";
};
delta = {
enable = true;
options = {
file-added-label = "[+]";
file-decoration-style = "none";
file-modified-label = "[*]";
file-removed-label = "[-]";
file-renamed-label = "[>]";
file-style = "bold reverse";
file-transformation = "s/$/ /";
hunk-header-decoration-style = "none";
hunk-header-file-style = "bold";
hunk-header-line-number-style = "bold";
hunk-header-style = "bold";
hunk-label = "";
hunk-label-style = "bold";
line-numbers = true;
max-line-distance = "0.9";
navigate = true;
};
};
extraConfig = {
apply.whitespace = "nowarn";
blame.date = "relative";
branch.main.rebase = true;
color = {
branch = "auto";
diff = "auto";
status = "auto";
ui = "auto";
};
column.ui = "auto";
core = {
compression = 3;
looseCompression = 3;
excludesfile = "~/.config/git/ignore";
};
fetch = {
prune = true;
prunetags = true;
showForcedUpdates = true;
};
gpg = {
format = "ssh";
ssh = {
allowedSignersFile = "${config.home.homeDirectory}/.ssh/authorized_keys";
defaultKeyCommand = "${config.home.homeDirectory}/.local/bin/git-signing-key";
};
};
init.defaultBranch = "main";
merge.conflictstyle = "zdiff3";
pack = {
compression = 3;
threads = 0;
};
pull.rebase = true;
push.default = "tracking";
rebase.autosquash = true;
rerere.enabled = true;
tag.sort = "-v:refname";
user.useConfigOnly = true;
};
ignores = [
"*~"
"*.a"
"*.class"
"*.iml"
"*.ipr"
"*.iwr"
"*.iws"
"*.la"
"*.o"
"*.pyc"
"*.so"
"*.swp"
".direnv"
".idea"
".null-ls_*"
];
signing = {
key = null;
signByDefault = true;
};
};
programs.gitui = {
enable = true;
keyConfig = ''
(
open_help: Some(( code: F(1), modifiers: "")),
move_left: Some(( code: Char('h'), modifiers: "")),
move_right: Some(( code: Char('l'), modifiers: "")),
move_up: Some(( code: Char('k'), modifiers: "")),
move_down: Some(( code: Char('j'), modifiers: "")),
popup_up: Some(( code: Char('p'), modifiers: "CONTROL")),
popup_down: Some(( code: Char('n'), modifiers: "CONTROL")),
page_up: Some(( code: Char('b'), modifiers: "CONTROL")),
page_down: Some(( code: Char('f'), modifiers: "CONTROL")),
home: Some(( code: Char('g'), modifiers: "")),
end: Some(( code: Char('G'), modifiers: "SHIFT")),
shift_up: Some(( code: Char('K'), modifiers: "SHIFT")),
shift_down: Some(( code: Char('J'), modifiers: "SHIFT")),
edit_file: Some(( code: Char('I'), modifiers: "SHIFT")),
status_reset_item: Some(( code: Char('U'), modifiers: "SHIFT")),
diff_reset_lines: Some(( code: Char('u'), modifiers: "")),
diff_stage_lines: Some(( code: Char('s'), modifiers: "")),
stashing_save: Some(( code: Char('w'), modifiers: "")),
stashing_toggle_index: Some(( code: Char('m'), modifiers: "")),
stash_open: Some(( code: Char('l'), modifiers: "")),
abort_merge: Some(( code: Char('M'), modifiers: "SHIFT")),
)
'';
theme = ''
(
selection_bg: Some(Black),
selection_fg: Some(Reset),
cmdbar_bg: Some(Reset),
cmdbar_extra_lines_bg: Some(Reset),
)
'';
};
programs.jujutsu = {
enable = true;
package = pkgs.jujutsu-openssh;
};
}

22
home/common/web.nix Normal file
View file

@ -0,0 +1,22 @@
{
config,
lib,
pkgs,
...
}:
{
config = lib.mkIf config.shelman.desktop.enable {
home.packages = with pkgs; [ tor-browser ];
programs.firefox = {
enable = true;
};
programs.chromium = {
enable = true;
package = pkgs.ungoogled-chromium;
};
};
}

11
home/common/wezterm.nix Normal file
View file

@ -0,0 +1,11 @@
{ config, lib, ... }:
{
config = lib.mkIf config.shelman.desktop.enable {
programs.wezterm = {
enable = true;
extraConfig = builtins.readFile ./../../files/config/wezterm/wezterm.lua;
};
};
}

67
home/dln/desktop.nix Normal file
View file

@ -0,0 +1,67 @@
{ pkgs, ... }:
{
shelman = {
desktop.enable = true;
};
home.packages = with pkgs; [
audacity
bitwig-studio
dynamic-wallpaper
gimp-with-plugins
helvum
inkscape
moonlight-qt
obsidian
pavucontrol
plexamp
reaper
signal-desktop
];
xdg.desktopEntries = {
firefox-work = {
categories = [
"Network"
"WebBrowser"
];
comment = "Browse the Web";
exec = "firefox %u -P work --new-instance --name firefox-work";
genericName = "Web Browser";
icon = "firefox";
mimeType = [
"text/html"
"text/xml"
"application/xhtml+xml"
"application/vnd.mozilla.xul+xml"
"text/mml"
"x-scheme-handler/http"
"x-scheme-handler/https"
];
name = "Firefox (Work)";
settings = {
StartupWMClass = "firefox-work";
Keywords = "web;browser;internet";
};
terminal = false;
type = "Application";
};
wezterm-nemo = {
categories = [
"System"
"TerminalEmulator"
];
exec = "wezterm start --class=org.wezfurlong.wezterm-nemo --domain=nemo";
genericName = "wezterm-nemo";
icon = "org.wezfurlong.wezterm";
name = "wezterm-nemo";
settings = {
StartupWMClass = "org.wezfurlong.wezterm-nemo";
TryExec = "wezterm";
};
terminal = false;
type = "Application";
};
};
}

14
home/dln/dinky.nix Normal file
View file

@ -0,0 +1,14 @@
{ ... }:
{
imports = [
./home.nix
./desktop.nix
];
dconf.settings = {
"org/gnome/shell" = {
enabled-extensions = [ "Battery-Health-Charging@maniacx.github.com" ];
};
};
}

140
home/dln/home.nix Normal file
View file

@ -0,0 +1,140 @@
{ pkgs, ... }:
let
realName = "Daniel Lundin";
email = "dln@arity.se";
in
{
home = {
username = "dln";
homeDirectory = "/home/dln";
packages = with pkgs; [
openconnect
ouch
];
};
programs.atuin.settings = {
cwd_filter = [
"^~/media"
"^/home/dln/media"
];
};
programs.git = {
userName = realName;
userEmail = email;
};
programs.jujutsu = {
settings = {
user = {
email = email;
name = realName;
};
signing = {
sign-all = true;
backend = "ssh";
backends.ssh.allowed-signers = "/home/dln/.ssh/authorized_keys";
key = "/home/dln/.ssh/git_signing_key.pub";
};
ui = {
"default-command" = [
"log"
"--limit=20"
"--template=builtin_log_comfortable"
];
pager = "bat";
};
"merge-tools" = {
difft."diff-args" = [
"--color=always"
"$left"
"$right"
];
};
aliases = {
l = [
"log"
"-T"
"builtin_log_comfortable"
"-r"
"(main..@) | (main..@)-"
];
la = [
"log"
"-T"
"builtin_log_oneline"
"-r"
"all()"
];
b = [
"branch"
"list"
];
n = [
"new"
"main"
];
d = [ "diff" ];
s = [ "show" ];
sh = [
"show"
"--tool=difft"
];
};
"revset-aliases" = {
# Prevent rewriting commits on main@origin and commits authored by other users;
"immutable_heads()" = "main@origin | (main@origin.. & ~mine())";
"user(x)" = "author(x) | committer(x)";
"trunk()" = "latest((present(main) | present(master)) & remote_branches())";
"open" = "(mine() ~ ::trunk()) ~ heads(empty())";
"wip" = ''description("wip: ")'';
"ready" = "open() ~ (wip::)";
};
colors = {
"commit_id prefix" = {
bold = true;
};
"diff token" = {
underline = false;
};
};
};
};
programs.ssh.matchBlocks = {
dev = {
hostname = "10.1.100.16";
};
nemo = {
hostname = "10.1.100.20";
forwardAgent = true;
localForwards = [
{
bind.address = "localhost";
bind.port = 8000;
host.address = "localhost";
host.port = 8000;
}
{
bind.address = "localhost";
bind.port = 8080;
host.address = "localhost";
host.port = 8080;
}
];
};
};
services.syncthing.enable = true;
home.stateVersion = "24.05"; # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
}

9
home/dln/nemo.nix Normal file
View file

@ -0,0 +1,9 @@
{ ... }:
{
imports = [
./home.nix
./desktop.nix
];
# Host specific user config goes here
}

40
home/lsjostro/home.nix Normal file
View file

@ -0,0 +1,40 @@
{ pkgs, ... }:
{
home = {
username = "lsjostro";
homeDirectory = "/home/lsjostro";
packages = with pkgs; [ openconnect ];
};
programs.git = {
userName = "Lars Sjöstrom";
userEmail = "lars@radicore.se";
};
programs.ssh.matchBlocks = {
dev = {
hostname = "10.1.100.17";
};
nemo = {
hostname = "10.1.100.20";
forwardAgent = true;
localForwards = [
{
bind.address = "localhost";
bind.port = 8000;
host.address = "localhost";
host.port = 8000;
}
{
bind.address = "localhost";
bind.port = 8080;
host.address = "localhost";
host.port = 8080;
}
];
};
};
home.stateVersion = "24.05"; # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
}

6
home/lsjostro/nemo.nix Normal file
View file

@ -0,0 +1,6 @@
{ ... }:
{
imports = [ ./home.nix ];
# Host specific user config goes here
}