Compare commits
374 commits
main
...
d918bf279d
Author | SHA1 | Date | |
---|---|---|---|
Bruno BELANYI | d918bf279d | ||
Bruno BELANYI | 6f3bee895c | ||
Bruno BELANYI | 069987f47e | ||
Bruno BELANYI | 971b6e9b65 | ||
Bruno BELANYI | 8c103a2261 | ||
Bruno BELANYI | 76f33fbd57 | ||
Bruno BELANYI | 7d787a2770 | ||
Bruno BELANYI | 323e99bbb0 | ||
Bruno BELANYI | 8569a8eb55 | ||
Bruno BELANYI | 6d393fdef2 | ||
Bruno BELANYI | a85922b3b3 | ||
Bruno BELANYI | d1cd5bfa32 | ||
Bruno BELANYI | d64a867afc | ||
Bruno BELANYI | cc21d84808 | ||
Bruno BELANYI | 84cdc30037 | ||
Bruno BELANYI | 07cf0fa4da | ||
Bruno BELANYI | 24de1890fc | ||
Bruno BELANYI | 4055ef17f0 | ||
Bruno BELANYI | 7ce69233c1 | ||
Bruno BELANYI | 9f86615e77 | ||
Bruno BELANYI | e805496588 | ||
Bruno BELANYI | 3201445c08 | ||
Bruno BELANYI | 30eaefc1d1 | ||
Bruno BELANYI | 5f41bb1647 | ||
Bruno BELANYI | fec4956063 | ||
Bruno BELANYI | a62c0ad126 | ||
Bruno BELANYI | 2cc13dddb5 | ||
Bruno BELANYI | de92358bc0 | ||
Bruno BELANYI | 167db81c6c | ||
Bruno BELANYI | 738d1760c3 | ||
Bruno BELANYI | e962d4c574 | ||
Bruno BELANYI | 1c0d671fff | ||
Bruno BELANYI | 3bf3980e45 | ||
Bruno BELANYI | f6faa11ff7 | ||
Bruno BELANYI | 67090494e2 | ||
Bruno BELANYI | 0d44b3b9f2 | ||
Bruno BELANYI | 37c20529c1 | ||
Bruno BELANYI | 2449a96652 | ||
Bruno BELANYI | 8a9337710f | ||
Bruno BELANYI | 7b75ea43ad | ||
Bruno BELANYI | fb6e2afe89 | ||
Bruno BELANYI | 51067582e0 | ||
Bruno BELANYI | 78ade4c605 | ||
Bruno BELANYI | 5c2921e00d | ||
Bruno BELANYI | 62a18cd3f6 | ||
Bruno BELANYI | c6cc64e156 | ||
Bruno BELANYI | 875a3d8587 | ||
Bruno BELANYI | 409e0ef357 | ||
Bruno BELANYI | b6af754199 | ||
Bruno BELANYI | ca5e5a53cd | ||
Bruno BELANYI | ba10af0644 | ||
Bruno BELANYI | 0f2c20e51d | ||
Bruno BELANYI | ca218730ff | ||
Bruno BELANYI | ac5fd7f472 | ||
Bruno BELANYI | db37cea907 | ||
Bruno BELANYI | 1cf93825b2 | ||
Bruno BELANYI | 8a2aad9b54 | ||
Bruno BELANYI | 018394b61d | ||
Bruno BELANYI | 1e3c633c72 | ||
Bruno BELANYI | df302465c9 | ||
Bruno BELANYI | 673ead7863 | ||
Bruno BELANYI | 3d10461a6e | ||
Bruno BELANYI | 75312c747b | ||
Bruno BELANYI | 68be7743ad | ||
Bruno BELANYI | 9d362655e2 | ||
Bruno BELANYI | 604b99a7ac | ||
Bruno BELANYI | 8467fda721 | ||
Bruno BELANYI | bad9b8a06b | ||
Bruno BELANYI | 2d26b36e31 | ||
Bruno BELANYI | c93a9e5a98 | ||
Bruno BELANYI | 3fa14ebe71 | ||
Bruno BELANYI | bd1a2000fe | ||
Bruno BELANYI | 4a0c10b897 | ||
Bruno BELANYI | 9f3811ea3b | ||
Bruno BELANYI | 5c95ba1113 | ||
Bruno BELANYI | 37bb7fd625 | ||
Bruno BELANYI | 45321072fc | ||
Bruno BELANYI | ed456c999d | ||
Bruno BELANYI | ad848ef89d | ||
Bruno BELANYI | 680d0c9f37 | ||
Bruno BELANYI | 9a06108603 | ||
Bruno BELANYI | c8633abf6d | ||
Bruno BELANYI | aceb4ef901 | ||
Bruno BELANYI | 5937d43993 | ||
Bruno BELANYI | add6326fdf | ||
Bruno BELANYI | b0e4475586 | ||
Bruno BELANYI | 5c1dd6500a | ||
Bruno BELANYI | 60e977611c | ||
Bruno BELANYI | 99462199bd | ||
Bruno BELANYI | 4fe18ff4cd | ||
Bruno BELANYI | 02ffbcf970 | ||
Bruno BELANYI | 878c92b67e | ||
Bruno BELANYI | 8596ce8638 | ||
Bruno BELANYI | 808058d576 | ||
Bruno BELANYI | 8ffad5d41b | ||
Bruno BELANYI | 52706ab4c4 | ||
Bruno BELANYI | 5ae7b593e4 | ||
Bruno BELANYI | 87613a9163 | ||
Bruno BELANYI | 47d19e5b3f | ||
Bruno BELANYI | a78091c57c | ||
Bruno BELANYI | 9aba0d3ce0 | ||
Bruno BELANYI | 78064bb2a1 | ||
Bruno BELANYI | 70af0ba99a | ||
Bruno BELANYI | dc2a3610a6 | ||
Bruno BELANYI | 894b571745 | ||
Bruno BELANYI | 2049e7a2c5 | ||
Bruno BELANYI | 7032ddef37 | ||
Bruno BELANYI | 81e12969eb | ||
Bruno BELANYI | b97eff2479 | ||
Bruno BELANYI | 4f742b69f2 | ||
Bruno BELANYI | 11fbbd62eb | ||
Bruno BELANYI | d21087ddcd | ||
Bruno BELANYI | 3919a87d9e | ||
Bruno BELANYI | 3fd487bbd2 | ||
Bruno BELANYI | 5916ae631d | ||
Bruno BELANYI | 1a436fd962 | ||
Bruno BELANYI | a48303e66d | ||
Bruno BELANYI | 30fc01b5ae | ||
Bruno BELANYI | 13684ecdc4 | ||
Bruno BELANYI | fe720b2de3 | ||
Bruno BELANYI | ec6b31f4a6 | ||
Bruno BELANYI | 1335bbfe9d | ||
Bruno BELANYI | 2cc1925346 | ||
Bruno BELANYI | eb0c5d5895 | ||
Bruno BELANYI | 8c298c26f9 | ||
Bruno BELANYI | 55a04cfac3 | ||
Bruno BELANYI | 1783c2838b | ||
Bruno BELANYI | e215f7aa1d | ||
Bruno BELANYI | afb683f1cf | ||
Bruno BELANYI | c320387746 | ||
Bruno BELANYI | bbb1231ad3 | ||
Bruno BELANYI | 9f00d8a38e | ||
Bruno BELANYI | 820b52314f | ||
Bruno BELANYI | a3293277d9 | ||
Bruno BELANYI | 2ecd417a68 | ||
Bruno BELANYI | 4e8045716c | ||
Bruno BELANYI | e060476f32 | ||
Bruno BELANYI | 2458ddf59d | ||
Bruno BELANYI | 8927b3182f | ||
Bruno BELANYI | f2dfeeb35b | ||
Bruno BELANYI | 971b610cd5 | ||
Bruno BELANYI | 21f48b5f71 | ||
Bruno BELANYI | a3edf2548b | ||
Bruno BELANYI | ea7b064546 | ||
Bruno BELANYI | ff8e64d601 | ||
Bruno BELANYI | 791109c3c1 | ||
Bruno BELANYI | 6eb3942270 | ||
Bruno BELANYI | 2232062fd9 | ||
Bruno BELANYI | d6e9f9786d | ||
Bruno BELANYI | 5abe4e929e | ||
Bruno BELANYI | 57717d70ef | ||
Bruno BELANYI | 7a382368e8 | ||
Bruno BELANYI | 0f17123d09 | ||
Bruno BELANYI | c6d21493ef | ||
Bruno BELANYI | 5cebb9b54b | ||
Bruno BELANYI | 92c2748747 | ||
Bruno BELANYI | 4cae294cf5 | ||
Bruno BELANYI | 23c6093c36 | ||
Bruno BELANYI | 3fdcfb5b5f | ||
Bruno BELANYI | c9418cc4d3 | ||
Bruno BELANYI | cd02cbff45 | ||
Bruno BELANYI | daa69a54fa | ||
Bruno BELANYI | 212dd299e2 | ||
Bruno BELANYI | cff3811cad | ||
Bruno BELANYI | 8f266245ee | ||
Bruno BELANYI | b8be3d80a8 | ||
Bruno BELANYI | b04c1b09ea | ||
Bruno BELANYI | 3a471433ed | ||
Bruno BELANYI | f8325cc9c7 | ||
Bruno BELANYI | cd1173d2f6 | ||
Bruno BELANYI | e319eaf09f | ||
Bruno BELANYI | e6ba569b36 | ||
Bruno BELANYI | ee21de5b94 | ||
Bruno BELANYI | 6614b47546 | ||
Bruno BELANYI | 06c53620f8 | ||
Bruno BELANYI | d43045c6d6 | ||
Bruno BELANYI | 6113ad154d | ||
Bruno BELANYI | e8982b8bc9 | ||
Bruno BELANYI | 7684489c9a | ||
Bruno BELANYI | 1994ef2b1b | ||
Bruno BELANYI | a434016252 | ||
Bruno BELANYI | 1794eefd30 | ||
Bruno BELANYI | 29437d3e3f | ||
Bruno BELANYI | a827a34501 | ||
Bruno BELANYI | 610b0f2f4b | ||
Bruno BELANYI | 59cb038045 | ||
Bruno BELANYI | 15db81eb3b | ||
Bruno BELANYI | 24efa3edca | ||
Bruno BELANYI | 2fe4f1faad | ||
Bruno BELANYI | 4f1f687eea | ||
Bruno BELANYI | b90be0acdf | ||
Bruno BELANYI | ea4c699b81 | ||
Bruno BELANYI | 8efe75295d | ||
Bruno BELANYI | 2d9b11406a | ||
Bruno BELANYI | 003c08cb09 | ||
Bruno BELANYI | 6728b50d3a | ||
Bruno BELANYI | 2eaf3bf2c7 | ||
Bruno BELANYI | 0077ce1f94 | ||
Bruno BELANYI | 14d9fc89f1 | ||
Bruno BELANYI | f660bf94e9 | ||
Bruno BELANYI | 3b9f01e780 | ||
Bruno BELANYI | 60f1e693d1 | ||
Bruno BELANYI | ce4b0b8c90 | ||
Bruno BELANYI | d2704b17fe | ||
Bruno BELANYI | 31f8ec6e98 | ||
Bruno BELANYI | af67d04992 | ||
Bruno BELANYI | f9bcf79430 | ||
Bruno BELANYI | b0cc830467 | ||
Bruno BELANYI | 9b054d10c7 | ||
Bruno BELANYI | e81aaa8ebc | ||
Bruno BELANYI | 737b5e797b | ||
Bruno BELANYI | 6728b5b949 | ||
Bruno BELANYI | 2999ba7c0b | ||
Bruno BELANYI | 1ac9f0cc8c | ||
Bruno BELANYI | 6074958292 | ||
Bruno BELANYI | da21e7a6f2 | ||
Bruno BELANYI | 395f15f181 | ||
Bruno BELANYI | 059831b532 | ||
Bruno BELANYI | 76d165343e | ||
Bruno BELANYI | f66da6fee6 | ||
Bruno BELANYI | ca1c7962ea | ||
Bruno BELANYI | 796df5475e | ||
Bruno BELANYI | 414606b58e | ||
Bruno BELANYI | 931b67fdb2 | ||
Bruno BELANYI | 8b4966fcbe | ||
Bruno BELANYI | a508db48c9 | ||
Bruno BELANYI | 406eeea9f6 | ||
Bruno BELANYI | 9d3d86365c | ||
Bruno BELANYI | 78d77890de | ||
Bruno BELANYI | a33fbc6659 | ||
Bruno BELANYI | b134aedff0 | ||
Bruno BELANYI | d31e293cef | ||
Bruno BELANYI | 182ec2a4db | ||
Bruno BELANYI | 81647c5a02 | ||
Bruno BELANYI | 8a8f7387f4 | ||
Bruno BELANYI | f2b20c65a8 | ||
Bruno BELANYI | cc37713839 | ||
Bruno BELANYI | e80485018c | ||
Bruno BELANYI | 15abb291ef | ||
Bruno BELANYI | fb56631ef3 | ||
Bruno BELANYI | 9113290161 | ||
Bruno BELANYI | 943ea20b16 | ||
Bruno BELANYI | 129fcdd42c | ||
Bruno BELANYI | d086af7e00 | ||
Bruno BELANYI | e4d8a4d4b2 | ||
Bruno BELANYI | 1a5dd0b91c | ||
Bruno BELANYI | 02c2a23ee5 | ||
Bruno BELANYI | f6ace9d438 | ||
Bruno BELANYI | 2a0b5b7802 | ||
Bruno BELANYI | 2c596395b0 | ||
Bruno BELANYI | 986701d1c8 | ||
Bruno BELANYI | ee33ab11c6 | ||
Bruno BELANYI | 7d0a772cce | ||
Bruno BELANYI | 97ee498405 | ||
Bruno BELANYI | e5fdfd6c44 | ||
Bruno BELANYI | 76148d75b8 | ||
Bruno BELANYI | 9e6bc604f3 | ||
Bruno BELANYI | b4d3b06fbf | ||
Bruno BELANYI | 8de23feee7 | ||
Bruno BELANYI | 0fc3bf3096 | ||
Bruno BELANYI | 7d48b0edab | ||
Bruno BELANYI | d23ad8f5e1 | ||
Bruno BELANYI | f3764ce20e | ||
Bruno BELANYI | f9d849c5da | ||
Bruno BELANYI | 59e833a55b | ||
Bruno BELANYI | 03130ed9ee | ||
Bruno BELANYI | ac4cf0c1a2 | ||
Bruno BELANYI | fab93a5f2f | ||
Bruno BELANYI | f04368a71e | ||
Bruno BELANYI | 30ce91557d | ||
Bruno BELANYI | d46f66842f | ||
Bruno BELANYI | 737484dcfe | ||
Bruno BELANYI | 125935ac0f | ||
Bruno BELANYI | e786eaddde | ||
Bruno BELANYI | e211ac7d73 | ||
Bruno BELANYI | 3f50abcbe0 | ||
Bruno BELANYI | 1c2193d698 | ||
Bruno BELANYI | 12b3397a20 | ||
Bruno BELANYI | ca620a4eb6 | ||
Bruno BELANYI | 885b45d39c | ||
Bruno BELANYI | 0c943d8430 | ||
Bruno BELANYI | 79dfb3a979 | ||
Bruno BELANYI | 00a5d1b076 | ||
Bruno BELANYI | 5e193b3a42 | ||
Bruno BELANYI | bf9de874ce | ||
Bruno BELANYI | 5aaa497653 | ||
Bruno BELANYI | 3887a86650 | ||
Bruno BELANYI | f57fd32088 | ||
Bruno BELANYI | 1c147613e4 | ||
Bruno BELANYI | 15190d4b50 | ||
Bruno BELANYI | 5f7d2c74bc | ||
Bruno BELANYI | 53dd04a0b7 | ||
Bruno BELANYI | 86ab6bf17a | ||
Bruno BELANYI | 6008ac470c | ||
Bruno BELANYI | 717c628ff1 | ||
Bruno BELANYI | 749ef9f072 | ||
Bruno BELANYI | a0c63f00f9 | ||
Bruno BELANYI | d9734dd505 | ||
Bruno BELANYI | 4225bdd103 | ||
Bruno BELANYI | 3a07cffa14 | ||
Bruno BELANYI | 06f9f423e9 | ||
Bruno BELANYI | ad1d907c25 | ||
Bruno BELANYI | ef0f4bdca5 | ||
Bruno BELANYI | b4d002033a | ||
Bruno BELANYI | 8837c7c33c | ||
Bruno BELANYI | f4cc68a650 | ||
Bruno BELANYI | 79525013b0 | ||
Bruno BELANYI | 2b8d01f056 | ||
Bruno BELANYI | b115d94cd6 | ||
Bruno BELANYI | 1022601602 | ||
Bruno BELANYI | 376e60d71e | ||
Bruno BELANYI | a03db294fe | ||
Bruno BELANYI | f2b9040175 | ||
Bruno BELANYI | b1e8664e32 | ||
Bruno BELANYI | b61aca7def | ||
Bruno BELANYI | d388a379d4 | ||
Bruno BELANYI | 3402b92784 | ||
Bruno BELANYI | b55466b791 | ||
Bruno BELANYI | 036d59ec11 | ||
Bruno BELANYI | f89e1ba3e9 | ||
Bruno BELANYI | 8788deac5e | ||
Bruno BELANYI | 676cd03c9c | ||
Bruno BELANYI | e329e7a59a | ||
Bruno BELANYI | 98a8e068ea | ||
Bruno BELANYI | f5fcd2a7a6 | ||
Bruno BELANYI | 1b9b598662 | ||
Bruno BELANYI | 05e0cd4e1f | ||
Bruno BELANYI | 9973e0d32f | ||
Bruno BELANYI | 8231e8feaa | ||
Bruno BELANYI | 8dc89846b2 | ||
Bruno BELANYI | 5a32160954 | ||
Bruno BELANYI | 6612d0226a | ||
Bruno BELANYI | 75e3d9bf70 | ||
Bruno BELANYI | 9dbfb65c27 | ||
Bruno BELANYI | f8d6447ac4 | ||
Bruno BELANYI | 185781a4e2 | ||
Bruno BELANYI | cdc29efafc | ||
Bruno BELANYI | 9f6c614c9f | ||
Bruno BELANYI | 54a20058fb | ||
Bruno BELANYI | 6bad81a644 | ||
Bruno BELANYI | 971ee359ce | ||
Bruno BELANYI | c175964630 | ||
Bruno BELANYI | 046391e26e | ||
Bruno BELANYI | b32fec2c63 | ||
Bruno BELANYI | 3ec448bf03 | ||
Bruno BELANYI | c3c44bceb6 | ||
Bruno BELANYI | e1240c188e | ||
Bruno BELANYI | d5b3b95827 | ||
Bruno BELANYI | c17b5f4004 | ||
Bruno BELANYI | e06edc8f47 | ||
Bruno BELANYI | 4d04dd9b9b | ||
Bruno BELANYI | e6b810b5a1 | ||
Bruno BELANYI | 595720dcd4 | ||
Bruno BELANYI | e6fb00ce9a | ||
Bruno BELANYI | d01b7963cd | ||
Bruno BELANYI | 646768c3b7 | ||
Bruno BELANYI | b254e0f7ac | ||
Bruno BELANYI | fee045d82c | ||
Bruno BELANYI | 76b17e924a | ||
Bruno BELANYI | 9fe78a5a70 | ||
Bruno BELANYI | 90ccf42779 | ||
Bruno BELANYI | cdbe16e703 | ||
Bruno BELANYI | 1da8177ea2 | ||
Bruno BELANYI | fe9f468e06 | ||
Bruno BELANYI | 45cb955433 | ||
Bruno BELANYI | b6fb77fc34 | ||
Bruno BELANYI | f57cfda767 | ||
Bruno BELANYI | 5427f15a17 | ||
Bruno BELANYI | 6acf9f4a19 | ||
Bruno BELANYI | cd7c8e2172 | ||
Bruno BELANYI | e0b0f44a9a | ||
Bruno BELANYI | bd53470e46 | ||
Bruno BELANYI | f634f1b2ed | ||
dc052386d1 |
|
@ -1,14 +1,16 @@
|
|||
labels:
|
||||
backend: local
|
||||
---
|
||||
kind: pipeline
|
||||
type: exec
|
||||
name: NixOS config check
|
||||
|
||||
steps:
|
||||
- name: nix flake check
|
||||
image: bash
|
||||
commands:
|
||||
- nix flake check
|
||||
|
||||
- name: notify
|
||||
image: bash
|
||||
- name: notifiy
|
||||
commands:
|
||||
- nix run .#matrix-notifier
|
||||
environment:
|
||||
ADDRESS:
|
||||
from_secret: matrix_homeserver
|
||||
|
@ -18,9 +20,8 @@ steps:
|
|||
from_secret: matrix_username
|
||||
PASS:
|
||||
from_secret: matrix_password
|
||||
commands:
|
||||
- nix run '.#matrix-notifier'
|
||||
when:
|
||||
status:
|
||||
- failure
|
||||
- success
|
||||
- failure
|
||||
- success
|
||||
...
|
13
.envrc
13
.envrc
|
@ -1,8 +1,9 @@
|
|||
if ! has nix_direnv_version || ! nix_direnv_version 3.0.0; then
|
||||
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.0/direnvrc" "sha256-21TMnI2xWX7HkSTjFFri2UaohXVj854mgvWapWrxRXg="
|
||||
fi
|
||||
|
||||
watch_file ./flake/checks.nix
|
||||
watch_file ./flake/dev-shells.nix
|
||||
use_flake() {
|
||||
watch_file flake.nix
|
||||
watch_file flake.lock
|
||||
eval "$(nix print-dev-env)"
|
||||
}
|
||||
|
||||
ulimit -s unlimited # Bypass current bug in `nix` flakes evaluation
|
||||
use flake
|
||||
eval "$shellHooks"
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
indent_type = "Spaces"
|
|
@ -17,7 +17,7 @@ Secondly, take care of a few manual steps:
|
|||
* Configure Gitea and Drone
|
||||
* Configure Lohr webhook and SSH key
|
||||
* Configure Jellyfin
|
||||
* Configure Prowlarr,Jackett and NZBHydra2
|
||||
* Configure Jackett and NZBHydra2
|
||||
* Configure Sonarr, Radarr, Bazarr
|
||||
* Configure Transmission's webui port
|
||||
* Configure Quassel user
|
||||
|
|
17
bootstrap.sh
17
bootstrap.sh
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p bitwarden-cli git gnupg jq nix
|
||||
# shellcheck shell=bash
|
||||
#! nix-shell -i bash -p bitwarden-cli git gnupg jq nixFlakes
|
||||
|
||||
# Command failure is script failure
|
||||
set -e
|
||||
|
@ -11,6 +10,7 @@ BOLD_GREEN="\e[0;1;32m"
|
|||
|
||||
RESET="\e[0m"
|
||||
|
||||
DEST="$HOME/.config/nixpkgs"
|
||||
BW_SESSION=""
|
||||
|
||||
warn() {
|
||||
|
@ -58,8 +58,8 @@ get_ssh() {
|
|||
|
||||
get_doc "SysAdmin/SSH" "shared-key-public" "$HOME/.ssh/shared_rsa.pub" 644
|
||||
get_doc "SysAdmin/SSH" "shared-key-private" "$HOME/.ssh/shared_rsa" 600
|
||||
get_doc "SysAdmin/SSH" "agenix-public" "$HOME/.ssh/agenix.pub" 644
|
||||
get_doc "SysAdmin/SSH" "agenix-private" "$HOME/.ssh/agenix" 600
|
||||
get_doc "SysAdmin/SSH" "agenix-public" "$HOME/.ssh/id_ed25519.pub" 644
|
||||
get_doc "SysAdmin/SSH" "agenix-private" "$HOME/.ssh/id_ed25519" 600
|
||||
}
|
||||
|
||||
get_pgp() {
|
||||
|
@ -87,6 +87,15 @@ get_creds() {
|
|||
get_pgp
|
||||
}
|
||||
|
||||
setup_gpg() {
|
||||
info 'Setting up loopback pinentry for GnuPG'
|
||||
echo "allow-loopback-pinentry" > ~/.gnupg/gpg-agent.conf
|
||||
|
||||
info 'Signing dummy message to ensure GnuPG key is usable by `git-crypt`'
|
||||
echo whatever | gpg --clearsign --armor --pinentry loopback --output /dev/null
|
||||
}
|
||||
|
||||
[ -z "$NOCREDS" ] && get_creds
|
||||
[ -z "$NOGPG" ] && setup_gpg
|
||||
|
||||
nix --experimental-features 'nix-command flakes' develop
|
||||
|
|
196
flake.lock
196
flake.lock
|
@ -2,133 +2,41 @@
|
|||
"nodes": {
|
||||
"agenix": {
|
||||
"inputs": {
|
||||
"darwin": "darwin",
|
||||
"home-manager": [
|
||||
"home-manager"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723293904,
|
||||
"narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=",
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ryantm",
|
||||
"ref": "main",
|
||||
"repo": "agenix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"agenix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1700795494,
|
||||
"narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d",
|
||||
"lastModified": 1631896269,
|
||||
"narHash": "sha256-DAyCxJ8JacayOzGgGSfzrn7ghtsfL/EsCyk1NEUaAR8=",
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"rev": "daf1d773989ac5d949aeef03fce0fe27e583dbca",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lnl7",
|
||||
"owner": "ryantm",
|
||||
"ref": "master",
|
||||
"repo": "nix-darwin",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733312601,
|
||||
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"ref": "main",
|
||||
"repo": "flake-parts",
|
||||
"repo": "agenix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"futils": {
|
||||
"inputs": {
|
||||
"systems": [
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"lastModified": 1631561581,
|
||||
"narHash": "sha256-3VQMV5zvxaVLvqqUrNz3iJelLw30mIVSfZmAaauM3dA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"rev": "7e5bf3925f6fbdfaf50a2a7ca0be2879c4261d19",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"ref": "main",
|
||||
"ref": "master",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"pre-commit-hooks",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709087332,
|
||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -136,11 +44,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1734808199,
|
||||
"narHash": "sha256-MxlUcLjE8xLbrI1SJ2B2jftlg4wdutEILa3fgqwA98I=",
|
||||
"lastModified": 1633296444,
|
||||
"narHash": "sha256-DnC7yVyoYFSsvFze16AWDa5iSHgtT1MbDGgp8rSC3H4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "f342df3ad938f205a913973b832f52c12546aac6",
|
||||
"rev": "099cbcf13e8219f07b493980a66fe64df0e32d09",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -152,11 +60,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1734424634,
|
||||
"narHash": "sha256-cHar1vqHOOyC7f1+tVycPoWTfKIaqkoe1Q6TnKzuti4=",
|
||||
"lastModified": 1633263894,
|
||||
"narHash": "sha256-InuWViZr3SL8PqRROkWhmSd3N8gGkiP7YaA7BRdjmhk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d3c42f187194c26d9f0309a8ecc469d6c878ce33",
|
||||
"rev": "01f2f2842aaa7f3af957fef93439d639e6941e6c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -167,21 +75,12 @@
|
|||
}
|
||||
},
|
||||
"nur": {
|
||||
"inputs": {
|
||||
"flake-parts": [
|
||||
"flake-parts"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1734810357,
|
||||
"narHash": "sha256-Oa6d+y1/PVaPrZ/GYwvmTK9kSrc5Qx/8D3DFN2TzpVA=",
|
||||
"lastModified": 1633342505,
|
||||
"narHash": "sha256-UgXnO+jX6V33mtbFgQKPLndNQid1DqOnMcsPlxqeWdk=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "e7b7b92a7c97a91f1465ab433bbdf6d00df1db8e",
|
||||
"rev": "061e44abde1dc11b10ff93fe6a388272850f473c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -193,21 +92,19 @@
|
|||
},
|
||||
"pre-commit-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
"flake-utils": [
|
||||
"futils"
|
||||
],
|
||||
"nixpkgs-stable": [
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1734797603,
|
||||
"narHash": "sha256-ulZN7ps8nBV31SE+dwkDvKIzvN6hroRY8sYOT0w+E28=",
|
||||
"lastModified": 1631170176,
|
||||
"narHash": "sha256-RLN/kur2Kpxt0cJp0Fms8ixuGpT8IHX0OpeQ8u8f0X4=",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "f0f0dc4920a903c3e08f5bdb9246bb572fcae498",
|
||||
"rev": "3ed0e618cebc1ff291c27b749cf7568959cac028",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -220,50 +117,11 @@
|
|||
"root": {
|
||||
"inputs": {
|
||||
"agenix": "agenix",
|
||||
"flake-parts": "flake-parts",
|
||||
"futils": "futils",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nur": "nur",
|
||||
"pre-commit-hooks": "pre-commit-hooks",
|
||||
"systems": "systems"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"ref": "main",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nur",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733222881,
|
||||
"narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "49717b5af6f80172275d47a418c9719a31a78b53",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"type": "github"
|
||||
"pre-commit-hooks": "pre-commit-hooks"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
139
flake.nix
139
flake.nix
|
@ -5,21 +5,9 @@
|
|||
type = "github";
|
||||
owner = "ryantm";
|
||||
repo = "agenix";
|
||||
ref = "main";
|
||||
ref = "master";
|
||||
inputs = {
|
||||
home-manager.follows = "home-manager";
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
systems.follows = "systems";
|
||||
};
|
||||
};
|
||||
|
||||
flake-parts = {
|
||||
type = "github";
|
||||
owner = "hercules-ci";
|
||||
repo = "flake-parts";
|
||||
ref = "main";
|
||||
inputs = {
|
||||
nixpkgs-lib.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -27,10 +15,7 @@
|
|||
type = "github";
|
||||
owner = "numtide";
|
||||
repo = "flake-utils";
|
||||
ref = "main";
|
||||
inputs = {
|
||||
systems.follows = "systems";
|
||||
};
|
||||
ref = "master";
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
|
@ -55,10 +40,6 @@
|
|||
owner = "nix-community";
|
||||
repo = "NUR";
|
||||
ref = "master";
|
||||
inputs = {
|
||||
flake-parts.follows = "flake-parts";
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
pre-commit-hooks = {
|
||||
|
@ -67,19 +48,115 @@
|
|||
repo = "pre-commit-hooks.nix";
|
||||
ref = "master";
|
||||
inputs = {
|
||||
flake-utils.follows = "futils";
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
nixpkgs-stable.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
systems = {
|
||||
type = "github";
|
||||
owner = "nix-systems";
|
||||
repo = "default";
|
||||
ref = "main";
|
||||
};
|
||||
};
|
||||
|
||||
# Can't eta-reduce a flake outputs...
|
||||
outputs = inputs: import ./flake inputs;
|
||||
outputs =
|
||||
inputs @
|
||||
{ self
|
||||
, agenix
|
||||
, futils
|
||||
, home-manager
|
||||
, nixpkgs
|
||||
, nur
|
||||
, pre-commit-hooks
|
||||
}:
|
||||
let
|
||||
inherit (futils.lib) eachDefaultSystem;
|
||||
|
||||
lib = nixpkgs.lib.extend (self: super: {
|
||||
my = import ./lib { inherit inputs; pkgs = nixpkgs; lib = self; };
|
||||
});
|
||||
|
||||
defaultModules = [
|
||||
({ ... }: {
|
||||
# Let 'nixos-version --json' know about the Git revision
|
||||
system.configurationRevision = self.rev or "dirty";
|
||||
})
|
||||
{
|
||||
nixpkgs.overlays = (lib.attrValues self.overlays) ++ [
|
||||
nur.overlay
|
||||
];
|
||||
}
|
||||
# Include generic settings
|
||||
./modules
|
||||
# Include bundles of settings
|
||||
./profiles
|
||||
];
|
||||
|
||||
buildHost = name: system: lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = defaultModules ++ [
|
||||
(./. + "/machines/${name}")
|
||||
];
|
||||
specialArgs = {
|
||||
# Use my extended lib in NixOS configuration
|
||||
inherit lib;
|
||||
# Inject inputs to use them in global registry
|
||||
inherit inputs;
|
||||
};
|
||||
};
|
||||
in
|
||||
eachDefaultSystem
|
||||
(system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
rec {
|
||||
apps = {
|
||||
diff-flake = futils.lib.mkApp { drv = packages.diff-flake; };
|
||||
};
|
||||
|
||||
checks = {
|
||||
pre-commit = pre-commit-hooks.lib.${system}.run {
|
||||
src = ./.;
|
||||
|
||||
hooks = {
|
||||
nixpkgs-fmt = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
defaultApp = apps.diff-flake;
|
||||
|
||||
devShell = pkgs.mkShell {
|
||||
name = "NixOS-config";
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
gitAndTools.pre-commit
|
||||
gnupg
|
||||
nixpkgs-fmt
|
||||
];
|
||||
|
||||
inherit (self.checks.${system}.pre-commit) shellHook;
|
||||
};
|
||||
|
||||
packages =
|
||||
let
|
||||
inherit (futils.lib) filterPackages flattenTree;
|
||||
packages = import ./pkgs { inherit pkgs; };
|
||||
flattenedPackages = flattenTree packages;
|
||||
finalPackages = filterPackages system flattenedPackages;
|
||||
in
|
||||
finalPackages;
|
||||
}) // {
|
||||
overlay = self.overlays.pkgs;
|
||||
|
||||
overlays = import ./overlays // {
|
||||
lib = final: prev: { inherit lib; };
|
||||
pkgs = final: prev: {
|
||||
ambroisie = prev.recurseIntoAttrs (import ./pkgs { pkgs = prev; });
|
||||
};
|
||||
};
|
||||
|
||||
nixosConfigurations = lib.mapAttrs buildHost {
|
||||
aramis = "x86_64-linux";
|
||||
porthos = "x86_64-linux";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
{ inputs, ... }:
|
||||
{
|
||||
perSystem = { self', ... }: {
|
||||
apps = {
|
||||
diff-flake = inputs.futils.lib.mkApp { drv = self'.packages.diff-flake; };
|
||||
default = self'.apps.diff-flake;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
{ inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.pre-commit-hooks.flakeModule
|
||||
];
|
||||
|
||||
perSystem = { ... }: {
|
||||
pre-commit = {
|
||||
# Add itself to `nix flake check`
|
||||
check.enable = true;
|
||||
|
||||
settings = {
|
||||
hooks = {
|
||||
deadnix = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
nixpkgs-fmt = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
shellcheck = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
stylua = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
{ flake-parts
|
||||
, systems
|
||||
, ...
|
||||
} @ inputs:
|
||||
let
|
||||
mySystems = import systems;
|
||||
in
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = mySystems;
|
||||
|
||||
imports = [
|
||||
./apps.nix
|
||||
./checks.nix
|
||||
./dev-shells.nix
|
||||
./home-manager.nix
|
||||
./lib.nix
|
||||
./nixos.nix
|
||||
./overlays.nix
|
||||
./packages.nix
|
||||
./templates.nix
|
||||
];
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
perSystem = { config, pkgs, ... }: {
|
||||
devShells = {
|
||||
default = pkgs.mkShellNoCC {
|
||||
name = "NixOS-config";
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
gitAndTools.pre-commit
|
||||
nixpkgs-fmt
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
${config.pre-commit.installationScript}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,62 +0,0 @@
|
|||
{ self, inputs, lib, ... }:
|
||||
let
|
||||
defaultModules = [
|
||||
# Include generic settings
|
||||
"${self}/modules/home"
|
||||
{
|
||||
# Basic user information defaults
|
||||
home.username = lib.mkDefault "ambroisie";
|
||||
home.homeDirectory = lib.mkDefault "/home/ambroisie";
|
||||
|
||||
# Make it a Linux installation by default
|
||||
targets.genericLinux.enable = lib.mkDefault true;
|
||||
|
||||
# Enable home-manager
|
||||
programs.home-manager.enable = true;
|
||||
}
|
||||
];
|
||||
|
||||
mkHome = name: system: inputs.home-manager.lib.homeManagerConfiguration {
|
||||
# Work-around for home-manager
|
||||
# * not letting me set `lib` as an extraSpecialArgs
|
||||
# * not respecting `nixpkgs.overlays` [1]
|
||||
# [1]: https://github.com/nix-community/home-manager/issues/2954
|
||||
pkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
|
||||
overlays = (lib.attrValues self.overlays) ++ [
|
||||
inputs.nur.overlays.default
|
||||
];
|
||||
};
|
||||
|
||||
modules = defaultModules ++ [
|
||||
"${self}/hosts/homes/${name}"
|
||||
];
|
||||
|
||||
extraSpecialArgs = {
|
||||
# Inject inputs to use them in global registry
|
||||
inherit inputs;
|
||||
};
|
||||
};
|
||||
|
||||
homes = {
|
||||
"ambroisie@bazin" = "x86_64-linux";
|
||||
"ambroisie@mousqueton" = "x86_64-linux";
|
||||
};
|
||||
in
|
||||
{
|
||||
perSystem = { system, ... }: {
|
||||
# Work-around for https://github.com/nix-community/home-manager/issues/3075
|
||||
legacyPackages = {
|
||||
homeConfigurations =
|
||||
let
|
||||
filteredHomes = lib.filterAttrs (_: v: v == system) homes;
|
||||
allHomes = filteredHomes // {
|
||||
# Default configuration
|
||||
ambroisie = system;
|
||||
};
|
||||
in
|
||||
lib.mapAttrs mkHome allHomes;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{ self, inputs, ... }:
|
||||
let
|
||||
inherit (inputs) nixpkgs;
|
||||
|
||||
lib = nixpkgs.lib.extend (final: _: {
|
||||
my = import "${self}/lib" { inherit inputs; pkgs = nixpkgs; lib = final; };
|
||||
});
|
||||
in
|
||||
{
|
||||
flake.lib = lib;
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
{ self, inputs, lib, ... }:
|
||||
let
|
||||
defaultModules = [
|
||||
{
|
||||
# Let 'nixos-version --json' know about the Git revision
|
||||
system.configurationRevision = self.rev or "dirty";
|
||||
}
|
||||
{
|
||||
nixpkgs.overlays = (lib.attrValues self.overlays) ++ [
|
||||
inputs.nur.overlays.default
|
||||
];
|
||||
}
|
||||
# Include generic settings
|
||||
"${self}/modules/nixos"
|
||||
];
|
||||
|
||||
buildHost = name: system: lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = defaultModules ++ [
|
||||
"${self}/hosts/nixos/${name}"
|
||||
];
|
||||
specialArgs = {
|
||||
# Use my extended lib in NixOS configuration
|
||||
inherit (self) lib;
|
||||
# Inject inputs to use them in global registry
|
||||
inherit inputs;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
flake.nixosConfigurations = lib.mapAttrs buildHost {
|
||||
aramis = "x86_64-linux";
|
||||
porthos = "x86_64-linux";
|
||||
};
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
{ self, ... }:
|
||||
let
|
||||
default-overlays = import "${self}/overlays";
|
||||
|
||||
additional-overlays = {
|
||||
# Expose my expanded library
|
||||
lib = _final: _prev: { inherit (self) lib; };
|
||||
|
||||
# Expose my custom packages
|
||||
pkgs = _final: prev: {
|
||||
ambroisie = prev.recurseIntoAttrs (import "${self}/pkgs" { pkgs = prev; });
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
flake.overlays = default-overlays // additional-overlays;
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
{ self, inputs, ... }:
|
||||
{
|
||||
perSystem = { pkgs, system, ... }: {
|
||||
packages =
|
||||
let
|
||||
inherit (inputs.futils.lib) filterPackages flattenTree;
|
||||
packages = import "${self}/pkgs" { inherit pkgs; };
|
||||
flattenedPackages = flattenTree packages;
|
||||
finalPackages = filterPackages system flattenedPackages;
|
||||
in
|
||||
finalPackages;
|
||||
};
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
{ self, ... }:
|
||||
{
|
||||
flake.templates = import "${self}/templates";
|
||||
}
|
|
@ -3,15 +3,13 @@ let
|
|||
cfg = config.my.home.bat;
|
||||
in
|
||||
{
|
||||
options.my.home.bat = with lib; {
|
||||
enable = my.mkDisableOption "bat configuration";
|
||||
options.my.home.bat = with lib.my; {
|
||||
enable = mkDisableOption "bat configuration";
|
||||
};
|
||||
|
||||
config.programs.bat = lib.mkIf cfg.enable {
|
||||
enable = true;
|
||||
config = {
|
||||
theme = "gruvbox-dark";
|
||||
|
||||
pager = with config.home.sessionVariables; "${PAGER} ${LESS}";
|
||||
};
|
||||
};
|
29
home/comma/default.nix
Normal file
29
home/comma/default.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.my.home.comma;
|
||||
in
|
||||
{
|
||||
options.my.home.comma = with lib; {
|
||||
enable = my.mkDisableOption "comma configuration";
|
||||
|
||||
pkgsFlake = mkOption {
|
||||
type = types.str;
|
||||
default = "pkgs";
|
||||
example = "nixpkgs";
|
||||
description = ''
|
||||
Which flake from the registry should be used with
|
||||
<command>nix shell</command>.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
ambroisie.comma
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
COMMA_PKGS_FLAKE = cfg.pkgsFlake;
|
||||
};
|
||||
};
|
||||
}
|
43
home/default.nix
Normal file
43
home/default.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./bat
|
||||
./bluetooth
|
||||
./comma
|
||||
./direnv
|
||||
./documentation
|
||||
./feh
|
||||
./firefox
|
||||
./flameshot
|
||||
./gammastep
|
||||
./gdb
|
||||
./git
|
||||
./gpg
|
||||
./gtk
|
||||
./htop
|
||||
./jq
|
||||
./mail
|
||||
./mpv
|
||||
./nix-index
|
||||
./nm-applet
|
||||
./packages
|
||||
./pager
|
||||
./power-alert
|
||||
./ssh
|
||||
./terminal
|
||||
./tmux
|
||||
./udiskie
|
||||
./vim
|
||||
./wm
|
||||
./x
|
||||
./xdg
|
||||
./zathura
|
||||
./zsh
|
||||
];
|
||||
|
||||
# First sane reproducible version
|
||||
home.stateVersion = "20.09";
|
||||
|
||||
# Who am I?
|
||||
home.username = "ambroisie";
|
||||
}
|
19
home/direnv/default.nix
Normal file
19
home/direnv/default.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.home.direnv;
|
||||
in
|
||||
{
|
||||
options.my.home.direnv = with lib.my; {
|
||||
enable = mkDisableOption "direnv configuration";
|
||||
};
|
||||
|
||||
config.programs.direnv = lib.mkIf cfg.enable {
|
||||
enable = true;
|
||||
nix-direnv = {
|
||||
# A better `use_nix`
|
||||
enable = true;
|
||||
# And `use_flake`
|
||||
enableFlakes = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -3,8 +3,8 @@ let
|
|||
cfg = config.my.home.documentation;
|
||||
in
|
||||
{
|
||||
options.my.home.documentation = with lib; {
|
||||
enable = my.mkDisableOption "documentation integration";
|
||||
options.my.home.documentation = with lib.my; {
|
||||
enable = mkDisableOption "documentation integration";
|
||||
};
|
||||
|
||||
# Add documentation for user packages
|
|
@ -33,10 +33,13 @@ in
|
|||
enable = true;
|
||||
|
||||
package = pkgs.firefox.override {
|
||||
nativeMessagingHosts = ([ ]
|
||||
++ lib.optional cfg.tridactyl.enable pkgs.tridactyl-native
|
||||
cfg = {
|
||||
enableTridactylNative = cfg.tridactyl.enable;
|
||||
};
|
||||
|
||||
extraNativeMessagingHosts = with pkgs; ([ ]
|
||||
# Watch videos using mpv
|
||||
++ lib.optional cfg.ff2mpv.enable pkgs.ff2mpv-go
|
||||
++ lib.optional cfg.ff2mpv.enable ambroisie.ff2mpv-go
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -54,27 +57,28 @@ in
|
|||
"browser.newtabpage.activity-stream.section.highlights.includePocket" = false; # Disable pocket
|
||||
"extensions.pocket.enabled" = false; # Disable pocket
|
||||
"media.eme.enabled" = true; # Enable DRM
|
||||
"media.gmp-widevinecdm.enabled" = true; # Enable DRM
|
||||
"media.gmp-widevinecdm.visible" = true; # Enable DRM
|
||||
"media.gmp-widevinecdm.enabled" = true; # Enable DRM
|
||||
"signon.autofillForms" = false; # Disable built-in form-filling
|
||||
"signon.rememberSignons" = false; # Disable built-in password manager
|
||||
"ui.systemUsesDarkTheme" = true; # Dark mode
|
||||
};
|
||||
|
||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; ([
|
||||
bitwarden
|
||||
consent-o-matic
|
||||
form-history-control
|
||||
reddit-comment-collapser
|
||||
reddit-enhancement-suite
|
||||
refined-github
|
||||
sponsorblock
|
||||
ublock-origin
|
||||
]
|
||||
++ lib.optional (cfg.tridactyl.enable) tridactyl
|
||||
++ lib.optional (cfg.ff2mpv.enable) ff2mpv
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; ([
|
||||
bitwarden
|
||||
form-history-control
|
||||
https-everywhere
|
||||
i-dont-care-about-cookies
|
||||
reddit-comment-collapser
|
||||
reddit-enhancement-suite
|
||||
refined-github
|
||||
sponsorblock
|
||||
ublock-origin
|
||||
]
|
||||
++ lib.optional (cfg.tridactyl.enable) tridactyl
|
||||
++ lib.optional (cfg.ff2mpv.enable) ff2mpv
|
||||
);
|
||||
};
|
||||
}
|
9
home/firefox/tridactyl/default.nix
Normal file
9
home/firefox/tridactyl/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.home.firefox.tridactyl;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
xdg.configFile."tridactyl/tridactylrc".source = ./tridactylrc;
|
||||
};
|
||||
}
|
|
@ -4,30 +4,26 @@
|
|||
" Use dark color scheme
|
||||
colorscheme dark
|
||||
|
||||
" Make tridactyl open Vim in my preferred terminal
|
||||
set editorcmd @editorcmd@
|
||||
|
||||
" Remove editor file after use
|
||||
alias editor_rm composite editor | jsb -p tri.native.run(`rm -f '${JS_ARG[0]}'`)
|
||||
bind --mode=insert <C-i> editor_rm
|
||||
bind --mode=input <C-i> editor_rm
|
||||
" Make tridactyl open Vim in my prefered terminal
|
||||
" FIXME: make it follow my prefered terminal
|
||||
set editorcmd termite --class tridactyl_editor -e 'vim %f'
|
||||
" }}}
|
||||
|
||||
" Binds {{{
|
||||
" Reddit et al. {{{
|
||||
" Toggle comments on Reddit, Hacker News, Lobste.rs, LWN
|
||||
bind ;c hint -Jc [class*="expand"],[class*="togg"],[class="comment_folder"],[class="CommentTitle"]
|
||||
" Toggle comments on Reddit, Hacker News, Lobste.rs
|
||||
bind ;c hint -c [class*="expand"],[class="togg"],[class="comment_folder"]
|
||||
|
||||
" Make `gu` take me back to subreddit from comments
|
||||
bindurl reddit.com gu urlparent 3
|
||||
|
||||
" Only hint search results on Google
|
||||
bindurl www.google.com f hint -Jc #search a
|
||||
bindurl www.google.com F hint -Jbc #search a
|
||||
bindurl www.google.com f hint -Jc #search div:not(.action-menu) > a
|
||||
bindurl www.google.com F hint -Jbc #search div:not(.action-menu) > a
|
||||
|
||||
" Only hint search results on DuckDuckGo
|
||||
bindurl ^https://duckduckgo.com f hint -Jc [data-testid="result"]
|
||||
bindurl ^https://duckduckgo.com F hint -Jbc [data-testid="result"]
|
||||
bindurl ^https://duckduckgo.com f hint -Jc [class=result__a]
|
||||
bindurl ^https://duckduckgo.com F hint -Jbc [class=result__a]
|
||||
|
||||
" Only hint item pages on Hacker News
|
||||
bindurl news.ycombinator.com ;f hint -Jc .age > a
|
||||
|
@ -73,7 +69,6 @@ autocmd DocStart ^http(s?)://www.reddit.com js tri.excmds.urlmodify("-t", "www",
|
|||
|
||||
" Disabled websites {{{
|
||||
blacklistadd netflix.com
|
||||
blacklistadd primevideo.com
|
||||
blacklistadd jellyfin.belanyi.fr
|
||||
" }}}
|
||||
|
42
home/gdb/default.nix
Normal file
42
home/gdb/default.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.my.home.gdb;
|
||||
in
|
||||
{
|
||||
options.my.home.gdb = with lib; {
|
||||
enable = my.mkDisableOption "gdb configuration";
|
||||
|
||||
rr = {
|
||||
enable = my.mkDisableOption "rr configuration";
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.rr;
|
||||
defaultText = literalExample "pkgs.rr";
|
||||
description = ''
|
||||
Package providing rr
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
gdb
|
||||
];
|
||||
|
||||
# FIXME: waiting for commit 64aaad6349d2b2c45063a5383f877ce9a3a0c354
|
||||
xdg.configFile."gdb/gdbinit".source = ./gdbinit;
|
||||
|
||||
# FIXME: remove once `gdb` is updated from version 10.2
|
||||
home.file.".gdbinit".source = ./gdbinit;
|
||||
})
|
||||
|
||||
(lib.mkIf cfg.rr.enable {
|
||||
home.packages = [
|
||||
cfg.rr.package
|
||||
];
|
||||
})
|
||||
];
|
||||
}
|
|
@ -19,6 +19,6 @@ set print demangle on
|
|||
set auto-load python-scripts
|
||||
|
||||
# Allow autoloading project-local .gdbinit files
|
||||
add-auto-load-safe-path ~/git/
|
||||
set auto-load safe-path ~/git/
|
||||
# Allow autoloading from the Nix store
|
||||
add-auto-load-safe-path /nix/store
|
||||
set auto-load safe-path /nix/store
|
|
@ -24,11 +24,3 @@ compile_commands.json
|
|||
# Swap and backup files
|
||||
*~
|
||||
~.swp
|
||||
|
||||
# Direnv files
|
||||
.envrc
|
||||
.direnv/
|
||||
|
||||
# Project-local neovim configuration files
|
||||
.nvim.lua
|
||||
.nvimrc
|
|
@ -1,34 +1,23 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
cfg = config.my.home.git;
|
||||
|
||||
inherit (lib.my) mkMailAddress;
|
||||
in
|
||||
{
|
||||
options.my.home.git = with lib; {
|
||||
enable = my.mkDisableOption "git configuration";
|
||||
|
||||
# I want the full experience by default
|
||||
package = mkPackageOption pkgs "git" { default = [ "gitFull" ]; };
|
||||
options.my.home.git = with lib.my; {
|
||||
enable = mkDisableOption "git configuration";
|
||||
};
|
||||
|
||||
config.home.packages = with pkgs; lib.mkIf cfg.enable [
|
||||
git-absorb
|
||||
git-revise
|
||||
tig
|
||||
];
|
||||
|
||||
config.programs.git = lib.mkIf cfg.enable {
|
||||
enable = true;
|
||||
|
||||
# Who am I?
|
||||
userEmail = mkMailAddress "bruno" "belanyi.fr";
|
||||
userEmail = "bruno@belanyi.fr";
|
||||
userName = "Bruno BELANYI";
|
||||
|
||||
inherit (cfg) package;
|
||||
# I want the full experience
|
||||
package = pkgs.gitAndTools.gitFull;
|
||||
|
||||
aliases = {
|
||||
git = "!git";
|
||||
lol = "log --graph --decorate --pretty=oneline --abbrev-commit --topo-order";
|
||||
lola = "lol --all";
|
||||
assume = "update-index --assume-unchanged";
|
||||
|
@ -37,39 +26,10 @@ in
|
|||
pick = "log -p -G";
|
||||
push-new = "!git push -u origin "
|
||||
+ ''"$(git branch | grep '^* ' | cut -f2- -d' ')"'';
|
||||
root = "git rev-parse --show-toplevel";
|
||||
};
|
||||
|
||||
lfs.enable = true;
|
||||
|
||||
delta = {
|
||||
enable = true;
|
||||
|
||||
options = {
|
||||
features = "diff-highlight decorations";
|
||||
|
||||
# Less jarring style for `diff-highlight` emulation
|
||||
diff-highlight = {
|
||||
minus-style = "red";
|
||||
minus-non-emph-style = "red";
|
||||
minus-emph-style = "bold red 52";
|
||||
|
||||
plus-style = "green";
|
||||
plus-non-emph-style = "green";
|
||||
plus-emph-style = "bold green 22";
|
||||
|
||||
whitespace-error-style = "reverse red";
|
||||
};
|
||||
|
||||
# Personal preference for easier reading
|
||||
decorations = {
|
||||
commit-style = "raw"; # Do not recolor meta information
|
||||
keep-plus-minus-markers = true;
|
||||
paging = "always";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# There's more
|
||||
extraConfig = {
|
||||
# Makes it a bit more readable
|
||||
|
@ -103,6 +63,13 @@ in
|
|||
whitespace = "red reverse";
|
||||
};
|
||||
|
||||
"color.diff-highlight" = {
|
||||
oldNormal = "red bold";
|
||||
oldHighlight = "red bold 52";
|
||||
newNormal = "green bold";
|
||||
newHighlight = "green bold 22";
|
||||
};
|
||||
|
||||
commit = {
|
||||
# Show my changes when writing the message
|
||||
verbose = true;
|
||||
|
@ -123,14 +90,15 @@ in
|
|||
defaultBranch = "main";
|
||||
};
|
||||
|
||||
# Local configuration, not-versioned
|
||||
include = {
|
||||
path = "config.local";
|
||||
};
|
||||
|
||||
merge = {
|
||||
conflictStyle = "zdiff3";
|
||||
};
|
||||
pager =
|
||||
let
|
||||
diff-highlight = "${pkgs.gitAndTools.gitFull}/share/git/contrib/diff-highlight/diff-highlight";
|
||||
in
|
||||
{
|
||||
diff = "${diff-highlight} | less";
|
||||
log = "${diff-highlight} | less";
|
||||
show = "${diff-highlight} | less";
|
||||
};
|
||||
|
||||
pull = {
|
||||
# Avoid useless merge commits
|
||||
|
@ -147,46 +115,11 @@ in
|
|||
autoSquash = true;
|
||||
autoStash = true;
|
||||
};
|
||||
|
||||
rerere = {
|
||||
enabled = true;
|
||||
};
|
||||
|
||||
url = {
|
||||
"git@git.belanyi.fr:" = {
|
||||
insteadOf = "https://git.belanyi.fr/";
|
||||
};
|
||||
|
||||
"git@github.com:" = {
|
||||
insteadOf = "https://github.com/";
|
||||
};
|
||||
|
||||
"git@gitlab.com:" = {
|
||||
insteadOf = "https://gitlab.com/";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Multiple identities
|
||||
includes = [
|
||||
{
|
||||
condition = "gitdir:~/git/EPITA/";
|
||||
contents = {
|
||||
user = {
|
||||
name = "Bruno BELANYI";
|
||||
email = mkMailAddress "bruno.belanyi" "epita.fr";
|
||||
};
|
||||
};
|
||||
}
|
||||
{
|
||||
condition = "gitdir:~/git/work/";
|
||||
contents = {
|
||||
user = {
|
||||
name = "Bruno BELANYI";
|
||||
email = mkMailAddress "ambroisie" "google.com";
|
||||
};
|
||||
};
|
||||
}
|
||||
{ path = ./epita.config; condition = "gitdir:~/git/EPITA/"; }
|
||||
];
|
||||
|
||||
ignores =
|
4
home/git/epita.config
Normal file
4
home/git/epita.config
Normal file
|
@ -0,0 +1,4 @@
|
|||
[user]
|
||||
email = bruno.belanyi@epita.fr
|
||||
name = Bruno BELANYI
|
||||
# vim: set ft=gitconfig:
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.home.gpg;
|
||||
in
|
||||
|
@ -6,7 +6,12 @@ in
|
|||
options.my.home.gpg = with lib; {
|
||||
enable = my.mkDisableOption "gpg configuration";
|
||||
|
||||
pinentry = mkPackageOption pkgs "pinentry" { default = [ "pinentry-tty" ]; };
|
||||
pinentry = mkOption {
|
||||
type = types.str;
|
||||
default = "tty";
|
||||
example = "gtk2";
|
||||
description = "Which pinentry interface to use";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -17,15 +22,10 @@ in
|
|||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true; # One agent to rule them all
|
||||
pinentryPackage = cfg.pinentry;
|
||||
pinentryFlavor = cfg.pinentry;
|
||||
extraConfig = ''
|
||||
allow-loopback-pinentry
|
||||
'';
|
||||
};
|
||||
|
||||
home.shellAliases = {
|
||||
# Sometime `gpg-agent` errors out...
|
||||
reset-agent = "gpg-connect-agent updatestartuptty /bye";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -21,12 +21,12 @@ in
|
|||
};
|
||||
|
||||
iconTheme = {
|
||||
package = pkgs.gnome-themes-extra;
|
||||
package = pkgs.gnome3.gnome_themes_standard;
|
||||
name = "Adwaita";
|
||||
};
|
||||
|
||||
theme = {
|
||||
package = pkgs.gnome-themes-extra;
|
||||
package = pkgs.gnome3.gnome_themes_standard;
|
||||
name = "Adwaita";
|
||||
};
|
||||
};
|
|
@ -3,8 +3,8 @@ let
|
|||
cfg = config.my.home.htop;
|
||||
in
|
||||
{
|
||||
options.my.home.htop = with lib; {
|
||||
enable = my.mkDisableOption "htop configuration";
|
||||
options.my.home.htop = with lib.my; {
|
||||
enable = mkDisableOption "htop configuration";
|
||||
};
|
||||
|
||||
config.programs.htop = lib.mkIf cfg.enable {
|
|
@ -3,8 +3,8 @@ let
|
|||
cfg = config.my.home.jq;
|
||||
in
|
||||
{
|
||||
options.my.home.jq = with lib; {
|
||||
enable = my.mkDisableOption "jq configuration";
|
||||
options.my.home.jq = with lib.my; {
|
||||
enable = mkDisableOption "jq configuration";
|
||||
};
|
||||
|
||||
config.programs.jq = lib.mkIf cfg.enable {
|
|
@ -2,22 +2,21 @@
|
|||
let
|
||||
cfg = config.my.home.mail;
|
||||
|
||||
inherit (lib.my) mkMailAddress;
|
||||
mkAddress = address: domain: "${address}@${domain}";
|
||||
|
||||
mkConfig = { domain, address, passName, aliases ? [ ], primary ? false }: {
|
||||
realName = lib.mkDefault "Bruno BELANYI";
|
||||
userName = lib.mkDefault (mkMailAddress address domain);
|
||||
userName = lib.mkDefault (mkAddress address domain);
|
||||
passwordCommand =
|
||||
lib.mkDefault [ (lib.getExe pkgs.ambroisie.rbw-pass) "Mail" passName ];
|
||||
lib.mkDefault [ "${pkgs.ambroisie.bw-pass}/bin/bw-pass" "Mail" passName ];
|
||||
|
||||
address = mkMailAddress address domain;
|
||||
aliases = builtins.map (lib.flip mkMailAddress domain) aliases;
|
||||
address = mkAddress address domain;
|
||||
aliases = builtins.map (lib.flip mkAddress domain) aliases;
|
||||
|
||||
inherit primary;
|
||||
|
||||
himalaya = {
|
||||
enable = cfg.himalaya.enable;
|
||||
# FIXME: try to actually configure it at some point
|
||||
};
|
||||
|
||||
msmtp = {
|
||||
|
@ -52,13 +51,27 @@ let
|
|||
};
|
||||
|
||||
office365Config = {
|
||||
flavor = "outlook.office365.com";
|
||||
imap = {
|
||||
host = "outlook.office365.com";
|
||||
port = 993;
|
||||
tls = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
smtp = {
|
||||
host = "outlook.office365.com";
|
||||
port = 587;
|
||||
tls = {
|
||||
enable = true;
|
||||
useStartTls = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
config.accounts.email.accounts = {
|
||||
personal = lib.mkMerge [
|
||||
# Common configuration
|
||||
# Common configuraton
|
||||
(mkConfig {
|
||||
domain = "belanyi.fr";
|
||||
address = "bruno";
|
||||
|
@ -70,7 +83,7 @@ in
|
|||
];
|
||||
|
||||
gmail = lib.mkMerge [
|
||||
# Common configuration
|
||||
# Common configuraton
|
||||
(mkConfig {
|
||||
domain = "gmail.com";
|
||||
address = "brunobelanyi";
|
|
@ -15,7 +15,7 @@ in
|
|||
enable = my.mkDisableOption "email configuration";
|
||||
|
||||
himalaya = {
|
||||
enable = mkEnableOption "himalaya configuration";
|
||||
enable = mkRelatedOption "himalaya configuration";
|
||||
};
|
||||
|
||||
msmtp = {
|
|
@ -9,7 +9,7 @@ in
|
|||
settings = {
|
||||
notify-cmd =
|
||||
let
|
||||
notify-send = lib.getExe pkgs.libnotify;
|
||||
notify-send = "${pkgs.libnotify}/bin/notify-send";
|
||||
in
|
||||
pkgs.writeScript "mail-notifier" ''
|
||||
SENDER="$1"
|
|
@ -13,8 +13,6 @@ in
|
|||
|
||||
scripts = [
|
||||
pkgs.mpvScripts.mpris # Allow controlling using media keys
|
||||
pkgs.mpvScripts.mpv-cheatsheet # Show some simple mappings on '?'
|
||||
pkgs.mpvScripts.uosc # Nicer UI
|
||||
];
|
||||
};
|
||||
};
|
|
@ -3,8 +3,8 @@ let
|
|||
cfg = config.my.home.nix-index;
|
||||
in
|
||||
{
|
||||
options.my.home.nix-index = with lib; {
|
||||
enable = my.mkDisableOption "nix-index configuration";
|
||||
options.my.home.nix-index = with lib.my; {
|
||||
enable = mkDisableOption "nix-index configuration";
|
||||
};
|
||||
|
||||
config.programs.nix-index = lib.mkIf cfg.enable {
|
|
@ -6,10 +6,6 @@ in
|
|||
options.my.home.packages = with lib; {
|
||||
enable = my.mkDisableOption "user packages";
|
||||
|
||||
allowAliases = mkEnableOption "allow package aliases";
|
||||
|
||||
allowUnfree = my.mkDisableOption "allow unfree packages";
|
||||
|
||||
additionalPackages = mkOption {
|
||||
type = with types; listOf package;
|
||||
default = [ ];
|
||||
|
@ -21,16 +17,12 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = with pkgs; ([
|
||||
fd
|
||||
file
|
||||
ripgrep
|
||||
tree
|
||||
] ++ cfg.additionalPackages);
|
||||
|
||||
nixpkgs.config = {
|
||||
inherit (cfg) allowAliases allowUnfree;
|
||||
};
|
||||
};
|
||||
config.home.packages = with pkgs; lib.mkIf cfg.enable ([
|
||||
file
|
||||
gitAndTools.git-absorb
|
||||
gitAndTools.git-revise
|
||||
gitAndTools.tig
|
||||
rr
|
||||
termite.terminfo
|
||||
] ++ cfg.additionalPackages);
|
||||
}
|
36
home/pager/default.nix
Normal file
36
home/pager/default.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.home.pager;
|
||||
in
|
||||
{
|
||||
options.my.home.pager = with lib.my; {
|
||||
enable = mkDisableOption "pager configuration";
|
||||
};
|
||||
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.sessionVariables = {
|
||||
# My default pager
|
||||
PAGER = "less";
|
||||
# Clear the screen on start and exit
|
||||
LESS = "-R -+X -c";
|
||||
};
|
||||
|
||||
programs.zsh.localVariables = {
|
||||
# Colored man pages
|
||||
LESS_TERMCAP_mb = "$(tput bold; tput setaf 2)";
|
||||
LESS_TERMCAP_md = "$(tput bold; tput setaf 6)";
|
||||
LESS_TERMCAP_me = "$(tput sgr0)";
|
||||
LESS_TERMCAP_so = "$(tput bold; tput setaf 3; tput setab 4)";
|
||||
LESS_TERMCAP_se = "$(tput rmso; tput sgr0)";
|
||||
LESS_TERMCAP_us = "$(tput bold; tput setaf 2)";
|
||||
LESS_TERMCAP_ue = "$(tput rmul; tput sgr0)";
|
||||
LESS_TERMCAP_mr = "$(tput rev)";
|
||||
LESS_TERMCAP_mh = "$(tput dim)";
|
||||
LESS_TERMCAP_ZN = "$(tput ssubm)";
|
||||
LESS_TERMCAP_ZV = "$(tput rsubm)";
|
||||
LESS_TERMCAP_ZO = "$(tput ssupm)";
|
||||
LESS_TERMCAP_ZW = "$(tput rsupm)";
|
||||
};
|
||||
};
|
||||
}
|
49
home/ssh/default.nix
Normal file
49
home/ssh/default.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.home.ssh;
|
||||
in
|
||||
{
|
||||
options.my.home.ssh = with lib.my; {
|
||||
enable = mkDisableOption "ssh configuration";
|
||||
};
|
||||
|
||||
config.programs.ssh = lib.mkIf cfg.enable {
|
||||
enable = true;
|
||||
|
||||
matchBlocks = {
|
||||
"github.com" = {
|
||||
hostname = "github.com";
|
||||
identityFile = "~/.ssh/shared_rsa";
|
||||
user = "git";
|
||||
};
|
||||
|
||||
"gitlab.com" = {
|
||||
hostname = "gitlab.com";
|
||||
identityFile = "~/.ssh/shared_rsa";
|
||||
user = "git";
|
||||
};
|
||||
|
||||
"git.sr.ht" = {
|
||||
hostname = "git.sr.ht";
|
||||
identityFile = "~/.ssh/shared_rsa";
|
||||
user = "git";
|
||||
};
|
||||
|
||||
"gitea.belanyi.fr" = {
|
||||
hostname = "gitea.belanyi.fr";
|
||||
identityFile = "~/.ssh/shared_rsa";
|
||||
user = "git";
|
||||
};
|
||||
|
||||
porthos = {
|
||||
hostname = "91.121.177.163";
|
||||
identityFile = "~/.ssh/shared_rsa";
|
||||
user = "ambroisie";
|
||||
};
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
AddKeysToAgent yes
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -10,14 +10,13 @@ let
|
|||
in
|
||||
{
|
||||
imports = [
|
||||
./alacritty
|
||||
./termite
|
||||
];
|
||||
|
||||
options.my.home = with lib; {
|
||||
terminal = {
|
||||
program = mkOption {
|
||||
type = with types; nullOr (enum [ "alacritty" "termite" ]);
|
||||
type = with types; nullOr (enum [ "termite" ]);
|
||||
default = null;
|
||||
example = "termite";
|
||||
description = "Which terminal to use for home session";
|
77
home/tmux/default.nix
Normal file
77
home/tmux/default.nix
Normal file
|
@ -0,0 +1,77 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.my.home.tmux;
|
||||
in
|
||||
{
|
||||
options.my.home.tmux = with lib.my; {
|
||||
enable = mkDisableOption "tmux terminal multiplexer";
|
||||
|
||||
service = {
|
||||
enable = mkDisableOption "tmux server service";
|
||||
};
|
||||
};
|
||||
|
||||
config.programs.tmux = lib.mkIf cfg.enable {
|
||||
enable = true;
|
||||
|
||||
keyMode = "vi"; # Home-row keys and other niceties
|
||||
clock24 = true; # I'm one of those heathens
|
||||
escapeTime = 0; # Let vim do its thing instead
|
||||
historyLimit = 50000; # Bigger buffer
|
||||
terminal = "tmux-256color"; # I want accurate termcap info
|
||||
|
||||
plugins = with pkgs.tmuxPlugins; [
|
||||
# Open high-lighted files in copy mode
|
||||
open
|
||||
# Better pane management
|
||||
pain-control
|
||||
# Better session management
|
||||
sessionist
|
||||
# X clipboard integration
|
||||
yank
|
||||
{
|
||||
# Show when prefix has been pressed
|
||||
plugin = prefix-highlight;
|
||||
extraConfig = ''
|
||||
# Also show when I'm in copy or sync mode
|
||||
set -g @prefix_highlight_show_copy_mode 'on'
|
||||
set -g @prefix_highlight_show_sync_mode 'on'
|
||||
# Show prefix mode in status bar
|
||||
set -g status-right '#{prefix_highlight} %a %Y-%m-%d %H:%M'
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
extraConfig = ''
|
||||
# Better vim mode
|
||||
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
||||
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
|
||||
'';
|
||||
};
|
||||
|
||||
config.systemd.user.services.tmux = lib.mkIf cfg.service.enable {
|
||||
Unit = {
|
||||
Description = "tmux server";
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "default.target" ];
|
||||
};
|
||||
|
||||
Service =
|
||||
let
|
||||
# Wrap `tmux` in a login shell and set the socket path
|
||||
tmuxCmd = "${config.programs.tmux.package}/bin/tmux";
|
||||
socketExport = lib.optionalString
|
||||
config.programs.tmux.secureSocket
|
||||
''export TMUX_TMPDIR=''${XDG_RUNTIME_DIR:-"/run/user/\$(id -u)"};'';
|
||||
mkTmuxCommand =
|
||||
c: "${pkgs.runtimeShell} -l -c '${socketExport} ${tmuxCmd} ${c}'";
|
||||
in
|
||||
{
|
||||
Type = "forking";
|
||||
ExecStart = mkTmuxCommand "new -d -s ambroisie";
|
||||
ExecStop = mkTmuxCommand "kill-server";
|
||||
};
|
||||
};
|
||||
}
|
14
home/vim/after/ftplugin/bash.vim
Normal file
14
home/vim/after/ftplugin/bash.vim
Normal file
|
@ -0,0 +1,14 @@
|
|||
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||
call ftplugined#check_undo_ft()
|
||||
|
||||
" Use shfmt as ALE fixer for bash
|
||||
let b:ale_fixers=[ 'shfmt' ]
|
||||
let b:undo_ftplugin.='|unlet! b:ale_fixers'
|
||||
|
||||
" Indent with 4 spaces, simplify script, indent switch cases, use Bash variant
|
||||
let b:ale_sh_shfmt_options='-i 4 -s -ci -ln bash'
|
||||
let b:undo_ftplugin.='|unlet! b:ale_sh_shfmt_options'
|
||||
|
||||
" Use bash dialect explicitly, require explicit empty string test
|
||||
let b:ale_sh_shellcheck_options='-s bash -o avoid-nullary-conditions'
|
||||
let b:undo_ftplugin.='|unlet! b:ale_sh_shellcheck_options'
|
|
@ -7,3 +7,7 @@ let b:undo_ftplugin.='|setlocal shiftwidth<'
|
|||
|
||||
" Have automatic padding of transactions so that decimal is on 52nd column
|
||||
let g:beancount_separator_col=52
|
||||
|
||||
" Automatic padding for transactions
|
||||
nnoremap <buffer> <leader>= :AlignCommodity<CR>
|
||||
vnoremap <buffer> <leader>= :AlignCommodity<CR>
|
14
home/vim/after/ftplugin/c.vim
Normal file
14
home/vim/after/ftplugin/c.vim
Normal file
|
@ -0,0 +1,14 @@
|
|||
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||
call ftplugined#check_undo_ft()
|
||||
|
||||
" More warnings and the usual version in flags for Clang
|
||||
let b:ale_c_clang_options='-Wall -Wextra -pedantic -std=c99'
|
||||
let b:undo_ftplugin.='|unlet! b:ale_c_clang_options'
|
||||
|
||||
" More warnings and the usual version in flags for GCC
|
||||
let b:ale_c_gcc_options='-Wall -Wextra -pedantic -std=c99'
|
||||
let b:undo_ftplugin.='|unlet! b:ale_c_gcc_options'
|
||||
|
||||
" Use compile_commands.json to look for additional flags
|
||||
let b:ale_c_parse_compile_commands=1
|
||||
let b:undo_ftplugin.='|unlet! b:ale_c_parse_compile_commands'
|
14
home/vim/after/ftplugin/cpp.vim
Normal file
14
home/vim/after/ftplugin/cpp.vim
Normal file
|
@ -0,0 +1,14 @@
|
|||
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||
call ftplugined#check_undo_ft()
|
||||
|
||||
" More warnings and the usual version in flags for Clang
|
||||
let b:ale_cpp_clang_options='-Wall -Wextra -pedantic -std=c++17'
|
||||
let b:undo_ftplugin.='|unlet! b:ale_cpp_clang_options'
|
||||
|
||||
" More warnings and the usual version in flags for GCC
|
||||
let b:ale_cpp_gcc_options='-Wall -Wextra -pedantic -std=c++17'
|
||||
let b:undo_ftplugin.='|unlet! b:ale_cpp_gcc_options'
|
||||
|
||||
" Use compile_commands.json to look for additional flags
|
||||
let b:ale_c_parse_compile_commands=1
|
||||
let b:undo_ftplugin.='|unlet! b:ale_c_parse_compile_commands'
|
6
home/vim/after/ftplugin/d.vim
Normal file
6
home/vim/after/ftplugin/d.vim
Normal file
|
@ -0,0 +1,6 @@
|
|||
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||
call ftplugined#check_undo_ft()
|
||||
|
||||
" Use my desired ALE fixer for D
|
||||
let b:ale_fixers=[ 'dfmt' ]
|
||||
let b:undo_ftplugin.='|unlet! b:ale_fixers'
|
|
@ -4,7 +4,3 @@ call ftplugined#check_undo_ft()
|
|||
" Enable spell checking on commit messages
|
||||
setlocal spell
|
||||
let b:undo_ftplugin.='|setlocal spell<'
|
||||
|
||||
" Change max length of a line to 72 for this buffer
|
||||
setlocal colorcolumn=72
|
||||
let b:undo_ftplugin.='|setlocal colorcolumn<'
|
2
home/vim/after/ftplugin/gitsendemail.vim
Normal file
2
home/vim/after/ftplugin/gitsendemail.vim
Normal file
|
@ -0,0 +1,2 @@
|
|||
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||
call ftplugined#check_undo_ft()
|
30
home/vim/after/ftplugin/haskell.vim
Normal file
30
home/vim/after/ftplugin/haskell.vim
Normal file
|
@ -0,0 +1,30 @@
|
|||
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||
call ftplugined#check_undo_ft()
|
||||
|
||||
" Use a small indentation value on Haskell files
|
||||
setlocal shiftwidth=2
|
||||
let b:undo_ftplugin.='|setlocal shiftwidth<'
|
||||
|
||||
" Use my desired ALE fixers for Haskell
|
||||
let b:ale_fixers=[ 'brittany' ]
|
||||
let b:undo_ftplugin.='|unlet! b:ale_fixers'
|
||||
|
||||
" Use stack-managed `hlint`
|
||||
let b:ale_haskell_hlint_executable='stack'
|
||||
let b:undo_ftplugin.='|unlet! b:ale_haskell_hlint_executable'
|
||||
|
||||
" Use stack-managed `brittany`
|
||||
let b:ale_haskell_brittany_executable='stack'
|
||||
let b:undo_ftplugin.='|unlet! b:ale_haskell_brittany_executable'
|
||||
|
||||
" Use dynamic libraries because of Arch linux, with default ALE options
|
||||
let b:ale_haskell_ghc_options='--dynamic -fno-code -v0'
|
||||
let b:undo_ftplugin.='|unlet! b:ale_haskell_ghc_options'
|
||||
|
||||
" Automatically format files when saving them
|
||||
let b:ale_fix_on_save=1
|
||||
let b:undo_ftplugin='|unlet! b:ale_lint_on_save'
|
||||
|
||||
" Change max length of a line to 100 for this buffer to match official guidelines
|
||||
setlocal colorcolumn=100
|
||||
let b:undo_ftplugin.='|setlocal colorcolumn<'
|
6
home/vim/after/ftplugin/json.vim
Normal file
6
home/vim/after/ftplugin/json.vim
Normal file
|
@ -0,0 +1,6 @@
|
|||
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||
call ftplugined#check_undo_ft()
|
||||
|
||||
" Use my desired ALE fixer for JSON
|
||||
let b:ale_fixers=[ 'jq' ]
|
||||
let b:undo_ftplugin.='|unlet! b:ale_fixers'
|
6
home/vim/after/ftplugin/netrw.vim
Normal file
6
home/vim/after/ftplugin/netrw.vim
Normal file
|
@ -0,0 +1,6 @@
|
|||
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||
call ftplugined#check_undo_ft()
|
||||
|
||||
" Don't show Netrw in buffer list
|
||||
setlocal bufhidden=delete
|
||||
let b:undo_ftplugin='|setlocal bufhidden<'
|
|
@ -1,6 +1,10 @@
|
|||
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||
call ftplugined#check_undo_ft()
|
||||
|
||||
" Let ALE know that I want Markdown linters
|
||||
let b:ale_linter_aliases=[ 'markdown' ]
|
||||
let b:undo_ftplugin.='|unlet! b:ale_linter_aliases'
|
||||
|
||||
" Use a small indentation value on Pandoc files
|
||||
setlocal shiftwidth=2
|
||||
let b:undo_ftplugin.='|setlocal shiftwidth<'
|
40
home/vim/after/ftplugin/python.vim
Normal file
40
home/vim/after/ftplugin/python.vim
Normal file
|
@ -0,0 +1,40 @@
|
|||
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||
call ftplugined#check_undo_ft()
|
||||
|
||||
" Use my desired ALE fixers for python
|
||||
let b:ale_fixers=[ 'black', 'isort' ]
|
||||
let b:undo_ftplugin.='|unlet! b:ale_fixers'
|
||||
" Use my desired ALE linters for python
|
||||
let b:ale_linters=[ 'flake8', 'mypy', 'pylint', 'pyls' ]
|
||||
let b:undo_ftplugin.='|unlet! b:ale_linters'
|
||||
|
||||
" Use pyls inside the python environment if needed
|
||||
let b:ale_python_pyls_auto_pipenv=1
|
||||
let b:undo_ftplugin.='|unlet! b:ale_python_pyls_auto_pipenv'
|
||||
|
||||
" Disable pycodestyle checks from pyls because I'm already using flake8
|
||||
let b:ale_python_pyls_config={
|
||||
\ 'pyls': {
|
||||
\ 'plugins': {
|
||||
\ 'pycodestyle': {
|
||||
\ 'enabled': v:false
|
||||
\ },
|
||||
\ },
|
||||
\ },
|
||||
\ }
|
||||
let b:undo_ftplugin.='|unlet! b:ale_python_pyls_config'
|
||||
|
||||
" Don't use mypy to check for syntax errors
|
||||
let b:ale_python_mypy_ignore_invalid_syntax=1
|
||||
let b:undo_ftplugin.='|unlet! b:ale_python_mypy_ignore_invalid_syntax'
|
||||
" Use mypy inside the python environment if needed
|
||||
let b:ale_python_mypy_auto_pipenv=1
|
||||
let b:undo_ftplugin.='|unlet! b:ale_python_mypy_auto_pipenv'
|
||||
|
||||
" Automatically format files when saving them
|
||||
let b:ale_fix_on_save=1
|
||||
let b:undo_ftplugin='|unlet! b:ale_lint_on_save'
|
||||
|
||||
" Change max length of a line to 88 for this buffer to match black's settings
|
||||
setlocal colorcolumn=88
|
||||
let b:undo_ftplugin.='|setlocal colorcolumn<'
|
8
home/vim/after/ftplugin/qf.vim
Normal file
8
home/vim/after/ftplugin/qf.vim
Normal file
|
@ -0,0 +1,8 @@
|
|||
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||
call ftplugined#check_undo_ft()
|
||||
|
||||
" Use h/l to go to the previous/next non-empty quickfix or location list
|
||||
nnoremap <silent> <buffer> h :call quickfixed#older()<CR>
|
||||
let b:undo_ftplugin.='|nunmap <buffer> h'
|
||||
nnoremap <silent> <buffer> l :call quickfixed#newer()<CR>
|
||||
let b:undo_ftplugin.='|nunmap <buffer> l'
|
31
home/vim/after/ftplugin/rust.vim
Normal file
31
home/vim/after/ftplugin/rust.vim
Normal file
|
@ -0,0 +1,31 @@
|
|||
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||
call ftplugined#check_undo_ft()
|
||||
|
||||
" Check tests too
|
||||
let b:ale_rust_cargo_check_tests=1
|
||||
let b:undo_ftplugin='|unlet! b:ale_rust_cargo_check_tests'
|
||||
|
||||
" Check examples too
|
||||
let b:ale_rust_cargo_check_examples=1
|
||||
let b:undo_ftplugin='|unlet! b:ale_rust_cargo_check_examples'
|
||||
|
||||
" Use clippy if it's available instead of just cargo check
|
||||
let b:ale_rust_cargo_use_clippy=executable('cargo-clippy')
|
||||
let b:undo_ftplugin='|unlet! b:ale_rust_cargo_use_clippy'
|
||||
|
||||
" Use rust-analyzer instead of RLS as a linter
|
||||
let b:ale_linters=[ 'cargo', 'analyzer' ]
|
||||
let b:undo_ftplugin='|unlet! b:ale_linters'
|
||||
|
||||
|
||||
" Use rustfmt as ALE fixer for rust
|
||||
let b:ale_fixers=[ 'rustfmt' ]
|
||||
let b:undo_ftplugin.='|unlet! b:ale_fixers'
|
||||
|
||||
" Automatically format files when saving them
|
||||
let b:ale_fix_on_save=1
|
||||
let b:undo_ftplugin='|unlet! b:ale_lint_on_save'
|
||||
|
||||
" Change max length of a line to 99 for this buffer to match official guidelines
|
||||
setlocal colorcolumn=99
|
||||
let b:undo_ftplugin.='|setlocal colorcolumn<'
|
14
home/vim/after/ftplugin/sh.vim
Normal file
14
home/vim/after/ftplugin/sh.vim
Normal file
|
@ -0,0 +1,14 @@
|
|||
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||
call ftplugined#check_undo_ft()
|
||||
|
||||
" Use shfmt as ALE fixer for sh
|
||||
let b:ale_fixers=[ 'shfmt' ]
|
||||
let b:undo_ftplugin.='|unlet! b:ale_fixers'
|
||||
|
||||
" Indent with 4 spaces, simplify the code, indent switch cases, use POSIX
|
||||
let b:ale_sh_shfmt_options='-i 4 -s -ci -ln posix'
|
||||
let b:undo_ftplugin.='|unlet! b:ale_sh_shfmt_options'
|
||||
|
||||
" Require explicit empty string test
|
||||
let b:ale_sh_shellcheck_options='-o avoid-nullary-conditions'
|
||||
let b:undo_ftplugin.='|unlet! b:ale_sh_shellcheck_options'
|
14
home/vim/after/ftplugin/zsh.vim
Normal file
14
home/vim/after/ftplugin/zsh.vim
Normal file
|
@ -0,0 +1,14 @@
|
|||
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||
call ftplugined#check_undo_ft()
|
||||
|
||||
" Use shfmt as ALE fixer for zsh
|
||||
let b:ale_fixers=[ 'shfmt' ]
|
||||
let b:undo_ftplugin.='|unlet! b:ale_fixers'
|
||||
|
||||
" Indent with 4 spaces, simplify script, indent switch cases, use Bash variant
|
||||
let b:ale_sh_shfmt_options='-i 4 -s -ci -ln bash'
|
||||
let b:undo_ftplugin.='|unlet! b:ale_sh_shfmt_options'
|
||||
|
||||
" Use bash dialect explicitly, require explicit empty string test
|
||||
let b:ale_sh_shellcheck_options='-s bash -o avoid-nullary-conditions'
|
||||
let b:undo_ftplugin.='|unlet! b:ale_sh_shellcheck_options'
|
2
home/vim/after/plugin/mappings/ale.vim
Normal file
2
home/vim/after/plugin/mappings/ale.vim
Normal file
|
@ -0,0 +1,2 @@
|
|||
" Use ALE LSP-powered symbol information
|
||||
nnoremap <Leader>K :ALEHover<CR>
|
10
home/vim/after/plugin/mappings/fugitive.vim
Normal file
10
home/vim/after/plugin/mappings/fugitive.vim
Normal file
|
@ -0,0 +1,10 @@
|
|||
" Visual bindings for merging diffs as in normal mode
|
||||
xnoremap dp :diffput<cr>
|
||||
xnoremap do :diffget<cr>
|
||||
|
||||
" Open status window
|
||||
nnoremap <Leader>gs :Gstatus<CR>
|
||||
" Open diff view of current buffer: the up/left window is the current index
|
||||
nnoremap <Leader>gd :Gdiffsplit!<CR>
|
||||
" Open current file log in new tab, populate its location list with history
|
||||
nnoremap <Leader>gl :sp<CR><C-w>T:Gllog --follow -- %:p<CR>
|
38
home/vim/after/plugin/mappings/fzf.vim
Normal file
38
home/vim/after/plugin/mappings/fzf.vim
Normal file
|
@ -0,0 +1,38 @@
|
|||
" Only git-tracked files, Vim needs to be in a Git repository
|
||||
nnoremap <Leader>fg :GFiles<CR>
|
||||
|
||||
" All files
|
||||
nnoremap <Leader>ff :Files<CR>
|
||||
|
||||
" Currently open buffers
|
||||
nnoremap <Leader>fb :Buffers<CR>
|
||||
|
||||
" Buffer history
|
||||
nnoremap <Leader>fh :History<CR>
|
||||
|
||||
" Tags in buffer
|
||||
nnoremap <Leader>ft :BTags<CR>
|
||||
|
||||
" Tags in all project files
|
||||
nnoremap <Leader>fT :Tags<CR>
|
||||
|
||||
" Snippets for the current fileytpe (using Ultisnips)
|
||||
nnoremap <Leader>fs :Snippets<CR>
|
||||
|
||||
" All available commands
|
||||
nnoremap <Leader>f: :Commands<CR>
|
||||
|
||||
" All commits (using fugitive)
|
||||
nnoremap <Leader>fc :Commits<CR>
|
||||
|
||||
" All commits for the current buffer (using fugitive)
|
||||
nnoremap <Leader>fC :BCommits<CR>
|
||||
|
||||
" Select normal mode mapping by searching for its name
|
||||
nmap <Leader><Tab> <Plug>(fzf-maps-n)
|
||||
|
||||
" Select visual mode mapping by searching for its name
|
||||
xmap <Leader><Tab> <Plug>(fzf-maps-x)
|
||||
|
||||
" Select operator pending mode mapping by searching for its name
|
||||
omap <Leader><Tab> <Plug>(fzf-maps-o)
|
8
home/vim/after/plugin/mappings/misc.vim
Normal file
8
home/vim/after/plugin/mappings/misc.vim
Normal file
|
@ -0,0 +1,8 @@
|
|||
" Yank until the end of line with Y, to be more consistent with D and C
|
||||
nnoremap Y y$
|
||||
|
||||
" Run make silently, then skip the 'Press ENTER to continue'
|
||||
noremap <Leader>m :silent! :make! \| :redraw!<CR>
|
||||
|
||||
" Remove search-highlighting
|
||||
noremap <Leader><Leader> :nohls<CR>
|
11
home/vim/after/plugin/mappings/qf.vim
Normal file
11
home/vim/after/plugin/mappings/qf.vim
Normal file
|
@ -0,0 +1,11 @@
|
|||
" Next and previous in quick-fix list
|
||||
nmap <Leader>fn <Plug>(qf_qf_next)
|
||||
nmap <Leader>fp <Plug>(qf_qf_previous)
|
||||
|
||||
" Next and previous in location list
|
||||
nmap <Leader>ln <Plug>(qf_loc_next)
|
||||
nmap <Leader>lp <Plug>(qf_loc_previous)
|
||||
|
||||
" Toggle quick-fix and location lists
|
||||
nmap <Leader>tf <Plug>(qf_qf_toggle)
|
||||
nmap <Leader>tl <Plug>(qf_loc_toggle)
|
7
home/vim/after/plugin/mappings/unimpaired.vim
Normal file
7
home/vim/after/plugin/mappings/unimpaired.vim
Normal file
|
@ -0,0 +1,7 @@
|
|||
" Better fr layout mappings for vim-unimpaired and other '[' and ']' commands
|
||||
nmap ( [
|
||||
nmap ) ]
|
||||
omap ( [
|
||||
omap ) ]
|
||||
xmap ( [
|
||||
xmap ) ]
|
68
home/vim/autoload/quickfixed.vim
Normal file
68
home/vim/autoload/quickfixed.vim
Normal file
|
@ -0,0 +1,68 @@
|
|||
" Taken from the Vimways article
|
||||
|
||||
function! s:isLocation()
|
||||
" Get dictionary of properties of the current window
|
||||
let wininfo = filter(getwininfo(), {i,v -> v.winnr == winnr()})[0]
|
||||
return wininfo.loclist
|
||||
endfunction
|
||||
|
||||
function! s:length()
|
||||
" Get the size of the current quickfix/location list
|
||||
return len(s:isLocation() ? getloclist(0) : getqflist())
|
||||
endfunction
|
||||
|
||||
function! s:getProperty(key, ...)
|
||||
" getqflist() and getloclist() expect a dictionary argument
|
||||
" If a 2nd argument has been passed in, use it as the value, else 0
|
||||
let l:what = {a:key : a:0 ? a:1 : 0}
|
||||
let l:listdict = s:isLocation() ? getloclist(0, l:what) : getqflist(l:what)
|
||||
return get(l:listdict, a:key)
|
||||
endfunction
|
||||
|
||||
function! s:isFirst()
|
||||
return s:getProperty('nr') <= 1
|
||||
endfunction
|
||||
|
||||
function! s:isLast()
|
||||
return s:getProperty('nr') == s:getProperty('nr', '$')
|
||||
endfunction
|
||||
|
||||
function! s:history(goNewer)
|
||||
" Build the command: one of colder/cnewer/lolder/lnewer
|
||||
let l:cmd = (s:isLocation() ? 'l' : 'c') . (a:goNewer ? 'newer' : 'older')
|
||||
|
||||
" Apply the cmd repeatedly until we hit a non-empty list, or first/last list
|
||||
" is reached
|
||||
while 1
|
||||
if (a:goNewer && s:isLast()) || (!a:goNewer && s:isFirst()) | break | endif
|
||||
" Run the command. Use :silent to suppress message-history output.
|
||||
" Note that the :try wrapper is no longer necessary
|
||||
silent execute l:cmd
|
||||
if s:length() | break | endif
|
||||
endwhile
|
||||
|
||||
" Echo a description of the new quickfix / location list.
|
||||
" And make it look like a rainbow.
|
||||
let l:nr = s:getProperty('nr')
|
||||
let l:last = s:getProperty('nr', '$')
|
||||
echohl MoreMsg | echon '('
|
||||
echohl Identifier | echon l:nr
|
||||
if l:last > 1
|
||||
echohl LineNr | echon ' of '
|
||||
echohl Identifier | echon l:last
|
||||
endif
|
||||
echohl MoreMsg | echon ') '
|
||||
echohl MoreMsg | echon '['
|
||||
echohl Identifier | echon s:length()
|
||||
echohl MoreMsg | echon '] '
|
||||
echohl Normal | echon s:getProperty('title')
|
||||
echohl None
|
||||
endfunction
|
||||
|
||||
function! quickfixed#older()
|
||||
call s:history(0)
|
||||
endfunction
|
||||
|
||||
function! quickfixed#newer()
|
||||
call s:history(1)
|
||||
endfunction
|
74
home/vim/default.nix
Normal file
74
home/vim/default.nix
Normal file
|
@ -0,0 +1,74 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
cfg = config.my.home.vim;
|
||||
configFiles =
|
||||
let
|
||||
toSource = directory: { source = ./. + "/${directory}"; };
|
||||
configureDirectory =
|
||||
name: lib.nameValuePair "nvim/${name}" (toSource name);
|
||||
linkDirectories =
|
||||
dirs: builtins.listToAttrs (map configureDirectory dirs);
|
||||
in
|
||||
linkDirectories [
|
||||
"after"
|
||||
"autoload"
|
||||
"ftdetect"
|
||||
"plugin"
|
||||
];
|
||||
in
|
||||
{
|
||||
options.my.home.vim = with lib.my; {
|
||||
enable = mkDisableOption "vim configuration";
|
||||
};
|
||||
|
||||
config.programs.neovim = lib.mkIf cfg.enable {
|
||||
enable = true;
|
||||
# All the aliases
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
# Theming
|
||||
lightline-vim # Fancy status bar
|
||||
vim-gruvbox8 # Nice dark theme
|
||||
|
||||
# tpope essentials
|
||||
vim-commentary # Easy comments
|
||||
vim-eunuch # UNIX integrations
|
||||
vim-fugitive # A 'git' wrapper
|
||||
vim-git # Sane git syntax files
|
||||
vim-repeat # Enanche '.' for plugins
|
||||
vim-rsi # Readline mappings
|
||||
vim-surround # Deal with pairs
|
||||
vim-unimpaired # Some ex command mappings
|
||||
vim-vinegar # Better netrw
|
||||
|
||||
# Languages
|
||||
rust-vim
|
||||
vim-beancount
|
||||
vim-jsonnet
|
||||
vim-nix
|
||||
vim-pandoc
|
||||
vim-pandoc-syntax
|
||||
vim-toml
|
||||
|
||||
# General enhancements
|
||||
fastfold # Better folding
|
||||
vim-qf # Better quick-fix list
|
||||
|
||||
# Other wrappers
|
||||
fzfWrapper # The vim plugin inside the 'fzf' package
|
||||
fzf-vim # Fuzzy commands
|
||||
git-messenger-vim # A simple blame window
|
||||
|
||||
# LSP and linting
|
||||
ale # Asynchronous Linting Engine
|
||||
lightline-ale # Status bar integration
|
||||
];
|
||||
|
||||
extraConfig = builtins.readFile ./init.vim;
|
||||
};
|
||||
|
||||
config.xdg.configFile = lib.mkIf cfg.enable configFiles;
|
||||
}
|
2
home/vim/ftdetect/automake.vim
Normal file
2
home/vim/ftdetect/automake.vim
Normal file
|
@ -0,0 +1,2 @@
|
|||
" Use Automake filetype for `local.am` files, explicit `set` to force override
|
||||
au BufNewFile,BufRead local.am set filetype=automake
|
2
home/vim/ftdetect/tikz.vim
Normal file
2
home/vim/ftdetect/tikz.vim
Normal file
|
@ -0,0 +1,2 @@
|
|||
" Use LaTeX filetype for TikZ files
|
||||
au BufNewFile,BufRead *.tikz setfiletype tex
|
|
@ -1,4 +1,4 @@
|
|||
" Basic configuration {{{
|
||||
" Basic configuraion {{{
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Use UTF-8
|
||||
set encoding=utf-8
|
||||
|
@ -13,13 +13,6 @@ set wildmenu
|
|||
" Enable syntax high-lighting and file-type specific plugins
|
||||
syntax on
|
||||
filetype plugin indent on
|
||||
|
||||
" Map leader to space (needs the noremap trick to avoid moving the cursor)
|
||||
nnoremap <Space> <Nop>
|
||||
let mapleader=" "
|
||||
|
||||
" Map localleader to '!' (if I want to filter text, I use visual mode)
|
||||
let maplocalleader="!"
|
||||
" }}}
|
||||
|
||||
" Indentation configuration {{{
|
||||
|
@ -38,10 +31,10 @@ set tabstop=8
|
|||
|
||||
" File parameters {{{
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Disable swap files
|
||||
" Disable backups, we have source control for that
|
||||
set nobackup
|
||||
" Disable swapfiles too
|
||||
set noswapfile
|
||||
" Enable undo files
|
||||
set undofile
|
||||
" }}}
|
||||
|
||||
" UI and UX parameters {{{
|
||||
|
@ -66,51 +59,21 @@ set list
|
|||
" Show a tab as an arrow, trailing spaces as ¤, non-breaking spaces as dots
|
||||
set listchars=tab:>─,trail:·,nbsp:¤
|
||||
|
||||
" Use patience diff
|
||||
set diffopt+=algorithm:patience
|
||||
" Align similar lines in each hunk
|
||||
set diffopt+=linematch:50
|
||||
|
||||
" Don't redraw when executing macros
|
||||
set lazyredraw
|
||||
|
||||
" Timeout quickly on shortcuts, I can't wait two seconds to delete in visual
|
||||
set timeoutlen=500
|
||||
|
||||
" Timeout quickly for CursorHold events (and also swap file)
|
||||
set updatetime=250
|
||||
|
||||
" Disable all mouse integrations
|
||||
set mouse=
|
||||
|
||||
" Set dark mode by default
|
||||
set background=dark
|
||||
|
||||
" Setup some overrides for gruvbox
|
||||
lua << EOF
|
||||
local gruvbox = require("gruvbox")
|
||||
local colors = gruvbox.palette
|
||||
|
||||
gruvbox.setup({
|
||||
overrides = {
|
||||
-- Only URLs should be underlined
|
||||
["@string.special.path"] = { link = "GruvboxOrange" },
|
||||
-- Revert back to the better diff highlighting
|
||||
DiffAdd = { fg = colors.green, bg = "NONE" },
|
||||
DiffChange = { fg = colors.aqua, bg = "NONE" },
|
||||
DiffDelete = { fg = colors.red, bg = "NONE" },
|
||||
DiffText = { fg = colors.yellow, bg = colors.bg0 },
|
||||
-- Directories "pop" better in blue
|
||||
Directory = { link = "GruvboxBlueBold" },
|
||||
},
|
||||
italic = {
|
||||
-- Comments should not be italic, for e.g: box drawing
|
||||
comments = false,
|
||||
},
|
||||
})
|
||||
EOF
|
||||
" Include plug-in integration
|
||||
let g:gruvbox_plugin_hi_groups=1
|
||||
" Include filetype integration
|
||||
let g:gruvbox_filetype_hi_groups=1
|
||||
" Use my preferred colorscheme
|
||||
colorscheme gruvbox
|
||||
colorscheme gruvbox8
|
||||
" }}}
|
||||
|
||||
" Search parameters {{{
|
||||
|
@ -123,10 +86,12 @@ set ignorecase
|
|||
set smartcase
|
||||
" }}}
|
||||
|
||||
" Project-local settings {{{
|
||||
" Import settings when inside a git repository {{{
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Securely read `.nvim.lua` or `.nvimrc`.
|
||||
set exrc
|
||||
let git_settings=system("git config --get vim.settings")
|
||||
if strlen(git_settings)
|
||||
exe "set" git_settings
|
||||
endif
|
||||
" }}}
|
||||
|
||||
" vim: foldmethod=marker
|
5
home/vim/plugin/abbreviations.vim
Normal file
5
home/vim/plugin/abbreviations.vim
Normal file
|
@ -0,0 +1,5 @@
|
|||
" A few useful sets of abbreviations
|
||||
|
||||
" A few things that are hard to write in ASCII
|
||||
abbreviate (R) ©
|
||||
abbreviate (TM) ™
|
6
home/vim/plugin/mappings/leader.vim
Normal file
6
home/vim/plugin/mappings/leader.vim
Normal file
|
@ -0,0 +1,6 @@
|
|||
" Map leader to space (needs the noremap trick to avoid moving the cursor)
|
||||
nnoremap <Space> <Nop>
|
||||
let mapleader=" "
|
||||
|
||||
" Map localleader to '!' (if I want to filter text, I use visual mode)
|
||||
let maplocalleader="!"
|
13
home/vim/plugin/numbertoggle.vim
Normal file
13
home/vim/plugin/numbertoggle.vim
Normal file
|
@ -0,0 +1,13 @@
|
|||
" Idea for toggling taken from jeffkreeftmeijer
|
||||
|
||||
" Show line numbers
|
||||
set number
|
||||
|
||||
augroup numbertoggle
|
||||
autocmd!
|
||||
" Toggle numbers between relative and absolute when changing buffers
|
||||
autocmd BufEnter,FocusGained,InsertLeave,WinEnter * if &nu | set rnu | endif
|
||||
autocmd BufLeave,FocusLost,InsertEnter,WinLeave * if &nu | set nornu | endif
|
||||
" Disable line numbers and relative line numbers in terminal
|
||||
autocmd TermOpen * setlocal nonu nornu
|
||||
augroup END
|
24
home/vim/plugin/settings/ale.vim
Normal file
24
home/vim/plugin/settings/ale.vim
Normal file
|
@ -0,0 +1,24 @@
|
|||
" Always display the sign column to avoid moving the buffer all the time
|
||||
let g:ale_sign_column_always=1
|
||||
|
||||
" Change the way ALE display messages
|
||||
let g:ale_echo_msg_info_str='I'
|
||||
let g:ale_echo_msg_warning_str='W'
|
||||
let g:ale_echo_msg_error_str='E'
|
||||
|
||||
" The message displayed in the command line area
|
||||
let g:ale_echo_msg_format='[%linter%][%severity%]%(code):% %s'
|
||||
|
||||
" The message displayed in the location list
|
||||
let g:ale_loclist_msg_format='[%linter%]%(code):% %s'
|
||||
|
||||
" Don't lint every time I change the buffer
|
||||
let g:ale_lint_on_text_changed=0
|
||||
" Don't lint on leaving insert mode
|
||||
let g:ale_lint_on_insert_leave=0
|
||||
" Don't lint on entering a buffer
|
||||
let g:ale_lint_on_enter=0
|
||||
" Do lint on save
|
||||
let g:ale_lint_on_save=1
|
||||
" Lint on changing the filetype
|
||||
let g:ale_lint_on_filetype_changed=1
|
5
home/vim/plugin/settings/fastfold.vim
Normal file
5
home/vim/plugin/settings/fastfold.vim
Normal file
|
@ -0,0 +1,5 @@
|
|||
" Intercept all fold commands
|
||||
let g:fastfold_fold_command_suffixes=[
|
||||
\ 'x', 'X', 'a', 'A', 'o', 'O', 'c', 'C',
|
||||
\ 'r', 'R', 'm', 'M', 'i', 'n', 'N'
|
||||
\ ]
|
8
home/vim/plugin/settings/fzf.vim
Normal file
8
home/vim/plugin/settings/fzf.vim
Normal file
|
@ -0,0 +1,8 @@
|
|||
" Use a floating window when availble
|
||||
if has('nvim-0.4.0') || has("patch-8.2.0191")
|
||||
let g:fzf_layout = { 'window': {
|
||||
\ 'width': 0.9,
|
||||
\ 'height': 0.7,
|
||||
\ 'highlight': 'Comment',
|
||||
\ 'rounded': v:false } }
|
||||
endif
|
5
home/vim/plugin/settings/gruvbox.vim
Normal file
5
home/vim/plugin/settings/gruvbox.vim
Normal file
|
@ -0,0 +1,5 @@
|
|||
" Use the high-contrast theme
|
||||
let g:gruvbox_contrast_dark='hard'
|
||||
|
||||
" Enable italics because urxvt supports them
|
||||
let g:gruvbox_italic=1
|
81
home/vim/plugin/settings/lightline.vim
Normal file
81
home/vim/plugin/settings/lightline.vim
Normal file
|
@ -0,0 +1,81 @@
|
|||
" Initialise light-line setting structure
|
||||
let g:lightline={}
|
||||
|
||||
" Use the wombat colorscheme
|
||||
let g:lightline.colorscheme='wombat'
|
||||
|
||||
" Status-line for active buffer
|
||||
let g:lightline.active={
|
||||
\ 'left': [
|
||||
\ [ 'mode', 'paste' ],
|
||||
\ [ 'gitbranch', 'readonly', 'filename', 'modified' ],
|
||||
\ [ 'spell' ],
|
||||
\ ],
|
||||
\ 'right': [
|
||||
\ [ 'lineinfo' ],
|
||||
\ [ 'percent' ],
|
||||
\ [ 'fileformat', 'fileencoding', 'filetype' ],
|
||||
\ [ 'linter_check', 'linter_errors', 'linter_warn', 'linter_ok' ],
|
||||
\ [ 'ctags_status' ],
|
||||
\ ]
|
||||
\ }
|
||||
|
||||
" Status-line for inactive buffer
|
||||
let g:lightline.inactive={
|
||||
\ 'left': [
|
||||
\ [ 'filename' ],
|
||||
\ ],
|
||||
\ 'right': [
|
||||
\ [ 'lineinfo' ],
|
||||
\ [ 'percent' ],
|
||||
\ ],
|
||||
\ }
|
||||
|
||||
" Which component should be written using which function
|
||||
let g:lightline.component_function={
|
||||
\ 'readonly': 'LightlineReadonly',
|
||||
\ 'modified': 'LightlineModified',
|
||||
\ 'gitbranch': 'LightlineFugitive',
|
||||
\ }
|
||||
|
||||
" Which component can be expanded by using which function
|
||||
let g:lightline.component_expand={
|
||||
\ 'linter_check': 'lightline#ale#checking',
|
||||
\ 'linter_warn': 'lightline#ale#warnings',
|
||||
\ 'linter_errors': 'lightline#ale#errors',
|
||||
\ 'linter_ok': 'lightline#ale#ok',
|
||||
\ }
|
||||
|
||||
" How to color custom components
|
||||
let g:lightline.component_type={
|
||||
\ 'readonly': 'error',
|
||||
\ 'linter_checking': 'left',
|
||||
\ 'linter_warn': 'warning',
|
||||
\ 'linter_errors': 'error',
|
||||
\ 'linter_ok': 'left',
|
||||
\ }
|
||||
|
||||
" Show pretty icons instead of text for linting status
|
||||
let g:lightline#ale#indicator_checking='⏳'
|
||||
let g:lightline#ale#indicator_warnings='◆'
|
||||
let g:lightline#ale#indicator_errors='✗'
|
||||
let g:lightline#ale#indicator_ok='✓'
|
||||
|
||||
" Show a lock icon when editing a read-only file when it makes sense
|
||||
function! LightlineReadonly()
|
||||
return &ft!~?'help\|vimfiler\|netrw' && &readonly ? '' : ''
|
||||
endfunction
|
||||
|
||||
" Show a '+' when the buffer is modified, '-' if not, when it makes sense
|
||||
function! LightlineModified()
|
||||
return &ft=~'help\|vimfiler\|netrw' ? '' : &modified ? '+' : &modifiable ? '' : '-'
|
||||
endfunction
|
||||
|
||||
" Show branch name with nice icon in status line, when it makes sense
|
||||
function! LightlineFugitive()
|
||||
if &ft!~?'help\|vimfiler\|netrw' && exists('*fugitive#head')
|
||||
let branch=fugitive#head()
|
||||
return branch!=#'' ? ' '.branch : ''
|
||||
endif
|
||||
return ''
|
||||
endfunction
|
20
home/vim/plugin/settings/pandoc.vim
Normal file
20
home/vim/plugin/settings/pandoc.vim
Normal file
|
@ -0,0 +1,20 @@
|
|||
" Which code-block languages should I expect to be high-lighted.
|
||||
let g:pandoc#syntax#codeblocks#embeds#langs=[
|
||||
\ "bash=sh",
|
||||
\ "c",
|
||||
\ "cpp",
|
||||
\ "go",
|
||||
\ "haskell",
|
||||
\ "python",
|
||||
\ "rust",
|
||||
\ "sh",
|
||||
\ "vim",
|
||||
\ "yaml",
|
||||
\ "tex",
|
||||
\ "toml",
|
||||
\ "perl",
|
||||
\ "json",
|
||||
\ "latex=tex",
|
||||
\ "make",
|
||||
\ "makefile=make",
|
||||
\ ]
|
8
home/vim/plugin/signtoggle.vim
Normal file
8
home/vim/plugin/signtoggle.vim
Normal file
|
@ -0,0 +1,8 @@
|
|||
augroup signtoggle
|
||||
autocmd!
|
||||
" Only show the sign column for the current focused buffer
|
||||
autocmd BufEnter,FocusGained,WinEnter * set signcolumn=yes
|
||||
autocmd BufLeave,FocusLost,WinLeave * set signcolumn=no
|
||||
" Disable the sign column in terminal
|
||||
autocmd TermOpen * setlocal signcolumn=no
|
||||
augroup END
|
|
@ -10,7 +10,6 @@ let
|
|||
in
|
||||
{
|
||||
imports = [
|
||||
./cursor
|
||||
./dunst
|
||||
./i3
|
||||
./i3bar
|
||||
|
@ -26,41 +25,12 @@ in
|
|||
description = "Which window manager to use for home session";
|
||||
};
|
||||
|
||||
cursor = {
|
||||
enable = mkRelatedOption "dunst configuration" [ "i3" ];
|
||||
};
|
||||
|
||||
dunst = {
|
||||
enable = mkRelatedOption "dunst configuration" [ "i3" ];
|
||||
};
|
||||
|
||||
i3bar = {
|
||||
enable = mkRelatedOption "i3bar configuration" [ "i3" ];
|
||||
|
||||
vpn = {
|
||||
enable = my.mkDisableOption "VPN configuration";
|
||||
|
||||
blockConfigs = mkOption {
|
||||
type = with types; listOf (attrsOf str);
|
||||
default = [
|
||||
{
|
||||
active_format = " VPN ";
|
||||
service = "wg-quick-wg";
|
||||
}
|
||||
{
|
||||
active_format = " VPN (LAN) ";
|
||||
service = "wg-quick-lan";
|
||||
}
|
||||
];
|
||||
example = [
|
||||
{
|
||||
active_format = " WORK ";
|
||||
service = "some-service-name";
|
||||
}
|
||||
];
|
||||
description = "list of block configurations, merged with the defaults";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
rofi = {
|
||||
|
@ -72,8 +42,8 @@ in
|
|||
|
||||
command = mkOption {
|
||||
type = types.str;
|
||||
default = "${lib.getExe pkgs.i3lock} -n -c 000000";
|
||||
example = "\${lib.getExe pkgs.i3lock} -n -i lock.png";
|
||||
default = "${pkgs.i3lock}/bin/i3lock -n -c 000000";
|
||||
example = "\${pkgs.i3lock}/bin/i3lock -n -i lock.png";
|
||||
description = "Locker command to run";
|
||||
};
|
||||
|
||||
|
@ -108,7 +78,7 @@ in
|
|||
|
||||
timeout = mkOption {
|
||||
type = types.ints.between 1 60;
|
||||
default = 15;
|
||||
default = 5;
|
||||
example = 1;
|
||||
description = "Inactive time interval to lock the screen automatically";
|
||||
};
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue