Compare commits

...

9 commits

5 changed files with 191 additions and 149 deletions

21
flake.lock generated
View file

@ -25,16 +25,15 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1790996401, "lastModified": 1792000010,
"narHash": "sha256-f+kOxEmOUnQazVAmGg0i8hzwgd1kX/geY+k/Dpheye8=", "narHash": "sha256-4jtkwQlReQdXsKJJfB9yT7nIf0TlwgZOk2XtxjUgDS8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "db7d5e2332710f5abb088f6b5de927d7f9511b35", "rev": "5a9d300bd619c03857521b50c8877a19dbad7078",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-26.05",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@ -46,11 +45,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1790499302, "lastModified": 1791711434,
"narHash": "sha256-Gbf/U9ptJhQh0qnDnJ/+a8MAcq1HXunbArUTHR2wNYk=", "narHash": "sha256-LpIhxnuO0tYeZ4k7BbNMxsPs2zJpB4hWXO1jdhUuE7Q=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "161d7c91accd93034bb3c295224d9d895a778573", "rev": "9a2dd40780eeab8543aa97c59c26f11267025616",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -77,16 +76,16 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1790920529, "lastModified": 1791956154,
"narHash": "sha256-nQyFkMR78WP6PiXKkDW2SjqzLf/spQqjRuxRGSbcV8k=", "narHash": "sha256-jBYGPi4udQ9uo4KQp9m2J0546nJVQitG15gvZSaVVAs=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "774debe7a0d1b496e35677ad955a1011c6ff74f3", "rev": "55bfb4d7437bd4e09ab7cba58a43bd68eb310044",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-26.05", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }

View file

@ -2,10 +2,10 @@
description = "NixOs Config Flake"; description = "NixOs Config Flake";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = { home-manager = {
url = "github:nix-community/home-manager/release-26.05"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
@ -44,6 +44,8 @@
environment.systemPackages = [ environment.systemPackages = [
claude-desktop-nix.packages.${pkgs.stdenv.hostPlatform.system}.default claude-desktop-nix.packages.${pkgs.stdenv.hostPlatform.system}.default
]; ];
programs.nix-index.package =
nix-index-database.packages.${pkgs.stdenv.hostPlatform.system}.nix-index-with-small-db;
}) })
]; ];
}; };

View file

@ -39,7 +39,7 @@ with lib;
hardware.uinput.enable = true; hardware.uinput.enable = true;
# boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = pkgs.linuxPackages_latest;
boot = { boot = {
extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ]; extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
@ -52,18 +52,18 @@ with lib;
]; ];
}; };
boot.kernelPackages = pkgs.linuxPackagesFor ( #boot.kernelPackages = pkgs.linuxPackagesFor (
pkgs.linux_latest.override { # pkgs.linux_latest.override {
argsOverride = rec { # argsOverride = rec {
version = "7.0.6"; # version = "7.0.6";
modDirVersion = "7.0.6"; # modDirVersion = "7.0.6";
src = pkgs.fetchurl { # src = pkgs.fetchurl {
url = "mirror://kernel/linux/kernel/v7.x/linux-${version}.tar.xz"; # url = "mirror://kernel/linux/kernel/v7.x/linux-${version}.tar.xz";
sha256 = "08vm18wx6399phzgr3wz94yga3ab4fyca79445ygvbspm904996b"; # sha256 = "08vm18wx6399phzgr3wz94yga3ab4fyca79445ygvbspm904996b";
}; # };
}; # };
} # }
); #);
# Bootloader. # Bootloader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
@ -74,10 +74,8 @@ with lib;
networking.hostName = "fw"; # Define your hostname. networking.hostName = "fw"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.extraHosts = '' networking.extraHosts = ''
# 204.168.170.249 talk.timo.social 127.0.0.1 yt.be m.youtube.com youtube.com
# 204.168.170.249 turn.talk.timo.social 127.0.0.1 www.youtube.com
# 127.0.0.1 yt.be m.youtube.com youtube.com
# 127.0.0.1 www.youtube.com
''; '';
# Configure network proxy if necessary # Configure network proxy if necessary
@ -174,6 +172,9 @@ with lib;
# Allow unfree packages # Allow unfree packages
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
virtualisation.virtualbox.host.enable = true;
users.extraGroups.vboxusers.members = [ "tsi" ];
virtualisation.libvirtd.enable = true; virtualisation.libvirtd.enable = true;
virtualisation.docker = { virtualisation.docker = {
enable = true; enable = true;
@ -207,12 +208,29 @@ with lib;
extraConfig = '' extraConfig = ''
[main] [main]
leftcontrol = layer(lctrl) leftcontrol = layer(lctrl)
leftalt = layer(lalt)
leftshift = layer(lshift) leftshift = layer(lshift)
rightshift = layer(lshift)
# Swapped layout
# leftalt = layer(lsuper)
# rightalt = layer(rsuper)
# leftmeta = layer(lalt)
# rightmeta = layer(altgr)
# Normal layout
leftalt = layer(lalt)
rightalt = layer(altgr)
leftmeta = layer(lsuper) leftmeta = layer(lsuper)
altgr = layer(rightalt) rightmeta = layer(rsuper)
capslock = layer(lctrl)
[lctrl:C] [lctrl:C]
j = enter
leftbrace = escape
[lalt:A] [lalt:A]
@ -220,8 +238,13 @@ with lib;
[lsuper:M] [lsuper:M]
[rsuper:M]
[altgr:G] [altgr:G]
[lctrl+lshift]
h = backspace
[lalt+lctrl] [lalt+lctrl]
h = left h = left
j = down j = down
@ -351,112 +374,115 @@ with lib;
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
vim
alacritty alacritty
keepassxc
nextcloud-client
dmenu
arandr
brave
pavucontrol
signal-desktop
simplex-chat-desktop
ayugram-desktop
dnsmasq
file
gnumake
nmap
usbutils
brightnessctl
pulseaudio
moreutils
spacer
yubioath-flutter
slack
mpv
netbird-ui
python3
dig
htop
gcc
wireguard-tools
gh
rustdesk
anydesk
jq
android-tools android-tools
gdu ansible
gron anydesk
mkvtoolnix-cli arandr
ydiff ayugram-desktop
wl-clipboard-rs bat
proton-vpn
iperf3
pv
libarchive
libreoffice
traceroute
pciutils
usbutils
bc bc
pstree brave
tmux brightnessctl
wget
gnupg
mosh
openvpn
clamav clamav
conntrack-tools conntrack-tools
kdotool convmv
trash-cli dash
bat dig
psmisc
mupdf
signal-cli
exfat
fprintd
ranger
dive dive
openssl_4_0 dmenu
dnsmasq
exfat
expect
fastfetch
ffmpeg
file
fprintd
gcc
gdu
gh
glow
gnumake
gnupg
gron
guestfs-tools
htop
ijq
iperf3
jless
jq
kdotool
keepassxc
ksh
libarchive
libreoffice
lynx
man-pages man-pages
man-pages-posix man-pages-posix
v4l-utils mkvtoolnix-cli
ffmpeg moreutils
tcpdump mosh
winbox mpv
mupdf
neomutt
netbird-ui
netcat-openbsd
nextcloud-client
nmap
nodejs_26
ntfsprogs-plus
obs-studio
openssh
openssl_4_0
openvpn
pangolin-cli pangolin-cli
paprefs paprefs
expect patchelf
guestfs-tools pavucontrol
sshpass pciutils
nodejs_26 proton-vpn
netcat-openbsd psmisc
convmv pstree
ntfsprogs-plus pulseaudio
sshfs pv
yash python3
ksh ranger
dash rustdesk
glow
tt
obs-studio
ydotool
tree
fastfetch
yq
jless
ijq
lynx
virtualenv
openssh
scli scli
signal-cli signal-cli
neomutt signal-cli
patchelf signal-desktop
simplex-chat-desktop
slack
spacer
sshfs
sshpass
tcpdump
tmux
traceroute
trash-cli
tree
tt
usbutils
usbutils
v4l-utils
vagrant
vim
virtualenv
wget
winbox
wireguard-tools
wl-clipboard-rs
yash
ydiff
ydotool
yq
yt-dlp yt-dlp
yubioath-flutter
]; ];
programs.ydotool.enable = true; programs.ydotool.enable = true;
documentation.dev.enable = true; documentation.dev.enable = true;
services.openssh = { services.openssh = {
@ -471,6 +497,8 @@ with lib;
}; };
}; };
programs.command-not-found.enable = true;
services.power-profiles-daemon.enable = true; services.power-profiles-daemon.enable = true;
environment.localBinInPath = true; environment.localBinInPath = true;

View file

@ -6,9 +6,9 @@
initExtra = '' initExtra = ''
[ "''${BASH_COMPLETION_VERSINFO-}" ] || unset -v BASH_COMPLETION_VERSINFO [ "''${BASH_COMPLETION_VERSINFO-}" ] || unset -v BASH_COMPLETION_VERSINFO
[ "$DISPLAY" ] && xset r rate 200 60 [ "$DISPLAY" ] && xset r rate 300 60
##################### user specific aliases and functions ###################### #-##################### user specific aliases and functions ######################
if [ -d ~/.bashrc.d ]; then if [ -d ~/.bashrc.d ]; then
for rc in ~/.bashrc.d/*; do for rc in ~/.bashrc.d/*; do
bn=''${rc##*/} bn=''${rc##*/}
@ -19,7 +19,7 @@
fi fi
unset rc bn unset rc bn
########################### shell settings & options ########################### #-########################### shell settings & options ###########################
set -E set -E
set -o pipefail set -o pipefail
@ -34,7 +34,7 @@
shopt -u histverify shopt -u histverify
_have bash_abbr && shopt -u expand_aliases _have bash_abbr && shopt -u expand_aliases
############################### shell variables ################################ #-############################### shell variables ################################
FIGNORE='.o' FIGNORE='.o'
HISTCONTROL=ignoreboth:erasedups HISTCONTROL=ignoreboth:erasedups
HISTTIMEFORMAT='%y-%m-%d %H:%M:%S ' HISTTIMEFORMAT='%y-%m-%d %H:%M:%S '
@ -42,7 +42,7 @@
HISTFILESIZE=-1 HISTFILESIZE=-1
HISTFILE=''$HOME/.''${USER:-default}_bash_history HISTFILE=''$HOME/.''${USER:-default}_bash_history
############################ environment variables ############################# #-############################ environment variables #############################
export PYTHON_BASIC_REPL=1 # I'm good at readline so I'm gonna use readline whereever possible! export PYTHON_BASIC_REPL=1 # I'm good at readline so I'm gonna use readline whereever possible!
export LESS='-SRFX' export LESS='-SRFX'
export PAGER='less' GIT_PAGER='less' MANPAGER='less' SYSTEMD_PAGER='less' export PAGER='less' GIT_PAGER='less' MANPAGER='less' SYSTEMD_PAGER='less'
@ -50,7 +50,7 @@
export EDITOR='vim' VISUAL='vim' FCEDIT='vim' SYSTEMD_EDITOR='vim' export EDITOR='vim' VISUAL='vim' FCEDIT='vim' SYSTEMD_EDITOR='vim'
export PATH export PATH
########################## generally useful functions ########################## #-########################## generally useful functions ##########################
take () { take () {
: 'Idempotently create directory recursively and cd into it' : 'Idempotently create directory recursively and cd into it'
local out local out
@ -61,8 +61,20 @@
} }
cd () { cd () {
: 'Run cd and if it succeeds, run ls' : 'Run cd; on success in a terminal, show the 4 newest entries (with a count of hidden ones)'
builtin cd "''$@" && command ls --color -Ah
builtin cd "''$@" || return
[[ -t 1 ]] || return 0
command -v ls &>/dev/null || return 0
local -a lines
mapfile -t lines < <(command ls --color=always --quoting-style=shell-escape -lArth)
if (( ''${#lines[@]} > 5 )); then
printf '\033[7m... %d more entries ...\033[27m\n' "$(( ''${#lines[@]} - 5 ))";
printf '%s\n' "''${lines[@]: -4}"
else
printf '%s\n' "''${lines[@]}"
fi
} }
drop_caches () { drop_caches () {
@ -112,8 +124,8 @@
declare plugin declare plugin
for plugin in "''${plugins[@]}"; do for plugin in "''${plugins[@]}"; do
case "''$plugin" in case "''$plugin" in
# Comment below case match if you don'\'''t want to have a pre-selection of plugins to export #-# Comment below case match if you don'\'''t want to have a pre-selection of plugins to export
# Requires `shopt -s extglob` #-# Requires `shopt -s extglob`
(+([0-9])-@(util|redact|prompt|docker-tools|funcs|init-and-complete|general-aliases|bash-abbr)) selected[''$plugin]=1 ;; (+([0-9])-@(util|redact|prompt|docker-tools|funcs|init-and-complete|general-aliases|bash-abbr)) selected[''$plugin]=1 ;;
(*) selected[''$plugin]= (*) selected[''$plugin]=
esac esac
@ -211,7 +223,7 @@
EOF EOF
} }
#################################### binds ##################################### #-#################################### binds #####################################
bind '"\e\C-r": kill-region' \ bind '"\e\C-r": kill-region' \
'"\C-x\C-k": kill-whole-line' \ '"\C-x\C-k": kill-whole-line' \
'"\e\C-p": history-search-backward' \ '"\e\C-p": history-search-backward' \
@ -230,23 +242,23 @@
'set colored-completion-prefix on' \ 'set colored-completion-prefix on' \
'set colored-stats on' 'set colored-stats on'
################################## autoclear ################################### #-################################## autoclear ###################################
# TODO #-# TODO
# prank () { #-# prank () {
# line_up_until_cursor=''${READLINE_LINE::READLINE_POINT} #-# line_up_until_cursor=''${READLINE_LINE::READLINE_POINT}
# line_after_cursor=''${READLINE_LINE:READLINE_POINT} #-# line_after_cursor=''${READLINE_LINE:READLINE_POINT}
# if [[ ''$((RANDOM % 5)) -eq 0 ]]; then #-# if [[ ''$((RANDOM % 5)) -eq 0 ]]; then
# READLINE_LINE="''$line_up_until_cursor''$line_after_cursor" #-# READLINE_LINE="''$line_up_until_cursor''$line_after_cursor"
# #READLINE_LINE="''$line_up_until_cursor''${1^}''$line_after_cursor" #-# #READLINE_LINE="''$line_up_until_cursor''${1^}''$line_after_cursor"
# READLINE_POINT=''$((READLINE_POINT+1)) #-# READLINE_POINT=''$((READLINE_POINT+1))
# else #-# else
# READLINE_LINE="''$line_up_until_cursor''$1''$line_after_cursor" #-# READLINE_LINE="''$line_up_until_cursor''$1''$line_after_cursor"
# READLINE_POINT=''$((READLINE_POINT+1)) #-# READLINE_POINT=''$((READLINE_POINT+1))
# fi #-# fi
# } #-# }
# bind -x '" ": prank " "' #-# bind -x '" ": prank " "'
# bind -x '"a": prank "a"' #-# bind -x '"a": prank "a"'
''; '';
}; };
} }

View file

@ -4,6 +4,7 @@
programs.git = { programs.git = {
enable = true; enable = true;
settings = { settings = {
rerere.enabled = true;
user = { user = {
name = "cubernetes"; name = "cubernetes";
email = "timo42@proton.me"; email = "timo42@proton.me";