init
This commit is contained in:
10
config-files/.vimrc
Normal file
10
config-files/.vimrc
Normal file
@@ -0,0 +1,10 @@
|
||||
set tabstop =2
|
||||
set softtabstop =2
|
||||
set shiftwidth =2
|
||||
set expandtab
|
||||
set backupdir=/home/alfoldi/.vim-tmp
|
||||
set directory=/home/alfoldi/.vim-tmp
|
||||
|
||||
set exrc
|
||||
set secure
|
||||
|
||||
2
config-files/nokia.enc.helper.sh
Normal file
2
config-files/nokia.enc.helper.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
sops --output-type yaml --age age17k7e9a8w95eu73uts6nr0fuww94kl5chrwgg0xudgmum03hv45sq9yuf4c --encrypt ./config-files/nokia.nmconnection > nokia.enc.nmconnection
|
||||
sops decrypt --input-type yaml --output-type binary config-files/nokia.enc.nmconnection
|
||||
15
config-files/nokia.enc.nmconnection
Normal file
15
config-files/nokia.enc.nmconnection
Normal file
File diff suppressed because one or more lines are too long
44
config-files/rclone-filters.txt
Normal file
44
config-files/rclone-filters.txt
Normal file
@@ -0,0 +1,44 @@
|
||||
# exclude common cruft and envs
|
||||
- **/.DS_Store
|
||||
- **/Thumbs.db
|
||||
- **/desktop.ini
|
||||
|
||||
# python
|
||||
- **/venv/**
|
||||
- **/.venv/**
|
||||
- **/__pycache__/**
|
||||
- **/*.pyc
|
||||
- **/.pytest_cache/**
|
||||
|
||||
+ **/.git
|
||||
+ **/.git/config
|
||||
- **/.git/**
|
||||
# - **/.git/objects/**
|
||||
# - **/.git/refs/**
|
||||
|
||||
# node
|
||||
- **/node_modules/**
|
||||
- **/dist/**
|
||||
- **/build/**
|
||||
|
||||
# caches, temporary
|
||||
- **/.cache/**
|
||||
- **/*.swp
|
||||
- **/*~
|
||||
- **/*.bak
|
||||
|
||||
# VM/disks/databases (review before enabling)
|
||||
- **/*.vdi
|
||||
- **/*.vmdk
|
||||
- **/*.iso
|
||||
- **/*.img
|
||||
- **/*.sqlite3
|
||||
- **/*.db
|
||||
|
||||
# more ignoring ...
|
||||
- **/.mypy_cache/**
|
||||
- **/__dist__/**
|
||||
- **/.ruff_cache/**
|
||||
- **/.tmp/**
|
||||
- **/tmp/**
|
||||
- **/.vagrant/**
|
||||
3
config-files/rclone.alfoldi.sh
Normal file
3
config-files/rclone.alfoldi.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
# rclone --filter-from config-files/rclone-filters.txt --config ~/.config/rclone/b2.storage.conf sync /home/alfoldi/workplace/home/ b2-storage:cnwco-storage/alfoldi/home --delete-excluded
|
||||
# rclone --filter-from config-files/rclone-filters.txt --config ~/.config/rclone/b2.storage.conf sync /home/alfoldi/workplace/home/ b2-storage:cnwco-storage/alfoldi/home --dry-run
|
||||
rclone --filter-from config-files/rclone-filters.txt --config ~/.config/rclone/b2.storage.conf sync /home/alfoldi/workplace/NOKIA/ b2-storage:cnwco-storage/alfoldi/NOKIA --dry-run
|
||||
12
config-files/rclone.conf
Normal file
12
config-files/rclone.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
[NokiaOneDrive]
|
||||
type = onedrive
|
||||
token = {"access_token":"","token_type":"Bearer","refresh_token":"1.ARAAURdHXXWWjUKRe3D0T5YwsNllVrGm7ZJAhTkO7Ddq_VkQABkQAA.BQABAwEAAAADAOz_BQD0__8RgzGNIRA3TSQx7WXz5v7H5EVEocAEePqGP_k3m_mmxxTsL5prcnqNIFAxh1BIwjdlr26zuAQWiTpLT0Bz6dfYILGRVpkbpZVbdc_XCssdUof2I0HyDfbGBfifzhYMsyj8IJlY6sSVJLHXmv2XbU5CpD_EBM51QTxpzjdG54_ldJes86sOtshu1wTFNqNAKEDVH-ae2-0153AwDjY1N6sBv35iqHrm-csn8y3Qx9Ee0fCrxFCV4x7QMpvnHk8Kc8WikGhSoVVJnOwMcY4cVwGfvZ3IvMsr0CE2aZQciJ_BUr6F1t72eDXNAhqJsEOJfWT9B81wlEQAYe7R39Pe3to5k_sbtjXVLIlAVcWPFMYQ2boyeRD0rdtlAjoyJecwLZVuKf5D3yEyV6LbznIkhmtkDQMGkhj2boRFdb9HeIC2wgLFT0xM40sYMReo6yUD3USw3LTVjhUqElphciN3HKm-nKBRbqAmIAC4WPXWXvcw3YannM6WfMQCZzdo4Dt7WP0rOBFUtiElMHzbiXxL3iT_dTGyLqggU6vU0RKJBUZTZWnmrLC4rqY6ZHauRPw0J0SyM8yz5D2LEjxfDgm47TYTuva1ZEgy04LPFF9uhAJKlKz2ZzGheYSGXILNGzEGZSne9ztupSJnG-YNrjbcoC8HGytXNzamf1xFc6TpYH5uIpu5sSMrxZSbJg7rBTwaySSCoqPTtFaY8ihP_YFV_vrXcumiGze3EQxk3Xg8V5CzwckXrtLE2k3u7iIEo1mqZvgE1S3Wkwr_mZS5dYyULnmJsf6G0GbMl49DdTtZR91OtjnQJdwd8X4O6IH38UZ9nB4T-3ZsnMVagHIf3MRwyMe-JR2-Dc8L-LZrQBe0R1yvY2lAqrqktQbQtqQnbO7iY7COdPV18WU0YzWtGkczXotphzsqw5nAEKWhgOR9QSU1UpIbokLXuS1edptij-C_tqWXW50ndWAfsLoUbgSN7FM3qrVOMCD29u6_PRCvz3jAPsIAfXqt-0vKa5Nsaeg-Yd08cOIBPp88c0qVlW1rGHvk8_UyACv7pjq4eZ-tTx00zZw86bjI9LFEpugZsYnOEMtIqbo8srSSA6YCoQfrLfhWoRTCp1FaHmlSNIwIPgmM58jMCDetgpxgRVO25TdE3EZa7ivfjMGpJ_YYB0BgWbd-eUOVuCtl2N-aBLfKfno9agtJqvYW4-Dta4yxi359x-Aba6w1R2ljRLKDhGWIbOiN4kiIItz2iJ7cnR8Rz824evWsDsWWeAWiB2U0Jm4Zl1JGm3_BgJQnBgoqrBO2QW57gjmK-9cmBxHKaUISBCWf7UthG_al9MR8KMfHtqWeGw3Hx0hdUmdJihfa5w5boI8N","expiry":"2025-11-17T03:18:03.482881953+01:00","expires_in":3599}
|
||||
drive_id = b!oZ68HakfOUyIjtCl8y_4dvI3LGh9x-FOpAsswDAgqczNrTmVYBjfSaurRAe77n-g
|
||||
drive_type = business
|
||||
|
||||
[NokiaSharePoint]
|
||||
type = onedrive
|
||||
token = {"access_token":"","token_type":"Bearer","refresh_token":"1.ARAAURdHXXWWjUKRe3D0T5YwsNllVrGm7ZJAhTkO7Ddq_VkQABkQAA.BQABAwEAAAADAOz_BQD0_y9ehjxi2_gHUIE4pOws9ipNlooFA1T_c_-SoKE9Vd8mOPkxML0H8H9-5rEfDub5RoxMkYmEVpjXO04WQIhG9AGuEzNd_ecrKawyNtwU8b1uSJE4p8ogoBtncpdK3hkaa4jAHfo_Cvm8_pa-BhZWfryqCTapIBaDpBBL_YNPKoSsujUX4I_Zy2sV6PgDwv7FGUIz2HK_y839leLMIyieZgMr9ClefU1fJuFUQ8c33oQcUOsimAssLIGHc5NVbyxpUrPCO2rPfk_rKULhnsx-ZLy6TaltSRkec57Wog4aUxzd5fFy2WF5RJ7yEceo1Nd6NdcQ-ncqeAuYZBdk8IdlpYx3AJ6g4IU_M5o961mqKlJHJJfjc5r9QXKgakdWku835u-I-z4oUImsKKJZndfik5hUa_GQH0YpFT_Nkh_R8I3dkXkBWfVUZuVIuEPfLSnWkIVEgmnuV3dMEeu3oZTVBxpzvWFOEOXjOUDyo85Cejl7QGeMd2sKH1ee4vHAYuGf5I7v9gbmTwLTOd3ULgOMIKFVwcZoHmikDxJSl3n1lH0WSETP6YIv93fXL48IK556wW1NnTu-ZYNwD9gHU97mug1A1v0Mpp_X_Ix0iNkQ2-zG5FT88GzDZk-rE-eiye_Bq2Hyc15b6PJC3Hwgjg9Ci_iCjbjIO3WotkZbV1cpwSvtbu72n51jMO2cHFqXfvF7vOsDhgipCNU1MMnfqXG9eKnDxKKqwL_Jgz4070jSbfGm5AzhLWvGYX147tGZ1kz_JQ7OetQX30yEwLEw2tXprtdlFqjRWxo5lh_07V1LicORabmWL8_vMauuCRdZ_m6RwK3mwb0L_yoGZ__bS4Y95w0MCgAfu-3AnGgCV2xWRtq49M1ucjlGcU3TLdGz35enjG0vWY64kO_xQ2kCTYGVwFpImR02EaOuQnlndmnp2kBuGKgs2T5QcQ096xKkxa1omptkkLhgh7jPKexoVqIuwWVT_BJps5BraUBdep5A-XjD6oCvhAuwY3qJI7Hjez0mUYLvP7P-7xhT5nBw-Q5SCmZrmIaSEuyKgHlE1WcdvQV2t5lBU0KQ3b4TSEqxfP9t1Hu0kbPceIvdJjPiQ1kEB-DEqB7HZ0LlebYSdgAWlwuVtfxbu242ZB-qtQr64bMeKdYP4ltIFOgwDE7B-1eY0HY7Przu7dK23e1_gJAJ1js5C7BrtdaJs3ULXH3R-Bowqln-xxzF2RdeMJpDrKuo0iJ1yF5xdehu0cEkR7V_qFZ7iPsh8h3h_xK7dPPNR4H3P_ABUE3xSUSUx1r2OO4NergXHxZku4qayh36laEcfzwqoOh-DQT-T6PdzD1fMFl72V4ikDhTj2vrFfH9","expiry":"2025-11-17T03:18:03.526767239+01:00","expires_in":3599}
|
||||
drive_id = b!KYmFKOmdnkuSkc8bRewSC4UuJN0bH89BjwJ4EyMN-SNDFuXWviqkQpZdC2IPBjPL
|
||||
drive_type = documentLibrary
|
||||
|
||||
105
config-files/restic-exclude-files.txt
Normal file
105
config-files/restic-exclude-files.txt
Normal file
@@ -0,0 +1,105 @@
|
||||
|
||||
# Cache directories
|
||||
.cache/
|
||||
*.cache/
|
||||
**/cache/
|
||||
**/Cache/
|
||||
**/CacheData/**
|
||||
**/CachedData/**
|
||||
**/CacheStorage/**
|
||||
**/Extensions/**
|
||||
**/Index*DB/**
|
||||
**/Code/logs/**
|
||||
|
||||
# Temporary files
|
||||
.tmp/
|
||||
*.tmp/
|
||||
**/tmp/
|
||||
/tmp/
|
||||
|
||||
# Browser caches and data
|
||||
.mozilla/firefox/*/cache2/
|
||||
.config/google-chrome/*/Cache/
|
||||
.config/chromium/*/Cache/
|
||||
|
||||
# Development Stuffs
|
||||
node_modules/
|
||||
.venv/
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
# System garbage
|
||||
.Trash/
|
||||
.local/share/Trash/
|
||||
|
||||
# Large media caches that we don't care about
|
||||
.thumbnails/
|
||||
|
||||
# Junk from Windows Drives
|
||||
$RECYCLE.BIN/
|
||||
System\ Volume\ Information/
|
||||
|
||||
|
||||
**/venv/**
|
||||
**/.venv/**
|
||||
**/__pycache__/**
|
||||
**/*.pyc
|
||||
**/.pytest_cache/**
|
||||
|
||||
# git
|
||||
# **/.git/*
|
||||
**/.git/*
|
||||
!**/.git/config
|
||||
|
||||
# node
|
||||
**/virtualenv/**
|
||||
**/node_modules/**
|
||||
**/.ansible/**
|
||||
**/.tldrc/**
|
||||
**/.npm/**
|
||||
**/.cargo/**
|
||||
**/.docker/buildx/**
|
||||
**/dist/**
|
||||
**/build/**
|
||||
|
||||
# caches, temporary
|
||||
**/.cache/**
|
||||
**/*.swp
|
||||
**/*~
|
||||
**/*.bak
|
||||
|
||||
# VM/disks/databases (review before enabling)
|
||||
**/*.vdi
|
||||
**/*.vmdk
|
||||
**/*.iso
|
||||
**/*.img
|
||||
**/*.sqlite3
|
||||
**/*.db
|
||||
|
||||
# more ignoring ...
|
||||
**/.mypy_cache/**
|
||||
**/__dist__/**
|
||||
**/.ruff_cache/**
|
||||
**/.tmp/**
|
||||
**/tmp/**
|
||||
**/.vagrant/**
|
||||
**/.arduino15/**
|
||||
**/.config/intune/**
|
||||
**/.config/libvirt/**
|
||||
**/.config/microsoft-edge/**
|
||||
|
||||
|
||||
**/VirtualBox VMs
|
||||
# /home/alfoldi/go
|
||||
**/go/**
|
||||
**/snap
|
||||
**/share/containers/storage/**
|
||||
**/NokiaOneDrive/**
|
||||
**/NokiaSharePoint/**
|
||||
**/.vagrant.d/**
|
||||
**/.vscode-server/**
|
||||
**/.vscode/**
|
||||
**/.local/share/nvim/**
|
||||
**/.local/state/nvim/**
|
||||
**/.local/share/pipx/**
|
||||
|
||||
1
config-files/restic.alfoldi.sh
Normal file
1
config-files/restic.alfoldi.sh
Normal file
@@ -0,0 +1 @@
|
||||
restic backup /home/alfoldi --exclude-file home-manager/config-files/restic-exclude-files.txt
|
||||
16
config-files/starship.toml
Normal file
16
config-files/starship.toml
Normal file
@@ -0,0 +1,16 @@
|
||||
[kubernetes]
|
||||
style = "bold #2b6fe5"
|
||||
disabled = false
|
||||
|
||||
[directory]
|
||||
truncate_to_repo = false
|
||||
|
||||
[hostname]
|
||||
ssh_only = false
|
||||
|
||||
[username]
|
||||
# style_user = 'white bold'
|
||||
# style_root = 'black bold'
|
||||
# format = 'user: [$user]($style) '
|
||||
# disabled = false
|
||||
show_always = true
|
||||
56
config-files/tmux.conf
Normal file
56
config-files/tmux.conf
Normal file
@@ -0,0 +1,56 @@
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
|
||||
# bind-key q last-window
|
||||
# bind q last-window
|
||||
bind-key -T prefix e switch-client -T last_window
|
||||
bind-key -T last_window e last-window
|
||||
|
||||
# bind cc new-window -c "#{pane_current_path}"
|
||||
|
||||
#
|
||||
# want to open new panel with current session path ...
|
||||
# but space already taken for another shortcut
|
||||
#
|
||||
# bind-key -T prefix Space switch-client -T prefix_c
|
||||
# bind-key -T prefix_c c new-window -c "#{pane_current_path}"
|
||||
# bind-key -T prefix_c % split-window -h -c "#{pane_current_path}"
|
||||
# bind-key -T prefix_c '"' split-window -v -c "#{pane_current_path}"
|
||||
|
||||
# bind Space split-window -h -c "#{pane_current_path}"
|
||||
# bind r split-window -h -c "#{pane_current_path}"
|
||||
# bind % split-window -h -c "#{pane_current_path}"
|
||||
# bind '"' split-window -v -c "#{pane_current_path}"
|
||||
|
||||
# List of plugins
|
||||
set -g @plugin 'tmux-plugins/tpm'
|
||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||
|
||||
# weird escape char when tmux starting
|
||||
set -sg escape-time 250
|
||||
# vi mode
|
||||
setw -g mode-keys vi
|
||||
|
||||
set -s copy-command 'wl-copy'
|
||||
|
||||
# (Optional) Explicitly bind 'v' to begin selection if not working
|
||||
# bind-key -T copy-mode-vi v send-keys -X begin-selection
|
||||
# bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
|
||||
|
||||
# press <prefix>‑T to toggle between C‑b and C‑a
|
||||
bind-key T run-shell "~/.tmux/toggle-prefix.sh"
|
||||
|
||||
set-option -g default-shell "/bin/bash"
|
||||
set -g default-terminal "screen-256color"
|
||||
new -n WindowName bash --login
|
||||
|
||||
# Other examples:
|
||||
# set -g @plugin 'github_username/plugin_name'
|
||||
# set -g @plugin 'git@github.com/user/plugin'
|
||||
# set -g @plugin 'git@bitbucket.com/user/plugin'
|
||||
|
||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
||||
run '~/.tmux/plugins/tpm/tpm'
|
||||
172
flake.lock
generated
Normal file
172
flake.lock
generated
Normal file
@@ -0,0 +1,172 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1767039857,
|
||||
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1770260404,
|
||||
"narHash": "sha256-3iVX1+7YUIt23hBx1WZsUllhbmP2EnXrV8tCRbLxHc8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "0d782ee42c86b196acff08acfbf41bb7d13eed5b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-25.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-secrets": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1769466557,
|
||||
"narHash": "sha256-1zrWg05ptRV9ntrxDF9onwozCPMXk8RbStgxb77NhTA=",
|
||||
"ref": "main",
|
||||
"rev": "026ee38dce0a1f0631c6bdd03f9e727b3eee8b1e",
|
||||
"shallow": true,
|
||||
"type": "git",
|
||||
"url": "ssh://git@github.com/alfonzso/nix-secrets.git"
|
||||
},
|
||||
"original": {
|
||||
"ref": "main",
|
||||
"shallow": true,
|
||||
"type": "git",
|
||||
"url": "ssh://git@github.com/alfonzso/nix-secrets.git"
|
||||
}
|
||||
},
|
||||
"nixos-wsl": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1770657009,
|
||||
"narHash": "sha256-v/LA5ZSJ+JQYzMSKB4sySM0wKfsAqddNzzxLLnbsV/E=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NixOS-WSL",
|
||||
"rev": "5b50ea1aaa14945d4794c80fcc99c4aa1db84d2d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "main",
|
||||
"repo": "NixOS-WSL",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1764947035,
|
||||
"narHash": "sha256-EYHSjVM4Ox4lvCXUMiKKs2vETUSL5mx+J2FfutM7T9w=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a672be65651c80d3f592a89b3945466584a22069",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1770019141,
|
||||
"narHash": "sha256-VKS4ZLNx4PNrABoB0L8KUpc1fE7CLpQXQs985tGfaCU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "cb369ef2efd432b3cdf8622b0ffc0a97a02f3137",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1770617025,
|
||||
"narHash": "sha256-1jZvgZoAagZZB6NwGRv2T2ezPy+X6EFDsJm+YSlsvEs=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2db38e08fdadcc0ce3232f7279bab59a15b94482",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-25.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1770380644,
|
||||
"narHash": "sha256-P7dWMHRUWG5m4G+06jDyThXO7kwSk46C1kgjEWcybkE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ae67888ff7ef9dff69b3cf0cc0fbfbcd3a722abe",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"nix-secrets": "nix-secrets",
|
||||
"nixos-wsl": "nixos-wsl",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"sops-nix": "sops-nix"
|
||||
}
|
||||
},
|
||||
"sops-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1770683991,
|
||||
"narHash": "sha256-xVfPvXDf9QN3Eh9dV+Lw6IkWG42KSuQ1u2260HKvpnc=",
|
||||
"owner": "mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "8b89f44c2cc4581e402111d928869fe7ba9f7033",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "mic92",
|
||||
"repo": "sops-nix",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
34
flake.nix
Normal file
34
flake.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
||||
nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
|
||||
|
||||
sops-nix.url = "github:mic92/sops-nix";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-25.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nix-secrets = {
|
||||
url = "git+ssh://git@github.com/alfonzso/nix-secrets.git?ref=main&shallow=1";
|
||||
inputs = { };
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, nixos-wsl,
|
||||
sops-nix,
|
||||
home-manager, ... }: {
|
||||
nixosConfigurations.nokiaWslNix = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
home-manager.nixosModules.home-manager
|
||||
sops-nix.nixosModules.sops
|
||||
nixos-wsl.nixosModules.default
|
||||
./home.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
72
hm_programs/bash.nix
Normal file
72
hm_programs/bash.nix
Normal file
@@ -0,0 +1,72 @@
|
||||
{ config, hostCfg, ... }:
|
||||
let
|
||||
gitPrompt = builtins.fetchurl {
|
||||
url =
|
||||
"https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh";
|
||||
sha256 = "7ff718f4a06fd0a0be7edfef926abb41b1353c48c1515ad312d226965b74943a";
|
||||
};
|
||||
PROJECT_ROOT = ./.;
|
||||
in {
|
||||
programs = {
|
||||
bash = {
|
||||
enable = true;
|
||||
profileExtra = ''
|
||||
# if running bash
|
||||
if [ -n "$BASH_VERSION" ]; then
|
||||
# include .bashrc if it exists
|
||||
if [ -f "$HOME/.bashrc" ]; then
|
||||
. "$HOME/.bashrc"
|
||||
fi
|
||||
fi
|
||||
|
||||
# set PATH so it includes user's private bin if it exists
|
||||
if [ -d "$HOME/bin" ] ; then
|
||||
PATH="$HOME/bin:$PATH"
|
||||
fi
|
||||
|
||||
# set PATH so it includes user's private bin if it exists
|
||||
if [ -d "$HOME/.local/bin" ] ; then
|
||||
PATH="$HOME/.local/bin:$PATH"
|
||||
fi
|
||||
'';
|
||||
initExtra = ''
|
||||
# some more ls aliases
|
||||
alias ll='ls -alF'
|
||||
alias la='ls -A'
|
||||
alias l='ls -CF'
|
||||
alias sudonix='sudo env PATH=$PATH'
|
||||
alias k='kubectl'
|
||||
alias rm="trash-put"
|
||||
|
||||
# export BASH_COMPLETION_USER_DIR=$HOME/.nix-profile/share/bash-completion.d/
|
||||
|
||||
# Eternal bash history.
|
||||
# ---------------------
|
||||
# Undocumented feature which sets the size to "unlimited".
|
||||
# http://stackoverflow.com/questions/9457233/unlimited-bash-history
|
||||
export HISTFILESIZE=
|
||||
export HISTSIZE=
|
||||
# export HISTTIMEFORMAT="[%F %T] "
|
||||
# Change the file location because certain bash sessions truncate .bash_history file upon close.
|
||||
# http://superuser.com/questions/575479/bash-history-truncated-to-500-lines-on-each-login
|
||||
export HISTFILE=~/.bash_eternal_history
|
||||
# Force prompt to write history after every command.
|
||||
# PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
|
||||
PROMPT_COMMAND="history -a '$HISTFILE'; $PROMPT_COMMAND"
|
||||
|
||||
# Source custom configuration
|
||||
if [ -f "$HOME/.bashrc.zs00lt" ]; then
|
||||
. "${PROJECT_ROOT}/config-files/bashrc.zs00lt"
|
||||
fi
|
||||
|
||||
# source <(kubectl completion bash)
|
||||
# source <(helm completion bash)
|
||||
# source <(rclone completion bash)
|
||||
|
||||
source ${gitPrompt}
|
||||
eval "$(starship init bash)"
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
3
hm_programs/default.nix
Normal file
3
hm_programs/default.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{ ... }: {
|
||||
imports = [ ./bash.nix ./git.nix ./tmux.nix ./vim.nix ];
|
||||
}
|
||||
65
hm_programs/git.nix
Normal file
65
hm_programs/git.nix
Normal file
@@ -0,0 +1,65 @@
|
||||
{ ... }:
|
||||
{
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
||||
ignores = [ ".tmp" "tmp" ".envrc" ];
|
||||
|
||||
settings = {
|
||||
|
||||
user.name = "alfonzso";
|
||||
user.email = "alfonzso@gmail.com";
|
||||
|
||||
core = {
|
||||
editor = "nvim";
|
||||
whitespace = "trailing-space,space-before-tab";
|
||||
quotepath = "off";
|
||||
};
|
||||
# pull.rebase = "true";
|
||||
stash = { showPatch = "1"; };
|
||||
color = {
|
||||
pager = "true";
|
||||
diff = "true";
|
||||
grep = "true";
|
||||
interactive = "true";
|
||||
status = "always";
|
||||
ui = "true";
|
||||
};
|
||||
"merge \"po\"" = {
|
||||
name = "Gettext merge driver";
|
||||
driver = "git-merge-po.sh %O %A %B";
|
||||
};
|
||||
apply = { whitespace = "fix"; };
|
||||
diff = {
|
||||
tool = "nvim -d";
|
||||
colorMoved = "default";
|
||||
};
|
||||
"color \"diff-highlight\"" = {
|
||||
oldNormal = "red bold";
|
||||
oldHighlight = "red bold 52";
|
||||
newNormal = "green bold";
|
||||
newHighlight = "green bold 22";
|
||||
};
|
||||
"color \"diff\"" = {
|
||||
meta = "yellow";
|
||||
frag = "magenta bold";
|
||||
commit = "yellow bold";
|
||||
old = "red bold";
|
||||
new = "green bold";
|
||||
whitespace = "red reverse";
|
||||
};
|
||||
merge = { tool = "nvim"; };
|
||||
"mergetool \"meld\"" = {
|
||||
cmd = ''meld "$LOCAL" "$MERGED" "$REMOTE" --output "$MERGED"'';
|
||||
};
|
||||
"mergetool \"nvim\"" = {
|
||||
cmd =
|
||||
"nvim -d \"$LOCAL\" \"$REMOTE\" \"$MERGED\" -c '$wincmd w' -c 'wincmd J'";
|
||||
};
|
||||
"mergetool \"vscode\"" = { cmd = ''code --wait "$MERGED"''; };
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
41
hm_programs/tmux.nix
Normal file
41
hm_programs/tmux.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{ pkgs, ... }: {
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
|
||||
# bind-key q last-window
|
||||
# bind q last-window
|
||||
|
||||
bind-key -T prefix e switch-client -T last_window
|
||||
bind-key -T last_window e last-window
|
||||
|
||||
# List of plugins
|
||||
set -g @plugin 'tmux-plugins/tpm'
|
||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||
set -sg escape-time 250
|
||||
|
||||
set-window-option -g mode-keys vi
|
||||
|
||||
# press <prefix>‑T to toggle between C‑b and C‑a
|
||||
# bind-key T run-shell "~/.tmux/toggle-prefix.sh"
|
||||
|
||||
set-option -g default-shell "${pkgs.bash}/bin/bash"
|
||||
set -g default-terminal "screen-256color"
|
||||
new -n WindowName bash --login
|
||||
|
||||
# Other examples:
|
||||
# set -g @plugin 'github_username/plugin_name'
|
||||
# set -g @plugin 'git@github.com/user/plugin'
|
||||
# set -g @plugin 'git@bitbucket.com/user/plugin'
|
||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
||||
run '~/.tmux/plugins/tpm/tpm'
|
||||
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
||||
43
hm_programs/vim.nix
Normal file
43
hm_programs/vim.nix
Normal file
@@ -0,0 +1,43 @@
|
||||
{ config, pkgs, hostCfg, ... }:
|
||||
# let
|
||||
# hostCfg = config.hostCfg ;
|
||||
# in
|
||||
let
|
||||
hostCfg = { username = "nixos"; };
|
||||
in
|
||||
{
|
||||
|
||||
programs.vim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
|
||||
# config = builtins.readFile ~/.vimrc;
|
||||
# extraConfig = builtins.readFile /home/nixos/.vimrc;
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
vim-fzf-coauthorship
|
||||
vim-sensible
|
||||
vim-automkdir
|
||||
vim-nix # Syntax highlighting for Nix
|
||||
nerdtree # File explorer
|
||||
fugitive # Git integration
|
||||
];
|
||||
|
||||
extraConfig = ''
|
||||
" NERDTree configuration
|
||||
" nnoremap <leader>n :NERDTreeToggle<CR>
|
||||
set tabstop =2
|
||||
set softtabstop =2
|
||||
set shiftwidth =2
|
||||
set expandtab
|
||||
set backupdir=/home/${hostCfg.username}/.vim-tmp
|
||||
set directory=/home/${hostCfg.username}/.vim-tmp
|
||||
|
||||
set exrc
|
||||
set secure
|
||||
|
||||
" Reopen the last edited position in files
|
||||
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
|
||||
'';
|
||||
};
|
||||
}
|
||||
88
home.nix
Normal file
88
home.nix
Normal file
@@ -0,0 +1,88 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
downloadedFile = builtins.fetchurl {
|
||||
url =
|
||||
"https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh";
|
||||
sha256 = "7ff718f4a06fd0a0be7edfef926abb41b1353c48c1515ad312d226965b74943a";
|
||||
};
|
||||
ProjectRoot = ./.;
|
||||
in {
|
||||
# Mandatory WSL settings
|
||||
wsl.enable = true;
|
||||
wsl.defaultUser = "nixos";
|
||||
|
||||
# Enable Flakes and new 'nix' commands
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
||||
# for neovim to x11 clipboard sync
|
||||
# or not just neovim ...
|
||||
xclip
|
||||
|
||||
# lua-language-server
|
||||
# stylua
|
||||
|
||||
rsync
|
||||
# screen
|
||||
openssh
|
||||
bash-completion
|
||||
gcc
|
||||
# cargo
|
||||
cmake
|
||||
gnumake
|
||||
# fzf
|
||||
trash-cli
|
||||
wl-clipboard
|
||||
|
||||
wget
|
||||
curl
|
||||
tree
|
||||
inetutils # telnet
|
||||
|
||||
restic
|
||||
wireguard-tools
|
||||
|
||||
];
|
||||
|
||||
home-manager = {
|
||||
users.nixos = {
|
||||
|
||||
imports = [ ./hm_programs ./packages.nix ];
|
||||
|
||||
home = {
|
||||
|
||||
sessionVariables = { POETRY_VIRTUALENVS_IN_PROJECT = "true"; };
|
||||
|
||||
activation.createCustomDir = lib.mkAfter ''
|
||||
mkdir -p ~/.vim-tmp
|
||||
chmod u+rw ~/.vim-tmp
|
||||
'';
|
||||
|
||||
file = {
|
||||
|
||||
".local/share/git/contrib/completion/git-prompt.sh".source =
|
||||
downloadedFile;
|
||||
|
||||
".config/starship.toml".source =
|
||||
"${ProjectRoot}/config-files/starship.toml";
|
||||
|
||||
".tmux.conf".source = "${ProjectRoot}/config-files/tmux.conf";
|
||||
|
||||
# home-manager config ... and not working
|
||||
# "current-system-packages".text = let
|
||||
# packages = builtins.map (p: "${p.name}") config.home.packages;
|
||||
# sortedUnique =
|
||||
# builtins.sort builtins.lessThan (pkgs.lib.lists.unique packages);
|
||||
# formatted = builtins.concatStringsSep "\n" sortedUnique;
|
||||
# in formatted;
|
||||
|
||||
};
|
||||
stateVersion = "25.11";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
}
|
||||
78
packages.nix
Normal file
78
packages.nix
Normal file
@@ -0,0 +1,78 @@
|
||||
{ pkgs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
|
||||
kubectl
|
||||
kubernetes-helm
|
||||
kustomize
|
||||
podman
|
||||
k9s
|
||||
|
||||
# needed by nvim
|
||||
neovim
|
||||
(python312.withPackages (ps: with ps; [ pip ]))
|
||||
poetry
|
||||
|
||||
# LSP servers
|
||||
tree-sitter
|
||||
nil # Nix LSP
|
||||
stylua
|
||||
prettierd
|
||||
bash-language-server
|
||||
lua-language-server
|
||||
just-lsp
|
||||
|
||||
# Formatters
|
||||
# nixfmt-rfc-style # or nixpkgs-fmt
|
||||
# nixfmt
|
||||
nixfmt-classic
|
||||
shfmt
|
||||
nodePackages.prettier
|
||||
|
||||
nodejs_24
|
||||
|
||||
###########
|
||||
# Rust not needed if blink is used from prebuilt binary
|
||||
###########
|
||||
# # Rust nightly with rust-src
|
||||
# (rust-bin.selectLatestNightlyWith (toolchain:
|
||||
# toolchain.default.override {
|
||||
# extensions = [ "rust-src" "rust-analyzer" ];
|
||||
# }))
|
||||
|
||||
ripgrep
|
||||
fzf
|
||||
fd
|
||||
ripgrep-all
|
||||
|
||||
sops
|
||||
age
|
||||
|
||||
dig
|
||||
htop
|
||||
iotop
|
||||
ncdu
|
||||
nmon
|
||||
pciutils # lspci
|
||||
ps # ps aux
|
||||
socat
|
||||
# unixtools.net-tools
|
||||
nettools
|
||||
usbutils # lsusb
|
||||
|
||||
bat
|
||||
git
|
||||
mc
|
||||
direnv
|
||||
neofetch
|
||||
rclone
|
||||
rename
|
||||
starship
|
||||
tldr
|
||||
tmux
|
||||
unzip
|
||||
|
||||
yq
|
||||
jq
|
||||
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user