Compare commits

..

9 commits

5 changed files with 191 additions and 149 deletions

21
flake.lock generated
View file

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

View file

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

View file

@ -6,9 +6,9 @@
initExtra = ''
[ "''${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
for rc in ~/.bashrc.d/*; do
bn=''${rc##*/}
@ -19,7 +19,7 @@
fi
unset rc bn
########################### shell settings & options ###########################
#-########################### shell settings & options ###########################
set -E
set -o pipefail
@ -34,7 +34,7 @@
shopt -u histverify
_have bash_abbr && shopt -u expand_aliases
############################### shell variables ################################
#-############################### shell variables ################################
FIGNORE='.o'
HISTCONTROL=ignoreboth:erasedups
HISTTIMEFORMAT='%y-%m-%d %H:%M:%S '
@ -42,7 +42,7 @@
HISTFILESIZE=-1
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 LESS='-SRFX'
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 PATH
########################## generally useful functions ##########################
#-########################## generally useful functions ##########################
take () {
: 'Idempotently create directory recursively and cd into it'
local out
@ -61,8 +61,20 @@
}
cd () {
: 'Run cd and if it succeeds, run ls'
builtin cd "''$@" && command ls --color -Ah
: 'Run cd; on success in a terminal, show the 4 newest entries (with a count of hidden ones)'
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 () {
@ -112,8 +124,8 @@
declare plugin
for plugin in "''${plugins[@]}"; do
case "''$plugin" in
# Comment below case match if you don'\'''t want to have a pre-selection of plugins to export
# Requires `shopt -s extglob`
#-# Comment below case match if you don'\'''t want to have a pre-selection of plugins to export
#-# Requires `shopt -s extglob`
(+([0-9])-@(util|redact|prompt|docker-tools|funcs|init-and-complete|general-aliases|bash-abbr)) selected[''$plugin]=1 ;;
(*) selected[''$plugin]=
esac
@ -211,7 +223,7 @@
EOF
}
#################################### binds #####################################
#-#################################### binds #####################################
bind '"\e\C-r": kill-region' \
'"\C-x\C-k": kill-whole-line' \
'"\e\C-p": history-search-backward' \
@ -230,23 +242,23 @@
'set colored-completion-prefix on' \
'set colored-stats on'
################################## autoclear ###################################
# TODO
#-################################## autoclear ###################################
#-# TODO
# prank () {
# line_up_until_cursor=''${READLINE_LINE::READLINE_POINT}
# line_after_cursor=''${READLINE_LINE:READLINE_POINT}
# if [[ ''$((RANDOM % 5)) -eq 0 ]]; then
# READLINE_LINE="''$line_up_until_cursor''$line_after_cursor"
# #READLINE_LINE="''$line_up_until_cursor''${1^}''$line_after_cursor"
# READLINE_POINT=''$((READLINE_POINT+1))
# else
# READLINE_LINE="''$line_up_until_cursor''$1''$line_after_cursor"
# READLINE_POINT=''$((READLINE_POINT+1))
# fi
# }
# bind -x '" ": prank " "'
# bind -x '"a": prank "a"'
#-# prank () {
#-# line_up_until_cursor=''${READLINE_LINE::READLINE_POINT}
#-# line_after_cursor=''${READLINE_LINE:READLINE_POINT}
#-# if [[ ''$((RANDOM % 5)) -eq 0 ]]; then
#-# READLINE_LINE="''$line_up_until_cursor''$line_after_cursor"
#-# #READLINE_LINE="''$line_up_until_cursor''${1^}''$line_after_cursor"
#-# READLINE_POINT=''$((READLINE_POINT+1))
#-# else
#-# READLINE_LINE="''$line_up_until_cursor''$1''$line_after_cursor"
#-# READLINE_POINT=''$((READLINE_POINT+1))
#-# fi
#-# }
#-# bind -x '" ": prank " "'
#-# bind -x '"a": prank "a"'
'';
};
}

View file

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