Compare commits
312 Commits
Author | SHA1 | Date |
---|---|---|
Sam | 86c59bb27b | |
Sam | ac6a9d2c21 | |
Sam | a154d2df79 | |
Sam | a95ac4ef25 | |
Sam | de5c1edf1b | |
Sam | ac5833c8af | |
Sam | b9c0b70fc8 | |
Sam | b2f849d80b | |
Sam | 4d0335d99a | |
Sam | ec7f879c6d | |
Sam | 2c44487796 | |
Sam | 45ee82da0e | |
Sam | 5d0b1b9be7 | |
Sam | 7be587d7b1 | |
Sam | 7e4f15496f | |
Sam | 9a26bbe7c5 | |
Sam | d725852387 | |
Sam | 4bee1bffbd | |
Sam | 8561f44963 | |
Sam | dde54c9aa7 | |
Sam | 16436da1e4 | |
Sam | 13dad7b532 | |
Sam | a9f321a847 | |
Sam | 7cffeffca9 | |
Sam | 70a788f588 | |
Sam | 4e6f1f6f01 | |
Sam | 8242c29cf7 | |
Sam | bd3f24056e | |
Sam | 71ac9901dd | |
Sam | b106d1cb6e | |
Sam | ca9dff8442 | |
Sam | 2516f9de21 | |
Sam | a9fc820d61 | |
Sam | c255cdbb2c | |
Sam | 6f4187b95e | |
Sam | 89141ff555 | |
Sam | e6c3917942 | |
Sam | 2793c3cfe0 | |
Sam | 2005bc293f | |
Sam | d9fce8a1c9 | |
Sam | 37768683d7 | |
Sam | 3092630c08 | |
Sam | dbd3dd5584 | |
Sam | 92fb9f5519 | |
Sam | 00d5c7db47 | |
Sam | 8eeea08472 | |
Sam | 5430e70bd4 | |
Sam | 62a3630a5c | |
Sam | 51320794e6 | |
Sam | bd3924fda3 | |
Sam | e0093f134b | |
Sam | f57afcc50c | |
Sam | 9096d69f9a | |
Sam | 74a2c3f930 | |
Sam | 2533603b65 | |
Sam | 25dfe2cf37 | |
Sam | 37901f3937 | |
Sam | 4c857eded4 | |
Sam | 2e90b1ae46 | |
Sam | 0038dbf8ce | |
Sam | 612affe2fd | |
Sam | 53d2343f04 | |
Sam | afaf3c4697 | |
Sam | 16fee36e96 | |
Sam | e374498aa4 | |
Sam | f7ffba2266 | |
Sam | a8e0ae35da | |
Sam | 564d4f6230 | |
Sam | 55d96ce54e | |
Sam | d86a05d7c3 | |
Sam | 5a6dca3b5d | |
Sam | d418d16fa4 | |
Sam | 9fe49f4d79 | |
Sam | 1af24715ff | |
Sam | 6f5f8867fd | |
Sam | c25d56f350 | |
Sam | 3d90deadf9 | |
Sam | f3ad132675 | |
Sam | f6b8aeca69 | |
Sam | 9f5e92d452 | |
Sam | dd94dea696 | |
Sam | 19f0057503 | |
Sam | dabff16a37 | |
Sam | 5fae14f4fc | |
Sam | c51cb70732 | |
Sam | c4ac477d6f | |
Sam | ff300d8542 | |
Sam | e30e731d61 | |
Sam | 07d19c4535 | |
Sam | 2ec9f2db77 | |
Sam | 0e0e2b2ae7 | |
Sam | b26aceec76 | |
Sam | 06f6aa1ffd | |
Sam | 3421360317 | |
Sam | 154b474868 | |
Sam | d5f72ee2fd | |
Sam | 46018fb461 | |
Sam | 621e97d8f1 | |
Sam | ae64001bc7 | |
Sam | 9d287792c6 | |
Sam | c448a8c0cd | |
Sam | 87f30f8ace | |
Sam | a5e41acf63 | |
Sam | 21bdc107eb | |
Sam | d56fc29336 | |
Sam | 9788e0d6e2 | |
Sam | bf30739d8b | |
Sam | f8f662daf7 | |
Sam | 04782f64f5 | |
Sam | cf8c449e5e | |
Sam | f7e23e39c7 | |
Sam | 86f27abb2f | |
Sam | fa060dba70 | |
Sam | f411adbf20 | |
Sam | 5e0230dcdd | |
Sam | 1049ecbd76 | |
Sam | e3a1143ca5 | |
Sam | b991fa4236 | |
Sam | 5f672c2665 | |
Sam | 22ce3e08c2 | |
Sam | 5147d02fa9 | |
Sam | 6fbd5447b8 | |
Sam | 1743869b07 | |
Sam | 0fb3056a4c | |
Sam | 32bf8eca1f | |
Sam | c9409866b7 | |
Sam | c5da58fc3b | |
Sam | 82b0838f5c | |
Sam | 7440a6662f | |
mrsu | 959d734fd1 | |
mrsu | 394a24567b | |
Sam | 6472e085c7 | |
Sam | 937b53db87 | |
Sam | fb7cf9e280 | |
Sam | efb6128704 | |
sam | 539ac37b8a | |
Sam | 22aa6d3fa4 | |
sam | 8e527473ac | |
Sam | db7bce57e7 | |
Sam | 614b9765dd | |
Sam | 4b85810128 | |
Sam | a7c8b86b1f | |
Sam | 89ab4e8f9d | |
Sam | 01ad0238a7 | |
Sam | 688c2c9bcd | |
Sam | b8973040d5 | |
Sam | ba9f593bcd | |
Sam | 3dbe85853e | |
Sam | ba19ee9125 | |
Sam | 8173a0dc94 | |
Sam | 600160bd9a | |
Sam | 5205e606c1 | |
Sam | 5b8a1430fe | |
Sam | 8f458590e2 | |
Sam | bcea6919fb | |
Sam | aa8d4ca3ae | |
Sam | 653901f823 | |
sam | febc33faee | |
Sam | 2f99d05406 | |
Sam | 947ddaca43 | |
Sam | 529fc394ef | |
Sam | 89646a5d6a | |
Sam | 804d6bf4d0 | |
Sam | 491350bc58 | |
Sam | baaaa3e8d6 | |
Sam | 591a9ce48f | |
Sam | 7df7970414 | |
Sam | 052c941e81 | |
Sam | f7695f4d15 | |
Sam | 52a3b85c8f | |
Sam | c9ee7c7e80 | |
Sam | fc2f6f4ca3 | |
Sam | 67e3d9dded | |
Sam | 4fbfbee45b | |
Sam | b8f85256a7 | |
Sam | 271b5958b8 | |
Sam | 2f0ddf8375 | |
Sam | e419389862 | |
Sam | fec1dae750 | |
Sam | 3b7a597d8f | |
Sam | 1e95ba6c36 | |
Sam | d29250a2a6 | |
Sam | f71ece31f1 | |
Sam | a71ee506d3 | |
Sam | 7f9c3535ef | |
Sam | 9ace130029 | |
Sam | 92d09646fa | |
Sam | 33981eea6d | |
Sam | bd719c72fa | |
sam | 37192edd83 | |
Sam | 911d7d6905 | |
Sam | 74dab0c38d | |
Sam | f6290f3215 | |
Sam | 8c13a24cc8 | |
Sam | 60b6064ded | |
Sam | 5000138b85 | |
Sam | 20bdddf472 | |
Sam | bcf6db040e | |
Sam | 63ba2ebaba | |
mrsu | e6f0770f97 | |
mrsu | 05ee6da5ee | |
mrsu | 739018e98f | |
mrsu | 906d11b3b0 | |
mrsu | 89dceb1827 | |
mrsu | 0f83b32f2b | |
mrsu | 91eda4f7cd | |
Sam | ecdf80143d | |
Sam | a227c6e17f | |
Sam | 57d5f3350d | |
Sam | 13bed86ae6 | |
Sam | 5c7a624c94 | |
Sam | aef3c1c1ce | |
Sam | 5b65d7d5b1 | |
Sam | db746efe7e | |
Sam | ed4f367713 | |
Sam | 37bd716e05 | |
Sam | d804790b9b | |
Sam | 974b90d997 | |
Sam | b385de186b | |
Sam | 73d507f453 | |
Sam | 65b59676ba | |
Sam | 1a4bf927a4 | |
Sam | 100f444d8a | |
Sam | f630a57b43 | |
Sam | 01d348c310 | |
Sam | d180075914 | |
Sam | f6304cf25f | |
Sam | fd20921d1e | |
Sam | 97ff165b02 | |
Sam | 08f1789b50 | |
Sam | 20da292709 | |
Sam | cfa74f52fe | |
Sam | 97d8a879eb | |
Sam | 0d6b762a6e | |
Sam | 056dbc106b | |
Sam | 72a03e8490 | |
Sam | 26f0335da8 | |
Sam | 7f93cea6e3 | |
Sam | 7a2b125646 | |
Sam | 3d49b1c5f1 | |
Sam | 5ecafc3879 | |
Sam | b30410e747 | |
Sam | fbd8946612 | |
Sam | 8ff60b5f00 | |
Sam | 1a8d9eab46 | |
Sam | 6af30c93a9 | |
Sam | fcfc907c57 | |
Sam | 8246ea052c | |
Sam | f5a34598a9 | |
= | 7c994c2712 | |
= | 853755bce0 | |
Sam | 9ea47f6057 | |
Sam | 75cdf136e3 | |
Sam | 1d61c343d1 | |
Sam | c4a76219c9 | |
Sam | 63874ede17 | |
Sam | a4815aa56b | |
Sam | f3b506ac81 | |
Sam | 2aea6ff2f4 | |
Sam | c226add411 | |
Sam | 658744d33c | |
Sam | a9ecc94a77 | |
Sam | e4161bfed9 | |
Sam | 18448d340a | |
Sam | 326d8fbae7 | |
Sam | 108f9b7028 | |
Sam | 3eb837c371 | |
Sam | 2f3fec9e5c | |
mrsu | b7a9b98dee | |
mrsu | c1ad764777 | |
Sam | 75faf815b9 | |
Sam | abefe52504 | |
Sam | eda162a7ff | |
Sam | 93c8f1593d | |
Sam | 0121b7a636 | |
Sam | 44f9408372 | |
Sam | 20b64f5707 | |
mrsu | 08e3aeeb38 | |
mrsu | 4141beb4cf | |
Sam | 861f58946b | |
Sam | f60f4bee7a | |
Sam | bd8fbdacd0 | |
Sam | cd7b3c9d0d | |
Sam | a0f084a465 | |
Sam | c754aa2fba | |
Sam | 9b205b2c1c | |
Sam | e9fde8a82b | |
Sam | d6dc868814 | |
Sam | 33d41f4256 | |
Sam | 2c8dcf74e4 | |
Sam | e06d88e7ac | |
Sam | 7d5e5cd6ca | |
Sam | 7681168109 | |
Sam | 6ce28c8b54 | |
mrsu | 57e98861d7 | |
Sam | 6ea135b770 | |
Sam | baceb411ce | |
Sam | 2f13f63c80 | |
Sam | d14e0e34a3 | |
Sam | 39d407d236 | |
Sam | afc6ef3e56 | |
Sam | f5094f4749 | |
mrsu | af0a899f55 | |
Sam | 95bb8156a6 | |
Sam | eca3a72a8f | |
Sam | 393c5b6a91 | |
Sam | 4efc1d3e61 | |
Sam | 2e46781189 | |
Sam | 2b74cf80e2 | |
Sam | 66523171c9 | |
Sam | 6ec05f1d16 | |
Sam | b82a9df299 |
390
flake.lock
390
flake.lock
|
@ -1,19 +1,56 @@
|
|||
{
|
||||
"nodes": {
|
||||
"arion": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"haskell-flake": "haskell-flake",
|
||||
"hercules-ci-effects": "hercules-ci-effects",
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1720147808,
|
||||
"narHash": "sha256-hlWEQGUbIwYb+vnd8egzlW/P++yKu3HjV/rOdOPVank=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "arion",
|
||||
"rev": "236f9dd82d6ef6a2d9987c7a7df3e75f1bc8b318",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "arion",
|
||||
"rev": "236f9dd82d6ef6a2d9987c7a7df3e75f1bc8b318",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"base16-schemes": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696158499,
|
||||
"narHash": "sha256-5yIHgDTPjoX/3oDEfLSQ0eJZdFL1SaCfb9d6M0RmOTM=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-schemes",
|
||||
"rev": "a9112eaae86d9dd8ee6bb9445b664fba2f94037a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-schemes",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"devshell": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713532798,
|
||||
"narHash": "sha256-wtBhsdMJA3Wa32Wtm1eeo84GejtI43pMrFrmwLXrsEc=",
|
||||
"lastModified": 1728330715,
|
||||
"narHash": "sha256-xRJ2nPOXb//u1jaBnDP56M7v5ldavjbtR6lfGqSvcKg=",
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"rev": "12e914740a25ea1891ec619bb53cf5e6ca922e40",
|
||||
"rev": "dd6b80932022cea34a019e2bb32f6fa9e494dfef",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -29,19 +66,45 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1716773194,
|
||||
"narHash": "sha256-rskkGmWlvYFb+CXedBiL8eWEuED0Es0XR4CkJ11RQKY=",
|
||||
"lastModified": 1715070411,
|
||||
"narHash": "sha256-5CNvkH0Nf7yMwgKhjUNg/lUK40C7DXB4zKOuA2jVO90=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "10986091e47fb1180620b78438512b294b7e8f67",
|
||||
"rev": "4677f6c53482a8b01ee93957e3bdd569d51261d6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "v1.6.1",
|
||||
"repo": "disko",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"extra-container": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"nix-bitcoin",
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nix-bitcoin",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722175938,
|
||||
"narHash": "sha256-HKyB4HD+NdX3T233bY31hm76v3/tdQBNeLLvopKbZeY=",
|
||||
"owner": "erikarvstedt",
|
||||
"repo": "extra-container",
|
||||
"rev": "37e7207ac9f857eedb58b208b9dc91cd6b24e651",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "erikarvstedt",
|
||||
"repo": "extra-container",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
|
@ -75,16 +138,16 @@
|
|||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nixvim",
|
||||
"arion",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1715865404,
|
||||
"narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=",
|
||||
"lastModified": 1719994518,
|
||||
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9",
|
||||
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -93,18 +156,45 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-root": {
|
||||
"flake-parts_2": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"arion",
|
||||
"hercules-ci-effects",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713493429,
|
||||
"narHash": "sha256-ztz8JQkI08tjKnsTpfLqzWoKFQF4JGu2LRz8bkdnYUk=",
|
||||
"owner": "srid",
|
||||
"repo": "flake-root",
|
||||
"rev": "bc748b93b86ee76e2032eecda33440ceb2532fcd",
|
||||
"lastModified": 1712014858,
|
||||
"narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "9126214d0a59633752a136528f5f3b9aa8565b7d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "srid",
|
||||
"repo": "flake-root",
|
||||
"id": "flake-parts",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"flake-parts_3": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727826117,
|
||||
"narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
|
@ -113,11 +203,11 @@
|
|||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701680307,
|
||||
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
||||
"lastModified": 1726560853,
|
||||
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
|
||||
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -140,11 +230,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1716213921,
|
||||
"narHash": "sha256-xrsYFST8ij4QWaV6HEokCUNIZLjjLP1bYC60K8XiBVA=",
|
||||
"lastModified": 1729104314,
|
||||
"narHash": "sha256-pZRZsq5oCdJt3upZIU4aslS9XwFJ+/nVtALHIciX/BI=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "0e8fcc54b842ad8428c9e705cb5994eaf05c26a0",
|
||||
"rev": "3c3e88f0f544d6bb54329832616af7eb971b6be6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -175,6 +265,44 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"haskell-flake": {
|
||||
"locked": {
|
||||
"lastModified": 1675296942,
|
||||
"narHash": "sha256-u1X1sblozi5qYEcLp1hxcyo8FfDHnRUVX3dJ/tW19jY=",
|
||||
"owner": "srid",
|
||||
"repo": "haskell-flake",
|
||||
"rev": "c2cafce9d57bfca41794dc3b99c593155006c71e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "srid",
|
||||
"ref": "0.1.0",
|
||||
"repo": "haskell-flake",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hercules-ci-effects": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_2",
|
||||
"nixpkgs": [
|
||||
"arion",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719226092,
|
||||
"narHash": "sha256-YNkUMcCUCpnULp40g+svYsaH1RbSEj6s4WdZY/SHe38=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "hercules-ci-effects",
|
||||
"rev": "11e4b8dc112e2f485d7c97e1cee77f9958f498f5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "hercules-ci-effects",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -182,15 +310,16 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1716847642,
|
||||
"narHash": "sha256-rjEswRV0o23eBBils8lJXyIGha+l/VjV73IPg+ztxgk=",
|
||||
"lastModified": 1726989464,
|
||||
"narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "10c7c219b7dae5795fb67f465a0d86cbe29f25fa",
|
||||
"rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-24.05",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
|
@ -203,26 +332,27 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1716457508,
|
||||
"narHash": "sha256-ZxzffLuWRyuMrkVVq7wastNUqeO0HJL9xqfY1QsYaqo=",
|
||||
"lastModified": 1726989464,
|
||||
"narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "850cb322046ef1a268449cf1ceda5fd24d930b05",
|
||||
"rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-24.05",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"impermanence": {
|
||||
"locked": {
|
||||
"lastModified": 1708968331,
|
||||
"narHash": "sha256-VUXLaPusCBvwM3zhGbRIJVeYluh2uWuqtj4WirQ1L9Y=",
|
||||
"lastModified": 1730403150,
|
||||
"narHash": "sha256-W1FH5aJ/GpRCOA7DXT/sJHFpa5r8sq2qAUncWwRZ3Gg=",
|
||||
"owner": "nix-community",
|
||||
"repo": "impermanence",
|
||||
"rev": "a33ef102a02ce77d3e39c25197664b7a636f9c30",
|
||||
"rev": "0d09341beeaa2367bac5d718df1404bf2ce45e6f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -231,6 +361,49 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-bitcoin": {
|
||||
"inputs": {
|
||||
"extra-container": "extra-container",
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727247704,
|
||||
"narHash": "sha256-Jl1CYXNIdJ4Ac0MK15e8+vflFOgPxZZNw24CKfLC6QY=",
|
||||
"owner": "fort-nix",
|
||||
"repo": "nix-bitcoin",
|
||||
"rev": "a0d36d59248ac54f1b42a668326346a77640c7f5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "fort-nix",
|
||||
"ref": "nixos-24.05",
|
||||
"repo": "nix-bitcoin",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-colors": {
|
||||
"inputs": {
|
||||
"base16-schemes": "base16-schemes",
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1707825078,
|
||||
"narHash": "sha256-hTfge2J2W+42SZ7VHXkf4kjU+qzFqPeC9k66jAUBMHk=",
|
||||
"owner": "misterio77",
|
||||
"repo": "nix-colors",
|
||||
"rev": "b01f024090d2c4fc3152cd0cf12027a7b8453ba1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "misterio77",
|
||||
"repo": "nix-colors",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -239,11 +412,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1716511055,
|
||||
"narHash": "sha256-5Fe/DGgvMhPEMl9VdVxv3zvwRcwNDmW5eRJ0gk72w7U=",
|
||||
"lastModified": 1729826725,
|
||||
"narHash": "sha256-w3WNlYxqWYsuzm/jgFPyhncduoDNjot28aC8j39TW0U=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "0bea8222f6e83247dd13b055d83e64bce02ee532",
|
||||
"rev": "7840909b00fbd5a183008a6eb251ea307fe4a76e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -253,13 +426,12 @@
|
|||
}
|
||||
},
|
||||
"nix-secrets": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1716900655,
|
||||
"narHash": "sha256-YQBKCTcP+CKP0LWSjVlP+qQ4kbk8ZWjir/nTPIl4+Bs=",
|
||||
"lastModified": 1730130467,
|
||||
"narHash": "sha256-mcyG1iu8hNmkDjgDEdFQyCZ3bBxBHFKd4nxT8NreMmY=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "c000be534d2c23315a746555e82a30b512c42f65",
|
||||
"revCount": 69,
|
||||
"rev": "c82ff6f7e995503acabb9cf2478e5b4e401968ce",
|
||||
"revCount": 188,
|
||||
"type": "git",
|
||||
"url": "ssh://git@git.bitlab21.com/sam/nix-secrets.git"
|
||||
},
|
||||
|
@ -270,39 +442,74 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 0,
|
||||
"narHash": "sha256-UlRZtrCnhPFSJlDQE7M0eyhgvuuHBTe1eJ9N9AQlJQ0=",
|
||||
"path": "/nix/store/3pif36ks3f56py4wb1dkq6sh0nkf3ygj-source",
|
||||
"type": "path"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1716655032,
|
||||
"narHash": "sha256-kQ25DAiCGigsNR/Quxm3v+JGXAEXZ8I7RAF4U94bGzE=",
|
||||
"lastModified": 1720031269,
|
||||
"narHash": "sha256-rwz8NJZV+387rnWpTYcXaRNvzUSnnF9aHONoJIYmiUQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "59a450646ec8ee0397f5fa54a08573e8240eb91f",
|
||||
"rev": "9f4128e00b0ae8ec65918efeba59db998750ead6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "release-23.11",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1697935651,
|
||||
"narHash": "sha256-qOfWjQ2JQSQL15KLh6D7xQhx0qgZlYZTYlcEiRuAMMw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "e1e11fdbb01113d85c7f41cada9d2847660e3902",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1729973466,
|
||||
"narHash": "sha256-knnVBGfTCZlQgxY1SgH0vn2OyehH9ykfF8geZgS95bk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "cd3e8833d70618c4eea8df06f95b364b016d4950",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "release-24.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1716509168,
|
||||
"narHash": "sha256-4zSIhSRRIoEBwjbPm3YiGtbd8HDWzFxJjw5DYSDy1n8=",
|
||||
"lastModified": 1726871744,
|
||||
"narHash": "sha256-V5LpfdHyQkUF7RfOaDPrZDP+oqz88lTJrMT1+stXNwo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a1d92660c6b3b7c26fb883500a80ea9d33321be2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable_2": {
|
||||
"locked": {
|
||||
"lastModified": 1730200266,
|
||||
"narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "bfb7a882678e518398ce9a31a881538679f6f092",
|
||||
"rev": "807e9154dcb16384b1b765ebe9cd2bba2ac287fd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -312,12 +519,27 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1730481737,
|
||||
"narHash": "sha256-HaUCfqLIFX/4wiSKkKKSTwUNmZd1EMy+lGB+faadQXU=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f18ab3b08f56abc54bcc2ef9bbca627d45926fee",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "release-24.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixvim": {
|
||||
"inputs": {
|
||||
"devshell": "devshell",
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-parts": "flake-parts",
|
||||
"flake-root": "flake-root",
|
||||
"flake-parts": "flake-parts_3",
|
||||
"git-hooks": "git-hooks",
|
||||
"home-manager": "home-manager_2",
|
||||
"nix-darwin": "nix-darwin",
|
||||
|
@ -327,28 +549,48 @@
|
|||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1716833970,
|
||||
"narHash": "sha256-K3tVrTna4EN86GW9IeOQJkbj57zT2xNGJg1hh26xy5c=",
|
||||
"lastModified": 1729945968,
|
||||
"narHash": "sha256-4u+nbBSMuXWGCtXxUPPEflRm54+y/HLIbhIep9do8Ew=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "a2afa5634495ee739e682e5ccb743c5c6dd90ec1",
|
||||
"rev": "c05ac01070425ed0797b1ff678dc690c333cea74",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "nixos-24.05",
|
||||
"repo": "nixvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1730472538,
|
||||
"narHash": "sha256-3m4OVGKsbPzMlnS0gVptIZBRlxgqQz+WhfwT+rT823Y=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "52c21ec8fde46366b1a5555e18d854ee18012ac8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"arion": "arion",
|
||||
"disko": "disko",
|
||||
"home-manager": "home-manager",
|
||||
"impermanence": "impermanence",
|
||||
"nix-bitcoin": "nix-bitcoin",
|
||||
"nix-colors": "nix-colors",
|
||||
"nix-secrets": "nix-secrets",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable_2",
|
||||
"nixvim": "nixvim",
|
||||
"nur": "nur",
|
||||
"sops-nix": "sops-nix"
|
||||
}
|
||||
},
|
||||
|
@ -360,11 +602,11 @@
|
|||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1716692524,
|
||||
"narHash": "sha256-sALodaA7Zkp/JD6ehgwc0UCBrSBfB4cX66uFGTsqeFU=",
|
||||
"lastModified": 1729999681,
|
||||
"narHash": "sha256-qm0uCtM9bg97LeJTKQ8dqV/FvqRN+ompyW4GIJruLuw=",
|
||||
"owner": "mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "962797a8d7f15ed7033031731d0bb77244839960",
|
||||
"rev": "1666d16426abe79af5c47b7c0efa82fd31bf4c56",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -396,11 +638,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1715940852,
|
||||
"narHash": "sha256-wJqHMg/K6X3JGAE9YLM0LsuKrKb4XiBeVaoeMNlReZg=",
|
||||
"lastModified": 1729613947,
|
||||
"narHash": "sha256-XGOvuIPW1XRfPgHtGYXd5MAmJzZtOuwlfKDgxX5KT3s=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "2fba33a182602b9d49f0b2440513e5ee091d838b",
|
||||
"rev": "aac86347fb5063960eccb19493e0cadcdb4205ca",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
118
flake.nix
118
flake.nix
|
@ -3,26 +3,41 @@
|
|||
|
||||
inputs = {
|
||||
# Nixpkgs
|
||||
nixpkgs.url = "github:nixos/nixpkgs/release-24.05";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
# NUR
|
||||
nur.url = "github:nix-community/NUR";
|
||||
|
||||
# Home manager
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
url = "github:nix-community/home-manager/release-24.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Nixvim
|
||||
nixvim = {
|
||||
url = "github:nix-community/nixvim";
|
||||
# If you are not running an unstable channel of nixpkgs, select the corresponding branch of nixvim.
|
||||
# url = "github:nix-community/nixvim/nixos-23.05";
|
||||
|
||||
url = "github:nix-community/nixvim/nixos-24.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Arion for docker
|
||||
arion = {
|
||||
url = "github:hercules-ci/arion/236f9dd82d6ef6a2d9987c7a7df3e75f1bc8b318";
|
||||
};
|
||||
|
||||
# nix-bitcoin
|
||||
nix-bitcoin = {
|
||||
url = "github:fort-nix/nix-bitcoin/nixos-24.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Nix colors
|
||||
nix-colors.url = "github:misterio77/nix-colors";
|
||||
|
||||
# Declarative partitioning and formatting
|
||||
disko = {
|
||||
url = "github:nix-community/disko";
|
||||
url = "github:nix-community/disko/v1.6.1";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
|
@ -38,7 +53,7 @@
|
|||
|
||||
nix-secrets = {
|
||||
url = "git+ssh://git@git.bitlab21.com/sam/nix-secrets.git";
|
||||
flake = false;
|
||||
inputs = {};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -46,44 +61,30 @@
|
|||
self,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
disko,
|
||||
#impermanence,
|
||||
...
|
||||
} @ inputs:
|
||||
let
|
||||
} @ inputs: let
|
||||
inherit (self) outputs;
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
];
|
||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
inherit (nixpkgs) lib;
|
||||
configVars = import ./vars {inherit inputs lib;};
|
||||
specialArgs = {
|
||||
inherit
|
||||
inputs
|
||||
outputs
|
||||
configVars
|
||||
;
|
||||
};
|
||||
in {
|
||||
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
|
||||
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
|
||||
overlays = import ./overlays {inherit inputs;};
|
||||
nixosModules = import ./modules/nixos;
|
||||
homeManagerModules = import ./modules/home-manager;
|
||||
|
||||
# System level configs
|
||||
nixosConfigurations = {
|
||||
nixdev = nixpkgs.lib.nixosSystem {
|
||||
inherit specialArgs;
|
||||
modules = [
|
||||
./hosts/nixdev
|
||||
home-manager.nixosModules.home-manager{
|
||||
home-manager.extraSpecialArgs = specialArgs;
|
||||
}
|
||||
];
|
||||
};
|
||||
fileserver = nixpkgs.lib.nixosSystem {
|
||||
inherit specialArgs;
|
||||
modules = [
|
||||
./hosts/fileserver
|
||||
home-manager.nixosModules.home-manager{
|
||||
home-manager.extraSpecialArgs = specialArgs;
|
||||
}
|
||||
];
|
||||
};
|
||||
bootstrap = nixpkgs.lib.nixosSystem {
|
||||
inherit specialArgs;
|
||||
modules = [
|
||||
|
@ -94,33 +95,42 @@
|
|||
inherit specialArgs;
|
||||
modules = [
|
||||
./hosts/sparky
|
||||
home-manager.nixosModules.home-manager{
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.extraSpecialArgs = specialArgs;
|
||||
}
|
||||
];
|
||||
};
|
||||
semita = nixpkgs.lib.nixosSystem {
|
||||
inherit specialArgs;
|
||||
modules = [
|
||||
./hosts/semita
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.extraSpecialArgs = specialArgs;
|
||||
}
|
||||
];
|
||||
};
|
||||
merlin = nixpkgs.lib.nixosSystem {
|
||||
inherit specialArgs;
|
||||
modules = [
|
||||
./hosts/nebula
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.extraSpecialArgs = specialArgs;
|
||||
}
|
||||
];
|
||||
};
|
||||
citadel = nixpkgs.lib.nixosSystem {
|
||||
inherit specialArgs;
|
||||
modules = [
|
||||
./hosts/citadel
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.extraSpecialArgs = specialArgs;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# # Standalone home-manager configuration entrypoint
|
||||
# # Available through 'home-manager --flake .#your-username@your-hostname'
|
||||
# homeConfigurations = {
|
||||
# # FIXME replace with your username@hostname
|
||||
# "sam@nixdev" = home-manager.lib.homeManagerConfiguration {
|
||||
# pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
||||
# extraSpecialArgs = {inherit inputs outputs ;};
|
||||
# modules = [
|
||||
# # > Our main home-manager configuration file <
|
||||
# ./home/nixdev.nix
|
||||
# ];
|
||||
# };
|
||||
# "admin@fileserver" = home-manager.lib.homeManagerConfiguration {
|
||||
# pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
||||
# extraSpecialArgs = {inherit inputs outputs ;};
|
||||
# modules = [
|
||||
# # > Our main home-manager configuration file <
|
||||
# ./home/nixdev.nix
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
};
|
||||
}
|
||||
|
|
|
@ -0,0 +1,84 @@
|
|||
{config, pkgs, ...}: {
|
||||
imports = [
|
||||
# Import users
|
||||
./users/sam
|
||||
|
||||
./common/core
|
||||
|
||||
# Import optional
|
||||
./common/optional/git.nix
|
||||
./common/optional/sops.nix
|
||||
./common/optional/syncthing.nix
|
||||
./common/optional/desktop/dwm
|
||||
./common/optional/desktop/common/themes/standard-dark.nix
|
||||
./common/optional/notes.nix
|
||||
./common/optional/yazi.nix
|
||||
];
|
||||
|
||||
home.packages = [
|
||||
pkgs.qgis
|
||||
];
|
||||
|
||||
colorScheme = {
|
||||
slug = "serene";
|
||||
name = "Serene";
|
||||
author = "Bitlab21";
|
||||
palette = {
|
||||
base00 = "#1F1F28";
|
||||
base01 = "#16161D";
|
||||
base02 = "#223249";
|
||||
base03 = "#363646";
|
||||
base04 = "#727169";
|
||||
base05 = "#DCD7BA";
|
||||
base06 = "#C8C093";
|
||||
base07 = "#717C7C";
|
||||
base08 = "#C34043";
|
||||
base09 = "#FFA066";
|
||||
base0A = "#C0A36E";
|
||||
base0B = "#76946A";
|
||||
base0C = "#6A9589";
|
||||
base0D = "#7E9CD8";
|
||||
base0E = "#957FB8";
|
||||
base0F = "#D27E99";
|
||||
};
|
||||
};
|
||||
|
||||
home.file.".Xresources" = {
|
||||
recursive = true;
|
||||
text = ''
|
||||
! st
|
||||
st.alpha: 0.8
|
||||
St.font: monospace:pixelsize=31:antialias=true:autohint=true;
|
||||
St.font2: NotoColorEmoji:pixelsize=24:antialias=true:autohint=true;
|
||||
|
||||
! dwm
|
||||
dwm.borderpx: 6
|
||||
dwm.font: monospace:size=14
|
||||
dwm.col_base00: #${config.colorScheme.colors.base00}
|
||||
dwm.col_base03: #${config.colorScheme.colors.base03}
|
||||
dwm.col_base04: #${config.colorScheme.colors.base04}
|
||||
dwm.col_base05: #${config.colorScheme.colors.base05}
|
||||
dwm.col_base08: #${config.colorScheme.colors.base08}
|
||||
dwm.col_base0B: #${config.colorScheme.colors.base0B}
|
||||
|
||||
! dmenu
|
||||
dmenu.font: monospace:size=14
|
||||
dmenu.font2: NotoColorEmoji:pixelsize=44:antialias=true:autohint=true
|
||||
dmenu.topbar: 1
|
||||
dmenu.normfgcolor: #${config.colorScheme.colors.base05}
|
||||
dmenu.normbgcolor: #${config.colorScheme.colors.base03}
|
||||
dmenu.selfgcolor: #${config.colorScheme.colors.base00}
|
||||
dmenu.selbgcolor: #${config.colorScheme.colors.base0B}
|
||||
|
||||
Nsxiv.window.background: #${config.colorScheme.colors.base03}
|
||||
Nsxiv.window.foreground: #${config.colorScheme.colors.base05}
|
||||
Nsxiv.mark.foreground: #${config.colorScheme.colors.base08}
|
||||
|
||||
Nsxiv.bar.background: #${config.colorScheme.colors.base00}
|
||||
Nsxiv.bar.foreground: #${config.colorScheme.colors.base05}
|
||||
Nsxiv.bar.font: monospace:size=12
|
||||
|
||||
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,12 +1,35 @@
|
|||
{ config, lib, pkgs, outputs, ... }:
|
||||
{ pkgs, inputs, outputs, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.nix-colors.homeManagerModules.default
|
||||
./zsh.nix
|
||||
./nixvim.nix
|
||||
] ;
|
||||
|
||||
home.packages = [
|
||||
pkgs.ripgrep
|
||||
./nixvim
|
||||
];
|
||||
home.stateVersion = "23.11";
|
||||
|
||||
nixpkgs.overlays = [
|
||||
inputs.nur.overlay
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.unstable-packages
|
||||
];
|
||||
|
||||
# Global home packages without config go here (for all hosts and users)
|
||||
home.packages = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
ripgrep
|
||||
fzf
|
||||
eza
|
||||
bat
|
||||
killall
|
||||
pciutils
|
||||
tree
|
||||
jq
|
||||
coreutils
|
||||
btop
|
||||
htop
|
||||
postgresql_16
|
||||
libqalculate
|
||||
tmux
|
||||
;
|
||||
};
|
||||
home.stateVersion = "24.05";
|
||||
}
|
||||
|
|
|
@ -1,356 +0,0 @@
|
|||
{ inputs, pkgs, ... }: {
|
||||
imports = [
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
enableMan = true; # install man pages for nixvim options
|
||||
|
||||
clipboard.register = "unnamedplus"; # use system clipboard instead of internal registers
|
||||
|
||||
colorschemes.kanagawa = {
|
||||
enable = true;
|
||||
settings = {
|
||||
commentStyle = {
|
||||
italic = true;
|
||||
};
|
||||
dimInactive = true;
|
||||
terminalColors = true;
|
||||
theme = "wave";
|
||||
transparent = false;
|
||||
undercurl = true;
|
||||
};
|
||||
};
|
||||
|
||||
opts = {
|
||||
#
|
||||
# ========= General Appearance =========
|
||||
#
|
||||
background = "";
|
||||
number = true; # show line numbers
|
||||
relativenumber = true; # show relative linenumbers
|
||||
laststatus = 0; # Display status line always
|
||||
history = 1000; # Store lots of :cmdline history
|
||||
showcmd = true; # Show incomplete cmds down the bottom
|
||||
showmode = true; # Show current mode down the bottom
|
||||
autoread = true; # Reload files changed outside vim
|
||||
lazyredraw = true; # Redraw only when needed
|
||||
showmatch = true; # highlight matching braces
|
||||
ruler = true; # show current line and column
|
||||
visualbell = true; # No sounds
|
||||
|
||||
listchars = "trail:·"; # Display tabs and trailing spaces visually
|
||||
|
||||
# ========= Font =========
|
||||
guifont = "NotoSansMono:h9"; # fontname:fontsize
|
||||
|
||||
# ========= Cursor =========
|
||||
guicursor = "n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20,n-v-i:blinkon0";
|
||||
|
||||
# ========= Redirect Temp Files =========
|
||||
# backup
|
||||
backupdir = "$HOME/.local/state/vim/backup//,/tmp//,.";
|
||||
writebackup = false;
|
||||
# swap
|
||||
directory = "$HOME/.local/vim/swap//,/tmp//,.";
|
||||
|
||||
# ================ Indentation ======================
|
||||
autoindent = true;
|
||||
cindent = true; # automatically indent braces
|
||||
smartindent = true;
|
||||
smarttab = true;
|
||||
shiftwidth = 2;
|
||||
softtabstop = 4;
|
||||
tabstop = 2;
|
||||
expandtab = true;
|
||||
|
||||
# ================ Folds ============================
|
||||
foldmethod = "indent"; # fold based on indent
|
||||
foldnestmax = 3; # deepest fold is 3 levels
|
||||
foldenable = false; # don't fold by default
|
||||
|
||||
# ================ Completion =======================
|
||||
wildmode = "list:longest";
|
||||
wildmenu = true; # enable ctrl-n and ctrl-p to scroll thru matches
|
||||
|
||||
# stuff to ignore when tab completing
|
||||
wildignore = "*.o,*.obj,*~,vim/backups,sass-cache,DS_Store,vendor/rails/**,vendor/cache/**,*.gem,log/**,tmp/**,*.png,*.jpg,*.gif";
|
||||
|
||||
# ================ Scrolling ========================
|
||||
scrolloff = 4; # Start scrolling when we're 4 lines away from margins
|
||||
sidescrolloff = 15;
|
||||
sidescroll = 1;
|
||||
|
||||
# ================ Searching ========================
|
||||
incsearch = true;
|
||||
hlsearch = true;
|
||||
ignorecase = true;
|
||||
smartcase = true;
|
||||
|
||||
# ================ Movement ========================
|
||||
backspace = "indent,eol,start"; # allow backspace in insert mode
|
||||
};
|
||||
|
||||
#
|
||||
# ========= UI Plugins =========
|
||||
#
|
||||
|
||||
plugins.nvim-colorizer = {
|
||||
enable = true;
|
||||
fileTypes = [ "*" ];
|
||||
};
|
||||
|
||||
plugins.lualine = {
|
||||
enable = true;
|
||||
theme = "auto";
|
||||
componentSeparators = {
|
||||
left = "";
|
||||
right = "";
|
||||
};
|
||||
sectionSeparators = {
|
||||
left = "";
|
||||
right = "";
|
||||
};
|
||||
sections = {
|
||||
lualine_a = [ "mode" ];
|
||||
lualine_b = [ "branch" "diff" "diagnostics" ];
|
||||
lualine_c = [ "filename" ];
|
||||
lualine_x = [ "encoding" "fileformat" "filetype" ];
|
||||
lualine_y = [ "progress" ];
|
||||
lualine_z = [ "locations" ];
|
||||
};
|
||||
};
|
||||
|
||||
#
|
||||
# ========= File Search =========
|
||||
#
|
||||
plugins.telescope = {
|
||||
# https://github.com/nvim-telescope/telescope.nvim
|
||||
enable = true;
|
||||
extensions.fzy-native.enable = true;
|
||||
};
|
||||
|
||||
# ========= File Nav ===========
|
||||
#
|
||||
plugins.harpoon = {
|
||||
enable = true;
|
||||
keymaps = {
|
||||
toggleQuickMenu = "<leader>b";
|
||||
};
|
||||
};
|
||||
|
||||
plugins.nvim-tree = {
|
||||
enable = true;
|
||||
view.width = {
|
||||
min = 30;
|
||||
max = -1;
|
||||
padding = 1;
|
||||
};
|
||||
disableNetrw = true;
|
||||
filters.dotfiles = true;
|
||||
|
||||
};
|
||||
|
||||
#
|
||||
# ========== Dev Tools =========
|
||||
#
|
||||
plugins.surround.enable = true; # vim-surround
|
||||
|
||||
plugins.gitsigns = {
|
||||
enable = true;
|
||||
settings.signs.add = {
|
||||
hl = "GitSignsAdd";
|
||||
text = " ▎";
|
||||
numhl = "GitSignsAddNr";
|
||||
linehl = "GitSignsAddLn";
|
||||
};
|
||||
settings.signs.change = {
|
||||
hl = "GitSignsChange";
|
||||
text = " ▎";
|
||||
numhl = "GitSignsChangeNr";
|
||||
linehl = "GitSignsChangeLn";
|
||||
};
|
||||
settings.signs.delete = {
|
||||
hl = "GitSignsDelete";
|
||||
text = " ●";
|
||||
numhl = "GitSignsDeleteNr";
|
||||
linehl = "GitSignsDeleteLn";
|
||||
};
|
||||
settings.signs.topdelete = {
|
||||
hl = "GitSignsDelete";
|
||||
text = " ●";
|
||||
numhl = "GitSignsDeleteNr";
|
||||
linehl = "GitSignsDeleteLn";
|
||||
};
|
||||
settings.signs.changedelete = {
|
||||
hl = "GitSignsChange";
|
||||
text = " ▎";
|
||||
numhl = "GitSignsChangeNr";
|
||||
linehl = "GitSignsChangeLn";
|
||||
};
|
||||
};
|
||||
|
||||
# Load Plugins that aren't provided as modules by nixvim
|
||||
extraPlugins = builtins.attrValues {
|
||||
inherit (pkgs.vimPlugins)
|
||||
ale
|
||||
vim-numbertoggle# Use relative number on focused buffer only
|
||||
vimade# Dim unfocused buffers
|
||||
vimwiki# Vim Wiki
|
||||
YouCompleteMe# Code completion engine
|
||||
vim-dadbod
|
||||
vim-dadbod-ui
|
||||
|
||||
# Keep vim-devicons as last entry
|
||||
vim-devicons;
|
||||
};
|
||||
|
||||
# ========= Mapleader =========
|
||||
globals.mapleader = ";";
|
||||
|
||||
#
|
||||
# ========= Key binds =========
|
||||
#
|
||||
keymaps = [
|
||||
# Switching windows
|
||||
{
|
||||
mode = [ "n" ];
|
||||
action = "<C-W>h";
|
||||
key = "<S-h>";
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = [ "n" ];
|
||||
action = "<C-W>j";
|
||||
key = "<S-j>";
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = [ "n" ];
|
||||
action = "<C-W>k";
|
||||
key = "<S-k>";
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = [ "n" ];
|
||||
action = "<C-W>l";
|
||||
key = "<S-l>";
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
# Toggle nvim-tree
|
||||
{
|
||||
mode = [ "n" ];
|
||||
action = "<cmd>NvimTreeFindFileToggle<CR>";
|
||||
key = "tt";
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
# clear search highlighting
|
||||
mode = [ "n" ];
|
||||
key = "<space><space>";
|
||||
action = "<cmd>nohlsearch<CR>";
|
||||
options = { noremap = true; };
|
||||
}
|
||||
|
||||
# ========== Telescope Plugin =========
|
||||
{
|
||||
# find files
|
||||
mode = [ "n" ];
|
||||
key = "<Leader>ff";
|
||||
action = "<cmd>Telescope find_files<CR>";
|
||||
options = { noremap = true; };
|
||||
}
|
||||
{
|
||||
# live grep
|
||||
mode = [ "n" ];
|
||||
key = "<Leader>fg";
|
||||
action = "<cmd>Telescope live_grep<CR>";
|
||||
options = { noremap = true; };
|
||||
}
|
||||
{
|
||||
# buffers
|
||||
mode = [ "n" ];
|
||||
key = "<Leader>fb";
|
||||
action = "<cmd>Telescope buffers<CR>";
|
||||
options = { noremap = true; };
|
||||
}
|
||||
{
|
||||
# help tags
|
||||
mode = [ "n" ];
|
||||
key = "<Leader>fh";
|
||||
action = "<cmd>Telescope help_tags<CR>";
|
||||
options = { noremap = true; };
|
||||
}
|
||||
|
||||
];
|
||||
extraConfigVim = ''
|
||||
" ================ Persistent Undo ==================
|
||||
" Keep undo history across sessions, by storing in file.
|
||||
" Only works all the time.
|
||||
if has('persistent_undo')
|
||||
silent !mkdir ~/.vim/backups > /dev/null 2>&1
|
||||
set undodir=~/.vim/backups
|
||||
set undofile
|
||||
endif
|
||||
|
||||
" ================ Vim Wiki config =================
|
||||
" See :h vimwiki_list for info on registering wiki paths
|
||||
let wiki_0 = {}
|
||||
let wiki_0.path = '~/dotfiles.wiki/'
|
||||
let wiki_0.index = 'home'
|
||||
let wiki_0.syntax = 'markdown'
|
||||
let wiki_0.ext = '.md'
|
||||
|
||||
" fill spaces in page names with _ in pathing
|
||||
let wiki_0.links_space_char = '_'
|
||||
|
||||
" ================ Ale ========================
|
||||
" linter and fixer packages have to be installed via AUR or pamac
|
||||
let g:ale_linters = {
|
||||
\ 'c': ['clang-tidy'],
|
||||
\ 'python': ['flake8'],
|
||||
\ 'vim': ['vint'],
|
||||
\ 'markdown': ['markdownlint'],
|
||||
\ }
|
||||
|
||||
let g:ale_fixers = {
|
||||
\ 'c': ['clang-format'],
|
||||
\ 'javascript': ['prettier', 'eslint'],
|
||||
\ 'json': ['fixjson', 'prettier'],
|
||||
\ 'python': ['black', 'isort'],
|
||||
\ }
|
||||
|
||||
" Set global fixers for all file types except Markdown
|
||||
" Why? because double spaces at the end of a line in markdown indicate a
|
||||
" linebreak without creating a new paragraph
|
||||
function! SetGlobalFixers()
|
||||
let g:ale_fixers['*'] = ['trim_whitespace', 'remove_trailing_lines']
|
||||
endfunction
|
||||
|
||||
augroup GlobalFixers
|
||||
autocmd!
|
||||
autocmd VimEnter * call SetGlobalFixers()
|
||||
augroup END
|
||||
|
||||
" Set buffer-local fixers for Markdown files
|
||||
augroup MarkdownFixers
|
||||
autocmd!
|
||||
autocmd FileType markdown let b:ale_fixers = ['prettier']
|
||||
augroup END
|
||||
|
||||
let g:ale_fix_on_save = 1
|
||||
'';
|
||||
|
||||
};
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
./plugins
|
||||
./options.nix
|
||||
./theme.nix
|
||||
./keymaps.nix
|
||||
];
|
||||
|
||||
# Install home packages needed for nixvim
|
||||
home.packages = [
|
||||
pkgs.nixpkgs-fmt
|
||||
pkgs.black
|
||||
pkgs.yamllint
|
||||
pkgs.yamlfmt
|
||||
pkgs.prettierd
|
||||
pkgs.sqlfmt
|
||||
pkgs.nodePackages_latest.sql-formatter
|
||||
pkgs.alejandra
|
||||
pkgs.shellcheck
|
||||
pkgs.shellharden
|
||||
pkgs.shfmt
|
||||
pkgs.stylua
|
||||
pkgs.glow
|
||||
];
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
package = pkgs.neovim-unwrapped;
|
||||
enableMan = true; # install man pages for nixvim options
|
||||
clipboard.register = "unnamedplus"; # use system clipboard instead of internal registers
|
||||
globals.mapleader = " ";
|
||||
|
||||
extraConfigLua = ''
|
||||
vim.api.nvim_set_keymap("", '<Space>', '<Nop>', { noremap = true, silent = true })
|
||||
'';
|
||||
|
||||
extraConfigVim = ''
|
||||
" ================ Persistent Undo ==================
|
||||
" Keep undo history across sessions, by storing in file.
|
||||
" Only works all the time.
|
||||
if has('persistent_undo')
|
||||
silent !mkdir ~/.vim/backups > /dev/null 2>&1
|
||||
set undodir=~/.vim/backups
|
||||
set undofile
|
||||
endif
|
||||
|
||||
" ================ Vim Wiki config =================
|
||||
" See :h vimwiki_list for info on registering wiki paths
|
||||
let wiki_0 = {}
|
||||
let wiki_0.path = '~/docs/wiki/'
|
||||
let wiki_0.index = 'home'
|
||||
let wiki_0.syntax = 'markdown'
|
||||
let wiki_0.ext = '.md'
|
||||
|
||||
" ==== dbui
|
||||
let g:db_ui_hide_schemas = ['pg_catalog', 'pg_toast_temp.*', 'pg_toast']
|
||||
let g:db_ui_use_nerd_fonts = 1
|
||||
let g:db_ui_execute_on_save = 0
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
{
|
||||
programs.nixvim.keymaps = [
|
||||
# Switching buffers
|
||||
{
|
||||
mode = ["n"];
|
||||
action = "<C-w>h";
|
||||
key = "<S-h>";
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = ["n"];
|
||||
action = "<C-w>j";
|
||||
key = "<S-j>";
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = ["n"];
|
||||
action = "<C-w>k";
|
||||
key = "<S-k>";
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = ["n"];
|
||||
action = "<C-w>l";
|
||||
key = "<S-l>";
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
# Toggle nvim-tree
|
||||
{
|
||||
mode = ["n"];
|
||||
action = "<cmd>NvimTreeFindFileToggle<CR>";
|
||||
key = "tt";
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
# Clear search highlighting
|
||||
{
|
||||
mode = ["n"];
|
||||
key = "<space><space>";
|
||||
action = "<cmd>nohlsearch<CR>";
|
||||
options = {noremap = true;};
|
||||
}
|
||||
|
||||
# Telescope Plugin
|
||||
{
|
||||
# find files
|
||||
mode = ["n"];
|
||||
key = "<Leader>ff";
|
||||
action = "<cmd>Telescope find_files<CR>";
|
||||
options = {noremap = true;};
|
||||
}
|
||||
{
|
||||
# live grep
|
||||
mode = ["n"];
|
||||
key = "<Leader>fg";
|
||||
action = "<cmd>Telescope live_grep<CR>";
|
||||
options = {noremap = true;};
|
||||
}
|
||||
{
|
||||
# buffers
|
||||
mode = ["n"];
|
||||
key = "<Leader>fb";
|
||||
action = "<cmd>Telescope buffers<CR>";
|
||||
options = {noremap = true;};
|
||||
}
|
||||
{
|
||||
# help tags
|
||||
mode = ["n"];
|
||||
key = "<Leader>fh";
|
||||
action = "<cmd>Telescope help_tags<CR>";
|
||||
options = {noremap = true;};
|
||||
}
|
||||
# paste over selected text without yanking it
|
||||
{
|
||||
mode = ["v"];
|
||||
key = "p";
|
||||
action = "\"_dP";
|
||||
options = {noremap = true;};
|
||||
}
|
||||
# resize window
|
||||
{
|
||||
mode = ["n"];
|
||||
key = "<Right>";
|
||||
action = ":vertical resize +1<CR>";
|
||||
options = {noremap = true;};
|
||||
}
|
||||
{
|
||||
mode = ["n"];
|
||||
key = "<Left>";
|
||||
action = ":vertical resize -1<CR>";
|
||||
options = {noremap = true;};
|
||||
}
|
||||
{
|
||||
mode = ["n"];
|
||||
key = "<Down>";
|
||||
action = ":resize -1<CR>";
|
||||
options = {noremap = true;};
|
||||
}
|
||||
{
|
||||
mode = ["n"];
|
||||
key = "<Up>";
|
||||
action = ": resize +1<CR>";
|
||||
options = {noremap = true;};
|
||||
}
|
||||
];
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
programs.nixvim.opts = {
|
||||
background = "";
|
||||
number = true; # show line numbers
|
||||
relativenumber = true; # show relative linenumbers
|
||||
laststatus = 0; # Display status line always
|
||||
history = 1000; # Store lots of :cmdline history
|
||||
showcmd = true; # Show incomplete cmds down the bottom
|
||||
showmode = true; # Show current mode down the bottom
|
||||
autoread = true; # Reload files changed outside vim
|
||||
lazyredraw = true; # Redraw only when needed
|
||||
showmatch = true; # highlight matching braces
|
||||
ruler = true; # show current line and column
|
||||
visualbell = true; # No sounds
|
||||
listchars = "trail:·"; # Display tabs and trailing spaces visually
|
||||
autoindent = true;
|
||||
cindent = true; # automatically indent braces
|
||||
smartindent = true;
|
||||
smarttab = true;
|
||||
shiftwidth = 2;
|
||||
softtabstop = 4;
|
||||
tabstop = 2;
|
||||
expandtab = true;
|
||||
wildmode = "list:longest";
|
||||
wildmenu = true; # enable ctrl-n and ctrl-p to scroll thru matches
|
||||
scrolloff = 4; # Start scrolling when we're 4 lines away from margins
|
||||
sidescrolloff = 15;
|
||||
sidescroll = 1;
|
||||
incsearch = true;
|
||||
hlsearch = true;
|
||||
ignorecase = true;
|
||||
smartcase = true;
|
||||
backspace = "indent,eol,start"; # allow backspace in insert mode
|
||||
spell = true;
|
||||
spelllang = "en_gb";
|
||||
};
|
||||
}
|
|
@ -0,0 +1,109 @@
|
|||
{
|
||||
programs.nixvim.plugins = {
|
||||
cmp-emoji = { enable = true; };
|
||||
cmp = {
|
||||
enable = true;
|
||||
cmdline = {};
|
||||
settings = {
|
||||
autoEnableSources = true;
|
||||
experimental = { ghost_text = true; };
|
||||
performance = {
|
||||
debounce = 60;
|
||||
fetchingTimeout = 200;
|
||||
maxViewEntries = 30;
|
||||
};
|
||||
snippet = { expand = "function(args) require('luasnip').lsp_expand(args.body) end"; };
|
||||
formatting = {
|
||||
fields = [ "kind" "abbr" "menu" ];
|
||||
format = ''
|
||||
function(entry, vim_item)
|
||||
vim_item.kind = string.format('%s %s', kind_icons[vim_item.kind], vim_item.kind)
|
||||
vim_item.menu = ({
|
||||
nvim_lsp = "[LSP]",
|
||||
nvim_lua = "[Lua]",
|
||||
luasnip = "[Snippet]",
|
||||
buffer = "[Buffer]",
|
||||
path = "[Path]",
|
||||
["vim-dadbod-completion"] = "[SQL-dadbod]"
|
||||
})[entry.source.name]
|
||||
return vim_item
|
||||
end,
|
||||
'';
|
||||
};
|
||||
sources = [
|
||||
{ name = "nvim_lsp"; }
|
||||
{ name = "nvim_lua"; }
|
||||
{ name = "luasnip"; }
|
||||
{ name = "buffer"; }
|
||||
{ name = "path"; }
|
||||
{ name = "vim-dadbod-completion"; }
|
||||
];
|
||||
window = {
|
||||
completion = { border = "solid"; };
|
||||
documentation = { border = "solid"; };
|
||||
};
|
||||
mapping = {
|
||||
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
|
||||
"<S-Tab>" = "cmp.mapping.select_prev_item()";
|
||||
"<C-b>" = "cmp.mapping.scroll_docs(-4)";
|
||||
"<C-f>" = "cmp.mapping.scroll_docs(4)";
|
||||
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||
};
|
||||
};
|
||||
};
|
||||
cmp-nvim-lsp = { enable = true; }; # lsp
|
||||
cmp-buffer = { enable = true; };
|
||||
cmp-path = { enable = true; }; # file system paths
|
||||
cmp_luasnip = { enable = true; }; # snippets
|
||||
cmp-cmdline = { enable = true; }; # autocomplete for cmdline
|
||||
};
|
||||
programs.nixvim.extraConfigLua = ''
|
||||
luasnip = require("luasnip")
|
||||
kind_icons = {
|
||||
Text = "",
|
||||
Method = "",
|
||||
Function = "",
|
||||
Constructor = "",
|
||||
Field = "",
|
||||
Variable = "",
|
||||
Class = "",
|
||||
Interface = "",
|
||||
Module = "",
|
||||
Property = "",
|
||||
Unit = "",
|
||||
Value = "",
|
||||
Enum = "",
|
||||
Keyword = "",
|
||||
Snippet = "",
|
||||
Color = "",
|
||||
File = "",
|
||||
Reference = "",
|
||||
Folder = "",
|
||||
EnumMember = "",
|
||||
Constant = "",
|
||||
Struct = "",
|
||||
Event = "",
|
||||
Operator = "",
|
||||
TypeParameter = "",
|
||||
}
|
||||
|
||||
local cmp = require'cmp'
|
||||
|
||||
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline({'/', "?" }, {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{ name = 'buffer' }
|
||||
}
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline(':', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'path' }
|
||||
}, {
|
||||
{ name = 'cmdline' }
|
||||
}),
|
||||
}) '';
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
programs.nixvim.plugins.nvim-colorizer = {
|
||||
enable = true;
|
||||
fileTypes = [ "*" ];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
programs.nixvim.plugins.comment = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
programs.nixvim.plugins.conform-nvim = {
|
||||
enable = true;
|
||||
notifyOnError = true;
|
||||
logLevel = "debug";
|
||||
formattersByFt = {
|
||||
html = ["prettierd"];
|
||||
css = ["prettierd"];
|
||||
javascript = ["prettierd"];
|
||||
python = ["black"];
|
||||
lua = ["stylua"];
|
||||
nix = ["alejandra"];
|
||||
markdown = ["prettierd"];
|
||||
yaml = ["yamlfmt"];
|
||||
sql = ["sqlfmt"];
|
||||
#sql = ["sql-formatter"];
|
||||
bash = [
|
||||
"shellcheck"
|
||||
"shellharden"
|
||||
"shfmt"
|
||||
];
|
||||
};
|
||||
# formatters = {
|
||||
# sql-formatter = {
|
||||
# command = "sql-formatter";
|
||||
# args = "--config ~/.config/sql-formatter/config.json";
|
||||
# };
|
||||
# };
|
||||
};
|
||||
|
||||
home.file.".config/sql-formatter/config.json".text = ''
|
||||
{
|
||||
"language": "postgresql",
|
||||
"tabWidth": 2,
|
||||
"linesBetweenQueries": 1,
|
||||
"expressionWidth": 88,
|
||||
"newlineBeforeSemicolon": true
|
||||
}
|
||||
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,162 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
user = config.home.username;
|
||||
in {
|
||||
|
||||
imports = [
|
||||
./cmp.nix
|
||||
./colorizer.nix
|
||||
./conform.nix
|
||||
./gitsigns.nix
|
||||
./harpoon.nix
|
||||
./lsp.nix
|
||||
./lualine.nix
|
||||
./luasnip.nix
|
||||
./nvim-tree.nix
|
||||
./surround.nix
|
||||
./telescope.nix
|
||||
./treesitter.nix
|
||||
./fold.nix
|
||||
./todo-comments.nix
|
||||
./oil.nix
|
||||
./comment.nix
|
||||
];
|
||||
|
||||
# Load Plugins that aren't provided as modules by nixvim
|
||||
programs.nixvim.extraPlugins = [
|
||||
pkgs.vimPlugins.vim-numbertoggle
|
||||
pkgs.vimPlugins.vimwiki
|
||||
pkgs.vimPlugins.vim-dadbod
|
||||
pkgs.vimPlugins.vim-dadbod-ui
|
||||
pkgs.vimPlugins.vim-dadbod-completion
|
||||
pkgs.vimPlugins.fugitive
|
||||
|
||||
(pkgs.vimUtils.buildVimPlugin
|
||||
{
|
||||
name = "glow.nvim";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "ellisonleao";
|
||||
repo = "glow.nvim";
|
||||
rev = "238070a";
|
||||
sha256 = "sha256-GsNcASzVvY0066kak2nvUY5luzanoBclqcUOsODww8g=";
|
||||
};
|
||||
})
|
||||
|
||||
(pkgs.vimUtils.buildVimPlugin
|
||||
{
|
||||
name = "buffer_manager.nvim";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "j-morano";
|
||||
repo = "buffer_manager.nvim";
|
||||
rev = "fd36131";
|
||||
sha256 = "sha256-abe9ZGmL7U9rC+LxC3LO5/bOn8lHke1FCKO0V3TZGs0=";
|
||||
};
|
||||
})
|
||||
|
||||
(pkgs.vimUtils.buildVimPlugin
|
||||
{
|
||||
name = "vimwiki-sync";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "michal-h21";
|
||||
repo = "vimwiki-sync";
|
||||
rev = "99eeab3";
|
||||
sha256 = "sha256-cz0dSFphIbQAI4AOqwIUpDBTuj/3xlOkhSlIVMdgsqM=";
|
||||
};
|
||||
})
|
||||
|
||||
# Keep vim-devicons as last entry
|
||||
pkgs.vimPlugins.vim-devicons
|
||||
];
|
||||
programs.nixvim.extraConfigLua = ''
|
||||
-- function to read api key from secrets file
|
||||
local function read_api_key(file_path)
|
||||
local file = io.open(file_path, "r")
|
||||
if file then
|
||||
local api_key = file:read("*all")
|
||||
file:close()
|
||||
return api_key
|
||||
else
|
||||
error("Failed to open file: " .. file_path)
|
||||
end
|
||||
end
|
||||
|
||||
-- buffer_manager.nvim
|
||||
local opts = {noremap = true}
|
||||
|
||||
require("buffer_manager").setup(
|
||||
{
|
||||
line_keys = "1234567890",
|
||||
select_menu_item_commands = {
|
||||
edit = {
|
||||
key = "<CR>",
|
||||
command = "edit"
|
||||
}
|
||||
},
|
||||
focus_alternate_buffer = true,
|
||||
short_file_names = false,
|
||||
short_term_names = true,
|
||||
height = 15,
|
||||
width = 0.8,
|
||||
loop_nav = true,
|
||||
highlight = "",
|
||||
win_extra_options = {},
|
||||
borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" },
|
||||
order_buffers = "lastused",
|
||||
show_indicators = "before",
|
||||
}
|
||||
)
|
||||
|
||||
require('glow').setup({
|
||||
border = "shadow",
|
||||
style = "dark",
|
||||
pager = false,
|
||||
width = 80,
|
||||
height = 100,
|
||||
width_ratio = 0.7,
|
||||
height_ratio = 0.7,
|
||||
})
|
||||
|
||||
-- Custom color for modified buffers
|
||||
vim.api.nvim_set_hl(0, "BufferManagerModified", { fg = "#988100" })
|
||||
|
||||
local bmui = require("buffer_manager.ui")
|
||||
vim.keymap.set('n', '<leader>b', bmui.toggle_quick_menu, opts)
|
||||
vim.keymap.set('n', '<leader>n', bmui.nav_next, opts)
|
||||
vim.keymap.set('n', '<leader>p', bmui.nav_prev, opts)
|
||||
|
||||
local keys="1234567890"
|
||||
for i = 1, #keys do
|
||||
local key = keys:sub(i,i)
|
||||
vim.keymap.set('n', string.format('<leader>%s', key),
|
||||
function () bmui.nav_file(i) end,
|
||||
opts
|
||||
)
|
||||
end
|
||||
|
||||
-- Setup vimwiki
|
||||
|
||||
vim.g.vimwiki_list = {
|
||||
{
|
||||
syntax = "markdown",
|
||||
ext = ".md",
|
||||
path = "/home/${user}/.local/share/notes",
|
||||
},
|
||||
}
|
||||
|
||||
-- Format function for conform.nvim
|
||||
vim.api.nvim_create_user_command("Format", function(args)
|
||||
local range = nil
|
||||
if args.count ~= -1 then
|
||||
local end_line = vim.api.nvim_buf_get_lines(0, args.line2 - 1, args.line2, true)[1]
|
||||
range = {
|
||||
start = { args.line1, 0 },
|
||||
["end"] = { args.line2, end_line:len() },
|
||||
}
|
||||
end
|
||||
require("conform").format({ async = true, lsp_format = "fallback", range = range })
|
||||
end, { range = true })
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
programs.nixvim.plugins.nvim-ufo = {
|
||||
enable = true;
|
||||
|
||||
};
|
||||
programs.nixvim.extraConfigLua = ''
|
||||
-- default fold options
|
||||
vim.o.foldcolumn = '1'
|
||||
vim.o.foldlevel = 99
|
||||
vim.o.foldlevelstart = 99
|
||||
vim.o.foldenable = true
|
||||
|
||||
-- nvim_ufo options
|
||||
vim.keymap.set('n', 'zR', require('ufo').openAllFolds, { desc = "Open all folds" })
|
||||
vim.keymap.set('n', 'zM', require('ufo').closeAllFolds, { desc = "Close all folds" })
|
||||
vim.keymap.set('n', 'zK', function()
|
||||
local winid = require("ufo").peekFoldedLinesUnderCursor()
|
||||
if not winid then
|
||||
vim.lsp.buf.hover()
|
||||
end
|
||||
end , { desc = "Peed fold" })
|
||||
|
||||
require("ufo").setup({
|
||||
provider_selector = function(bufnr, filetype, buftype)
|
||||
return { 'lsp', 'indent' }
|
||||
end
|
||||
})
|
||||
|
||||
'';
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
programs.nixvim.plugins.gitsigns = {
|
||||
enable = true;
|
||||
settings.signs.add = {
|
||||
hl = "GitSignsAdd";
|
||||
text = " ▎";
|
||||
numhl = "GitSignsAddNr";
|
||||
linehl = "GitSignsAddLn";
|
||||
};
|
||||
settings.signs.change = {
|
||||
hl = "GitSignsChange";
|
||||
text = " ▎";
|
||||
numhl = "GitSignsChangeNr";
|
||||
linehl = "GitSignsChangeLn";
|
||||
};
|
||||
settings.signs.delete = {
|
||||
hl = "GitSignsDelete";
|
||||
text = " ●";
|
||||
numhl = "GitSignsDeleteNr";
|
||||
linehl = "GitSignsDeleteLn";
|
||||
};
|
||||
settings.signs.topdelete = {
|
||||
hl = "GitSignsDelete";
|
||||
text = " ●";
|
||||
numhl = "GitSignsDeleteNr";
|
||||
linehl = "GitSignsDeleteLn";
|
||||
};
|
||||
settings.signs.changedelete = {
|
||||
hl = "GitSignsChange";
|
||||
text = " ▎";
|
||||
numhl = "GitSignsChangeNr";
|
||||
linehl = "GitSignsChangeLn";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
programs.nixvim.plugins.harpoon = {
|
||||
enable = true;
|
||||
keymaps = {
|
||||
toggleQuickMenu = "<leader>h";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
{ osConfig , ... }:
|
||||
let
|
||||
hostname = osConfig.networking.hostName;
|
||||
in
|
||||
{
|
||||
programs.nixvim.plugins = {
|
||||
lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
lua-ls = {enable = true;};
|
||||
nixd = {
|
||||
enable = true;
|
||||
cmd = ["nixd"];
|
||||
settings = {
|
||||
nixpkgs.expr = "import <nixpkgs> { }";
|
||||
options = {
|
||||
nixos.expr = "(builtins.getFlake \"/etc/nixos\").nixosConfigurations.${hostname}.options";
|
||||
# TODO get home-manager options working when hm imported as submodule
|
||||
# home_manager.expr = "(builtins.getFlake \"github:nix-community/home-manager\").homeConfigurations.${hostname}.options";
|
||||
};
|
||||
};
|
||||
};
|
||||
bashls = {enable = true;};
|
||||
pyright = {enable = true;};
|
||||
html = {enable = true;};
|
||||
marksman = {enable = true;};
|
||||
ccls = {enable = true;};
|
||||
cssls = {enable = true;};
|
||||
r-language-server = {enable = true;};
|
||||
tsserver = {enable = true;};
|
||||
};
|
||||
keymaps = {
|
||||
lspBuf = {
|
||||
gd = {
|
||||
action = "definition";
|
||||
desc = "Goto Definition";
|
||||
};
|
||||
gr = {
|
||||
action = "references";
|
||||
desc = "Goto References";
|
||||
};
|
||||
gD = {
|
||||
action = "declaration";
|
||||
desc = "Goto Declaration";
|
||||
};
|
||||
gI = {
|
||||
action = "implementation";
|
||||
desc = "Goto Implementation";
|
||||
};
|
||||
gT = {
|
||||
action = "type_definition";
|
||||
desc = "Type Definition";
|
||||
};
|
||||
gK = {
|
||||
action = "hover";
|
||||
desc = "Hover";
|
||||
};
|
||||
"<leader>cw" = {
|
||||
action = "workspace_symbol";
|
||||
desc = "Workspace Symbol";
|
||||
};
|
||||
"<leader>cr" = {
|
||||
action = "rename";
|
||||
desc = "Rename";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
# TODO: enable otter.nvim when merged into nixvim stable
|
||||
# otter = {
|
||||
# enable = true;
|
||||
# };
|
||||
};
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
# Add tiny pictograms to lsp
|
||||
programs.nixvim.plugins.lspkind = {
|
||||
enable = true;
|
||||
symbolMap = {
|
||||
Copilot = "";
|
||||
};
|
||||
extraOptions = {
|
||||
maxwidth = 50;
|
||||
ellipsis_char = "...";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
programs.nixvim.plugins.lualine = {
|
||||
enable = true;
|
||||
theme = "auto";
|
||||
componentSeparators = {
|
||||
left = "";
|
||||
right = "";
|
||||
};
|
||||
sectionSeparators = {
|
||||
left = "";
|
||||
right = "";
|
||||
};
|
||||
sections = {
|
||||
lualine_a = [ "mode" ];
|
||||
lualine_b = [ "branch" "diff" "diagnostics" ];
|
||||
lualine_c = [ "filename" ];
|
||||
lualine_x = [ "encoding" "fileformat" "filetype" ];
|
||||
lualine_y = [ "progress" ];
|
||||
lualine_z = [ "locations" ];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
{ pkgs, ... }: {
|
||||
programs.nixvim.plugins.luasnip = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
enable_autosnippets = true;
|
||||
store_selection_keys = "<Tab>";
|
||||
};
|
||||
fromVscode = [
|
||||
{
|
||||
lazyLoad = true;
|
||||
paths = "${pkgs.vimPlugins.friendly-snippets}";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
programs.nixvim.plugins.nvim-tree = {
|
||||
enable = true;
|
||||
view.width = {
|
||||
min = 30;
|
||||
max = -1;
|
||||
padding = 1;
|
||||
};
|
||||
disableNetrw = true;
|
||||
filters.dotfiles = true;
|
||||
};
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
programs.nixvim.plugins.oil = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
programs.nixvim.plugins.surround.enable = true; # vim-surround
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
programs.nixvim.plugins.telescope = {
|
||||
enable = true;
|
||||
extensions.fzy-native.enable = true;
|
||||
};
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
programs = {
|
||||
nixvim = {
|
||||
plugins.todo-comments = {
|
||||
enable = true;
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = [ "n" ];
|
||||
action = "<cmd>TodoTelescope<cr>";
|
||||
key = "<leader>ft";
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
programs.nixvim.plugins.treesitter = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
programs.nixvim.colorschemes.kanagawa = {
|
||||
enable = true;
|
||||
settings = {
|
||||
commentStyle = {
|
||||
italic = true;
|
||||
};
|
||||
terminalColors = true;
|
||||
theme = "wave";
|
||||
transparent = true;
|
||||
undercurl = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,19 +1,23 @@
|
|||
{ pkgs, config, ... }: {
|
||||
{ config, ... }: {
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
|
||||
shellAliases = {
|
||||
ll = "ls -l";
|
||||
src = "cd ~/.local/share/src";
|
||||
no = "cd /etc/nixos";
|
||||
cat = "bat --decorations=never";
|
||||
ls = "eza";
|
||||
};
|
||||
history.size = 10000;
|
||||
history.path = "${config.xdg.dataHome}/zsh/history";
|
||||
|
||||
initExtra = ''
|
||||
bindkey -v
|
||||
initExtra = ''
|
||||
bindkey -v
|
||||
bindkey "^H" backward-delete-char
|
||||
bindkey "^?" backward-delete-char
|
||||
set -o vi
|
||||
|
@ -22,11 +26,11 @@
|
|||
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
|
||||
SESSION_TYPE="(ssh) "
|
||||
fi
|
||||
|
||||
|
||||
####
|
||||
# Format prompt
|
||||
####
|
||||
|
||||
|
||||
# Define colors
|
||||
COLOR_RED="red"
|
||||
COLOR_MAGENTA="92"
|
||||
|
@ -34,20 +38,20 @@
|
|||
COLOR_GREEN="36"
|
||||
COLOR_BLUE="4"
|
||||
COLOR_WHITE="7"
|
||||
|
||||
|
||||
# Format git colors
|
||||
autoload -Uz compinit && compinit
|
||||
autoload -Uz add-zsh-hook
|
||||
autoload -Uz vcs_info
|
||||
add-zsh-hook precmd vcs_info
|
||||
|
||||
|
||||
zstyle ':vcs_info:*' enable git
|
||||
zstyle ':vcs_info:*' formats " %F{cyan}%c%u(%b)%f"
|
||||
zstyle ':vcs_info:*' actionformats " %F{cyan}%c%u(%b)%f %a"
|
||||
zstyle ':vcs_info:*' stagedstr "%F{$COLOR_RED}"
|
||||
zstyle ':vcs_info:*' unstagedstr "%F{$COLOR_RED}"
|
||||
zstyle ':vcs_info:*' check-for-changes true
|
||||
|
||||
|
||||
zstyle ':vcs_info:git*+set-message:*' hooks git-untracked
|
||||
+vi-git-untracked() {
|
||||
if git --no-optional-locks status --porcelain 2> /dev/null | grep -q "^??"; then
|
||||
|
@ -58,7 +62,7 @@
|
|||
hook_com[staged]+="%F{$COLOR_GREEN}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# Format prompt
|
||||
setopt PROMPT_SUBST
|
||||
PROMPT='%F{'$COLOR_GREEN'}'$(echo "$SESSION_TYPE")'''
|
||||
|
@ -77,11 +81,28 @@
|
|||
setopt autocd # Automatically cd into typed directory.
|
||||
stty stop undef # Disable ctrl-s to freeze terminal.
|
||||
setopt interactive_comments
|
||||
|
||||
|
||||
# General opts
|
||||
HISTSIZE=10000000
|
||||
SAVEHIST=10000000
|
||||
setopt appendhistory
|
||||
|
||||
# Change cursor shape for different vi modes.
|
||||
function zle-keymap-select () {
|
||||
case $KEYMAP in
|
||||
vicmd) echo -ne '\e[1 q';; # block
|
||||
viins|main) echo -ne '\e[5 q';; # beam
|
||||
esac
|
||||
}
|
||||
zle -N zle-keymap-select
|
||||
zle-line-init() {
|
||||
zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere)
|
||||
echo -ne "\e[5 q"
|
||||
}
|
||||
zle -N zle-line-init
|
||||
echo -ne '\e[5 q' # Use beam shape cursor on startup.
|
||||
preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt.
|
||||
|
||||
'';
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
home.file.".config/autostart/feh-wallpaper-changer.desktop" = {
|
||||
recursive = true;
|
||||
text = ''
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Exec=feh-wallpaper-changer
|
||||
X-GNOME-Autostart-enabled=true
|
||||
NoDisplay=false
|
||||
Hidden=false
|
||||
Name[en_GB]=feh-wallpaper-changer
|
||||
Comment[en_GB]=Periodically changes the wallpaper using feh
|
||||
X-GNOME-Autostart-Delay=5
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
{ pkgs, ... }: {
|
||||
home.file.".config/cinnamon-monitors".text = ''
|
||||
<monitors version="2">
|
||||
<configuration>
|
||||
${builtins.concatStringsSep "\n" (map (monitor: ''
|
||||
<logicalmonitor>
|
||||
<x>${toString monitor.x}</x>
|
||||
<y>${toString monitor.y}</y>
|
||||
<scale>${toString monitor.scale}</scale>
|
||||
${if monitor.primary then "<primary>yes</primary>" else ""}
|
||||
<monitor>
|
||||
<monitorspec>
|
||||
<connector>${toString monitor.name}</connector>
|
||||
<vendor>${toString monitor.vendor}</vendor>
|
||||
<product>${toString monitor.product}</product>
|
||||
<serial>${toString monitor.serial}</serial>
|
||||
</monitorspec>
|
||||
<mode>
|
||||
<width>${toString monitor.width}</width>
|
||||
<height>${toString monitor.height}</height>
|
||||
<rate>${toString monitor.refreshRate}</rate>
|
||||
</mode>
|
||||
</monitor>
|
||||
</logicalmonitor>
|
||||
''))}
|
||||
</configuration>
|
||||
</monitors>
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
imports = [
|
||||
../common
|
||||
../common/x11
|
||||
./autostart.nix
|
||||
# This doesn't seem to work in Cinnamon
|
||||
#./cinnamon-monitors.nix
|
||||
];
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
||||
colors = with config.colorScheme.palette; {
|
||||
bright = {
|
||||
black = "0x${base03}";
|
||||
blue = "0x${base04}";
|
||||
cyan = "0x${base0F}";
|
||||
green = "0x${base01}";
|
||||
magenta = "0x${base06}";
|
||||
red = "0x${base09}";
|
||||
white = "0x${base07}";
|
||||
yellow = "0x${base02}";
|
||||
};
|
||||
cursor = {
|
||||
cursor = "0x${base05}";
|
||||
text = "0x${base00}";
|
||||
};
|
||||
normal = {
|
||||
black = "0x${base00}";
|
||||
blue = "0x${base0D}";
|
||||
cyan = "0x${base0C}";
|
||||
green = "0x${base0B}";
|
||||
magenta = "0x${base0E}";
|
||||
red = "0x${base08}";
|
||||
white = "0x${base05}";
|
||||
yellow = "0x${base0A}";
|
||||
};
|
||||
primary = {
|
||||
background = "0x${base00}";
|
||||
foreground = "0x${base05}";
|
||||
};
|
||||
};
|
||||
|
||||
window = {
|
||||
padding = {
|
||||
x = 5;
|
||||
y = 5;
|
||||
};
|
||||
blur = true;
|
||||
opacity = 0.9;
|
||||
};
|
||||
|
||||
shell.program = "${pkgs.zsh}/bin/zsh";
|
||||
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
{pkgs, ...}: {
|
||||
imports = [
|
||||
./firefox.nix
|
||||
./alacritty.nix
|
||||
./zotero.nix
|
||||
./fontconfig.nix
|
||||
];
|
||||
|
||||
# Global packages for desktop environments
|
||||
home.packages = [
|
||||
pkgs.alacritty
|
||||
pkgs.libnotify
|
||||
pkgs.zathura
|
||||
pkgs.xfce.thunar
|
||||
pkgs.kcolorchooser
|
||||
pkgs.zotero
|
||||
pkgs.transmission
|
||||
pkgs.mpv
|
||||
pkgs.gnome.simple-scan
|
||||
pkgs.pandoc
|
||||
pkgs.texlive.combined.scheme-small
|
||||
pkgs.libreoffice-fresh
|
||||
pkgs.hunspell
|
||||
pkgs.hunspellDicts.en-gb-large
|
||||
pkgs.hunspellDicts.en-gb-large
|
||||
pkgs.hunspellDicts.en_US
|
||||
pkgs.set_wm_class
|
||||
pkgs.xorg.xkill
|
||||
pkgs.krita
|
||||
pkgs.R
|
||||
pkgs.gimp
|
||||
pkgs.gajim
|
||||
];
|
||||
}
|
|
@ -0,0 +1,101 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
configVars,
|
||||
...
|
||||
}: let
|
||||
user = config.home.username;
|
||||
jellyfinIp = configVars.networking.addresses.jellyfin.ip;
|
||||
jellyfinPort = configVars.networking.addresses.jellyfin.port;
|
||||
bitcoinNodeIp = configVars.networking.addresses.bitcoin-node.ip;
|
||||
mempoolPort = configVars.networking.addresses.bitcoin-node.services.mempool.port;
|
||||
in {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
profiles.${user} = {
|
||||
search = {
|
||||
force = true;
|
||||
default = "Searx";
|
||||
order = ["Searx" "DuckDuckGo"];
|
||||
engines = {
|
||||
"Nix Packages" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{
|
||||
name = "type";
|
||||
value = "packages";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = ["@np"];
|
||||
};
|
||||
"NixOS Wiki" = {
|
||||
urls = [{template = "https://nixos.wiki/index.php?search={searchTerms}";}];
|
||||
iconUpdateURL = "https://nixos.wiki/favicon.png";
|
||||
updateInterval = 24 * 60 * 60 * 1000; # every day
|
||||
definedAliases = ["@nw"];
|
||||
};
|
||||
"Searx" = {
|
||||
urls = [{template = "http://10.0.10.35:8855/?q={searchTerms}";}];
|
||||
iconUpdateURL = "https://docs.searxng.org/_static/searxng-wordmark.svg";
|
||||
updateInterval = 24 * 60 * 60 * 1000; # every day
|
||||
definedAliases = ["@searx"];
|
||||
};
|
||||
"Bing".metaData.hidden = true;
|
||||
"Google".metaData.alias = "@g"; # builtin engines only support specifying one additional alias
|
||||
};
|
||||
};
|
||||
|
||||
bookmarks = [
|
||||
{
|
||||
name = "toolbar";
|
||||
toolbar = true;
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Jellyfin";
|
||||
url = "http://${jellyfinIp}:${jellyfinPort}";
|
||||
}
|
||||
{
|
||||
name = "Mempool";
|
||||
url = "http://${bitcoinNodeIp}:${toString mempoolPort}";
|
||||
}
|
||||
{
|
||||
name = "Nixos Package Search";
|
||||
url = "https://search.nixos.org/packages";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
settings = {
|
||||
"dom.security.https_only_mode" = true;
|
||||
"browser.download.panel.shown" = true;
|
||||
"identity.fxaccounts.enabled" = false;
|
||||
"signon.rememberSignons" = false;
|
||||
"browser.compactmode.show" = true;
|
||||
"browser.startup.homepage" = "http://10.0.10.35:8855";
|
||||
"browser.search.defaultenginename" = "Searx";
|
||||
"browser.search.order.1" = "Searx";
|
||||
};
|
||||
|
||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
ublock-origin
|
||||
return-youtube-dislikes
|
||||
bitwarden
|
||||
sponsorblock
|
||||
darkreader
|
||||
vimium
|
||||
privacy-badger
|
||||
zotero-connector
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
nerdfonts
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
hack-font
|
||||
liberation_ttf
|
||||
libertine
|
||||
font-awesome
|
||||
];
|
||||
|
||||
fonts = {
|
||||
fontconfig = {
|
||||
enable = true;
|
||||
defaultFonts = {
|
||||
serif = [ "NotoSans Nerd Font" ];
|
||||
sansSerif = [ "Linux Biolinum O" ];
|
||||
monospace = [ "Hack Nerd Font" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
{pkgs, ...}: {
|
||||
# Prevent error when enabling gtk https://github.com/nix-community/home-manager/issues/3113
|
||||
# error: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name ca.desrt.dconf was not provided by any .service files
|
||||
home.packages = [
|
||||
pkgs.dconf
|
||||
];
|
||||
|
||||
# Get details about theme package
|
||||
#cd $(nix build nixpkgs#kanagawa-gtk-theme --print-out-paths --no-link) && nix run nixpkgs#eza -- --tree --level 4
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
name = "Kanagawa-B";
|
||||
package = pkgs.kanagawa-gtk-theme;
|
||||
};
|
||||
iconTheme = {
|
||||
package = pkgs.gnome.adwaita-icon-theme;
|
||||
name = "Adwaita";
|
||||
};
|
||||
|
||||
gtk3.extraConfig = {
|
||||
Settings = ''
|
||||
gtk-application-prefer-dark-theme=1
|
||||
'';
|
||||
};
|
||||
|
||||
gtk4.extraConfig = {
|
||||
Settings = ''
|
||||
gtk-application-prefer-dark-theme=1
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
#gtk.theme.package = pkgs.kanagawa-gtk-theme;
|
||||
|
||||
# gtk.cursorTheme = {
|
||||
# name = "Vimix-Cursors";
|
||||
# package = pkgs.vimix-cursor-theme;
|
||||
# };
|
||||
|
||||
# gtk.theme.name = "Kanagawa-B";
|
||||
|
||||
# gtk.iconTheme.package = pkgs.kanagawa-icon-theme;
|
||||
# gtk.iconTheme.name = "Kanagawa";
|
||||
|
||||
qt.enable = true;
|
||||
qt.platformTheme.name = "gtk";
|
||||
qt.style.name = "adwaita-dark";
|
||||
qt.style.package = pkgs.adwaita-qt;
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./mako.nix
|
||||
./waybar.nix
|
||||
./swww-wallpaper-changer.nix
|
||||
];
|
||||
|
||||
home.packages = [
|
||||
pkgs.wofi
|
||||
pkgs.wl-clipboard
|
||||
pkgs.pyprland
|
||||
];
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
services.mako = {
|
||||
enable = true;
|
||||
backgroundColor = "#${config.colorScheme.colors.base00}";
|
||||
borderColor = "#${config.colorScheme.colors.base0D}";
|
||||
borderRadius = 5;
|
||||
borderSize = 2;
|
||||
textColor = "#${config.colorScheme.colors.base05}";
|
||||
layer = "overlay";
|
||||
};
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
(writeShellScriptBin "swww-wallpaper-changer" ''
|
||||
export WAYLAND_DISPLAY="wayland-1"
|
||||
wallpaper_dir="$HOME/.local/share/bg/"
|
||||
[ -d "$wallpaper_dir" ] || mkdir -p "$wallpaper_dir"
|
||||
${swww}/bin/swww-daemon &
|
||||
|
||||
while true; do
|
||||
find "$wallpaper_dir" -type f -follow \( -iname \*.jpg -o -iname \*.png -o -iname \*.gif -o -iname \*.bmp \) | shuf | while read -r file; do
|
||||
${swww}/bin/swww img "$file" --transition-step 10 --transition-fps 60
|
||||
[ $? != 0 ] && echo "swww failed, exiting" && exit 1
|
||||
sleep 600
|
||||
done
|
||||
done
|
||||
'')
|
||||
];
|
||||
}
|
|
@ -0,0 +1,230 @@
|
|||
{ lib
|
||||
, config
|
||||
, pkgs
|
||||
, ...
|
||||
}: {
|
||||
# Let it try to start a few more times
|
||||
systemd.user.services.waybar = {
|
||||
Unit.StartLimitBurst = 30;
|
||||
};
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
|
||||
settings = {
|
||||
primary = {
|
||||
mode = "dock";
|
||||
height = 30;
|
||||
margin = "6";
|
||||
spacing = 5;
|
||||
modules-left = [
|
||||
"custom/menu"
|
||||
"hyprland/workspaces"
|
||||
"hyprland/window"
|
||||
];
|
||||
|
||||
modules-center = [
|
||||
"clock"
|
||||
];
|
||||
|
||||
modules-right = [
|
||||
"cpu"
|
||||
"memory"
|
||||
"network"
|
||||
"pulseaudio"
|
||||
"battery"
|
||||
"tray"
|
||||
"custom/exit"
|
||||
"custom/hostname"
|
||||
"custom/ip"
|
||||
];
|
||||
|
||||
"hyprland/window" = {
|
||||
"format" = "{}";
|
||||
"rewrite" = {
|
||||
"(.*) — Mozilla Firefox" = "$1";
|
||||
};
|
||||
"separate-outputs" = true;
|
||||
};
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
"format" = "{name}";
|
||||
"on-click" = "activate";
|
||||
"format-icons" = {
|
||||
"urgent" = "";
|
||||
"active" = "";
|
||||
"default" = "";
|
||||
};
|
||||
};
|
||||
|
||||
"clock" = {
|
||||
"format" = "<span> </span>{:%y-%m-%d %H:%M:%S}";
|
||||
"tooltip-format" = "<big>{:%B %Y}</big>\n<tt><small>{calendar}</small></tt>";
|
||||
"on-click" = "calendar";
|
||||
};
|
||||
|
||||
"cpu" = {
|
||||
"interval" = 10;
|
||||
"format" = " {}%";
|
||||
"max-length" = 10;
|
||||
"on-click" = "";
|
||||
};
|
||||
|
||||
"memory" = {
|
||||
"interval" = 30;
|
||||
"format" = " {}%";
|
||||
"format-alt" = " {used:0.1f}G";
|
||||
"max-length" = 10;
|
||||
};
|
||||
|
||||
"network" = {
|
||||
"format-wifi" = "直 {signalStrength}%";
|
||||
"format-ethernet" = " wired ({ipaddr})";
|
||||
"format-disconnected" = "睊";
|
||||
};
|
||||
|
||||
"battery" = {
|
||||
"bat" = "BAT0";
|
||||
"adapter" = "ADP0";
|
||||
"interval" = 60;
|
||||
"states" = {
|
||||
"warning" = 30;
|
||||
"critical" = 15;
|
||||
};
|
||||
"max-length" = 20;
|
||||
"format" = "{icon} {capacity}%";
|
||||
"format-warning" = "{icon} {capacity}%";
|
||||
"format-critical" = "{icon} {capacity}%";
|
||||
"format-charging" = "<span font-family='Font Awesome 6 Free'></span> {capacity}%";
|
||||
"format-plugged" = " {capacity}%";
|
||||
"format-alt" = "{icon} {time}";
|
||||
"format-full" = " {capacity}%";
|
||||
"format-icons" = [ " " " " " " " " " " ];
|
||||
};
|
||||
|
||||
"tray" = {
|
||||
"spacing" = 10;
|
||||
};
|
||||
|
||||
"custom/menu" = {
|
||||
"format" = " Nixos";
|
||||
"on-click" = "wofi --show drun";
|
||||
};
|
||||
|
||||
"custom/hostname" = {
|
||||
"exec" = "echo $USER@$(hostname)";
|
||||
"on-click" = "$TERMINAL";
|
||||
};
|
||||
|
||||
"custom/exit" = {
|
||||
"format" = "";
|
||||
"on-click" = "wlogout";
|
||||
};
|
||||
|
||||
"pulseaudio" = {
|
||||
"format" = "{icon} {volume}%";
|
||||
"format-muted" = " 0%";
|
||||
"format-icons" = {
|
||||
"headphone" = "";
|
||||
"headset" = "";
|
||||
"portable" = "";
|
||||
"default" = [ "" "" "" ];
|
||||
};
|
||||
"on-click" = "pypr toggle volume";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
style = ''
|
||||
* {
|
||||
font-family: JetBrainsMono Nerd Font;
|
||||
font-size: 12pt;
|
||||
padding: 0 8px;
|
||||
}
|
||||
.modules-right {
|
||||
margin-right: -15px;
|
||||
}
|
||||
.modules-left {
|
||||
margin-left: -15px;
|
||||
}
|
||||
window#waybar {
|
||||
color: white;
|
||||
background-color: #002635;
|
||||
opacity: 0.95;
|
||||
padding: 0;
|
||||
border-radius: 10px;
|
||||
}
|
||||
window#waybar.bottom {
|
||||
opacity: 0.90;
|
||||
background-color: #002635;
|
||||
border: 2px solid #14747e;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 5px;
|
||||
color: #7984A4;
|
||||
background-color: transparent;
|
||||
box-shadow: inset 0 -3px transparent;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
#workspaces button.hidden {
|
||||
background-color: #002635;
|
||||
color: #869696;
|
||||
}
|
||||
#workspaces button.focused {
|
||||
color: #bf616a;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
color: #6a92d7;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: #eb4d4b;
|
||||
}
|
||||
|
||||
#clock {
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
#tray {
|
||||
color: #a1a19a;
|
||||
}
|
||||
|
||||
#custom-hostname {
|
||||
background-color: white;
|
||||
color: #002635;
|
||||
padding-left: 15px;
|
||||
padding-right: 18px;
|
||||
margin-right: 0;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
|
||||
#custom-menu {
|
||||
font-size: 16pt;
|
||||
background-color: white;
|
||||
color: #002635;
|
||||
padding-left: 15px;
|
||||
padding-right: 22px;
|
||||
margin-left: 0;
|
||||
margin-right: 10px;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./scripts/feh-wallpaper-changer.nix
|
||||
];
|
||||
|
||||
home.packages = [
|
||||
pkgs.flameshot
|
||||
pkgs.st
|
||||
pkgs.xclip
|
||||
pkgs.feh
|
||||
];
|
||||
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
package = pkgs.brave;
|
||||
};
|
||||
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
(writeShellScriptBin "feh-wallpaper-changer" ''
|
||||
|
||||
# Kill previous instance if exists
|
||||
script_name=''${BASH_SOURCE[0]}
|
||||
for pid in $(pidof -x $script_name); do
|
||||
if [ $pid != $$ ]; then
|
||||
kill -9 $pid
|
||||
fi
|
||||
done
|
||||
|
||||
wallpaper_dir="$HOME/.local/share/bg/"
|
||||
if [ ! -d "$wallpaper_dir" ]; then
|
||||
echo "No wallpapers in $wallpaper_dir, cloning from remote"
|
||||
mkdir -p "$wallpaper_dir"
|
||||
git clone https://git.bitlab21.com/sam/minimalistic-wallpaper-collection.git "$wallpaper_dir/minimalistic-wallpaper-collection"
|
||||
[ $? != 0 ] && echo "cloning from gitea failed, exiting" && exit 1
|
||||
fi
|
||||
pics_exist=$(find "$wallpaper_dir" -type f -follow \( -iname \*.jpg -o -iname \*.png -o -iname \*.gif -o -iname \*.bmp \))
|
||||
if [ -z "$pics_exist" ]; then
|
||||
git clone https://git.bitlab21.com/sam/minimalistic-wallpaper-collection.git "$wallpaper_dir/minimalistic-wallpaper-collection"
|
||||
[ $? != 0 ] && echo "cloning from gitea failed, exiting" && exit 1
|
||||
fi
|
||||
|
||||
while true; do
|
||||
find "$wallpaper_dir" -type f -follow \( -iname \*.jpg -o -iname \*.png -o -iname \*.gif -o -iname \*.bmp \) | shuf | while read -r file; do
|
||||
${feh}/bin/feh --bg-fill "$file"
|
||||
[ $? != 0 ] && echo "feh failed, exiting" && exit 1
|
||||
sleep 600
|
||||
done
|
||||
done
|
||||
'')
|
||||
];
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
{ pkgs, config, ... }:
|
||||
let
|
||||
user = config.home.username;
|
||||
in
|
||||
{
|
||||
home.packages = [
|
||||
pkgs.zotero
|
||||
];
|
||||
|
||||
home.file.".zotero/zotero/profiles.ini".text = ''
|
||||
[General]
|
||||
StartWithLastProfile=1
|
||||
|
||||
[Profile0]
|
||||
Name=default
|
||||
IsRelative=1
|
||||
Path=zprofile.default
|
||||
Default=1
|
||||
'';
|
||||
|
||||
home.file.".zotero/zotero/zprofile.default/user.js".text = ''
|
||||
user_pref("extensions.zotero.dataDir", "/home/${user}/.local/share/Zotero");
|
||||
user_pref("extensions.zotero.firstRun.skipFirefoxProfileAccessCheck", true);
|
||||
user_pref("extensions.zotero.firstRun2", false);
|
||||
user_pref("extensions.zotero.useDataDir", true);
|
||||
user_pref("intl.accept_languages", "en-GB, en");
|
||||
user_pref("extensions.zotero.sync.server.username", "samual.shop@proton.me");
|
||||
user_pref("extensions.zotero.sync.fulltext.enabled", false);
|
||||
user_pref("extensions.zotero.sync.storage.enabled", false);
|
||||
user_pref("extensions.zotero.sync.storage.groups.enabled", false);
|
||||
'';
|
||||
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
|
||||
imports = [
|
||||
../common
|
||||
../common/x11
|
||||
./xinitrc.nix
|
||||
./sxhkdrc.nix
|
||||
./picom.nix
|
||||
./dunst.nix
|
||||
./music_player.nix
|
||||
|
||||
# Status bar scripts
|
||||
./scripts/sb-cpu-pct.nix
|
||||
./scripts/sb-mem-pct.nix
|
||||
./scripts/sb-volume.nix
|
||||
./scripts/sb-network-status.nix
|
||||
./scripts/sb-updates.nix
|
||||
./scripts/sb-battery.nix
|
||||
|
||||
# Notification scripts
|
||||
./scripts/dunstify-volume-notification.nix
|
||||
./scripts/dunstify-battery-notification.nix
|
||||
|
||||
# Helper scripts
|
||||
./scripts/emoji-picker.nix
|
||||
./scripts/clipboard-save.nix
|
||||
./scripts/clipboard-recall.nix
|
||||
./scripts/get-focused-monitor.nix
|
||||
./scripts/git-commit-ai.nix
|
||||
./scripts/aichat-wrapper.nix
|
||||
./scripts/dmenu-wifi.nix
|
||||
./scripts/battery-status.nix
|
||||
./scripts/dmenu-set-wm-class.nix
|
||||
./scripts/key-remaps.nix
|
||||
];
|
||||
|
||||
home.packages = [
|
||||
pkgs.dwmblocks
|
||||
pkgs.dmenu
|
||||
pkgs.dunst
|
||||
pkgs.picom
|
||||
pkgs.sxhkd
|
||||
pkgs.nsxiv
|
||||
pkgs.unstable.aichat
|
||||
pkgs.toipe
|
||||
];
|
||||
}
|
|
@ -0,0 +1,179 @@
|
|||
{ pkgs, config, ... }: {
|
||||
home.packages = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
libnotify; # required by dunst
|
||||
};
|
||||
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
iconTheme = {
|
||||
name = "Adwaita";
|
||||
package = pkgs.gnome.adwaita-icon-theme;
|
||||
size = "16x16";
|
||||
};
|
||||
settings = {
|
||||
global = {
|
||||
# Allow a small subset of html markup:<b></b>, <i></i>, <s></s>, and <u></u>.
|
||||
# For a complete reference see
|
||||
# <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>.
|
||||
# If markup is not allowed, those tags will be stripped out of the message.
|
||||
markup = "yes";
|
||||
|
||||
# The format of the message. Possible variables are:
|
||||
# %a appname
|
||||
# %s summary
|
||||
# %b body
|
||||
# %i iconname (including its path)
|
||||
# %I iconname (without its path)
|
||||
# %p progress value if set ([ 0%] to [100%]) or nothing
|
||||
# Markup is allowed
|
||||
#format = ''%I %s %p\n%b'';
|
||||
format = ''<b>%s:</b>\n%b\n\n%a '';
|
||||
|
||||
font = "monospace";
|
||||
|
||||
# Options are "left", "center", and "right".
|
||||
alignment = "left";
|
||||
|
||||
# Sort messages by urgency.
|
||||
sort = "yes";
|
||||
|
||||
# Show how many messages are currently hidden (because of geometry).
|
||||
indicate_hidden = "yes";
|
||||
|
||||
# Show age of message if message is older than show_age_threshold
|
||||
# seconds.
|
||||
# Set to -1 to disable.
|
||||
show_age_threshold = 60;
|
||||
|
||||
# Split notifications into multiple lines if they don't fit into
|
||||
# geometry.
|
||||
word_wrap = "no";
|
||||
|
||||
# Ignore newlines '\n' in notifications.
|
||||
ignore_newline = "no";
|
||||
|
||||
# The geometry of the window:
|
||||
# [{width}]x{height}[+/-{x}+/-{y}]
|
||||
# The geometry of the message window.
|
||||
# The height is measured in number of notifications everything else
|
||||
# in pixels. If the width is omitted but the height is given
|
||||
# ("-geometry x2"), the message window expands over the whole screen
|
||||
# (dmenu-like). If width is 0, the window expands to the longest
|
||||
# message displayed. A positive x is measured from the left, a
|
||||
# negative from the right side of the screen. Y is measured from
|
||||
# the top and down respectevly.
|
||||
# The width can be negative. In this case the actual width is the
|
||||
# screen width minus the width defined in within the geometry option.
|
||||
# geometry = "400x0-15+60";
|
||||
|
||||
# Shrink window if it's smaller than the width. Will be ignored if
|
||||
# width is 0.
|
||||
shrink = "yes";
|
||||
|
||||
# Display notification on focused monitor. Possible modes are:
|
||||
# mouse: follow mouse pointer
|
||||
# keyboard: follow window with keyboard focus
|
||||
# none: don't follow anything
|
||||
#
|
||||
# "keyboard" needs a windowmanager that exports the _NET_ACTIVE_WINDOW property.
|
||||
# This should be the case for almost all modern windowmanagers.
|
||||
#
|
||||
# If this option is set to mouse or keyboard, the monitor option will be ignored.
|
||||
follow = "none";
|
||||
|
||||
# Should a notification popped up from history be sticky or timeout
|
||||
# as if it would normally do.
|
||||
sticky_history = "yes";
|
||||
|
||||
# Maximum amount of notifications kept in history
|
||||
history_length = 20;
|
||||
|
||||
# Display indicators for URLs (U) and actions (A).
|
||||
show_indicators = "yes";
|
||||
|
||||
# The height of a single line. If the height is smaller than the
|
||||
# font height, it will get raised to the font height.
|
||||
# This adds empty space above and under the text.
|
||||
line_height = 0;
|
||||
|
||||
# Draw a line of "separator_height" pixel height between two
|
||||
# notifications. Set to 0 to disable.
|
||||
separator_height = 0;
|
||||
|
||||
# Gap between messages - requires compositor
|
||||
gap_size = 4;
|
||||
|
||||
# Padding between text and separator.
|
||||
padding = 10;
|
||||
|
||||
# Horizontal padding.
|
||||
horizontal_padding = 10;
|
||||
|
||||
# The transparency of the window. Range: [0; 100].
|
||||
# This option will only work if a compositing windowmanager is
|
||||
# present (e.g. xcompmgr, compiz, etc.).
|
||||
transparency = 0;
|
||||
|
||||
# Define a color for the separator.
|
||||
# possible values are:
|
||||
# * auto: dunst tries to find a color fitting to the background;
|
||||
# * foreground: use the same color as the foreground;
|
||||
# * frame: use the same color as the frame;
|
||||
# * anything else will be interpreted as a X color.
|
||||
separator_color = "frame";
|
||||
|
||||
# Align icons left/right/off
|
||||
icon_position = "left";
|
||||
|
||||
width = 400;
|
||||
height = 300;
|
||||
offset = "15x60";
|
||||
origin = "top-right";
|
||||
|
||||
frame_color = "#${config.colorScheme.colors.base0B}";
|
||||
frame_width = 2;
|
||||
|
||||
# Browser for opening urls in context menu.
|
||||
browser = "firefox";
|
||||
|
||||
# Shortcuts are specified as [modifier+][modifier+]...key
|
||||
# Available modifiers are "ctrl", "mod1" (the alt-key), "mod2",
|
||||
# "mod3" and "mod4" (windows-key).
|
||||
# Xev might be helpful to find names for keys.
|
||||
|
||||
# Close notification.
|
||||
close = "ctrl+space";
|
||||
|
||||
# Close all notifications.
|
||||
close_all = "ctrl+shift+space";
|
||||
|
||||
# Redisplay last message(s).
|
||||
history = "ctrl+shift+h";
|
||||
|
||||
# Context menu.
|
||||
context = "ctrl+shift+c";
|
||||
|
||||
};
|
||||
|
||||
urgency_low = {
|
||||
background = "#${config.colorScheme.colors.base03}";
|
||||
foreground = "#${config.colorScheme.colors.base05}";
|
||||
timeout = 15;
|
||||
};
|
||||
|
||||
urgency_normal = {
|
||||
background = "#${config.colorScheme.colors.base03}";
|
||||
foreground = "#${config.colorScheme.colors.base05}";
|
||||
timeout = 15;
|
||||
};
|
||||
|
||||
urgency_critical = {
|
||||
background = "#${config.colorScheme.colors.base08}";
|
||||
foreground = "#${config.colorScheme.colors.base05}";
|
||||
frame_color = "#${config.colorScheme.colors.base05}";
|
||||
timeout = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
home.file."mus/music_data".source = config.lib.file.mkOutOfStoreSymlink /media/media/music/music_data;
|
||||
|
||||
home.packages = [
|
||||
pkgs.ffmpeg
|
||||
pkgs.nsxiv
|
||||
pkgs.kunst
|
||||
pkgs.mpc-cli
|
||||
pkgs.jq
|
||||
pkgs.imagemagick
|
||||
];
|
||||
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
package = pkgs.mpd;
|
||||
extraConfig = ''
|
||||
|
||||
music_directory "~/mus/music_data"
|
||||
playlist_directory "~/.local/share/mpd/playlists"
|
||||
|
||||
log_file "~/.local/share/mpd/log"
|
||||
db_file "~/.local/share/mpd/database"
|
||||
pid_file "~/.local/share/mpd/pid"
|
||||
state_file "~/.local/share/mpd/state"
|
||||
sticker_file "~/.local/share/mpd/sticker.sql"
|
||||
|
||||
auto_update "yes"
|
||||
|
||||
audio_output {
|
||||
type "pipewire"
|
||||
name "PipeWire Sound Server"
|
||||
}
|
||||
|
||||
audio_output {
|
||||
type "fifo"
|
||||
name "Visualizer feed"
|
||||
path "/tmp/mpd.fifo"
|
||||
format "44100:16:2"
|
||||
}
|
||||
|
||||
'';
|
||||
musicDirectory = "~/mus/music_data";
|
||||
};
|
||||
|
||||
programs.ncmpcpp = {
|
||||
enable = true;
|
||||
package = (pkgs.ncmpcpp.override { visualizerSupport = true; });
|
||||
mpdMusicDir = "~/mus/music_data";
|
||||
settings = {
|
||||
mpd_host = "127.0.0.1";
|
||||
mpd_port = "6600";
|
||||
visualizer_data_source = "/tmp/mpd.fifo";
|
||||
visualizer_output_name = "Visualizer Feed";
|
||||
visualizer_in_stereo = "yes";
|
||||
visualizer_type = "spectrum";
|
||||
visualizer_fps = "60";
|
||||
visualizer_autoscale = "no";
|
||||
visualizer_look = "●▮";
|
||||
visualizer_color = "169, 170, 169, 135, 134, 133, 129, 128, 127, 126, 125, 124";
|
||||
visualizer_spectrum_smooth_look = "yes";
|
||||
visualizer_spectrum_dft_size = "3";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
home.file.".config/picom/picom.conf" = {
|
||||
recursive = true;
|
||||
text = ''
|
||||
vsync = true;
|
||||
backend = "xrender";
|
||||
shadow = true;
|
||||
shadow-radius = 10;
|
||||
shadow-offset-x = -5;
|
||||
shadow-offset-y = -5;
|
||||
fading = true;
|
||||
fade-in-step = 0.2;
|
||||
fade-out-step = 0.2;
|
||||
fade-delta = 50;
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [
|
||||
(pkgs.writeShellScriptBin "aichat-wrapper" ''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
model=$(${pkgs.aichat}/bin/aichat --list-models | ${pkgs.fzf}/bin/fzf)
|
||||
|
||||
${pkgs.aichat}/bin/aichat --model "$model"
|
||||
'')
|
||||
];
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [
|
||||
(pkgs.writeShellScriptBin "battery-status" ''
|
||||
|
||||
# Get the current power consumption of the laptop battery
|
||||
power=$(cat /sys/class/power_supply/BAT0/power_now)
|
||||
power_watts=$(${pkgs.bc}/bin/bc <<< "scale=3; $power / 1000000")
|
||||
|
||||
# Get the current battery charge capacity
|
||||
energy=$(cat /sys/class/power_supply/BAT0/energy_now)
|
||||
|
||||
# Get the current battery status (charging or discharging)
|
||||
battery_status=$(cat /sys/class/power_supply/BAT0/status)
|
||||
|
||||
# Calculate the time remaining until the battery is empty or full
|
||||
if [ "$battery_status" == "Charging" ]; then
|
||||
# Calculate the time remaining until the battery is full
|
||||
hours=$(${pkgs.bc}/bin/bc <<< "scale=2; $power / $energy")
|
||||
hours_int=$(${pkgs.bc}/bin/bc <<< "scale=0; $hours / 1")
|
||||
minutes=$(${pkgs.bc}/bin/bc <<< "scale=0; 60 * ($hours - $hours_int)/1")
|
||||
|
||||
if [ "$hours_int" -gt "0" ]; then
|
||||
# Show hours and minutes if time remaining is greater than or equal to 1 hour
|
||||
echo "Full in: $hours_int hours $minutes minutes"
|
||||
else
|
||||
# Show minutes if time remaining is less than 1 hour
|
||||
echo "Full in: $minutes minutes"
|
||||
fi
|
||||
|
||||
elif [ "$battery_status" == "Discharging" ]; then
|
||||
# Calculate the time remaining until the battery is empty
|
||||
hours=$(${pkgs.bc}/bin/bc <<< "scale=2; $energy / $power")
|
||||
hours_int=$(${pkgs.bc}/bin/bc <<< "scale=0; $hours / 1")
|
||||
minutes=$(${pkgs.bc}/bin/bc <<< "scale=0; 60 * ($hours - $hours_int)/1")
|
||||
|
||||
if [ "$hours_int" -gt "0" ]; then
|
||||
# Show hours and minutes if time remaining is greater than or equal to 1 hour
|
||||
echo "Empty in: $hours_int hours $minutes minutes"
|
||||
else
|
||||
# Show minutes if time remaining is less than 1 hour
|
||||
echo "Empty in: $minutes minutes"
|
||||
fi
|
||||
|
||||
elif [ "$battery_status" == "Full" ]; then
|
||||
echo "Battery full"
|
||||
elif [ "$battery_status" == "Not charging" ]; then
|
||||
echo "Battery full - not charging"
|
||||
fi
|
||||
|
||||
echo "Power consumption: $power_watts W"
|
||||
'')
|
||||
];
|
||||
}
|
|
@ -0,0 +1,87 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
(writeShellScriptBin "clipboard-text-recall" ''
|
||||
# Function to convert seconds to days, hours, minutes or seconds
|
||||
clipboard_dir="/tmp/clipboard/text/*"
|
||||
function format_time() {
|
||||
local diff=$1
|
||||
|
||||
if ((diff<60)); then
|
||||
echo "''${diff} seconds"
|
||||
elif ((diff<3600)); then
|
||||
echo "''$((diff/60)) minutes"
|
||||
elif ((diff<86400)); then
|
||||
echo "''$((diff/3600)) hours"
|
||||
else
|
||||
echo "''$((diff/86400)) days"
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to get file info and sort it by modification time in reverse order
|
||||
function get_files_info() {
|
||||
now=$(date +%s)
|
||||
|
||||
# Sort files by modification time before the for loop
|
||||
sorted_files=( $(ls -t $clipboard_dir) )
|
||||
|
||||
for file in "''${sorted_files[@]}"; do
|
||||
mtime=$(stat -c %Y "$file")
|
||||
diff=$((now-mtime))
|
||||
|
||||
# Get the number of lines in the file
|
||||
num_lines=$(wc -l <"$file")
|
||||
|
||||
# Get the first non-empty line of the file and truncate it to 40 characters
|
||||
first_line=$(grep . "$file" | head -n 1 | cut -c -60)
|
||||
|
||||
echo "$file ($num_lines lines) $(format_time $diff) ago, - '$first_line'..."
|
||||
done
|
||||
}
|
||||
|
||||
# Usage: get_files_info *
|
||||
get_files_info $clipboard_dir | ${fzf}/bin/fzf --ansi \
|
||||
--height 100% \
|
||||
--color "hl:-1:underline,hl+:-1:underline:reverse" \
|
||||
--preview '${bat}/bin/bat --style=numbers --color=always {1}' \
|
||||
--preview-window 'up,70%,+{2}+3/3,~3' \
|
||||
--bind 'enter:become(cat {1} | nohup xclip -loops 0 -i -selection CLIPBOARD >/dev/null 2>&1 && touch {1})'
|
||||
|
||||
exit
|
||||
'')
|
||||
|
||||
(writeShellScriptBin "clipboard-image-recall" ''
|
||||
# Script to view and select and output images in image clipboard dir to clipboard.
|
||||
monitor_name=$(get-focused-monitor)
|
||||
monitor_info=$(xrandr | grep "$monitor_name")
|
||||
|
||||
width=$(echo $monitor_info | grep -oP '\d+x\d+' | cut -dx -f1)
|
||||
height=$(echo $monitor_info | grep -oP '\d+x\d+' | cut -dx -f2)
|
||||
|
||||
scale_width=$(( $width/4 + $width/2 ))
|
||||
scale_height=$(( $height/4 + $height/2 ))
|
||||
|
||||
if [ "$1" == "" ] || [ -f "$1" ]; then
|
||||
notify-send -t 1000 "Clipboard Recall" "Directory not specified or missing."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
filesdir="$(find $1 -type f -printf '%T@ %p\n' | sort -rn | cut -d ' ' -f 2-)"
|
||||
[ "$filesdir" == "" ] && notify-send -t 1000 "Clipboard Recall" "No images in directory" && exit 1
|
||||
output="$(echo "$filesdir" | ${nsxiv}/bin/nsxiv -tioq -g "$scale_width"x"$scale_height" -N nsxiv-float )"
|
||||
num_lines=$( echo "$output" | wc -l)
|
||||
|
||||
if [ "$num_lines" -gt 1 ]; then
|
||||
echo "More than one image selected, outputting list to clipboard as text"
|
||||
echo "$output" | ${xclip}/bin/xclip -i -selection CLIPBOARD && ${libnotify}/bin/notify-send "Image to Clipboard" "Paths:\n$output\ncopied to clipboard" -t 5000
|
||||
elif [ -z "$output" ]; then
|
||||
echo "Nothing selected"
|
||||
exit 1
|
||||
else
|
||||
echo "Outputted to clipboard"
|
||||
${xclip}/bin/xclip -selection clipboard -t image/png -i "$output" && ${libnotify}/bin/notify-send "Image to Clipboard" "$output copied to clipboard" -t 5000
|
||||
fi
|
||||
'')
|
||||
|
||||
];
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
(writeShellScriptBin "clipboard-save" ''
|
||||
# Script to automatically save copied images and text in specified directories
|
||||
while ${clipnotify}/bin/clipnotify
|
||||
do
|
||||
image_location="/tmp/clipboard/images"
|
||||
text_location="/tmp/clipboard/text"
|
||||
[[ -d $image_location ]] || mkdir -p $image_location
|
||||
[[ -d $text_location ]] || mkdir -p $text_location
|
||||
|
||||
case "$(xclip -selection clipboard -t TARGETS -o)" in
|
||||
*image*)
|
||||
echo "$(${xclip}/bin/xclip -selection clipboard -t TARGETS -o)"
|
||||
filename=$(${xclip}/bin/xclip -selection clipboard -t image/png -o | ${openssl}/bin/openssl sha1 | cut -b 49-)
|
||||
file_exists=$(ls $image_location | grep $filename | sed "s/\..*//")
|
||||
[[ $filename != "$file_exists" ]] &&
|
||||
xclip -selection clipboard -t image/png -o > "$image_location/$filename.png" &&
|
||||
notify-send -t 5000 "Image Copied" "$image_location/$filename.png"
|
||||
;;
|
||||
*UTF8_STRING*)
|
||||
echo "$(${xclip}/bin/xclip -selection clipboard -t TARGETS -o)"
|
||||
filename=$(${xclip}/bin/xclip -selection clipboard -t UTF8_STRING -o | ${openssl}/bin/openssl sha1 | cut -b 49-)
|
||||
file_exists=$(ls "$text_location" | grep "$filename" | sed "s/\..*//")
|
||||
echo "$filename" "$file_exists"
|
||||
[[ "$filename" != "$file_exists" ]] &&
|
||||
xclip -selection clipboard -t UTF8_STRING -o > "$text_location/$filename"
|
||||
echo "$text_location/$filename"
|
||||
touch "$text_location/$filename"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
'')
|
||||
];
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
(writeShellScriptBin "dmenu-set-wm-class" ''
|
||||
${libnotify}/bin/notify-send "Set Window Class" "Select window..."
|
||||
winid=$(${xorg.xwininfo}/bin/xwininfo | grep "Window id:" | grep -o "0x[0-9a-fA-F]*")
|
||||
class=$(${xorg.xprop}/bin/xprop -id "$winid" WM_CLASS | grep -o "\".*\"$")
|
||||
new_class=$( echo "" | ${dmenu}/bin/dmenu -p "Selected: $class. Set class name of window:")
|
||||
[ -z "$new_class" ] && ${libnotify}/bin/notify-send "Set Window Class" "Nothing set, exiting" && exit
|
||||
${set_wm_class}/bin/set_wm_class "$winid" "$new_class"
|
||||
'')
|
||||
];
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
(writeShellScriptBin "dmenu-wifi" ''
|
||||
nmcli dev wifi rescan
|
||||
ssid_list=$(nmcli -f in-use,bssid,ssid,mode,chan,freq,rate,signal,bars,security dev wifi)
|
||||
available_connections=$(echo "$ssid_list" | sed '/--.*Infra/d')
|
||||
|
||||
connection=$( echo "$available_connections" | dmenu -l 20)
|
||||
bssid=$(echo "$connection" | sed 's/^.\s*//;s/\s\s.*$//')
|
||||
ssid=$(echo "$connection" | sed 's/^.\s*[0-9;A-Z;:]*\s\s//;s/\s*Infra\s*[0-9].*$//')
|
||||
[[ "$connection" = "" ]] && notify-send -t 5000 "Wifi Connect" "Cancelled" && exit 0
|
||||
[[ $( echo "$connection" | grep "IN-USE" -o) = "IN-USE" ]] && notify-send -t 5000 "Wifi Connect" "Please select valid network" && exit 0
|
||||
[[ -n "$(echo "$connection" | grep '\*')" ]] && notify-send -t 5000 "Wifi Connect" "Already Connected to: $(echo "$ssid")" && exit 0
|
||||
|
||||
notify-send -t 5000 "Network Manager" "Attempting to connect to $ssid..."
|
||||
nmcli connection modify "$ssid" 802-11-wireless.bssid "$bssid"
|
||||
nmcli device wifi connect "$bssid"
|
||||
return_code=$?
|
||||
if [ $return_code == 4 ];
|
||||
then
|
||||
notify-send -t 5000 "Wifi Connect" "Please enter password for '$ssid'..."
|
||||
prompt="Enter Password for '$ssid'"
|
||||
pwd=$(echo "" | dmenu -p "$prompt")
|
||||
nmcli device wifi connect "$bssid" password "$pwd"
|
||||
return_code=$?
|
||||
fi
|
||||
case "$return_code" in
|
||||
0) notify-send -t 5000 "Wifi Connect" "Successfully connected to: $ssid!"
|
||||
pkill -RTMIN+12 dwmblocks
|
||||
exit 0
|
||||
;;
|
||||
3) notify-send -t 5000 "Wifi Connect" "Connection to $ssid failed. Timeout expired?"
|
||||
pkill -RTMIN+12 dwmblocks
|
||||
exit 1
|
||||
;;
|
||||
4)
|
||||
notify-send -t 5000 "Wifi Connect" "Connection to $ssid failed. Possibly wrong password?"
|
||||
nmcli connection delete id "$ssid"
|
||||
pkill -RTMIN+12 dwmblocks
|
||||
exit 1
|
||||
;;
|
||||
*) notify-send -t 5000 "Wifi Connect" "Connection to $ssid failed. Error code $?"
|
||||
echo "Failed. Exiting"
|
||||
pkill -RTMIN+12 dwmblocks
|
||||
exit 1
|
||||
esac
|
||||
'')
|
||||
];
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [
|
||||
(pkgs.writeShellScriptBin "dunstify-battery-notification" ''
|
||||
msgTag="battery-notify"
|
||||
${pkgs.dunst}/bin/dunstify -a "batteryNotify" -u critical -i battery-notify -h string:x-dunst-stack-tag:$msgTag "Battery Status" "$(battery-status)" -t 5000
|
||||
'')
|
||||
];
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
(writeShellScriptBin "dunstify-volume-notification" ''
|
||||
mute_test=$(${pamixer}/bin/pamixer --get-mute)
|
||||
mic_mute_test=$(${pamixer}/bin/pamixer --default-source --get-mute)
|
||||
|
||||
mute=""
|
||||
if [ "$mute_test" == true ];
|
||||
then
|
||||
mute="(Speakers Muted)"
|
||||
fi
|
||||
|
||||
if [ "$mic_mute_test" == true ];
|
||||
then
|
||||
mute="(Mic Muted)"
|
||||
fi
|
||||
|
||||
if [ "$mute_test" == true ] && [ "$mic_mute_test" == true ];
|
||||
then
|
||||
mute="(Speakers Muted & Mic Muted)"
|
||||
fi
|
||||
|
||||
volume=$(${pamixer}/bin/pamixer --get-volume)
|
||||
|
||||
msgTag="volume-notify"
|
||||
${dunst}/bin/dunstify -a "changeVolume" -u low -i audio-volume-high -h string:x-dunst-stack-tag:$msgTag "Volume" "''${volume} ''${mute}" -t 2000
|
||||
'')
|
||||
];
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
(writeShellScriptBin "emoji-picker" ''
|
||||
# Define variables
|
||||
symbols_dir="$HOME/.local/share/symbols"
|
||||
emoji_file="$symbols_dir/emoji"
|
||||
nerdfont_file="$symbols_dir/nerdfont"
|
||||
recent="$symbols_dir/recent"
|
||||
remote="https://git.bitlab21.com/sam/symbols.git"
|
||||
|
||||
# Check if emoji files are installed, if not pull from remote
|
||||
if [ ! -f "$emoji_file" ] || [ ! -f "$nerdfont_file" ]; then
|
||||
notify-send -t 5000 "Emoji Picker" "Symbol files not found. Fetching from: '$remote'..."
|
||||
mkdir -p "$symbols_dir"
|
||||
git clone "$remote" "$symbols_dir"
|
||||
[ "$?" != 0 ] && notify-send -t 2000 "Emoji Picker" "Error fetching from: $remote" && exit 1
|
||||
fi
|
||||
|
||||
# Concat all emoji files and pipe into dmenu. Remove empty rows with sed. Exit if invalid selection.
|
||||
emoji_row=$(cat "$recent" "$emoji_file" "$nerdfont_file" | sed '/^$/d' | dmenu -l 20)
|
||||
[ "$emoji_row" == "" ] && notify-send -t 1000 "Emoji Picker" "Cancelled" && exit 0
|
||||
[ "$emoji_row" == "**** Recent ****" ] || [ "$emoji_row" == "****************" ] && notify-send -t 1000 "Emoji Picker" "Invalid selection." && exit 1
|
||||
|
||||
# Add selected emoji to recent.
|
||||
sed -i "/$emoji_row/d" "$recent" && sed -i "2s/^/$emoji_row\n/" "$recent"
|
||||
|
||||
# Copy to clipboard
|
||||
emoji=$(echo "$emoji_row" | sed 's/\s.*//g')
|
||||
echo "$emoji" | xclip -i -r -selection CLIPBOARD
|
||||
notify-send -t 5000 "Emoji Picker" "$emoji_row copied to clipboard"
|
||||
'')
|
||||
];
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
(writeShellScriptBin "get-focused-monitor" ''
|
||||
# get the current cursor location into X and Y variables
|
||||
eval $(xdotool getmouselocation --shell)
|
||||
|
||||
# compare mouse location to monitor coordinates
|
||||
while IFS= read -r line; do
|
||||
if [[ $line =~ " connected" ]]; then
|
||||
display=$(echo "$line" | awk '{print $1}')
|
||||
coords=$(echo "$line" | grep -oP "\d+x\d+" | tr 'x+' ' ')
|
||||
|
||||
read width height x_offset y_offset <<< $coords
|
||||
|
||||
if (( X >= x_offset && X <= width + x_offset )) && (( Y >= y_offset && Y <= height + y_offset )); then
|
||||
echo "$display"
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done < <(xrandr)
|
||||
|
||||
'')
|
||||
];
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [
|
||||
(pkgs.writers.writePython3Bin
|
||||
"tiktoken-cli"
|
||||
{ libraries = [ pkgs.python3Packages.tiktoken ]; }
|
||||
''
|
||||
import os
|
||||
import sys
|
||||
import tiktoken
|
||||
|
||||
content = sys.stdin.read()
|
||||
|
||||
default = "gpt-3.5-turbo-0301"
|
||||
model = os.getenv('TIKTOKEN_MODEL', default)
|
||||
|
||||
try:
|
||||
encoding = tiktoken.encoding_for_model(model)
|
||||
except KeyError:
|
||||
encoding = tiktoken.get_encoding(default)
|
||||
|
||||
print(len(encoding.encode(content)))
|
||||
'')
|
||||
|
||||
(pkgs.writeShellScriptBin "git-commit-ai" ''
|
||||
# This bash script performs the following tasks:
|
||||
# 1. Takes a git diff of modifications made to a repo.
|
||||
# 2. Passes this diff to an LLM (Large Language Model) that generates a commit
|
||||
# message.
|
||||
#
|
||||
# Usage: ./git-commit-ai --git-diff-commands --model
|
||||
#
|
||||
#
|
||||
diff=$(git diff "$@" )
|
||||
[ -z "$diff" ] && echo "No diff provided. Did you stage the changes?" && exit 1
|
||||
tokens=$(echo "$diff" | tiktoken-cli)
|
||||
echo -e "\n\nEstimated tokens: $tokens\n\n"
|
||||
|
||||
choose_model() {
|
||||
models=$(${pkgs.aichat}/bin/aichat --list-models)
|
||||
model=$(echo "$models" | fzf)
|
||||
}
|
||||
choose_model
|
||||
|
||||
git config commit.template ".git/gitmessage"
|
||||
|
||||
redo=""
|
||||
while true
|
||||
do
|
||||
|
||||
[ -z "$redo" ] && echo "Using model: $model" && commit_message=$(${pkgs.aichat}/bin/aichat --model "$model" --role "git_commit" "$diff")
|
||||
|
||||
echo ""
|
||||
echo "Message:"
|
||||
echo "---------------------------------------------"
|
||||
echo ""
|
||||
echo "$commit_message"
|
||||
echo ""
|
||||
echo "---------------------------------------------"
|
||||
echo "What would you like to do?"
|
||||
echo ""
|
||||
echo "Copy to clipboard (c)"
|
||||
echo "Git commit in editor (g)"
|
||||
echo "Open in editor (e)"
|
||||
echo "Show diff (d)"
|
||||
echo "Choose different model (m)"
|
||||
echo "Exit and do nothing (q)"
|
||||
|
||||
read -r -p "Action: (c|g|e|q) " input
|
||||
|
||||
case "$input" in
|
||||
"c") echo "$commit_message" | ${pkgs.xclip}/bin/xclip -i -selection CLIPBOARD &&
|
||||
${pkgs.libnotify}/bin/notify-send "AI Buddy" "Copied to clipboard"
|
||||
exit 0
|
||||
;;
|
||||
"g") echo "$commit_message" > ".git/gitmessage" &&
|
||||
git commit -e
|
||||
cat /dev/null > ".git/gitmessage" # clear the template
|
||||
exit 0
|
||||
;;
|
||||
"d") echo -e "Current commit message:\n\n$commit_message\n\nDiff file:\n\n$diff" | less
|
||||
redo=true
|
||||
shift
|
||||
;;
|
||||
"e") echo "$commit_message" | nvim -
|
||||
exit 0
|
||||
;;
|
||||
"m") choose_model && shift
|
||||
;;
|
||||
"q") exit 0
|
||||
;;
|
||||
*) exit 0
|
||||
esac
|
||||
done
|
||||
|
||||
'')
|
||||
];
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
(writeShellScriptBin "key-remaps" ''
|
||||
${xorg.xmodmap}/bin/xmodmap -e "keycode 64 = Mode_switch"
|
||||
${xorg.xmodmap}/bin/xmodmap -e "keycode 43 = h H Left H"
|
||||
${xorg.xmodmap}/bin/xmodmap -e "keycode 44 = j J Down J"
|
||||
${xorg.xmodmap}/bin/xmodmap -e "keycode 45 = k K Up K"
|
||||
${xorg.xmodmap}/bin/xmodmap -e "keycode 46 = l L Right L"
|
||||
'')
|
||||
];
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
(writeShellScriptBin "sb-battery" ''
|
||||
BAT=/sys/class/power_supply/BAT0/capacity
|
||||
|
||||
# Exit script if no battery detected
|
||||
[ ! -f "$BAT" ] && exit
|
||||
|
||||
STATUS=$(cat /sys/class/power_supply/BAT0/uevent | grep "POWER_SUPPLY_STATUS" | sed "s/^.*=//")
|
||||
capacity=$(cat "$BAT")
|
||||
|
||||
if [ "$STATUS" == "Charging" ] || [ "$STATUS" == "Not charging" ]; then
|
||||
echo "[ $capacity%] "
|
||||
else
|
||||
case $capacity in
|
||||
100) echo "[ $capacity%] ";;
|
||||
9[0-9]) echo "[ $capacity%] ";;
|
||||
8[0-9]) echo "[ $capacity%] ";;
|
||||
7[0-9]) echo "[ $capacity%] ";;
|
||||
6[0-9]) echo "[ $capacity%] ";;
|
||||
5[0-9]) echo "[ $capacity%] ";;
|
||||
4[0-9]) echo "[ $capacity%] ";;
|
||||
3[0-9]) echo "[ $capacity%] ";;
|
||||
2[0-9]) echo "[ $capacity%] ";;
|
||||
1[0-9]) echo "[ $capacity%] ";;
|
||||
[6-9]) echo "[ $capacity%] ";;
|
||||
[0-5]) echo "[ $capacity%] ";;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [[ $capacity -le 20 && $STATUS != "Charging" ]]; then
|
||||
dunstify-battery-notification
|
||||
fi
|
||||
'')
|
||||
];
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
(writeShellScriptBin "sb-cpu-pct" ''
|
||||
echo "[ $(top -bn 1 |grep "Cpu(s)" | awk '{print $2+$6 "%"}' | sed "s/\..//g")] "
|
||||
'')
|
||||
];
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
(writeShellScriptBin "sb-mem-pct" ''
|
||||
# Gets current ram percent utilisation
|
||||
echo "[ $(free | awk '/^Mem/ {print "100*" $3 " / " $2 }' | ${bc}/bin/bc | awk '{print $1"%"}')] "
|
||||
'')
|
||||
];
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
(writeShellScriptBin "sb-network-status" ''
|
||||
# Nerd Font Symbols
|
||||
wifi_symbol=" "
|
||||
lan_symbol=" "
|
||||
disconnected_symbol=" "
|
||||
vpn_symbol=" "
|
||||
internet=" "
|
||||
internet_disconnected=" "
|
||||
|
||||
# Get the network status
|
||||
DEFAULT_INTERFACE=$(ip route | grep '^default' | awk '{print $5}' | uniq)
|
||||
IP_ADDRESS=$(ip -o route get to 8.8.8.8 | sed -n 's/.*src \([0-9.]\+\).*/\1/p')
|
||||
|
||||
if [ -z "$DEFAULT_INTERFACE" ]; then
|
||||
network_symbol="$disconnected_symbol"
|
||||
else
|
||||
# Check if it is a wireless interface (wlan*)
|
||||
if [[ $DEFAULT_INTERFACE == wl* ]]; then
|
||||
network_symbol="$wifi_symbol"
|
||||
else
|
||||
network_symbol="$lan_symbol"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check internet connectivity
|
||||
if ! ping -c 1 8.8.8.8 &> /dev/null;
|
||||
then
|
||||
network_symbol="$network_symbol $internet_disconnected"
|
||||
else
|
||||
network_symbol="$network_symbol $internet"
|
||||
fi
|
||||
|
||||
if ip addr show tun0 > /dev/null 2>&1; then
|
||||
network_symbol="$network_symbol $vpn_symbol"
|
||||
else
|
||||
network_symbol="$network_symbol"
|
||||
fi
|
||||
|
||||
if [ -z "$IP_ADDRESS" ];
|
||||
then
|
||||
printf "[$network_symbol] "
|
||||
else
|
||||
printf "[$network_symbol|$IP_ADDRESS] "
|
||||
fi
|
||||
'')
|
||||
];
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
(writeShellScriptBin "sb-updates" ''
|
||||
# Gets number of flake inputs that are ready for update
|
||||
# Checks every 60 minutes
|
||||
# inputs=$(cd /etc/nixos &&
|
||||
# nix flake update --output-lock-file <(cat flake.nix) 2> /tmp/update &&
|
||||
# cat /tmp/update | grep -c Update)
|
||||
# printf "[ $inputs] "
|
||||
'')
|
||||
];
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
(writeShellScriptBin "sb-volume" ''
|
||||
# Prints the current volume or 婢 if muted.
|
||||
get_mic_status=$(${pamixer}/bin/pamixer --default-source --get-mute)
|
||||
vol="$(${pamixer}/bin/pamixer --get-volume)"
|
||||
|
||||
if [ $get_mic_status == false ]; then
|
||||
mic_status=""
|
||||
else
|
||||
mic_status=""
|
||||
fi
|
||||
|
||||
if [ "$vol" -gt "90" ]; then
|
||||
icon=""
|
||||
elif [ "$vol" -gt "50" ]; then
|
||||
icon=""
|
||||
elif [ "$vol" -gt "0" ]; then
|
||||
icon=""
|
||||
else
|
||||
icon=""
|
||||
fi
|
||||
|
||||
if [ $(${pamixer}/bin/pamixer --get-mute) = true ]; then
|
||||
icon=""
|
||||
vol="0"
|
||||
fi
|
||||
|
||||
print_string="$mic_status $icon $vol%"
|
||||
printf '%s' "[''${print_string}] "
|
||||
'')
|
||||
];
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
# TODO: add emoji and dmenu-dict scripts
|
||||
home.file.".config/sxhkd/sxhkdrc" = {
|
||||
recursive = true;
|
||||
text = ''
|
||||
XF86AudioRaiseVolume
|
||||
pamixer --set-limit 150 --allow-boost -i 5 && dunstify-volume-notification && pkill -RTMIN+10 dwmblocks && exit 1
|
||||
|
||||
XF86AudioLowerVolume
|
||||
pamixer --set-limit 150 --allow-boost -d 5 && dunstify-volume-notification && pkill -RTMIN+10 dwmblocks && exit 1
|
||||
|
||||
XF86AudioMute
|
||||
pamixer --toggle-mute && dunstify-volume-notification && pkill -RTMIN+10 dwmblocks && exit 1
|
||||
|
||||
XF86AudioMicMute
|
||||
pamixer --default-source --toggle-mute && dunstify-volume-notification && pkill -RTMIN+10 dwmblocks && exit 1
|
||||
|
||||
XF86Messenger
|
||||
dunstify-battery-notification
|
||||
|
||||
control + F8
|
||||
clipboard-image-recall /tmp/clipboard/images/
|
||||
|
||||
Print
|
||||
env QT_AUTO_SCREEN_SCALE_FACTOR=1.5 QT_SCREEN_SCALE_FACTORS="" flameshot gui
|
||||
|
||||
control + F7
|
||||
emoji-picker
|
||||
|
||||
control + F4
|
||||
dmenu-set-wm-class
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
{...}: {
|
||||
# TODO: configure x11 to look in .config/x11
|
||||
home.file.".xinitrc" = {
|
||||
recursive = true;
|
||||
text = ''
|
||||
|
||||
picom -b --config ~/.config/picom/picom.conf
|
||||
xrdb -merge ~/.Xresources
|
||||
|
||||
autostart="clipboard-save dwmblocks feh-wallpaper-changer sxhkd key-remaps"
|
||||
|
||||
for program in $autostart; do
|
||||
pidof -sx "$program" || "$program" &
|
||||
done >/dev/null 2>&1
|
||||
|
||||
|
||||
if test -z "$DBUS_SESSION_BUS_ADDRESS"; then
|
||||
eval $(dbus-launch --exit-with-session --sh-syntax)
|
||||
fi
|
||||
systemctl --user import-environment DISPLAY XAUTHORITY
|
||||
|
||||
if command -v dbus-update-activation-environment >/dev/null 2>&1; then
|
||||
dbus-update-activation-environment DISPLAY XAUTHORITY
|
||||
fi
|
||||
|
||||
export XSESSION_PID="$$"
|
||||
exec dwm
|
||||
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,85 +1,86 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
{ lib
|
||||
, config
|
||||
, ...
|
||||
}: {
|
||||
|
||||
imports = [
|
||||
../wallpaper-changer/swww-wallpaper-changer
|
||||
../common
|
||||
../common/wayland
|
||||
./pyprland.nix
|
||||
];
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd = {
|
||||
variables = ["--all"];
|
||||
enable = true;
|
||||
# Same as default, but stop graphical-session too
|
||||
extraCommands = lib.mkBefore [
|
||||
"systemctl --user stop graphical-session.target"
|
||||
"systemctl --user start hyprland-session.target"
|
||||
];
|
||||
variables = [ "--all" ];
|
||||
enable = true;
|
||||
# Same as default, but stop graphical-session too
|
||||
extraCommands = lib.mkBefore [
|
||||
"systemctl --user stop graphical-session.target"
|
||||
"systemctl --user start hyprland-session.target"
|
||||
];
|
||||
};
|
||||
extraConfig = let
|
||||
monitor = "${toString (builtins.map (m: "monitor=${ m.name },${ toString(m.width) }x${ toString(m.height) }@60,auto,1") config.monitors)}";
|
||||
in ''
|
||||
extraConfig =
|
||||
let
|
||||
monitor = "${toString (builtins.map (m: "monitor=${ m.name },${ toString( m.width ) }x${ toString( m.height ) }@${ toString( m.refreshRate ) },${ toString( m.x ) }x${ toString( m.y ) },${ toString( m.scale ) }\n") config.monitors)}";
|
||||
active = "rgba(${config.colorScheme.colors.base08}ee)";
|
||||
inactive = "rgba(${config.colorScheme.colors.base0C}ee)";
|
||||
in
|
||||
''
|
||||
|
||||
${monitor}
|
||||
$terminal = kitty
|
||||
$fileManager = dolphin
|
||||
$terminal = alacritty
|
||||
$fileManager = thunar
|
||||
$menu = wofi --show drun
|
||||
|
||||
|
||||
env = XCURSOR_SIZE,24
|
||||
|
||||
|
||||
input {
|
||||
kb_layout = gb
|
||||
kb_variant =
|
||||
kb_model =
|
||||
kb_options = caps:swapescape
|
||||
kb_rules =
|
||||
|
||||
repeat_delay = 280
|
||||
repeat_rate = 60
|
||||
follow_mouse = 1
|
||||
|
||||
touchpad {
|
||||
natural_scroll = no
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
general {
|
||||
|
||||
gaps_in = 5
|
||||
gaps_out = 20
|
||||
|
||||
gaps_in = 10
|
||||
gaps_out = 10
|
||||
border_size = 2
|
||||
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
|
||||
col.inactive_border = rgba(595959aa)
|
||||
|
||||
col.active_border = ${active}
|
||||
col.inactive_border = ${inactive}
|
||||
layout = dwindle
|
||||
|
||||
allow_tearing = false
|
||||
}
|
||||
|
||||
|
||||
decoration {
|
||||
|
||||
rounding = 10
|
||||
|
||||
|
||||
rounding = 5
|
||||
|
||||
blur {
|
||||
enabled = true
|
||||
size = 3
|
||||
passes = 1
|
||||
}
|
||||
|
||||
|
||||
drop_shadow = yes
|
||||
shadow_range = 4
|
||||
shadow_render_power = 3
|
||||
col.shadow = rgba(1a1a1aee)
|
||||
}
|
||||
|
||||
|
||||
animations {
|
||||
enabled = yes
|
||||
|
||||
|
||||
|
||||
|
||||
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
||||
|
||||
|
||||
animation = windows, 1, 7, myBezier
|
||||
animation = windowsOut, 1, 7, default, popin 80%
|
||||
animation = border, 1, 10, default
|
||||
|
@ -87,43 +88,46 @@
|
|||
animation = fade, 1, 7, default
|
||||
animation = workspaces, 1, 6, default
|
||||
}
|
||||
|
||||
|
||||
dwindle {
|
||||
}
|
||||
|
||||
|
||||
master {
|
||||
new_is_master = true
|
||||
}
|
||||
|
||||
|
||||
gestures {
|
||||
workspace_swipe = off
|
||||
}
|
||||
|
||||
|
||||
misc {
|
||||
}
|
||||
|
||||
|
||||
device {
|
||||
name = epic-mouse-v1
|
||||
sensitivity = -0.5
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
windowrulev2 = float, class:floating
|
||||
|
||||
$mainMod = SUPER
|
||||
|
||||
bind = $mainMod, Q, exec, $terminal
|
||||
bind = $mainMod, C, killactive,
|
||||
|
||||
bind = $mainMod, RETURN, exec, $terminal
|
||||
bind = $mainMod, Q, killactive,
|
||||
bind = $mainMod, M, exit,
|
||||
bind = $mainMod, E, exec, $fileManager
|
||||
bind = $mainMod, V, togglefloating,
|
||||
bind = $mainMod, R, exec, $menu
|
||||
bind = $mainMod, S, exec, rofi -show drun -show-icons
|
||||
|
||||
bind = $mainMod, left, movefocus, l
|
||||
bind = $mainMod, right, movefocus, r
|
||||
bind = $mainMod, up, movefocus, u
|
||||
bind = $mainMod, down, movefocus, d
|
||||
|
||||
|
||||
bind = $mainMod, y, exec, pypr toggle termy
|
||||
bind = $mainMod, u, exec, pypr toggle termu
|
||||
bind = $mainMod, i, exec, pypr toggle termi
|
||||
|
||||
bind = $mainMod, h, movefocus, l
|
||||
bind = $mainMod, l, movefocus, r
|
||||
bind = $mainMod, k, movefocus, u
|
||||
bind = $mainMod, j, movefocus, d
|
||||
|
||||
bind = $mainMod, 1, workspace, 1
|
||||
bind = $mainMod, 2, workspace, 2
|
||||
bind = $mainMod, 3, workspace, 3
|
||||
|
@ -134,7 +138,7 @@
|
|||
bind = $mainMod, 8, workspace, 8
|
||||
bind = $mainMod, 9, workspace, 9
|
||||
bind = $mainMod, 0, workspace, 10
|
||||
|
||||
|
||||
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
||||
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
||||
bind = $mainMod SHIFT, 3, movetoworkspace, 3
|
||||
|
@ -145,17 +149,17 @@
|
|||
bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
||||
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||
|
||||
|
||||
bind = $mainMod, S, togglespecialworkspace, magic
|
||||
bind = $mainMod SHIFT, S, movetoworkspace, special:magic
|
||||
|
||||
|
||||
bind = $mainMod, mouse_down, workspace, e+1
|
||||
bind = $mainMod, mouse_up, workspace, e-1
|
||||
|
||||
|
||||
bindm = $mainMod, mouse:272, movewindow
|
||||
bindm = $mainMod, mouse:273, resizewindow
|
||||
|
||||
exec-once=bash ~/.config/hypr/start.sh
|
||||
|
||||
exec-once=swww-wallpaper-changer & pypr
|
||||
'';
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
{ ... }:
|
||||
{
|
||||
home.file.".config/hypr/pyprland.toml".text = ''
|
||||
[pyprland]
|
||||
plugins = [
|
||||
"scratchpads"
|
||||
]
|
||||
|
||||
[scratchpads.termy]
|
||||
animation = "fromTop"
|
||||
command = "$TERMINAL --class $TERMINAL-dropterm-y --title 'Scratchpad(y)'"
|
||||
class = "$TERMINAL-dropterm-y"
|
||||
size = "80% 80%"
|
||||
|
||||
[scratchpads.termu]
|
||||
animation = "fromTop"
|
||||
command = "$TERMINAL --class $TERMINAL-dropterm-u --title 'Scratchpad(u)'"
|
||||
class = "$TERMINAL-dropterm-u"
|
||||
size = "80% 80%"
|
||||
|
||||
[scratchpads.termi]
|
||||
animation = "fromTop"
|
||||
command = "$TERMINAL --class $TERMINAL-dropterm-i --title 'Scratchpad(i)'"
|
||||
class = "$TERMINAL-dropterm-i"
|
||||
size = "80% 80%"
|
||||
|
||||
[scratchpads.volume]
|
||||
animation = "fromTop"
|
||||
command = "pavucontrol --class floating"
|
||||
class = "org.pulseaudio.pavucontrol"
|
||||
size = "75% 60%"
|
||||
'';
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
systemd.user.services.wallpaper-changer = {
|
||||
Unit = {
|
||||
Description = "Script to change wallpaper using swww";
|
||||
PartOf = [ "hyprland-session.target" ];
|
||||
After = [ "hyprland-session.target" ]; # or "wayland.target", depending on your system setup
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "default.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = [ "oneshot" ];
|
||||
ExecStart = "${pkgs.writeShellScript "swww-wallpaper-changer" ''
|
||||
export WAYLAND_DISPLAY="wayland-1"
|
||||
wallpaper_dir="$HOME/.local/share/bg/"
|
||||
|
||||
# Allow some time for desktop to start
|
||||
sleep 3
|
||||
echo "starting daemon..."
|
||||
${pkgs.swww}/bin/swww-daemon &
|
||||
|
||||
while true; do
|
||||
find "$wallpaper_dir" -type f -follow \( -iname \*.jpg -o -iname \*.png -o -iname \*.gif -o -iname \*.bmp \) | shuf | while read -r file; do
|
||||
${pkgs.swww}/bin/swww img "$file" --transition-step 10 --transition-fps 60
|
||||
[ $? != 0 ] && echo "swww failed, reloading daemon" && ${pkgs.swww}/bin/swww-daemon &
|
||||
sleep 600
|
||||
done
|
||||
done
|
||||
''}";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# Let it try to start a few more times
|
||||
systemd.user.services.waybar = {
|
||||
Unit.StartLimitBurst = 30;
|
||||
};
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
#package = "";
|
||||
systemd.enable = true;
|
||||
};
|
||||
}
|
|
@ -1,101 +0,0 @@
|
|||
{ pkgs, inputs, config, ... }:
|
||||
let
|
||||
user = config.home.username;
|
||||
in
|
||||
{
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
policies = {
|
||||
DisableTelemetry = true;
|
||||
DisableFirefoxStudies = true;
|
||||
EnableTrackingProtection = {
|
||||
Value= true;
|
||||
Locked = true;
|
||||
Cryptomining = true;
|
||||
Fingerprinting = true;
|
||||
};
|
||||
DisablePocket = true;
|
||||
DisableFirefoxAccounts = true;
|
||||
DisableAccounts = true;
|
||||
DisableFirefoxScreenshots = true;
|
||||
OverrideFirstRunPage = "";
|
||||
OverridePostUpdatePage = "";
|
||||
DontCheckDefaultBrowser = true;
|
||||
DisplayBookmarksToolbar = "never"; # alternatives: "always" or "newtab"
|
||||
DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on"
|
||||
SearchBar = "unified"; # alternative: "separate"
|
||||
/* ---- EXTENSIONS ---- */
|
||||
# Check about:support for extension/add-on ID strings.
|
||||
# Valid strings for installation_mode are "allowed", "blocked",
|
||||
# "force_installed" and "normal_installed".
|
||||
ExtensionSettings = {
|
||||
"*".installation_mode = "blocked"; # blocks all addons except the ones specified below
|
||||
# uBlock Origin:
|
||||
"uBlock0@raymondhill.net" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
# Privacy Badger:
|
||||
"jid1-MnnxcxisBPnSXQ@jetpack" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/privacy-badger17/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
# Bitwarden
|
||||
"{446900e4-71c2-419f-a6a7-df9c091e268b}" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
# Dark Reader
|
||||
"addon@darkreader.org" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/darkreader/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
# Sponser Block
|
||||
"sponsorBlocker@ajay.app" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/sponsorblock/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
# Return Youtube Dislike
|
||||
"{762f9885-5a13-4abd-9c77-433dcd38b8fd}" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/return-youtube-dislikes/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
};
|
||||
};
|
||||
profiles.${user} = {
|
||||
|
||||
search.engines = {
|
||||
"Searxng" = {
|
||||
urls = [{
|
||||
template = "http://10.0.10.35:8855";
|
||||
}];
|
||||
|
||||
};
|
||||
};
|
||||
search.force = true;
|
||||
|
||||
bookmarks = [
|
||||
{
|
||||
name = "wikipedia";
|
||||
tags = [ "wiki" ];
|
||||
keyword = "wiki";
|
||||
url = "https://en.wikipedia.org/wiki/Special:Search?search=%s&go=Go";
|
||||
}
|
||||
{
|
||||
name = "bitlab21";
|
||||
tags = [ "bitcoin" ];
|
||||
keyword = "bitcoin";
|
||||
url = "https://bitlab21.com";
|
||||
}
|
||||
];
|
||||
|
||||
settings = {
|
||||
"dom.security.https_only_mode" = true;
|
||||
"browser.download.panel.shown" = true;
|
||||
"identity.fxaccounts.enabled" = false;
|
||||
"signon.rememberSignons" = false;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,10 +1,13 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{ pkgs, configVars, ... }:
|
||||
let
|
||||
email = configVars.email.user;
|
||||
in
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.gitAndTools.gitFull;
|
||||
userName = "Sam";
|
||||
userEmail = "samual.shop@proton.me";
|
||||
userEmail = "${email}";
|
||||
aliases = { };
|
||||
extraConfig = {
|
||||
pull.rebase = false;
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
let
|
||||
user = config.home.username;
|
||||
in
|
||||
{
|
||||
home.activation.get-notes = lib.hm.dag.entryAfter [ "installPackages" ] ''
|
||||
notes_dir=/home/${user}/.local/share/notes
|
||||
remote=git@git.bitlab21.com:sam/notes
|
||||
if [ -d "$notes_dir" ];
|
||||
then
|
||||
cd "$notes_dir"
|
||||
[ ! -d .git ] && PATH="${pkgs.git}/bin:${pkgs.openssh}/bin:$PATH" git clone "$remote" "$notes_dir"
|
||||
else
|
||||
mkdir -p "$notes_dir" && PATH="${pkgs.git}/bin:${pkgs.openssh}/bin:$PATH" git clone "$remote" "$notes_dir"
|
||||
fi
|
||||
exit 0
|
||||
'';
|
||||
}
|
|
@ -1,10 +1,9 @@
|
|||
{ inputs, config, osConfig, ... }:
|
||||
{ inputs, config, ... }:
|
||||
let
|
||||
secretsDirectory = builtins.toString inputs.nix-secrets;
|
||||
secretsFile = "${secretsDirectory}/secrets.yaml";
|
||||
homeDirectory = config.home.homeDirectory;
|
||||
username = config.home.username;
|
||||
hostname = osConfig.networking.hostName;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
|
@ -12,11 +11,18 @@ in
|
|||
];
|
||||
|
||||
sops = {
|
||||
age.sshKeyPaths = ["${homeDirectory}/.ssh/id_ed25519"];
|
||||
age = {
|
||||
sshKeyPaths = [ "${homeDirectory}/.ssh/id_ed25519" ];
|
||||
generateKey = true;
|
||||
keyFile = "/home/${username}/.config/sops/age/keys.txt";
|
||||
};
|
||||
defaultSopsFile = "${secretsFile}";
|
||||
validateSopsFiles = false;
|
||||
secrets."ssh_keys/deploy_key/id_ed25519" = {
|
||||
path = "/home/${username}/.ssh/deploy_key-ssh-ed25519";
|
||||
};
|
||||
|
||||
secrets = {
|
||||
"ssh_keys/deploy_key/id_ed25519" = {
|
||||
path = "/home/${username}/.ssh/deploy_key-ssh-ed25519";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,22 +6,6 @@ in
|
|||
services = {
|
||||
syncthing = {
|
||||
enable = true;
|
||||
# user = "${user}";
|
||||
# dataDir = "/home/${user}/sync";
|
||||
# configDir = "/home/${user}/.config/syncthing";
|
||||
# overrideDevices = true; # overrides any devices added or deleted through the WebUI
|
||||
# overrideFolders = true; # overrides any folders added or deleted through the WebUI
|
||||
# settings = {
|
||||
# devices = {
|
||||
# "device1" = { id = "UT6263Y-V3GJXNO-6KIGAKZ-KY6UQMD-ER6BT4R-4LPKT2P-V4PCJYZ-ROJZIQQ"; };
|
||||
# };
|
||||
# folders = {
|
||||
# "sync" = { # Name of folder in Syncthing, also the folder ID
|
||||
# path = "/home/${user}/sync"; # Which folder to add to Syncthing
|
||||
# devices = [ "device1" ]; # Which devices to share the folder with
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
in {
|
||||
systemd.user.services.transmission-daemon = {
|
||||
Unit = {
|
||||
Description = "Transmission Bittorrent Daemon";
|
||||
Wants = "network-online.target";
|
||||
After = "network-online.target";
|
||||
Documentation = "man:transmission-daemon(1)";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = ["multi-user.target"];
|
||||
};
|
||||
Service = {
|
||||
User = "transmission";
|
||||
Type = "notify";
|
||||
ExecStart = "${pkgs.transmission}/bin/transmission-daemon -f --log-level=error";
|
||||
ExecReload = "${pkgs.coreutils}/bin/kill -s HUP $MAINPID";
|
||||
CapabilityBoundingSet = "";
|
||||
DevicePolicy = "closed";
|
||||
KeyringMode = "private";
|
||||
LockPersonality = "true";
|
||||
NoNewPrivileges = "true";
|
||||
MemoryDenyWriteExecute = "true";
|
||||
PrivateTmp = "true";
|
||||
PrivateDevices = "true";
|
||||
ProtectClock = "true";
|
||||
ProtectKernelLogs = "true";
|
||||
ProtectControlGroups = "true";
|
||||
ProtectKernelModules = "true";
|
||||
ProtectSystem = "true";
|
||||
ProtectHostname = "true";
|
||||
ProtectKernelTunables = "true";
|
||||
ProtectProc = "invisible";
|
||||
RestrictNamespaces = "true";
|
||||
RestrictSUIDSGID = "true";
|
||||
RestrictAddressFamilies = "AF_UNIX AF_INET AF_INET6";
|
||||
RestrictRealtime = "true";
|
||||
SystemCallFilter = "@system - service";
|
||||
SystemCallArchitectures = "native";
|
||||
SystemCallErrorNumber = "EPERM";
|
||||
};
|
||||
};
|
||||
# home.file.".config/transmission-daemon/settings.json" = {
|
||||
# recursive = true;
|
||||
# text = ''
|
||||
#
|
||||
# '';
|
||||
# };
|
||||
}
|
|
@ -0,0 +1,120 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
package = pkgs.yazi;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
|
||||
settings = {
|
||||
log = {
|
||||
enabled = true;
|
||||
};
|
||||
manager = {
|
||||
show_hidden = false;
|
||||
sort_by = "modified";
|
||||
sort_dir_first = true;
|
||||
sort_reverse = true;
|
||||
};
|
||||
};
|
||||
|
||||
theme = {
|
||||
manager = {
|
||||
marker_copied = { fg = "#98bb6c"; bg = "#98bb6c"; };
|
||||
marker_cut = { fg = "#e46876"; bg = "#e46876"; };
|
||||
marker_marked = { fg = "#957fb8"; bg = "#957fb8"; };
|
||||
marker_selected = { fg = "#ffa066"; bg = "#ffa066"; };
|
||||
cwd = { fg = "#e6c384"; };
|
||||
hovered = { reversed = true; };
|
||||
preview_hovered = { reversed = true; };
|
||||
tab_active = { reversed = true; };
|
||||
tab_inactive = { };
|
||||
tab_width = 1;
|
||||
count_copied = { fg = "#1f1f28"; bg = "#98bb6c"; };
|
||||
count_cut = { fg = "#1f1f28"; bg = "#e46876"; };
|
||||
count_selected = { fg = "#1f1f28"; bg = "#e6c384"; };
|
||||
border_symbol = "│";
|
||||
border_style = { fg = "#dcd7ba"; };
|
||||
};
|
||||
|
||||
status = {
|
||||
separator_open = "";
|
||||
separator_close = "";
|
||||
separator_style = { fg = "reset"; bg = "#363646"; };
|
||||
mode_normal = { fg = "#1f1f28"; bg = "#85a6ea"; bold = true; };
|
||||
mode_select = { fg = "#1f1f28"; bg = "#957fb8"; bold = true; };
|
||||
mode_unset = { fg = "#1f1f28"; bg = "#e6c384"; bold = true; };
|
||||
progress_label = { fg = "#85a6ea"; bg = "#363646"; bold = true; };
|
||||
progress_normal = { fg = "#363646"; bg = "#1f1f28"; };
|
||||
progress_error = { fg = "#363646"; bg = "#1f1f28"; };
|
||||
permissions_t = { fg = "#98bb6c"; };
|
||||
permissions_r = { fg = "#e6c384"; };
|
||||
permissions_w = { fg = "#e82424"; };
|
||||
permissions_x = { fg = "#7aa89f"; };
|
||||
permissions_s = { fg = "#938aa9"; };
|
||||
};
|
||||
|
||||
select = {
|
||||
border = { fg = "#7fb4ca"; };
|
||||
active = { fg = "#938aa9"; bold = true; };
|
||||
inactive = { };
|
||||
};
|
||||
|
||||
input = {
|
||||
border = { fg = "#7fb4ca"; };
|
||||
title = { };
|
||||
value = { };
|
||||
selected = { reversed = true; };
|
||||
};
|
||||
|
||||
completion = {
|
||||
border = { fg = "#7fb4ca"; };
|
||||
active = { reversed = true; };
|
||||
inactive = { };
|
||||
};
|
||||
|
||||
tasks = {
|
||||
border = { fg = "#7fb4ca"; };
|
||||
title = { };
|
||||
hovered = { fg = "#938aa9"; };
|
||||
};
|
||||
|
||||
which = {
|
||||
cols = 2;
|
||||
separator = " - ";
|
||||
separator_style = { fg = "#727169"; };
|
||||
mask = { bg = "#16161d"; };
|
||||
rest = { fg = "#727169"; };
|
||||
cand = { fg = "#85a6ea"; };
|
||||
desc = { fg = "#565666"; };
|
||||
};
|
||||
|
||||
help = {
|
||||
on = { fg = "#7aa89f"; };
|
||||
run = { fg = "#938aa9"; };
|
||||
desc = { };
|
||||
hovered = { reversed = true; bold = true; };
|
||||
footer = { fg = "#090618"; bg = "#dcd7ba"; };
|
||||
};
|
||||
|
||||
notify = {
|
||||
title_info = { fg = "#98bb6c"; };
|
||||
title_warn = { fg = "#e6c384"; };
|
||||
title_error = { fg = "#e82424"; };
|
||||
};
|
||||
|
||||
filetype = {
|
||||
rules = [
|
||||
{ mime = "image/*"; fg = "#e6c384"; }
|
||||
{ mime = "{audio,video}/*"; fg = "#957fb8"; }
|
||||
{ mime = "application/{,g}zip"; fg = "#e46876"; }
|
||||
{ mime = "application/x-{tar,bzip*,7z-compressed,xz,rar}"; fg = "#e46876"; }
|
||||
{ mime = "application/{pdf,doc,rtf,vnd.*}"; fg = "#6a9589"; }
|
||||
{ name = "*"; is = "orphan"; fg = "#e46876"; }
|
||||
{ name = "*"; is = "exec"; fg = "#957fb8"; }
|
||||
{ name = "*/"; fg = "#85a6ea"; }
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Import users
|
||||
./users/admin
|
||||
|
||||
./common/core
|
||||
./common/optional/sops.nix
|
||||
|
||||
# Import optional
|
||||
./common/optional/git.nix
|
||||
|
||||
];
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Import users
|
||||
./users/sam
|
||||
|
||||
./common/core
|
||||
./common/optional/desktop/hyprland
|
||||
./common/optional/desktop/waybar.nix
|
||||
./common/optional/sops.nix
|
||||
|
||||
# Import optional
|
||||
./common/optional/git.nix
|
||||
];
|
||||
|
||||
# ------
|
||||
# | DP-1
|
||||
# ------
|
||||
monitors = [
|
||||
{
|
||||
name = "Virtual-1";
|
||||
width = 2048;
|
||||
height = 1152;
|
||||
x = 0;
|
||||
workspace = "1";
|
||||
primary = true;
|
||||
}
|
||||
];
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Import users
|
||||
./users/sam
|
||||
|
||||
./common/core
|
||||
|
||||
# Import optional
|
||||
./common/optional/git.nix
|
||||
./common/optional/sops.nix
|
||||
./common/optional/syncthing.nix
|
||||
./common/optional/desktop/dwm
|
||||
./common/optional/desktop/common/themes/standard-dark.nix
|
||||
./common/optional/notes.nix
|
||||
./common/optional/yazi.nix
|
||||
./common/optional/transmission.nix
|
||||
];
|
||||
|
||||
home.packages = [
|
||||
pkgs.qgis
|
||||
];
|
||||
|
||||
colorScheme = {
|
||||
slug = "serene";
|
||||
name = "Serene";
|
||||
author = "Bitlab21";
|
||||
palette = {
|
||||
base00 = "#1F1F28";
|
||||
base01 = "#16161D";
|
||||
base02 = "#223249";
|
||||
base03 = "#363646";
|
||||
base04 = "#727169";
|
||||
base05 = "#DCD7BA";
|
||||
base06 = "#C8C093";
|
||||
base07 = "#717C7C";
|
||||
base08 = "#C34043";
|
||||
base09 = "#FFA066";
|
||||
base0A = "#C0A36E";
|
||||
base0B = "#76946A";
|
||||
base0C = "#6A9589";
|
||||
base0D = "#7E9CD8";
|
||||
base0E = "#957FB8";
|
||||
base0F = "#D27E99";
|
||||
};
|
||||
};
|
||||
|
||||
xresources.extraConfig = ''
|
||||
! st
|
||||
st.alpha: 0.8
|
||||
St.font: monospace:pixelsize=21:antialias=true:autohint=true;
|
||||
St.font2: NotoColorEmoji:pixelsize=19:antialias=true:autohint=true;
|
||||
|
||||
! dwm
|
||||
dwm.borderpx: 3
|
||||
dwm.font: monospace:size=12
|
||||
dwm.col_base00: #${config.colorScheme.colors.base00}
|
||||
dwm.col_base03: #${config.colorScheme.colors.base03}
|
||||
dwm.col_base04: #${config.colorScheme.colors.base04}
|
||||
dwm.col_base05: #${config.colorScheme.colors.base05}
|
||||
dwm.col_base08: #${config.colorScheme.colors.base08}
|
||||
dwm.col_base0B: #${config.colorScheme.colors.base0B}
|
||||
|
||||
! dmenu
|
||||
dmenu.font: monospace:size=12
|
||||
dmenu.font2: NotoColorEmoji:pixelsize=22:antialias=true:autohint=true
|
||||
dmenu.topbar: 1
|
||||
dmenu.normfgcolor: #${config.colorScheme.colors.base05}
|
||||
dmenu.normbgcolor: #${config.colorScheme.colors.base03}
|
||||
dmenu.selfgcolor: #${config.colorScheme.colors.base00}
|
||||
dmenu.selbgcolor: #${config.colorScheme.colors.base0B}
|
||||
|
||||
Nsxiv.window.background: #${config.colorScheme.colors.base03}
|
||||
Nsxiv.window.foreground: #${config.colorScheme.colors.base05}
|
||||
Nsxiv.mark.foreground: #${config.colorScheme.colors.base08}
|
||||
|
||||
Nsxiv.bar.background: #${config.colorScheme.colors.base00}
|
||||
Nsxiv.bar.foreground: #${config.colorScheme.colors.base05}
|
||||
Nsxiv.bar.font: monospace:size=12
|
||||
'';
|
||||
}
|
|
@ -1,20 +1,18 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
{ inputs
|
||||
, ...
|
||||
}: {
|
||||
imports = [
|
||||
# Import users
|
||||
./users/media
|
||||
|
||||
./common/core
|
||||
./common/optional/sops.nix
|
||||
./common/optional/firefox.nix
|
||||
|
||||
# Import optional
|
||||
./common/optional/git.nix
|
||||
./common/optional/syncthing.nix
|
||||
./common/optional/desktop/cinnamon
|
||||
|
||||
];
|
||||
|
||||
colorScheme = inputs.nix-colors.colorSchemes.kanagawa;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
{
|
||||
home.username = "admin";
|
||||
home.homeDirectory = "/home/admin";
|
||||
home.stateVersion = "23.11";
|
||||
|
||||
imports = [
|
||||
] ++ (builtins.attrValues outputs.homeManagerModules); # import all homeManagerModules?
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
{
|
||||
home.username = "media";
|
||||
home.homeDirectory = "/home/media";
|
||||
home.stateVersion = "23.11";
|
||||
|
||||
imports = [
|
||||
inputs.impermanence.nixosModules.home-manager.impermanence
|
||||
|
@ -13,6 +12,7 @@
|
|||
enable = true;
|
||||
matchBlocks = {
|
||||
"git.bitlab21.com" = {
|
||||
user = "git";
|
||||
identitiesOnly = true;
|
||||
identityFile = [ "~/.ssh/deploy_key-ssh-ed25519" ];
|
||||
};
|
||||
|
@ -46,4 +46,3 @@
|
|||
|
||||
programs.home-manager.enable = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,62 +1,41 @@
|
|||
{ config, pkgs, lib, outputs, ... }:
|
||||
|
||||
{
|
||||
{outputs, ...}: {
|
||||
home.username = "sam";
|
||||
home.homeDirectory = "/home/sam";
|
||||
home.stateVersion = "23.11";
|
||||
|
||||
imports = [
|
||||
] ++ (builtins.attrValues outputs.homeManagerModules); # import all homeManagerModules?
|
||||
|
||||
home.packages = [
|
||||
pkgs.firefox
|
||||
pkgs.kitty
|
||||
pkgs.zathura
|
||||
pkgs.xfce.thunar
|
||||
#pkgs.age
|
||||
];
|
||||
|
||||
home.file = {
|
||||
".icons/bibata".source = "${pkgs.bibata-cursors}/share/icons/Bibata-Modern-Classic";
|
||||
};
|
||||
imports =
|
||||
[
|
||||
]
|
||||
++ (builtins.attrValues outputs.homeManagerModules); # import all homeManagerModules?
|
||||
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
matchBlocks = {
|
||||
"git.bitlab21.com" = {
|
||||
identitiesOnly = true;
|
||||
identityFile = [ "~/.ssh/id_ed25519"];
|
||||
identitiesOnly = true;
|
||||
identityFile = ["~/.ssh/id_ed25519"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.sessionPath = [
|
||||
];
|
||||
|
||||
gtk.enable = true;
|
||||
|
||||
gtk.cursorTheme.package = pkgs.bibata-cursors;
|
||||
gtk.cursorTheme.name = "Bibata-Modern-Ice";
|
||||
|
||||
gtk.theme.package = pkgs.gruvbox-gtk-theme;
|
||||
gtk.theme.name = "Gruvbox-Dark-B";
|
||||
|
||||
gtk.iconTheme.package = pkgs.gruvbox-plus-icons;
|
||||
gtk.iconTheme.name = "GruvboxPlus";
|
||||
|
||||
qt.enable = true;
|
||||
qt.platformTheme.name = "gtk";
|
||||
qt.style.name = "adwaita-dark";
|
||||
qt.style.package = pkgs.adwaita-qt;
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR="nvim";
|
||||
MUSIC="$HOME/mus/music_data/";
|
||||
TERMINAL="kitty";
|
||||
READER="zathura";
|
||||
IMAGE_VIEWER="";
|
||||
IMAGE_EDITOR="";
|
||||
xdg.userDirs = {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
desktop = null;
|
||||
documents = "/home/sam/docs";
|
||||
download = "/home/sam/dl";
|
||||
music = "/home/sam/mus";
|
||||
pictures = "/home/sam/pics";
|
||||
publicShare = "/home/sam/sync";
|
||||
templates = null;
|
||||
videos = "/home/sam/vids";
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
TERMINAL = "st";
|
||||
READER = "zathura";
|
||||
IMAGE_VIEWER = "nsxiv";
|
||||
IMAGE_EDITOR = "drawing";
|
||||
PATH = "$PATH:$HOME/.scripts";
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,134 @@
|
|||
{
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
configVars,
|
||||
...
|
||||
}: let
|
||||
# Disko setup
|
||||
fsType = "btrfs"; # one of ext4 or btrfs. Use btrfs if using impermanence
|
||||
dev = "/dev/nvme0n1"; # depends on target hardware
|
||||
encrypted = true; # currrently only applies to btrfs
|
||||
btrfsMountDevice =
|
||||
if encrypted
|
||||
then "/dev/mapper/crypted"
|
||||
else "/dev/root_vg/root";
|
||||
user = "sam";
|
||||
impermanence = true;
|
||||
pieholeIp = configVars.networking.addresses.piehole.ip;
|
||||
gatewayIp = configVars.networking.addresses.gateway.ip;
|
||||
in {
|
||||
imports = [
|
||||
# Create users for this host
|
||||
../common/users/${user}
|
||||
|
||||
# Disk configuration
|
||||
inputs.disko.nixosModules.disko
|
||||
(import ../common/disks {
|
||||
device = dev;
|
||||
impermanence = impermanence;
|
||||
fsType = fsType;
|
||||
encrypted = encrypted;
|
||||
})
|
||||
|
||||
# Impermanence
|
||||
(import ../common/disks/btrfs/impermanence.nix {
|
||||
btrfsMountDevice = btrfsMountDevice;
|
||||
lib = lib;
|
||||
})
|
||||
|
||||
# Import core options
|
||||
./hardware-configuration.nix
|
||||
../common/core
|
||||
|
||||
# Import optional options
|
||||
../common/optional/persistence.nix
|
||||
../common/optional/pipewire.nix
|
||||
../common/optional/openssh.nix
|
||||
../common/optional/dwm.nix
|
||||
../common/optional/nfs-mounts/media.nix
|
||||
../common/optional/nfs-mounts/homeshare.nix
|
||||
../common/optional/nfs-mounts/photos.nix
|
||||
../common/optional/printing.nix
|
||||
../common/optional/backlight.nix
|
||||
../common/optional/xmodmap-arrow-remaps.nix
|
||||
../common/optional/nix-ld.nix
|
||||
];
|
||||
|
||||
boot = {
|
||||
blacklistedKernelModules = ["snd_hda_intel" "snd_soc_skl"];
|
||||
kernelModules = ["iwlwifi"];
|
||||
initrd.kernelModules = ["thinkpad-acpi" "acpi-call"];
|
||||
kernelPackages = pkgs.linuxPackagesFor pkgs.linux_latest;
|
||||
extraModulePackages = [
|
||||
config.boot.kernelPackages.acpi_call
|
||||
];
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = 3;
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [ {
|
||||
device = "/.swapvol/swapfile";
|
||||
size = 32*1024;
|
||||
} ];
|
||||
|
||||
services = {
|
||||
libinput.touchpad.accelSpeed = "0.5";
|
||||
xserver = {
|
||||
xkb.options = "caps:swapescape";
|
||||
dpi = 196;
|
||||
upscaleDefaultCursor = true;
|
||||
# FIXME this doesnt work for some reason
|
||||
# displayManager.sessionCommands = pkgs.writeShellScriptBin "key-remaps" ''
|
||||
# ${pkgs.xorg.xmodmap}/bin/xmodmap -e "keycode 64 = Mode_switch"
|
||||
# ${pkgs.xorg.xmodmap}/bin/xmodmap -e "keycode 43 = h H Left H"
|
||||
# ${pkgs.xorg.xmodmap}/bin/xmodmap -e "keycode 44 = j J Down J"
|
||||
# ${pkgs.xorg.xmodmap}/bin/xmodmap -e "keycode 45 = k K Up K"
|
||||
# ${pkgs.xorg.xmodmap}/bin/xmodmap -e "keycode 46 = l L Right L"
|
||||
# '';
|
||||
};
|
||||
};
|
||||
|
||||
environment.variables = {
|
||||
GDK_SCALE = "2.2";
|
||||
GDK_DPI_SCALE = "0.8";
|
||||
_JAVA_OPTIONS = "-Dsun.java2d.uiScale=2.2";
|
||||
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
|
||||
XCURSOR_SIZE = "64";
|
||||
};
|
||||
|
||||
# services.tlp = {
|
||||
# enable = true;
|
||||
# settings = {
|
||||
# CPU_SCALING_GOVERNOR_ON_AC = "ondemand";
|
||||
# CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||
#
|
||||
# START_CHARGE_THRESH_BAT0 = 50;
|
||||
# STOP_CHARGE_THRESH_BAT0 = 95;
|
||||
# };
|
||||
# };
|
||||
|
||||
hardware = {
|
||||
bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
};
|
||||
enableRedistributableFirmware = true;
|
||||
firmware = [
|
||||
pkgs.sof-firmware
|
||||
];
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "citadel";
|
||||
networkmanager.enable = true;
|
||||
enableIPv6 = false;
|
||||
nameservers = ["${pieholeIp}" "${gatewayIp}" "8.8.8.8"];
|
||||
};
|
||||
|
||||
services.libinput.enable = true;
|
||||
}
|
|
@ -8,18 +8,11 @@
|
|||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sr_mod" "virtio_blk" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/9bed98b2-5ee2-4408-a9b1-6d40e9b68135";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
@ -1,23 +1,25 @@
|
|||
{ pkgs, lib, inputs, config, outputs, ...}:
|
||||
{ pkgs, lib, inputs, config, outputs, ... }:
|
||||
let
|
||||
sopsHashedPasswordFile = lib.optionalString (lib.hasAttr "sops-nix" inputs) config.sops.secrets."passwords/root".path;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.impermanence.nixosModules.impermanence
|
||||
./sops.nix
|
||||
./locale.nix
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
overlays = [
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.unstable-packages
|
||||
];
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
overlays = [
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.unstable-packages
|
||||
inputs.nur.overlay
|
||||
];
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
|
@ -32,16 +34,22 @@ in
|
|||
root = {
|
||||
hashedPasswordFile = sopsHashedPasswordFile;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.rsync
|
||||
pkgs.curl
|
||||
pkgs.just
|
||||
pkgs.git
|
||||
pkgs.vim
|
||||
];
|
||||
pkgs.rsync
|
||||
pkgs.curl
|
||||
pkgs.just
|
||||
pkgs.git
|
||||
pkgs.vim
|
||||
];
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{ pkgs, lib, inputs, config, ... }:
|
||||
|
||||
let
|
||||
{
|
||||
lib,
|
||||
inputs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
secretsDirectory = builtins.toString inputs.nix-secrets;
|
||||
secretsFile = "${secretsDirectory}/secrets.yaml";
|
||||
hasOptinPersistence = config.environment.persistence ? "/persist";
|
||||
hostname = config.networking.hostName;
|
||||
|
||||
in
|
||||
{
|
||||
in {
|
||||
imports = [
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
];
|
||||
|
@ -17,13 +17,13 @@ in
|
|||
validateSopsFiles = false;
|
||||
|
||||
age = {
|
||||
sshKeyPaths = [ "${lib.optionalString hasOptinPersistence "/persist"}/etc/ssh/ssh_host_ed25519_key" ];
|
||||
sshKeyPaths = ["${lib.optionalString hasOptinPersistence "/persist"}/etc/ssh/ssh_host_ed25519_key"];
|
||||
};
|
||||
secrets = {
|
||||
"passwords/root".neededForUsers = true;
|
||||
"ssh_keys/deploy_key/id_ed25519" = {
|
||||
path = "/etc/ssh/deploy_key-ssh-ed25519";
|
||||
};
|
||||
secrets = {
|
||||
"passwords/root".neededForUsers = true;
|
||||
"ssh_keys/deploy_key/id_ed25519" = {
|
||||
path = "/etc/ssh/deploy_key-ssh-ed25519";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
type = "btrfs";
|
||||
extraArgs = ["-f"];
|
||||
subvolumes = {
|
||||
"/root" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
|
||||
"/nix" = {
|
||||
mountOptions = [ "subvol=nix" "noatime" ];
|
||||
mountpoint = "/nix";
|
||||
};
|
||||
|
||||
"/swap" = {
|
||||
mountOptions = [ "noatime" ];
|
||||
mountpoint = "/.swapvol";
|
||||
swap.swapfile.size = "8192M";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,11 +1,11 @@
|
|||
{ device, fsType, encrypted, ... }:
|
||||
{ device, fsType, encrypted, impermanence, ... }:
|
||||
let
|
||||
# basic and perists configs. basic fs = ext4, persist fs = btrfs either encrypted or under lvm
|
||||
basic = import ./gpt-bios-compact.nix { inherit device; };
|
||||
btrfs-persist-lvm = import ./btrfs-lvm.nix { inherit device; };
|
||||
btrfs-persist-luks = import ./btrfs-luks.nix { inherit device; };
|
||||
fsModule = if impermanence then ./${fsType}/persist.nix else ./${fsType}/standard.nix;
|
||||
basic = import ./${fsType}/basic.nix { inherit device; };
|
||||
lvm = import ./lvm.nix { inherit device; fsModule = fsModule; };
|
||||
luks = import ./luks.nix { inherit device; fsModule = fsModule; };
|
||||
in
|
||||
if fsType == "ext4" then basic
|
||||
else if fsType == "btrfs" && encrypted then btrfs-persist-luks
|
||||
else if fsType == "btrfs" then btrfs-persist-lvm
|
||||
else null # or some default value
|
||||
else if fsType == "btrfs" && encrypted then luks
|
||||
else if fsType == "btrfs" then lvm
|
||||
else null
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
{device ? throw "Must define a device, e.g. /dev/sda"}:
|
||||
{
|
||||
device ? throw "Must define a device, e.g. /dev/sda",
|
||||
fsModule ? "Must specify submodule"
|
||||
}:
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
|
@ -26,7 +29,7 @@
|
|||
type = "luks";
|
||||
name = "crypted";
|
||||
passwordFile = "/tmp/luks_secret.key"; # Interactive
|
||||
content = (import ./btrfs-persist.nix);
|
||||
content = (import "${fsModule}");
|
||||
};
|
||||
};
|
||||
};
|
|
@ -1,4 +1,7 @@
|
|||
{device ? throw "Must define a device, e.g. /dev/sda"}:
|
||||
{
|
||||
device ? throw "Must define a device, e.g. /dev/sda",
|
||||
fsModule ? "Must specify submodule"
|
||||
}:
|
||||
{
|
||||
disko.devices = {
|
||||
disk.main = {
|
||||
|
@ -36,7 +39,7 @@
|
|||
lvs = {
|
||||
root = {
|
||||
size = "100%FREE";
|
||||
content = (import ./btrfs-persist.nix);
|
||||
content = (import "${fsModule}");
|
||||
};
|
||||
};
|
||||
};
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko ./zspeed.nix
|
|
@ -0,0 +1,70 @@
|
|||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
x = {
|
||||
type = "disk";
|
||||
device = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
zfs = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "zfs";
|
||||
pool = "zspeed";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
y = {
|
||||
type = "disk";
|
||||
device = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi3";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
zfs = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "zfs";
|
||||
pool = "zspeed";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
zpool = {
|
||||
zspeed = {
|
||||
type = "zpool";
|
||||
mode = "mirror";
|
||||
rootFsOptions = {
|
||||
"compression" = "zstd-4";
|
||||
"com.sun:auto-snapshot" = "false";
|
||||
"xattr" = "sa";
|
||||
"atime" = "off";
|
||||
};
|
||||
options = {
|
||||
"ashift" = "13";
|
||||
};
|
||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zspeed@blank$' || zfs snapshot zspeed@blank";
|
||||
|
||||
datasets = {
|
||||
postgres = {
|
||||
type = "zfs_volume";
|
||||
size = "10G -s";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "btrfs";
|
||||
mountpoint = "/postgres";
|
||||
};
|
||||
options = {
|
||||
"com.sun:auto-snapshot:daily" = "true";
|
||||
"volblocksize" = "8k";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = [
|
||||
pkgs.brightnessctl
|
||||
];
|
||||
services.illum.enable = true;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue