mirror of
https://github.com/nmasur/dotfiles
synced 2026-07-29 14:08:36 +00:00
Compare commits
30
Commits
e0fb590314
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
59685bf023 | ||
|
|
a3a5c516ce | ||
|
|
033026bff8 | ||
|
|
5929b3201d | ||
|
|
373beb6daf | ||
|
|
8cef9bfb59 | ||
|
|
98d426ce89 | ||
|
|
e107431fa9 | ||
|
|
1960d84e7a | ||
|
|
671a17af76 | ||
|
|
71709776f9 | ||
|
|
829af86dd8 | ||
|
|
e7fd5eb770 | ||
|
|
f0b400d134 | ||
|
|
573c0acd33 | ||
|
|
eec777c0c1 | ||
|
|
638b112db9 | ||
|
|
27917ffede | ||
|
|
73b62e0907 | ||
|
|
b25cfe6877 | ||
|
|
d162df2515 | ||
|
|
396337f74d | ||
|
|
76b50920de | ||
|
|
e04cdab409 | ||
|
|
d238b7a81a | ||
|
|
f3e24c3730 | ||
|
|
5862c7cb29 | ||
|
|
a175acd0ad | ||
|
|
3f3cf65c77 | ||
|
|
35d40ca346 |
@@ -0,0 +1,16 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
## 2026-07-25
|
||||||
|
|
||||||
|
- Added jjui config generation to `jujutsu.nix` in Home Manager to include custom GitHub ruleset bypass commands (`ctrl+b` and `ctrl+shift+b`).
|
||||||
|
- Added `overlays/cheetah3.nix` to disable `pythonMetadataCheckPhase` for `cheetah3`.
|
||||||
|
This fixes an issue where the NixOS rebuild fails for `sabnzbd` due to `importlib.metadata.PackageNotFoundError: No package metadata was found for cheetah3` during the Python package evaluation in `nixos-unstable`.
|
||||||
|
|
||||||
|
## 2026-07-20
|
||||||
|
|
||||||
|
- Added `overlays/paho-mqtt.nix` to disable paho-mqtt's flaky, socket-based
|
||||||
|
test suite. Its `checkPhase` hangs in the Nix sandbox and times out with a
|
||||||
|
`KeyboardInterrupt` after ~150s, which was breaking the `flame` rebuild
|
||||||
|
(paho-mqtt is pulled in transitively, e.g. via mealie). The override is
|
||||||
|
applied through `pythonPackagesExtensions` so it covers every Python
|
||||||
|
package set.
|
||||||
Generated
+121
-47
@@ -8,11 +8,11 @@
|
|||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1766810506,
|
"lastModified": 1782994178,
|
||||||
"narHash": "sha256-I4BxozsEu205tA7jazufztI8ZQ5p7hcCnjqrSKPz9nI=",
|
"narHash": "sha256-VGc3/2fe6hnOmNSLlOygEAbeS69v7A7rjKDKRzAgE2Q=",
|
||||||
"owner": "hraban",
|
"owner": "hraban",
|
||||||
"repo": "cl-nix-lite",
|
"repo": "cl-nix-lite",
|
||||||
"rev": "038e341cede255a83a8f04af114dc95717461d32",
|
"rev": "eb584721e5e799bafe0c6210a8a1a398f90e8ac0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -28,11 +28,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1781761792,
|
"lastModified": 1784500460,
|
||||||
"narHash": "sha256-rCPytmKNjctLloB6UgK5CRrHSwV4b0ygxtJLPPp8R14=",
|
"narHash": "sha256-UvORnAxTRHax7RG74W8Z2t4GvIkX6AjJ5kk0QlwZomo=",
|
||||||
"owner": "lnl7",
|
"owner": "lnl7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "a1fa429e945becaf60468600daf649be4ba0350c",
|
"rev": "57a3171f94705599a2499248ca5758d5eb47c0e0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -65,11 +65,11 @@
|
|||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730663653,
|
"lastModified": 1766808011,
|
||||||
"narHash": "sha256-kFCUWettiFHDIqxCWWQ9qY8pVh+Lj+XL0Giyy/kdomg=",
|
"narHash": "sha256-s83BS0abtIj7vzUf8JE0209KphfHA6qRw/92D9k/F+0=",
|
||||||
"owner": "hraban",
|
"owner": "hraban",
|
||||||
"repo": "flake-compat",
|
"repo": "flake-compat",
|
||||||
"rev": "e5b16676185cb7548581c852f51ce7f3a49bba5e",
|
"rev": "6e0aafdc4c4c2043c66f756d5045374b42184fc5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -80,6 +80,22 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-compat_2": {
|
"flake-compat_2": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1767039857,
|
||||||
|
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-compat_3": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1767039857,
|
"lastModified": 1767039857,
|
||||||
@@ -179,11 +195,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1783134515,
|
"lastModified": 1784913159,
|
||||||
"narHash": "sha256-qMoZazubXlXUD9k/syJ/aiWC4X4g73mwVmZ7Z4+rdpM=",
|
"narHash": "sha256-JWq0BfjO4ktpH5USfQNQzdvHpIDT8fSKD5K7LvdMRFs=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "b885baad531fa3d3beae2ba9a0712d22974d8016",
|
"rev": "079a3b5d1aa6a719920a51316253b7d6dd22738d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -203,11 +219,11 @@
|
|||||||
"treefmt-nix": "treefmt-nix_2"
|
"treefmt-nix": "treefmt-nix_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1766810876,
|
"lastModified": 1783182903,
|
||||||
"narHash": "sha256-VPElWFQIiP31lXQXEom+L4sl85alZpZn33O4hewsP9k=",
|
"narHash": "sha256-7IteXipJZfFepi5zakxe0jQ5i3vRBQguk0+Gtte1Fu4=",
|
||||||
"owner": "hraban",
|
"owner": "hraban",
|
||||||
"repo": "mac-app-util",
|
"repo": "mac-app-util",
|
||||||
"rev": "4747968574ea58512c5385466400b2364c85d2d0",
|
"rev": "039f33deef21782d4db97087f426504951239887",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -216,6 +232,46 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nix-caddy-withplugins": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat_2",
|
||||||
|
"nixpkgs": "nixpkgs_5"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1784936738,
|
||||||
|
"narHash": "sha256-X4w9BrFkisfzla3m1WwDJUicUbI7JRdhzq5aS7rrB0k=",
|
||||||
|
"owner": "MichailiK",
|
||||||
|
"repo": "nix-caddy-withplugins",
|
||||||
|
"rev": "70307cfc568e5434cf42067d797b27c38ea69944",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "MichailiK",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nix-caddy-withplugins",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nix-index-database": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1785046085,
|
||||||
|
"narHash": "sha256-UiK+mmZJuLWQVhJ5b2wDzogIYWAesyRm6LA3h3Ulh3Y=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nix-index-database",
|
||||||
|
"rev": "11665045df8b9938ef811a3bfdc65cffb02b4b70",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nix-index-database",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nix2vim": {
|
"nix2vim": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_2",
|
"flake-utils": "flake-utils_2",
|
||||||
@@ -275,11 +331,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1766736597,
|
"lastModified": 1779796641,
|
||||||
"narHash": "sha256-BASnpCLodmgiVn0M1MU2Pqyoz0aHwar/0qLkp7CjvSQ=",
|
"narHash": "sha256-ZsIrKmhp4vbBXoXXmR/tBXA/UCsAQiJL9vsgZEduhVY=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "f560ccec6b1116b22e6ed15f4c510997d99d5852",
|
"rev": "25f538306313eae3927264466c70d7001dcea1df",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -306,11 +362,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1782847225,
|
"lastModified": 1784707089,
|
||||||
"narHash": "sha256-JC9PjqKYG9ve5U8aDOLQipp3+KLANBHUvGdLZlxzdKI=",
|
"narHash": "sha256-2V/6imsUgB7mPZlHY54oeVBRDoZbPKnvzwkAHUSSufk=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "95ca1e203c0750115fd4a6f17d5a245dfe6b1edd",
|
"rev": "b3fe9581c9061c749abef42b6d4ee7b7c05c33fa",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -338,27 +394,27 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732617236,
|
"lastModified": 1782999065,
|
||||||
"narHash": "sha256-PYkz6U0bSEaEB1al7O1XsqVNeSNS+s3NVclJw7YC43w=",
|
"narHash": "sha256-5Dgj5+pIQYZKrXUGaLCk7CKfN3MmpwIhO94++WVxvng=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "af51545ec9a44eadf3fe3547610a5cdd882bc34e",
|
"rev": "80d591ed473cfc46329932c2aadac9b435342c7c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-26.05",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "af51545ec9a44eadf3fe3547610a5cdd882bc34e",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1761236834,
|
"lastModified": 1770107345,
|
||||||
"narHash": "sha256-+pthv6hrL5VLW2UqPdISGuLiUZ6SnAXdd2DdUE+fV2Q=",
|
"narHash": "sha256-tbS0Ebx2PiA1FRW8mt8oejR0qMXmziJmPaU1d4kYY9g=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d5faa84122bc0a1fd5d378492efce4e289f8eac1",
|
"rev": "4533d9293756b63904b7238acb84ac8fe4c8c2c4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -370,11 +426,27 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_5": {
|
"nixpkgs_5": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1782959384,
|
"lastModified": 1781074563,
|
||||||
"narHash": "sha256-xnJJk+ct+D2+wdRxj1wk36w5zV9RVESwRqcklPdt3fM=",
|
"narHash": "sha256-md8WlXOlfnIeHeOScMTTHFyf2d6iaTwPl2apR5EQ3P4=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "9ae611a455b90cf061d8f332b977e387bda8e1ca",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_6": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1784796856,
|
||||||
|
"narHash": "sha256-wWFrV5/Qbm+lyt5x20E/bSbfJiGKMo4RCxZV8cl/WZI=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "65179426c83bb3f6bc14898b42ea1c6f01d374b0",
|
"rev": "e2587caef70cea85dd97d7daab492899902dbf5d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -384,7 +456,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_6": {
|
"nixpkgs_7": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1744536153,
|
"lastModified": 1744536153,
|
||||||
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
|
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
|
||||||
@@ -408,11 +480,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1783145257,
|
"lastModified": 1784959021,
|
||||||
"narHash": "sha256-ToFI5ch+MRCsP82ghZMhkF/YbNmDWMmvvJadvKhDlb8=",
|
"narHash": "sha256-Atc5ydxAmAAD5o8e6F8VVxVCOQb82bqi5TRNRUSBvZU=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nur",
|
"repo": "nur",
|
||||||
"rev": "c50af1cc06115c76b81c0bbe079248193003e707",
|
"rev": "1166a294990afd245fd72b8d2896075222408399",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -427,9 +499,11 @@
|
|||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"mac-app-util": "mac-app-util",
|
"mac-app-util": "mac-app-util",
|
||||||
|
"nix-caddy-withplugins": "nix-caddy-withplugins",
|
||||||
|
"nix-index-database": "nix-index-database",
|
||||||
"nix2vim": "nix2vim",
|
"nix2vim": "nix2vim",
|
||||||
"nixos-generators": "nixos-generators",
|
"nixos-generators": "nixos-generators",
|
||||||
"nixpkgs": "nixpkgs_5",
|
"nixpkgs": "nixpkgs_6",
|
||||||
"nixpkgs-stable": "nixpkgs-stable",
|
"nixpkgs-stable": "nixpkgs-stable",
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"rust-overlay": "rust-overlay",
|
"rust-overlay": "rust-overlay",
|
||||||
@@ -440,14 +514,14 @@
|
|||||||
},
|
},
|
||||||
"rust-overlay": {
|
"rust-overlay": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_6"
|
"nixpkgs": "nixpkgs_7"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1783144302,
|
"lastModified": 1784956772,
|
||||||
"narHash": "sha256-NQnzmXwpEAd5tjMBh2+P/y9NknF+WHv5+6yoXoN4h/Y=",
|
"narHash": "sha256-5polVWDhgATIQj+RUV2ZlOd5nE6cGJo+C4tOEs5vp6U=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "fe5aee0952e8e1525533d61defd9e36513db811b",
|
"rev": "a163bd01a6e11ac58d4f8d11669da550b5afbbc6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -539,11 +613,11 @@
|
|||||||
"nixpkgs": "nixpkgs_4"
|
"nixpkgs": "nixpkgs_4"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1766000401,
|
"lastModified": 1780220602,
|
||||||
"narHash": "sha256-+cqN4PJz9y0JQXfAK5J1drd0U05D5fcAGhzhfVrDlsI=",
|
"narHash": "sha256-eynAfOmbmxJnkp7YewvCEbShNnnYJ9gLLqkzsYtBPeM=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"rev": "42d96e75aa56a3f70cab7e7dc4a32868db28e8fd",
|
"rev": "db947814a175b7ca6ded66e21383d938df01c227",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -554,17 +628,17 @@
|
|||||||
},
|
},
|
||||||
"wsl": {
|
"wsl": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_2",
|
"flake-compat": "flake-compat_3",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1781182279,
|
"lastModified": 1784642409,
|
||||||
"narHash": "sha256-V5EQQbDnmdiXGQXrEF1PEL7QYsFqfH8N1E89Z5ONwFk=",
|
"narHash": "sha256-hcbDqFuySAJawljt5r0sKBCJKYnbtGD0T/ZIozH1Dq0=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NixOS-WSL",
|
"repo": "NixOS-WSL",
|
||||||
"rev": "5675822ba756e6e56f8f6a5a76e90e0da2ece94d",
|
"rev": "eaeb18da90024448a60eb1ec7132eafa4003404e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -40,6 +40,12 @@
|
|||||||
# inputs.nixpkgs.follows = "nixpkgs"; # Use system packages list for their inputs
|
# inputs.nixpkgs.follows = "nixpkgs"; # Use system packages list for their inputs
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Caddy with decoupled plugin hashes
|
||||||
|
nix-caddy-withplugins = {
|
||||||
|
url = "github:MichailiK/nix-caddy-withplugins/nixos-unstable";
|
||||||
|
# Important: Do not follow nixpkgs here, per the README
|
||||||
|
};
|
||||||
|
|
||||||
# Manage disk format and partitioning
|
# Manage disk format and partitioning
|
||||||
disko = {
|
disko = {
|
||||||
url = "github:nix-community/disko";
|
url = "github:nix-community/disko";
|
||||||
@@ -52,6 +58,11 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nix-index-database = {
|
||||||
|
url = "github:nix-community/nix-index-database";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
# Convert Nix to Neovim config
|
# Convert Nix to Neovim config
|
||||||
nix2vim = {
|
nix2vim = {
|
||||||
url = "github:gytis-ivaskevicius/nix2vim";
|
url = "github:gytis-ivaskevicius/nix2vim";
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ rec {
|
|||||||
|
|
||||||
nmasur.profiles = {
|
nmasur.profiles = {
|
||||||
base.enable = true;
|
base.enable = true;
|
||||||
work.enable = true;
|
# work.enable = true;
|
||||||
extra.enable = true;
|
# extra.enable = true;
|
||||||
gaming.enable = true;
|
# gaming.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users."Noah.Masur" = {
|
home-manager.users."Noah.Masur" = {
|
||||||
@@ -26,6 +26,8 @@ rec {
|
|||||||
nmasur.profiles = {
|
nmasur.profiles = {
|
||||||
common.enable = true;
|
common.enable = true;
|
||||||
darwin-base.enable = true;
|
darwin-base.enable = true;
|
||||||
|
darwin-gaming.enable = true;
|
||||||
|
llm-development.enable = true;
|
||||||
power-user.enable = true;
|
power-user.enable = true;
|
||||||
work.enable = true;
|
work.enable = true;
|
||||||
experimental.enable = true;
|
experimental.enable = true;
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ rec {
|
|||||||
nmasur.profiles = {
|
nmasur.profiles = {
|
||||||
common.enable = true;
|
common.enable = true;
|
||||||
linux-base.enable = true;
|
linux-base.enable = true;
|
||||||
|
llm-development.enable = true;
|
||||||
power-user.enable = true;
|
power-user.enable = true;
|
||||||
};
|
};
|
||||||
nmasur.presets.programs.helix.enable = true;
|
nmasur.presets.programs.helix.enable = true;
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ rec {
|
|||||||
nmasur.profiles = {
|
nmasur.profiles = {
|
||||||
common.enable = true;
|
common.enable = true;
|
||||||
linux-base.enable = true;
|
linux-base.enable = true;
|
||||||
|
llm-development.enable = true;
|
||||||
power-user.enable = true;
|
power-user.enable = true;
|
||||||
};
|
};
|
||||||
home.stateVersion = "23.05";
|
home.stateVersion = "23.05";
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ rec {
|
|||||||
linux-base.enable = true;
|
linux-base.enable = true;
|
||||||
linux-gui.enable = true;
|
linux-gui.enable = true;
|
||||||
linux-gaming.enable = true;
|
linux-gaming.enable = true;
|
||||||
|
llm-development.enable = true;
|
||||||
power-user.enable = true;
|
power-user.enable = true;
|
||||||
developer.enable = true;
|
developer.enable = true;
|
||||||
experimental.enable = true;
|
experimental.enable = true;
|
||||||
@@ -51,7 +52,7 @@ rec {
|
|||||||
|
|
||||||
# Graphics and VMs
|
# Graphics and VMs
|
||||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = [ "kvm-amd" "it87" ];
|
||||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||||
|
|
||||||
# Required binary blobs to boot on this machine
|
# Required binary blobs to boot on this machine
|
||||||
@@ -68,16 +69,16 @@ rec {
|
|||||||
hardware.fancontrol.config = ''
|
hardware.fancontrol.config = ''
|
||||||
# Configuration file generated by pwmconfig, changes will be lost
|
# Configuration file generated by pwmconfig, changes will be lost
|
||||||
INTERVAL=10
|
INTERVAL=10
|
||||||
DEVPATH=hwmon0=devices/pci0000:00/0000:00:03.1/0000:06:00.0/0000:07:00.0/0000:08:00.0
|
DEVPATH=hwmon1=devices/pci0000:00/0000:00:03.1/0000:06:00.0/0000:07:00.0/0000:08:00.0
|
||||||
DEVNAME=hwmon0=amdgpu
|
DEVNAME=hwmon1=amdgpu
|
||||||
FCTEMPS=hwmon0/pwm1=hwmon0/temp1_input
|
FCTEMPS=hwmon1/pwm1=hwmon1/temp1_input
|
||||||
FCFANS= hwmon0/pwm1=hwmon0/fan1_input
|
FCFANS= hwmon1/pwm1=hwmon1/fan1_input
|
||||||
MINTEMP=hwmon0/pwm1=50
|
MINTEMP=hwmon1/pwm1=50
|
||||||
MAXTEMP=hwmon0/pwm1=70
|
MAXTEMP=hwmon1/pwm1=70
|
||||||
MINSTART=hwmon0/pwm1=100
|
MINSTART=hwmon1/pwm1=100
|
||||||
MINSTOP=hwmon0/pwm1=10
|
MINSTOP=hwmon1/pwm1=10
|
||||||
MINPWM=hwmon0/pwm1=10
|
MINPWM=hwmon1/pwm1=10
|
||||||
MAXPWM=hwmon0/pwm1=240
|
MAXPWM=hwmon1/pwm1=240
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# File systems must be declared in order to boot
|
# File systems must be declared in order to boot
|
||||||
|
|||||||
+19
-11
@@ -66,7 +66,9 @@ lib
|
|||||||
overlays = [
|
overlays = [
|
||||||
inputs.nur.overlays.default
|
inputs.nur.overlays.default
|
||||||
inputs.nix2vim.overlay
|
inputs.nix2vim.overlay
|
||||||
inputs.zellij-switch.overlays.default
|
(final: prev: {
|
||||||
|
zellij-switch = inputs.zellij-switch.packages.${prev.stdenv.hostPlatform.system}.default;
|
||||||
|
})
|
||||||
# inputs.helix.overlays.default
|
# inputs.helix.overlays.default
|
||||||
]
|
]
|
||||||
++ (importOverlays ../overlays);
|
++ (importOverlays ../overlays);
|
||||||
@@ -101,6 +103,9 @@ lib
|
|||||||
config.permittedInsecurePackages = [
|
config.permittedInsecurePackages = [
|
||||||
"litestream-0.3.13"
|
"litestream-0.3.13"
|
||||||
"electron-36.9.5"
|
"electron-36.9.5"
|
||||||
|
# Build-time-only dep of karakeep's frontend; CVEs don't reach
|
||||||
|
# the runtime closure. Remove once nixpkgs bumps it.
|
||||||
|
"pnpm-9.15.9"
|
||||||
];
|
];
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
}
|
}
|
||||||
@@ -149,10 +154,12 @@ lib
|
|||||||
pkgs = pkgsBySystem.${system};
|
pkgs = pkgsBySystem.${system};
|
||||||
modules = [
|
modules = [
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
inputs.nix-index-database.nixosModules.default
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
inputs.wsl.nixosModules.wsl
|
inputs.wsl.nixosModules.wsl
|
||||||
{ imports = (nixFiles ../platforms/nixos); }
|
{ imports = (nixFiles ../platforms/nixos); }
|
||||||
module
|
module
|
||||||
|
# (builtins.removeAttrs module [ "home-manager" ])
|
||||||
{
|
{
|
||||||
home-manager = {
|
home-manager = {
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
@@ -175,21 +182,21 @@ lib
|
|||||||
inherit system specialArgs;
|
inherit system specialArgs;
|
||||||
modules = [
|
modules = [
|
||||||
inputs.home-manager.darwinModules.home-manager
|
inputs.home-manager.darwinModules.home-manager
|
||||||
|
inputs.nix-index-database.darwinModules.nix-index
|
||||||
inputs.mac-app-util.darwinModules.default
|
inputs.mac-app-util.darwinModules.default
|
||||||
{
|
{
|
||||||
imports = (nixFiles ../platforms/nix-darwin);
|
imports = (nixFiles ../platforms/nix-darwin);
|
||||||
nixpkgs.pkgs = pkgsBySystem.${system};
|
nixpkgs.pkgs = pkgsBySystem.${system};
|
||||||
}
|
}
|
||||||
module
|
# Home Manager is intentionally NOT activated here. It is managed
|
||||||
{
|
# standalone via `nh home switch` (see homeConfigurations, extracted
|
||||||
home-manager = {
|
# from the host module's `home-manager.users`). Strip that attr so
|
||||||
extraSpecialArgs = {
|
# darwin-rebuild doesn't also activate a second, divergent HM
|
||||||
inherit colorscheme;
|
# generation with different store paths (useUserPackages puts packages
|
||||||
}
|
# in /etc/profiles/per-user vs. ~/.nix-profile standalone) -- that
|
||||||
// specialArgs;
|
# mismatch broke the prompt after every darwin-rebuild until the next
|
||||||
}
|
# `nh home switch`.
|
||||||
// homeModule.home-manager;
|
(builtins.removeAttrs module [ "home-manager" ])
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -220,6 +227,7 @@ lib
|
|||||||
pkgs = pkgsBySystem.${system};
|
pkgs = pkgsBySystem.${system};
|
||||||
modules = [
|
modules = [
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
inputs.nix-index-database.homeModules.default
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
inputs.wsl.nixosModules.wsl
|
inputs.wsl.nixosModules.wsl
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,67 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
home-manager.users.${config.user} = lib.mkIf pkgs.stdenv.isDarwin {
|
|
||||||
|
|
||||||
home.packages =
|
|
||||||
let
|
|
||||||
ldap_scheme = "ldaps";
|
|
||||||
magic_prefix = "take";
|
|
||||||
ldap_port = 3269;
|
|
||||||
jq_parse = pkgs.writeShellScriptBin "ljq" ''
|
|
||||||
jq --slurp \
|
|
||||||
--raw-input 'split("\n\n")|map(split("\n")|map(select(.[0:1]!="#" and length>0)) |select(length > 0)|map(capture("^(?<key>[^:]*:?): *(?<value>.*)") |if .key[-1:.key|length] == ":" then .key=.key[0:-1]|.value=(.value|@base64d) else . end)| group_by(.key) | map({key:.[0].key,value:(if .|length > 1 then [.[].value] else .[].value end)}) | from_entries)' | jq -r 'del(.[].thumbnailPhoto)'
|
|
||||||
'';
|
|
||||||
ldap_script = pkgs.writeShellScriptBin "ldap" ''
|
|
||||||
if ! [ "$LDAP_HOST" ]; then
|
|
||||||
echo "No LDAP_HOST specified!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
SEARCH_FILTER="$@"
|
|
||||||
ldapsearch -LLL \
|
|
||||||
-B -o ldif-wrap=no \
|
|
||||||
-E pr=5000/prompt \
|
|
||||||
-H "${ldap_scheme}://''${LDAP_HOST}:${builtins.toString ldap_port}" \
|
|
||||||
-D "${pkgs.lib.toUpper magic_prefix}2\\${pkgs.lib.toLower config.user}" \
|
|
||||||
-w "$(${pkgs._1password-cli}/bin/op item get T2 --fields label=password --reveal)" \
|
|
||||||
-b "dc=''${LDAP_HOST//./,dc=}" \
|
|
||||||
-s "sub" -x "(cn=''${SEARCH_FILTER})" \
|
|
||||||
| ${jq_parse}/bin/ljq
|
|
||||||
'';
|
|
||||||
ldapm_script = pkgs.writeShellScriptBin "ldapm" ''
|
|
||||||
if ! [ "$LDAP_HOST" ]; then
|
|
||||||
echo "No LDAP_HOST specified!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
${ldap_script}/bin/ldap "$@" | jq '[ .[].memberOf] | add'
|
|
||||||
'';
|
|
||||||
ldapg_script = pkgs.writeShellScriptBin "ldapg" ''
|
|
||||||
if ! [ "$LDAP_HOST" ]; then
|
|
||||||
echo "No LDAP_HOST specified!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
${ldap_script}/bin/ldap "$@" | jq '[ .[].member] | add'
|
|
||||||
'';
|
|
||||||
ldapl_script = pkgs.writeShellScriptBin "ldapl" ''
|
|
||||||
if ! [ "$LDAP_HOST" ]; then
|
|
||||||
echo "No LDAP_HOST specified!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
${ldap_script}/bin/ldap "*$@*" | jq -r '.[].name'
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
[
|
|
||||||
ldap_script
|
|
||||||
ldapm_script
|
|
||||||
ldapg_script
|
|
||||||
ldapl_script
|
|
||||||
jq_parse
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
|
|
||||||
# Homebrew - Mac-specific packages that aren't in Nix
|
|
||||||
config = lib.mkIf pkgs.stdenv.isDarwin {
|
|
||||||
|
|
||||||
# # Requires Homebrew to be installed
|
|
||||||
system.activationScripts.preActivation.text = ''
|
|
||||||
if ! xcode-select --version 2>/dev/null; then
|
|
||||||
$DRY_RUN_CMD xcode-select --install
|
|
||||||
fi
|
|
||||||
if ! /opt/homebrew/bin/brew --version 2>/dev/null; then
|
|
||||||
$DRY_RUN_CMD /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Add homebrew paths to CLI path
|
|
||||||
home-manager.users.${config.user}.home.sessionPath = [
|
|
||||||
"/opt/homebrew/bin/"
|
|
||||||
"/opt/homebrew/opt/trash/bin/"
|
|
||||||
];
|
|
||||||
|
|
||||||
homebrew = {
|
|
||||||
enable = true;
|
|
||||||
onActivation = {
|
|
||||||
autoUpdate = false; # Don't update during rebuild
|
|
||||||
cleanup = "zap"; # Uninstall all programs not declared
|
|
||||||
upgrade = true;
|
|
||||||
};
|
|
||||||
global = {
|
|
||||||
brewfile = true; # Run brew bundle from anywhere
|
|
||||||
};
|
|
||||||
brews = [
|
|
||||||
"trash" # Delete files and folders to trash instead of rm
|
|
||||||
"jiratui" # Terminal program to manage Jira
|
|
||||||
];
|
|
||||||
casks = [
|
|
||||||
"1password" # 1Password will not launch from Nix on macOS
|
|
||||||
# "gitify" # Git notifications in menu bar (downgrade manually from 4.6.1)
|
|
||||||
"keybase" # GUI on Nix not available for macOS
|
|
||||||
# "logitech-g-hub" # Mouse and keyboard management
|
|
||||||
"logitune" # Logitech webcam firmware
|
|
||||||
"meetingbar" # Show meetings in menu bar
|
|
||||||
"scroll-reverser" # Different scroll style for mouse vs. trackpad
|
|
||||||
"notunes" # Don't launch Apple Music with the play button
|
|
||||||
"steam" # Not packaged for Nixon macOS
|
|
||||||
"epic-games" # Not packaged for Nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
_inputs: _final: prev: {
|
||||||
|
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
|
||||||
|
(_pyfinal: pyprev: {
|
||||||
|
cheetah3 = pyprev.cheetah3.overridePythonAttrs (_old: {
|
||||||
|
dontCheckPythonMetadata = true;
|
||||||
|
});
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
inputs: inputs.nix-caddy-withplugins.overlays.default
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
# Disable paho-mqtt's flaky test suite.
|
||||||
|
#
|
||||||
|
# paho-mqtt's checkPhase runs socket-based integration tests that hang in
|
||||||
|
# the Nix sandbox (they eventually time out with a KeyboardInterrupt after
|
||||||
|
# ~150s, reporting errors and failing the build). This breaks the flame
|
||||||
|
# rebuild, where paho-mqtt is pulled in transitively (e.g. via mealie).
|
||||||
|
#
|
||||||
|
# Applied through pythonPackagesExtensions so it covers every Python
|
||||||
|
# package set (python3Packages, python314Packages, ...).
|
||||||
|
|
||||||
|
_inputs: _final: prev: {
|
||||||
|
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
|
||||||
|
(_pyfinal: pyprev: {
|
||||||
|
paho-mqtt = pyprev.paho-mqtt.overridePythonAttrs (_old: {
|
||||||
|
doCheck = false;
|
||||||
|
doInstallCheck = false;
|
||||||
|
});
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
buildNpmPackage,
|
||||||
|
fetchFromGitHub,
|
||||||
|
nodejs,
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildNpmPackage rec {
|
||||||
|
pname = "actualtap";
|
||||||
|
version = "1.0.34";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "MattFaz";
|
||||||
|
repo = "actualtap";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-I2yb3WCOXYx/6RXiKjePlpChrr9G1il44OdON/SeVCw=";
|
||||||
|
};
|
||||||
|
|
||||||
|
npmDepsHash = "sha256-LlTLwUt0Yja4NSBLbaYPV/keawSJKffno/28rtSj/oQ=";
|
||||||
|
|
||||||
|
dontNpmBuild = true;
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace src/server.js \
|
||||||
|
--replace-fail 'port: 3001' 'port: process.env.PORT || 3001'
|
||||||
|
'';
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cat <<EOF > $out/bin/actualtap
|
||||||
|
#!/bin/sh
|
||||||
|
exec ${lib.getExe nodejs} $out/lib/node_modules/actualtap/src/server.js "\$@"
|
||||||
|
EOF
|
||||||
|
chmod +x $out/bin/actualtap
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Automatically create transactions in Actual Budget when you use Tap-to-Pay on a mobile device";
|
||||||
|
homepage = "https://github.com/MattFaz/actualtap";
|
||||||
|
license = licenses.gpl3Only;
|
||||||
|
maintainers = [ ];
|
||||||
|
};
|
||||||
|
}
|
||||||
+2
-13
@@ -2,21 +2,10 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
fetchFromGitHub,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
# Maintain a static version so that the plugin hash doesn't keep breaking
|
pkgs.caddy.withPlugins {
|
||||||
(pkgs.caddy.overrideAttrs rec {
|
|
||||||
version = "2.10.2";
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "caddyserver";
|
|
||||||
repo = "caddy";
|
|
||||||
tag = "v${version}";
|
|
||||||
hash = "sha256-KvikafRYPFZ0xCXqDdji1rxlkThEDEOHycK8GP5e8vk=";
|
|
||||||
};
|
|
||||||
}).withPlugins
|
|
||||||
{
|
|
||||||
plugins = [ "github.com/caddy-dns/cloudflare@v0.2.1" ];
|
plugins = [ "github.com/caddy-dns/cloudflare@v0.2.1" ];
|
||||||
hash = "sha256-xz43pXTsnYmXZDAAUT+vTapoq3O/8br7igGwqZbjFdk=";
|
hash = "sha256-HuVBmiT3kD6RrDejQ6SnjCN8f7pFdZlGtZFbEf47bks=";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,6 +89,13 @@ let
|
|||||||
drf-access-policy
|
drf-access-policy
|
||||||
# psycopg-binary
|
# psycopg-binary
|
||||||
;
|
;
|
||||||
|
# clevercsv's test_encoding_chardet is nondeterministic (chardet
|
||||||
|
# returns None instead of ISO-8859-1/KOI8-R on some platforms),
|
||||||
|
# breaking the build. Skip its test suite.
|
||||||
|
clevercsv = pyprev.clevercsv.overridePythonAttrs (_old: {
|
||||||
|
doCheck = false;
|
||||||
|
doInstallCheck = false;
|
||||||
|
});
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -202,6 +202,9 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Used for macOS
|
||||||
|
xdg.enable = lib.mkDefault pkgs.stdenv.isDarwin;
|
||||||
|
|
||||||
xdg.desktopEntries.aerc = lib.mkIf (pkgs.stdenv.isLinux) {
|
xdg.desktopEntries.aerc = lib.mkIf (pkgs.stdenv.isLinux) {
|
||||||
name = "aerc";
|
name = "aerc";
|
||||||
exec = "${lib.getExe config.nmasur.presets.services.i3.terminal} -e aerc %u";
|
exec = "${lib.getExe config.nmasur.presets.services.i3.terminal} -e aerc %u";
|
||||||
|
|||||||
@@ -18,16 +18,16 @@ in
|
|||||||
ca = "cargo";
|
ca = "cargo";
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = [
|
||||||
gcc
|
pkgs.gcc
|
||||||
rustc
|
pkgs.rustc
|
||||||
cargo
|
pkgs.cargo
|
||||||
cargo-watch
|
pkgs.stable.cargo-watch
|
||||||
clippy
|
pkgs.clippy
|
||||||
rustfmt
|
pkgs.rustfmt
|
||||||
pkg-config
|
pkgs.pkg-config
|
||||||
openssl
|
pkgs.openssl
|
||||||
rust-analyzer
|
pkgs.rust-analyzer
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,13 +13,35 @@ in
|
|||||||
|
|
||||||
options.nmasur.presets.programs.fish-darwin.enable = lib.mkEnableOption {
|
options.nmasur.presets.programs.fish-darwin.enable = lib.mkEnableOption {
|
||||||
description = "Fish macOS options";
|
description = "Fish macOS options";
|
||||||
default = config.nmasur.presets.programs.fish && pkgs.stdenv.isDarwin;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
programs.fish.shellAbbrs = {
|
# Default shell setting doesn't work
|
||||||
|
home.sessionVariables = {
|
||||||
|
SHELL = "${pkgs.fish}/bin/fish";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.fish = {
|
||||||
|
shellAbbrs = {
|
||||||
# Shortcut to edit hosts file
|
# Shortcut to edit hosts file
|
||||||
hosts = "sudo nvim /etc/hosts";
|
hosts = "sudo hx /etc/hosts";
|
||||||
|
};
|
||||||
|
shellInit = ''
|
||||||
|
set -g __nixos_path_original $PATH
|
||||||
|
function __nixos_path_fix -d "fix PATH value"
|
||||||
|
set -l result (string split ":" $__nixos_path_original)
|
||||||
|
for elt in $PATH
|
||||||
|
if not contains -- $elt $result
|
||||||
|
set -a result $elt
|
||||||
|
end
|
||||||
|
end
|
||||||
|
set -g PATH $result
|
||||||
|
end
|
||||||
|
__nixos_path_fix
|
||||||
|
'';
|
||||||
|
|
||||||
|
# # Speeds up fish launch time on macOS
|
||||||
|
# useBabelfish = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,13 +16,12 @@ in
|
|||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
# Set the i3 terminal
|
# Set the i3 terminal
|
||||||
nmasur.presets.services.i3.terminal =
|
nmasur.presets.services.i3.terminal = config.programs.ghostty.package;
|
||||||
if pkgs.stdenv.isDarwin then pkgs.alacritty else config.programs.ghostty.package;
|
|
||||||
|
|
||||||
programs.ghostty = {
|
programs.ghostty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
package = if pkgs.stdenv.isDarwin then null else pkgs.ghostty;
|
package = if pkgs.stdenv.isDarwin then pkgs.ghostty-bin else pkgs.ghostty;
|
||||||
|
|
||||||
enableFishIntegration = true;
|
enableFishIntegration = true;
|
||||||
enableBashIntegration = true;
|
enableBashIntegration = true;
|
||||||
@@ -38,8 +37,8 @@ in
|
|||||||
fullscreen = if pkgs.stdenv.isDarwin then true else false;
|
fullscreen = if pkgs.stdenv.isDarwin then true else false;
|
||||||
keybind = [
|
keybind = [
|
||||||
"super+t=unbind" # Pass super-t to underlying tool (e.g. zellij tabs)
|
"super+t=unbind" # Pass super-t to underlying tool (e.g. zellij tabs)
|
||||||
"super+shift+bracket_right=unbind"
|
"super+shift+]=unbind"
|
||||||
"super+shift+bracket_left=unbind"
|
"super+shift+[=unbind"
|
||||||
"ctrl+tab=unbind"
|
"ctrl+tab=unbind"
|
||||||
"ctrl+shift+tab=unbind"
|
"ctrl+shift+tab=unbind"
|
||||||
"ctrl+tab=text:\\x1b[9;5u"
|
"ctrl+tab=text:\\x1b[9;5u"
|
||||||
|
|||||||
@@ -0,0 +1,83 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.nmasur.presets.programs.homebrew;
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
options.nmasur.presets.programs.homebrew.enable =
|
||||||
|
lib.mkEnableOption "Homebrew macOS package manager";
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
|
home.file.".Brewfile".text = /* homebrew */ ''
|
||||||
|
# Taps
|
||||||
|
# tap "homebrew/bundle"
|
||||||
|
|
||||||
|
# Brews (CLI Apps)
|
||||||
|
brew "trash" # Delete files and folders to trash instead of rm
|
||||||
|
|
||||||
|
# Casks (GUI Apps)
|
||||||
|
cask "scroll-reverser" # Different scroll style for mouse vs. trackpad
|
||||||
|
cask "notunes" # Don't launch Apple Music with the play button
|
||||||
|
cask "topnotch" # Darkens the menu bar to complete black
|
||||||
|
cask "ghostty" # Terminal application (not buildable on Nix on macOS)
|
||||||
|
cask "discord" # nixpkgs bundle breaks its notarization seal on macOS 26+
|
||||||
|
|
||||||
|
# Mac App Store apps (requires 'mas' CLI, optional)
|
||||||
|
# mas "Tailscale", id: 1475387142
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Add homebrew paths to CLI path
|
||||||
|
home.sessionPath = [
|
||||||
|
"/opt/homebrew/bin/"
|
||||||
|
"/opt/homebrew/opt/trash/bin"
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.fish.shellAbbrs.t = "trash";
|
||||||
|
|
||||||
|
home.activation.backendBrewBundle = /* bash */ ''
|
||||||
|
# Requires Homebrew to be installed
|
||||||
|
if ! /usr/bin/xcode-select --version 2>/dev/null; then
|
||||||
|
$DRY_RUN_CMD /usr/bin/xcode-select --install
|
||||||
|
fi
|
||||||
|
if ! /opt/homebrew/bin/brew --version 2>/dev/null; then
|
||||||
|
$DRY_RUN_CMD /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
verboseEcho "Syncing Homebrew dependencies via Brewfile..."
|
||||||
|
|
||||||
|
# Ensure Homebrew is in the PATH for the script (Apple Silicon path)
|
||||||
|
export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"
|
||||||
|
|
||||||
|
# Keep activation deterministic and non-interactive. Without this, brew
|
||||||
|
# auto-updates (git-fetches its taps) which can hang forever when there
|
||||||
|
# is no TTY (network stall, credential prompt, or a leftover brew lock).
|
||||||
|
export HOMEBREW_NO_AUTO_UPDATE=1
|
||||||
|
export HOMEBREW_NO_ENV_HINTS=1
|
||||||
|
|
||||||
|
# Point brew at the generated Brewfile in the Nix store directly. This
|
||||||
|
# avoids depending on the ~/.Brewfile symlink being linked first, and
|
||||||
|
# sidesteps the --global vs. inherited HOMEBREW_BUNDLE_FILE conflict.
|
||||||
|
unset HOMEBREW_BUNDLE_FILE
|
||||||
|
brewfile="${config.home.file.".Brewfile".source}"
|
||||||
|
|
||||||
|
if command -v brew &> /dev/null; then
|
||||||
|
# Install/upgrade everything declared in the Brewfile...
|
||||||
|
$DRY_RUN_CMD brew bundle install --file="$brewfile"
|
||||||
|
# ...then uninstall anything NOT listed (replaces deprecated --cleanup).
|
||||||
|
$DRY_RUN_CMD brew bundle cleanup --file="$brewfile" --force
|
||||||
|
else
|
||||||
|
verboseEcho "Warning: Homebrew not found. Actions skipped."
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
'';
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.nmasur.presets.programs.jujutsu;
|
cfg = config.nmasur.presets.programs.jujutsu;
|
||||||
|
tomlFormat = pkgs.formats.toml { };
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -31,6 +32,31 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
xdg.configFile."jjui/config.toml".source = tomlFormat.generate "jjui-config" {
|
||||||
|
actions = [
|
||||||
|
{
|
||||||
|
name = "set-github-bypass";
|
||||||
|
lua = ''
|
||||||
|
exec_shell([[gh api --method PATCH -H "Accept: application/vnd.github+json" /repos/$(gh repo view --json nameWithOwner -q .nameWithOwner)/properties/values -f 'properties[][property_name]=Allow-Ruleset-Bypass' -f 'properties[][value]=true']])
|
||||||
|
flash("Set GitHub rule bypass")
|
||||||
|
'';
|
||||||
|
key = "ctrl+b";
|
||||||
|
scope = "revisions";
|
||||||
|
desc = "Set GitHub rule bypass";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "remove-github-bypass";
|
||||||
|
lua = ''
|
||||||
|
exec_shell([[gh api --method PATCH -H "Accept: application/vnd.github+json" /repos/$(gh repo view --json nameWithOwner -q .nameWithOwner)/properties/values -f 'properties[][property_name]=Allow-Ruleset-Bypass' -f 'properties[][value]=']])
|
||||||
|
flash("Removed GitHub rule bypass")
|
||||||
|
'';
|
||||||
|
key = "ctrl+shift+b";
|
||||||
|
scope = "revisions";
|
||||||
|
desc = "Remove GitHub rule bypass";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
home.packages = [
|
home.packages = [
|
||||||
# Required for the fsmonitor to auto-snapshot
|
# Required for the fsmonitor to auto-snapshot
|
||||||
pkgs.stable.watchman
|
pkgs.stable.watchman
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
# pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
@@ -23,17 +23,18 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Create nix-index if doesn't exist
|
# Create nix-index if doesn't exist
|
||||||
home.activation.createNixIndex =
|
# Should not be necessary with the nix-index-database flake
|
||||||
let
|
# home.activation.createNixIndex =
|
||||||
cacheDir = "${config.xdg.cacheHome}/nix-index";
|
# let
|
||||||
in
|
# cacheDir = "${config.xdg.cacheHome}/nix-index";
|
||||||
lib.mkIf config.programs.nix-index.enable (
|
# in
|
||||||
config.lib.dag.entryAfter [ "writeBoundary" ] ''
|
# lib.mkIf config.programs.nix-index.enable (
|
||||||
if [ ! -d ${cacheDir} ]; then
|
# config.lib.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
run ${pkgs.nix-index}/bin/nix-index -f ${pkgs.path}
|
# if [ ! -d ${cacheDir} ]; then
|
||||||
fi
|
# run ${pkgs.nix-index}/bin/nix-index -f ${pkgs.path}
|
||||||
''
|
# fi
|
||||||
);
|
# ''
|
||||||
|
# );
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -15,10 +15,21 @@ in
|
|||||||
|
|
||||||
config = lib.mkIf (cfg.enable && (pkgs.stdenv.isDarwin || config.services.dunst.enable)) {
|
config = lib.mkIf (cfg.enable && (pkgs.stdenv.isDarwin || config.services.dunst.enable)) {
|
||||||
home.packages = [ pkgs.noti ];
|
home.packages = [ pkgs.noti ];
|
||||||
programs.fish.shellAbbrs = {
|
programs.fish = {
|
||||||
|
shellAbbrs = {
|
||||||
# Add noti for ghpr in Darwin
|
# Add noti for ghpr in Darwin
|
||||||
ghpr = lib.mkForce "gh pr create && sleep 3 && noti gh run watch";
|
ghpr = lib.mkForce "gh pr create && sleep 3 && noti gh run watch";
|
||||||
grw = lib.mkForce "noti gh run watch";
|
grw = lib.mkForce "noti gh run watch";
|
||||||
};
|
};
|
||||||
|
functions = {
|
||||||
|
gh-run = {
|
||||||
|
body =
|
||||||
|
lib.mkForce # fish
|
||||||
|
''
|
||||||
|
${lib.getExe pkgs.zellij} action new-pane --start-suspended -- noti gh run watch
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,6 +109,10 @@ in
|
|||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
default_mode = "locked";
|
default_mode = "locked";
|
||||||
|
# Spawn fish directly instead of trusting $SHELL, which inherits the
|
||||||
|
# macOS login shell. On darwin that login shell is no longer managed by
|
||||||
|
# nix-darwin, so $SHELL can point at a stale /run/current-system path.
|
||||||
|
default_shell = lib.getExe pkgs.fish;
|
||||||
# default_layout = "compact-top";
|
# default_layout = "compact-top";
|
||||||
# Remove border
|
# Remove border
|
||||||
pane_frames = false;
|
pane_frames = false;
|
||||||
|
|||||||
@@ -0,0 +1,93 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.nmasur.presets.services.darwin-settings;
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
options.nmasur.presets.services.darwin-settings.enable = lib.mkEnableOption "macOS settings";
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
|
targets.darwin.defaults = {
|
||||||
|
NSGlobalDomain = {
|
||||||
|
|
||||||
|
# Set to dark mode
|
||||||
|
AppleInterfaceStyle = "Dark";
|
||||||
|
|
||||||
|
# Don't change from dark to light automatically
|
||||||
|
# AppleInterfaceSwitchesAutomatically = false;
|
||||||
|
|
||||||
|
# Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)
|
||||||
|
AppleKeyboardUIMode = 3;
|
||||||
|
|
||||||
|
# Expand save panel by default
|
||||||
|
NSNavPanelExpandedStateForSaveMode = true;
|
||||||
|
|
||||||
|
# Expand print panel by default
|
||||||
|
PMPrintingExpandedStateForPrint = true;
|
||||||
|
|
||||||
|
# Replace press-and-hold with key repeat
|
||||||
|
ApplePressAndHoldEnabled = false;
|
||||||
|
|
||||||
|
# Set a fast key repeat rate
|
||||||
|
KeyRepeat = 2;
|
||||||
|
|
||||||
|
# Shorten delay before key repeat begins
|
||||||
|
InitialKeyRepeat = 12;
|
||||||
|
|
||||||
|
# Disable autocorrect capitalization
|
||||||
|
NSAutomaticCapitalizationEnabled = false;
|
||||||
|
|
||||||
|
# Disable autocorrect smart dashes
|
||||||
|
NSAutomaticDashSubstitutionEnabled = false;
|
||||||
|
|
||||||
|
# Disable autocorrect adding periods
|
||||||
|
NSAutomaticPeriodSubstitutionEnabled = false;
|
||||||
|
|
||||||
|
# Disable autocorrect smart quotation marks
|
||||||
|
NSAutomaticQuoteSubstitutionEnabled = false;
|
||||||
|
|
||||||
|
# Disable autocorrect spellcheck
|
||||||
|
NSAutomaticSpellingCorrectionEnabled = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
"com.apple.LaunchServices" = {
|
||||||
|
# Disable "Are you sure you want to open" dialog
|
||||||
|
LSQuarantine = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Where to save screenshots
|
||||||
|
"com.apple.screencapture" = {
|
||||||
|
location = "~/Downloads";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Disable disk image verification
|
||||||
|
"com.apple.frameworks.diskimages" = {
|
||||||
|
skip-verify = true;
|
||||||
|
skip-verify-locked = true;
|
||||||
|
skip-verify-remote = true;
|
||||||
|
};
|
||||||
|
# Require password immediately after screen saver begins
|
||||||
|
"com.apple.screensaver" = {
|
||||||
|
askForPassword = 1;
|
||||||
|
askForPasswordDelay = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
targets.darwin.currentHostDefaults = {
|
||||||
|
"com.apple.mouse.tapBehavior" = {
|
||||||
|
# Disable trackpad tap to click
|
||||||
|
Clicking = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.nmasur.presets.services.dock;
|
||||||
|
|
||||||
|
# macOS stores persistent-apps as an array of dicts, not strings.
|
||||||
|
# nix-darwin's dock module did this transform for us; targets.darwin.defaults
|
||||||
|
# writes values verbatim, so we build the tile dicts ourselves.
|
||||||
|
mkDockApp = path: {
|
||||||
|
tile-data.file-data = {
|
||||||
|
_CFURLString = path;
|
||||||
|
_CFURLStringType = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
options.nmasur.presets.services.dock.enable = lib.mkEnableOption "macOS Dock";
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
|
targets.darwin.defaults = {
|
||||||
|
"com.apple.dock" = {
|
||||||
|
magnification = true;
|
||||||
|
largesize = 48;
|
||||||
|
|
||||||
|
# Automatically show and hide the dock
|
||||||
|
autohide = true;
|
||||||
|
|
||||||
|
# Add translucency in dock for hidden applications
|
||||||
|
showhidden = true;
|
||||||
|
|
||||||
|
# Enable spring loading on all dock items
|
||||||
|
enable-spring-load-actions-on-all-items = true;
|
||||||
|
|
||||||
|
# Highlight hover effect in dock stack grid view
|
||||||
|
mouse-over-hilite-stack = true;
|
||||||
|
|
||||||
|
mineffect = "genie";
|
||||||
|
orientation = "bottom";
|
||||||
|
show-recents = false;
|
||||||
|
tilesize = 44;
|
||||||
|
|
||||||
|
persistent-apps = map mkDockApp [
|
||||||
|
"/Applications/1Password.app"
|
||||||
|
"${pkgs.thunderbird}/Applications/Thunderbird.app"
|
||||||
|
"${pkgs.slack}/Applications/Slack.app"
|
||||||
|
"/System/Applications/Reminders.app"
|
||||||
|
"/System/Applications/Calendar.app"
|
||||||
|
"/Applications/Claude.app"
|
||||||
|
"${pkgs.firefox-unwrapped}/Applications/Firefox.app"
|
||||||
|
"/System/Applications/Messages.app"
|
||||||
|
"/System/Applications/Preview.app"
|
||||||
|
"/System/Applications/Mail.app"
|
||||||
|
"/Applications/zoom.us.app"
|
||||||
|
"${config.programs.ghostty.package}/Applications/Ghostty.app"
|
||||||
|
# Discord comes from Homebrew on macOS: the nixpkgs bundle is
|
||||||
|
# modified in place, breaking its notarization seal, so macOS 26+
|
||||||
|
# refuses to launch it ("damaged"). See presets/programs/homebrew.nix.
|
||||||
|
"/Applications/Discord.app"
|
||||||
|
"${pkgs.obsidian}/Applications/Obsidian.app"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Automatically reload the Dock and Finder when Home Manager switches
|
||||||
|
home.activation = {
|
||||||
|
reloadMacSettings = config.lib.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
|
verboseEcho "Restarting macOS desktop services..."
|
||||||
|
run /usr/bin/killall Dock Finder || true
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.nmasur.presets.services.finder;
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
options.nmasur.presets.services.finder.enable = lib.mkEnableOption "macOS Finder options";
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
targets.darwin.defaults = {
|
||||||
|
"com.apple.finder" = {
|
||||||
|
# Default Finder window set to column view
|
||||||
|
FXPreferredViewStyle = "clmv";
|
||||||
|
|
||||||
|
# Finder search in current folder by default
|
||||||
|
FXDefaultSearchScope = "SCcf";
|
||||||
|
|
||||||
|
# Disable warning when changing file extension
|
||||||
|
FXEnableExtensionChangeWarning = false;
|
||||||
|
|
||||||
|
# Allow quitting of Finder application
|
||||||
|
QuitMenuItem = true;
|
||||||
|
|
||||||
|
# Disable the warning before emptying the Trash
|
||||||
|
WarnOnEmptyTrash = false;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
NSGlobalDomain = {
|
||||||
|
|
||||||
|
# Save to local disk by default, not iCloud
|
||||||
|
NSDocumentSaveNewDocumentsToCloud = false;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
# Avoid creating .DS_Store files on network or USB volumes
|
||||||
|
"com.apple.desktopservices" = {
|
||||||
|
DSDontWriteNetworkStores = true;
|
||||||
|
DSDontWriteUSBStores = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
+1
-1
@@ -57,7 +57,7 @@ function obj:init()
|
|||||||
self.launcher:bind("ctrl", "space", function() end)
|
self.launcher:bind("ctrl", "space", function() end)
|
||||||
self.launcher:bind("", "return", function()
|
self.launcher:bind("", "return", function()
|
||||||
-- self:switch("@wezterm@")
|
-- self:switch("@wezterm@")
|
||||||
self:switch("/Applications/Ghostty.app")
|
self:switch("@ghostty@")
|
||||||
end)
|
end)
|
||||||
self.launcher:bind("", "C", function()
|
self.launcher:bind("", "C", function()
|
||||||
self:switch("Calendar.app")
|
self:switch("Calendar.app")
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.nmasur.presets.services.hammerspoon;
|
cfg = config.nmasur.presets.services.hammerspoon;
|
||||||
|
# inherit (config.nmasur.settings) username;
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -15,14 +16,26 @@ in
|
|||||||
lib.mkEnableOption "Hammerspoon macOS automation";
|
lib.mkEnableOption "Hammerspoon macOS automation";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
|
home.file.".Brewfile".text = /* homebrew */ ''
|
||||||
|
cask "hammerspoon" # Different scroll style for mouse vs. trackpad
|
||||||
|
'';
|
||||||
|
|
||||||
|
targets.darwin.defaults = {
|
||||||
|
"org.hammerspoon.Hammerspoon" = {
|
||||||
|
MJConfigFile = "${config.xdg.configHome}/hammerspoon/init.lua";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
xdg.configFile."hammerspoon/init.lua".source = ./init.lua;
|
xdg.configFile."hammerspoon/init.lua".source = ./init.lua;
|
||||||
xdg.configFile."hammerspoon/Spoons/ControlEscape.spoon".source = ./Spoons/ControlEscape.spoon;
|
xdg.configFile."hammerspoon/Spoons/ControlEscape.spoon".source = ./Spoons/ControlEscape.spoon;
|
||||||
xdg.configFile."hammerspoon/Spoons/DismissAlerts.spoon".source = ./Spoons/DismissAlerts.spoon;
|
xdg.configFile."hammerspoon/Spoons/DismissAlerts.spoon".source = ./Spoons/DismissAlerts.spoon;
|
||||||
xdg.configFile."hammerspoon/Spoons/Launcher.spoon/init.lua".source =
|
xdg.configFile."hammerspoon/Spoons/Launcher.spoon/init.lua".source =
|
||||||
pkgs.replaceVars ./Spoons/Launcher.spoon/init.lua
|
pkgs.replaceVars ./Spoons/Launcher.spoon/init.lua
|
||||||
{
|
{
|
||||||
discord = "${pkgs.discord}/Applications/Discord.app";
|
discord = "Discord.app";
|
||||||
firefox = "${pkgs.firefox-unwrapped}/Applications/Firefox.app";
|
firefox = "${pkgs.firefox-unwrapped}/Applications/Firefox.app";
|
||||||
|
ghostty = "${pkgs.ghostty-bin}/Applications/Ghostty.app";
|
||||||
obsidian = "${pkgs.obsidian}/Applications/Obsidian.app";
|
obsidian = "${pkgs.obsidian}/Applications/Obsidian.app";
|
||||||
slack = "${pkgs.slack}/Applications/Slack.app";
|
slack = "${pkgs.slack}/Applications/Slack.app";
|
||||||
wezterm = "${pkgs.wezterm}/Applications/WezTerm.app";
|
wezterm = "${pkgs.wezterm}/Applications/WezTerm.app";
|
||||||
@@ -32,9 +45,18 @@ in
|
|||||||
xdg.configFile."hammerspoon/Spoons/HideZoomWindow.spoon".source = ./Spoons/HideZoomWindow.spoon;
|
xdg.configFile."hammerspoon/Spoons/HideZoomWindow.spoon".source = ./Spoons/HideZoomWindow.spoon;
|
||||||
|
|
||||||
home.activation.reloadHammerspoon = config.lib.dag.entryAfter [ "writeBoundary" ] ''
|
home.activation.reloadHammerspoon = config.lib.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
$DRY_RUN_CMD /Applications/Hammerspoon.app/Contents/Frameworks/hs/hs -c "hs.reload()" || true
|
# The `hs` CLI blocks forever on Hammerspoon's IPC message port when the
|
||||||
|
# app isn't running (|| true can't help — it never returns). Only reload
|
||||||
|
# when the app is actually up, and wrap each call in `timeout` as a hard
|
||||||
|
# backstop so activation can never hang even if IPC is unresponsive.
|
||||||
|
hs=/Applications/Hammerspoon.app/Contents/Frameworks/hs/hs
|
||||||
|
if /usr/bin/pgrep -x Hammerspoon > /dev/null 2>&1; then
|
||||||
|
$DRY_RUN_CMD ${pkgs.coreutils}/bin/timeout 10 "$hs" -c "hs.reload()" || true
|
||||||
$DRY_RUN_CMD sleep 1
|
$DRY_RUN_CMD sleep 1
|
||||||
$DRY_RUN_CMD /Applications/Hammerspoon.app/Contents/Frameworks/hs/hs -c "hs.console.clearConsole()" || true
|
$DRY_RUN_CMD ${pkgs.coreutils}/bin/timeout 10 "$hs" -c "hs.console.clearConsole()" || true
|
||||||
|
else
|
||||||
|
verboseEcho "Hammerspoon not running; skipping reload."
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.nmasur.presets.services.menubar;
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
options.nmasur.presets.services.menubar.enable = lib.mkEnableOption "macOS menubar settings";
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
|
home.packages = [
|
||||||
|
pkgs.ice-bar # Menu bar hiding
|
||||||
|
];
|
||||||
|
|
||||||
|
targets.darwin.defaults = {
|
||||||
|
NSGlobalDomain = {
|
||||||
|
|
||||||
|
# Only hide menu bar in fullscreen
|
||||||
|
_HIHideMenuBar = false;
|
||||||
|
|
||||||
|
NSStatusItemSelectionPadding = 6;
|
||||||
|
NSStatusItemSpacing = 6;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
"com.apple.menuextra.clock" = {
|
||||||
|
# Show seconds on the clock
|
||||||
|
ShowSeconds = true;
|
||||||
|
|
||||||
|
FlashDateSeparator = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
"leits.MeetingBar" = {
|
||||||
|
eventTimeFormat = ''"show"'';
|
||||||
|
eventTitleFormat = ''"none"'';
|
||||||
|
eventTitleIconFormat = ''"iconCalendar"'';
|
||||||
|
slackBrowser = ''{"deletable":true,"arguments":"","name":"Slack","path":""}'';
|
||||||
|
zoomBrowser = ''{"deletable":true,"arguments":"","name":"Zoom","path":""}'';
|
||||||
|
teamsBrowser = ''{"deletable":true,"arguments":"","name":"Teams","path":""}'';
|
||||||
|
KeyboardShortcuts_joinEventShortcut = ''{"carbonModifiers":6400,"carbonKeyCode":38}'';
|
||||||
|
timeFormat = ''"12-hour"'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -17,33 +17,23 @@ in
|
|||||||
|
|
||||||
nmasur.presets = {
|
nmasur.presets = {
|
||||||
fonts.enable = lib.mkDefault true;
|
fonts.enable = lib.mkDefault true;
|
||||||
services.hammerspoon.enable = lib.mkDefault true;
|
services = {
|
||||||
programs.nixpkgs-darwin.enable = lib.mkDefault true;
|
darwin-settings.enable = lib.mkDefault true;
|
||||||
programs.mpv.enable = lib.mkDefault true;
|
dock.enable = lib.mkDefault true;
|
||||||
|
finder.enable = lib.mkDefault true;
|
||||||
|
hammerspoon.enable = lib.mkDefault true;
|
||||||
|
menubar.enable = lib.mkDefault true;
|
||||||
|
};
|
||||||
|
programs = {
|
||||||
|
fish-darwin.enable = lib.mkDefault true;
|
||||||
|
homebrew.enable = lib.mkDefault true;
|
||||||
|
nixpkgs-darwin.enable = lib.mkDefault true;
|
||||||
|
mpv.enable = lib.mkDefault true;
|
||||||
|
noti.enable = lib.mkDefault true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.homeDirectory = lib.mkForce "/Users/${config.home.username}";
|
home.homeDirectory = lib.mkForce "/Users/${config.home.username}";
|
||||||
|
|
||||||
# Default shell setting doesn't work
|
|
||||||
home.sessionVariables = {
|
|
||||||
SHELL = "${pkgs.fish}/bin/fish";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Used for aerc
|
|
||||||
xdg.enable = lib.mkDefault pkgs.stdenv.isDarwin;
|
|
||||||
|
|
||||||
programs.fish.shellAbbrs.t = "trash";
|
|
||||||
|
|
||||||
# Add homebrew paths to CLI path
|
|
||||||
home.sessionPath = [
|
|
||||||
"/opt/homebrew/bin/"
|
|
||||||
"/opt/homebrew/opt/trash/bin"
|
|
||||||
];
|
|
||||||
|
|
||||||
home.packages = [
|
|
||||||
pkgs.noti # Create notifications programmatically
|
|
||||||
pkgs.ice-bar # Menu bar hiding
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Fix for: 'Error: HOME is set to "/var/root" but we expect "/var/empty"'
|
# Fix for: 'Error: HOME is set to "/var/root" but we expect "/var/empty"'
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.nmasur.profiles.darwin-gaming;
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
options.nmasur.profiles.darwin-gaming.enable = lib.mkEnableOption "gaming config for macOS";
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
|
home.file.".Brewfile".text = /* homebrew */ ''
|
||||||
|
# Casks (GUI Apps)
|
||||||
|
cask "steam" # Not packaged for Nix on macOS
|
||||||
|
cask "epic-games" # Not packaged for Nix
|
||||||
|
'';
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -21,6 +21,9 @@ in
|
|||||||
|
|
||||||
home.packages = [
|
home.packages = [
|
||||||
|
|
||||||
|
pkgs.nmasur.ren-find # Rename files
|
||||||
|
pkgs.nmasur.rep-grep # Replace text in files
|
||||||
|
|
||||||
# Charm tools
|
# Charm tools
|
||||||
|
|
||||||
pkgs.glow # Markdown previews
|
pkgs.glow # Markdown previews
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.nmasur.profiles.llm-development;
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
options.nmasur.profiles.llm-development.enable = lib.mkEnableOption "LLM coding tools";
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
|
home.packages = [
|
||||||
|
|
||||||
|
pkgs.pi-coding-agent # AI LLM Agent
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
@@ -29,8 +29,6 @@ in
|
|||||||
pkgs.nixfmt # Format Nix code
|
pkgs.nixfmt # Format Nix code
|
||||||
pkgs.nmasur.jqr # FZF fq JSON tool
|
pkgs.nmasur.jqr # FZF fq JSON tool
|
||||||
pkgs.nmasur.osc # Clipboard over SSH
|
pkgs.nmasur.osc # Clipboard over SSH
|
||||||
pkgs.nmasur.ren-find # Rename files
|
|
||||||
pkgs.nmasur.rep-grep # Replace text in files
|
|
||||||
pkgs.pandoc # Convert text documents
|
pkgs.pandoc # Convert text documents
|
||||||
pkgs.qrencode # Generate qr codes
|
pkgs.qrencode # Generate qr codes
|
||||||
pkgs.spacer # Output lines in terminal
|
pkgs.spacer # Output lines in terminal
|
||||||
|
|||||||
@@ -43,12 +43,20 @@ in
|
|||||||
pkgs.uv # Python packaging
|
pkgs.uv # Python packaging
|
||||||
];
|
];
|
||||||
|
|
||||||
|
home.file.".Brewfile".text = /* homebrew */ ''
|
||||||
|
# cask "1password" # 1Password will not launch from Nix on macOS
|
||||||
|
# cask "gitify" # Git notifications in menu bar (downgrade manually from 4.6.1)
|
||||||
|
# cask "logitech-g-hub" # Mouse and keyboard management
|
||||||
|
cask "logitune" # Logitech webcam firmware
|
||||||
|
cask "meetingbar" # Show meetings in menu bar
|
||||||
|
'';
|
||||||
|
|
||||||
programs.fish.shellAliases.ec2 = "aws-ec2";
|
programs.fish.shellAliases.ec2 = "aws-ec2";
|
||||||
|
|
||||||
nmasur.presets = {
|
nmasur.presets = {
|
||||||
fonts.enable = lib.mkDefault true;
|
fonts.enable = lib.mkDefault true;
|
||||||
programs = {
|
programs = {
|
||||||
_1password.enable = lib.mkDefault true;
|
# _1password.enable = lib.mkDefault true;
|
||||||
atuin.enable = lib.mkDefault true;
|
atuin.enable = lib.mkDefault true;
|
||||||
aws-ssh.enable = lib.mkDefault true;
|
aws-ssh.enable = lib.mkDefault true;
|
||||||
bash.enable = lib.mkDefault true;
|
bash.enable = lib.mkDefault true;
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.nmasur.presets.programs._1password;
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
options.nmasur.presets.programs._1password.enable = lib.mkEnableOption "1Password password manager";
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
# Unfree packages are already permitted via the shared nixpkgs instance
|
||||||
|
# created in lib/default.nix (config.allowUnfree = true). Setting
|
||||||
|
# nixpkgs.config here would conflict with nixpkgs.pkgs being set externally.
|
||||||
|
programs._1password.enable = true;
|
||||||
|
programs._1password-gui = {
|
||||||
|
enable = true;
|
||||||
|
# Certain features, including CLI integration and system authentication support,
|
||||||
|
# require enabling PolKit integration on some desktop environments (e.g. Plasma).
|
||||||
|
# polkitPolicyOwners = [ "yourUsernameHere" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -50,7 +50,10 @@ in
|
|||||||
"/System/Applications/Mail.app"
|
"/System/Applications/Mail.app"
|
||||||
"/Applications/zoom.us.app"
|
"/Applications/zoom.us.app"
|
||||||
"/Applications/Ghostty.app"
|
"/Applications/Ghostty.app"
|
||||||
"${pkgs.discord}/Applications/Discord.app"
|
# Discord comes from Homebrew on macOS: the nixpkgs bundle is modified
|
||||||
|
# in place, breaking its notarization seal, so macOS 26+ refuses to
|
||||||
|
# launch it ("damaged").
|
||||||
|
"/Applications/Discord.app"
|
||||||
"${pkgs.obsidian}/Applications/Obsidian.app"
|
"${pkgs.obsidian}/Applications/Obsidian.app"
|
||||||
"${pkgs.thunderbird}/Applications/Thunderbird.app"
|
"${pkgs.thunderbird}/Applications/Thunderbird.app"
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -25,76 +25,76 @@ in
|
|||||||
enableKeyMapping = true; # Allows for skhd
|
enableKeyMapping = true; # Allows for skhd
|
||||||
};
|
};
|
||||||
|
|
||||||
defaults = {
|
# defaults = {
|
||||||
NSGlobalDomain = {
|
# NSGlobalDomain = {
|
||||||
|
|
||||||
# Set to dark mode
|
# # Set to dark mode
|
||||||
AppleInterfaceStyle = "Dark";
|
# AppleInterfaceStyle = "Dark";
|
||||||
|
|
||||||
# Don't change from dark to light automatically
|
# # Don't change from dark to light automatically
|
||||||
# AppleInterfaceSwitchesAutomatically = false;
|
# # AppleInterfaceSwitchesAutomatically = false;
|
||||||
|
|
||||||
# Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)
|
# # Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)
|
||||||
AppleKeyboardUIMode = 3;
|
# AppleKeyboardUIMode = 3;
|
||||||
|
|
||||||
# Expand save panel by default
|
# # Expand save panel by default
|
||||||
NSNavPanelExpandedStateForSaveMode = true;
|
# NSNavPanelExpandedStateForSaveMode = true;
|
||||||
|
|
||||||
# Expand print panel by default
|
# # Expand print panel by default
|
||||||
PMPrintingExpandedStateForPrint = true;
|
# PMPrintingExpandedStateForPrint = true;
|
||||||
|
|
||||||
# Replace press-and-hold with key repeat
|
# # Replace press-and-hold with key repeat
|
||||||
ApplePressAndHoldEnabled = false;
|
# ApplePressAndHoldEnabled = false;
|
||||||
|
|
||||||
# Set a fast key repeat rate
|
# # Set a fast key repeat rate
|
||||||
KeyRepeat = 2;
|
# KeyRepeat = 2;
|
||||||
|
|
||||||
# Shorten delay before key repeat begins
|
# # Shorten delay before key repeat begins
|
||||||
InitialKeyRepeat = 12;
|
# InitialKeyRepeat = 12;
|
||||||
|
|
||||||
# Disable autocorrect capitalization
|
# # Disable autocorrect capitalization
|
||||||
NSAutomaticCapitalizationEnabled = false;
|
# NSAutomaticCapitalizationEnabled = false;
|
||||||
|
|
||||||
# Disable autocorrect smart dashes
|
# # Disable autocorrect smart dashes
|
||||||
NSAutomaticDashSubstitutionEnabled = false;
|
# NSAutomaticDashSubstitutionEnabled = false;
|
||||||
|
|
||||||
# Disable autocorrect adding periods
|
# # Disable autocorrect adding periods
|
||||||
NSAutomaticPeriodSubstitutionEnabled = false;
|
# NSAutomaticPeriodSubstitutionEnabled = false;
|
||||||
|
|
||||||
# Disable autocorrect smart quotation marks
|
# # Disable autocorrect smart quotation marks
|
||||||
NSAutomaticQuoteSubstitutionEnabled = false;
|
# NSAutomaticQuoteSubstitutionEnabled = false;
|
||||||
|
|
||||||
# Disable autocorrect spellcheck
|
# # Disable autocorrect spellcheck
|
||||||
NSAutomaticSpellingCorrectionEnabled = false;
|
# NSAutomaticSpellingCorrectionEnabled = false;
|
||||||
};
|
# };
|
||||||
|
|
||||||
# Disable "Are you sure you want to open" dialog
|
# # Disable "Are you sure you want to open" dialog
|
||||||
LaunchServices.LSQuarantine = false;
|
# LaunchServices.LSQuarantine = false;
|
||||||
|
|
||||||
# Disable trackpad tap to click
|
# # Disable trackpad tap to click
|
||||||
trackpad.Clicking = false;
|
# trackpad.Clicking = false;
|
||||||
|
|
||||||
# Where to save screenshots
|
# # Where to save screenshots
|
||||||
screencapture.location = "~/Downloads";
|
# screencapture.location = "~/Downloads";
|
||||||
|
|
||||||
CustomUserPreferences = {
|
# CustomUserPreferences = {
|
||||||
# Disable disk image verification
|
# # Disable disk image verification
|
||||||
"com.apple.frameworks.diskimages" = {
|
# "com.apple.frameworks.diskimages" = {
|
||||||
skip-verify = true;
|
# skip-verify = true;
|
||||||
skip-verify-locked = true;
|
# skip-verify-locked = true;
|
||||||
skip-verify-remote = true;
|
# skip-verify-remote = true;
|
||||||
};
|
# };
|
||||||
# Require password immediately after screen saver begins
|
# # Require password immediately after screen saver begins
|
||||||
"com.apple.screensaver" = {
|
# "com.apple.screensaver" = {
|
||||||
askForPassword = 1;
|
# askForPassword = 1;
|
||||||
askForPasswordDelay = 0;
|
# askForPasswordDelay = 0;
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
|
|
||||||
CustomSystemPreferences = {
|
# CustomSystemPreferences = {
|
||||||
|
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
|
|
||||||
# # Settings that don't have an option in nix-darwin
|
# # Settings that don't have an option in nix-darwin
|
||||||
# activationScripts.postActivation.text = ''
|
# activationScripts.postActivation.text = ''
|
||||||
|
|||||||
@@ -18,30 +18,31 @@ in
|
|||||||
|
|
||||||
nmasur.presets = {
|
nmasur.presets = {
|
||||||
programs = {
|
programs = {
|
||||||
|
_1password.enable = lib.mkDefault true;
|
||||||
fish.enable = lib.mkDefault true;
|
fish.enable = lib.mkDefault true;
|
||||||
homebrew.enable = lib.mkDefault true;
|
# homebrew.enable = lib.mkDefault true;
|
||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
daily-summary.enable = lib.mkDefault false;
|
# daily-summary.enable = lib.mkDefault false;
|
||||||
dock.enable = lib.mkDefault true;
|
# dock.enable = lib.mkDefault true;
|
||||||
finder.enable = lib.mkDefault true;
|
# finder.enable = lib.mkDefault true;
|
||||||
hammerspoon.enable = lib.mkDefault true;
|
# hammerspoon.enable = lib.mkDefault true;
|
||||||
menubar.enable = lib.mkDefault true;
|
# menubar.enable = lib.mkDefault true;
|
||||||
nix.enable = lib.mkDefault true;
|
nix.enable = lib.mkDefault true;
|
||||||
settings.enable = lib.mkDefault true;
|
settings.enable = lib.mkDefault true;
|
||||||
user.enable = lib.mkDefault true;
|
user.enable = lib.mkDefault true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
homebrew.brews = [
|
# homebrew.brews = [
|
||||||
"trash" # Delete files and folders to trash instead of rm
|
# "trash" # Delete files and folders to trash instead of rm
|
||||||
];
|
# ];
|
||||||
homebrew.casks = [
|
# homebrew.casks = [
|
||||||
"scroll-reverser" # Different scroll style for mouse vs. trackpad
|
# "scroll-reverser" # Different scroll style for mouse vs. trackpad
|
||||||
"notunes" # Don't launch Apple Music with the play button
|
# "notunes" # Don't launch Apple Music with the play button
|
||||||
"topnotch" # Darkens the menu bar to complete black
|
# "topnotch" # Darkens the menu bar to complete black
|
||||||
"ghostty" # Terminal application (not buildable on Nix on macOS)
|
# "ghostty" # Terminal application (not buildable on Nix on macOS)
|
||||||
];
|
# ];
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,12 +16,12 @@ in
|
|||||||
|
|
||||||
nmasur.profiles.base.enable = lib.mkDefault true;
|
nmasur.profiles.base.enable = lib.mkDefault true;
|
||||||
|
|
||||||
homebrew.casks = [
|
# homebrew.casks = [
|
||||||
"1password" # 1Password will not launch from Nix on macOS
|
# "1password" # 1Password will not launch from Nix on macOS
|
||||||
# "gitify" # Git notifications in menu bar (downgrade manually from 4.6.1)
|
# # "gitify" # Git notifications in menu bar (downgrade manually from 4.6.1)
|
||||||
# "logitech-g-hub" # Mouse and keyboard management
|
# # "logitech-g-hub" # Mouse and keyboard management
|
||||||
"logitune" # Logitech webcam firmware
|
# "logitune" # Logitech webcam firmware
|
||||||
"meetingbar" # Show meetings in menu bar
|
# "meetingbar" # Show meetings in menu bar
|
||||||
];
|
# ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,8 +109,9 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Allow web traffic to Caddy
|
# Allow web traffic to Caddy
|
||||||
nmasur.presets.services.caddy.routes = [
|
nmasur.presets.services.caddy.routes = lib.mkAfter [
|
||||||
{
|
{
|
||||||
|
group = "actual";
|
||||||
match = [ { host = [ hostnames.budget ]; } ];
|
match = [ { host = [ hostnames.budget ]; } ];
|
||||||
handle = [
|
handle = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,122 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (config.nmasur.settings) hostnames;
|
||||||
|
cfg = config.nmasur.presets.services.actualtap;
|
||||||
|
|
||||||
|
actualtapConfigType = lib.types.submodule {
|
||||||
|
options = {
|
||||||
|
port = lib.mkOption {
|
||||||
|
type = lib.types.port;
|
||||||
|
description = "Port to use for the actualtap instance localhost";
|
||||||
|
};
|
||||||
|
path = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Path prefix for this actualtap instance on the reverse proxy";
|
||||||
|
};
|
||||||
|
budgetIdFile = lib.mkOption {
|
||||||
|
type = lib.types.path;
|
||||||
|
description = "Path to the age encrypted file containing the budget ID";
|
||||||
|
};
|
||||||
|
apiKeyFile = lib.mkOption {
|
||||||
|
type = lib.types.path;
|
||||||
|
description = "Path to the age encrypted file containing the API key";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
options.nmasur.presets.services.actualtap = {
|
||||||
|
enable = lib.mkEnableOption "ActualTap instances";
|
||||||
|
instances = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf actualtapConfigType;
|
||||||
|
default = { };
|
||||||
|
description = "Attribute set of ActualTap instances.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
|
users.users.actualtap = {
|
||||||
|
isSystemUser = true;
|
||||||
|
group = "shared";
|
||||||
|
uid = 981;
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services = lib.mapAttrs' (
|
||||||
|
name: instance:
|
||||||
|
lib.nameValuePair "actualtap-${name}" {
|
||||||
|
enable = true;
|
||||||
|
description = "ActualTap - ${name}";
|
||||||
|
after = [
|
||||||
|
"network.target"
|
||||||
|
"actual.service"
|
||||||
|
];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
PORT = builtins.toString instance.port;
|
||||||
|
ACTUAL_URL = "http://127.0.0.1:${builtins.toString config.nmasur.presets.services.actualbudget.port}";
|
||||||
|
};
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
User = config.users.users.actualtap.name;
|
||||||
|
Group = config.users.users.actualtap.group;
|
||||||
|
EnvironmentFile = [
|
||||||
|
config.secrets."actualbudget-password".dest
|
||||||
|
config.secrets."actualtap-${name}-budget-id".dest
|
||||||
|
config.secrets."actualtap-${name}-api-key".dest
|
||||||
|
];
|
||||||
|
ExecStart = lib.getExe pkgs.nmasur.actualtap;
|
||||||
|
Restart = "on-failure";
|
||||||
|
WorkingDirectory = "/var/lib/actualtap-${name}";
|
||||||
|
StateDirectory = "actualtap-${name}";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
) cfg.instances;
|
||||||
|
|
||||||
|
secrets = lib.mkMerge (
|
||||||
|
lib.mapAttrsToList (name: instance: {
|
||||||
|
"actualtap-${name}-budget-id" = {
|
||||||
|
source = instance.budgetIdFile;
|
||||||
|
dest = "${config.secretsDirectory}/actualtap-${name}-budget-id";
|
||||||
|
owner = config.users.users.actualtap.name;
|
||||||
|
group = config.users.users.actualtap.group;
|
||||||
|
};
|
||||||
|
"actualtap-${name}-api-key" = {
|
||||||
|
source = instance.apiKeyFile;
|
||||||
|
dest = "${config.secretsDirectory}/actualtap-${name}-api-key";
|
||||||
|
owner = config.users.users.actualtap.name;
|
||||||
|
group = config.users.users.actualtap.group;
|
||||||
|
};
|
||||||
|
}) cfg.instances
|
||||||
|
);
|
||||||
|
|
||||||
|
nmasur.presets.services.caddy.routes = lib.mapAttrsToList (name: instance: {
|
||||||
|
group = "actual";
|
||||||
|
match = [
|
||||||
|
{
|
||||||
|
host = [ hostnames.budget ];
|
||||||
|
path = [ "${instance.path}*" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
handle = [
|
||||||
|
{
|
||||||
|
handler = "rewrite";
|
||||||
|
strip_path_prefix = instance.path;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
handler = "reverse_proxy";
|
||||||
|
upstreams = [ { dial = "localhost:${builtins.toString instance.port}"; } ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}) cfg.instances;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
-----BEGIN AGE ENCRYPTED FILE-----
|
||||||
|
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IE1nSGFPdyBIUkxs
|
||||||
|
RmFmNmo3L2MwVVhmeTdUVGdXOWRIVDd5c21EVnhtWWUwTVpWbW5zCnNSS1luUHNW
|
||||||
|
YlIwbmVrbTJTUUdOQkpCbGpNQm1tYlRrbDhaWEhJUDRHaDQKLT4gc3NoLWVkMjU1
|
||||||
|
MTkgWXlTVU1RIHJIYTd4eFo3aklGQ1Evb0JPOGZSWDh1Q1pXU3ExZ1pmR29qT2lP
|
||||||
|
bFcwREkKTWFXMlZCeXpoMi92OXdtN3plekE2dFlCbk44YncxLzJYZzE2amNIVnEz
|
||||||
|
QQotPiBzc2gtZWQyNTUxOSBuanZYNUEgWi8rNnV4VWtwUEEzbys4Skl1Z0p0Ly9r
|
||||||
|
ZS82dzFJeEhHVHpSNU04WU5CVQpIMWhQcDdNeU45dVpkVyswQW1RK2Q0aXpkZXMz
|
||||||
|
MXAraG9KUFBDUVdFcTRVCi0+IHNzaC1lZDI1NTE5IENxSU9VQSBUQWQvU0JwdTlX
|
||||||
|
UkJYakdYTjU1YlBzWHEzY3FQa1dhMmp6UjE0RTJYN1ZBCmk0SWc0Ym1mUTdVL1NJ
|
||||||
|
ZXJFVkNmckRaVnlkSmUxL0dSUlo5VER0b2x3WVUKLT4gc3NoLWVkMjU1MTkgejFP
|
||||||
|
Y1p3IHBIQllKcmczOVJvSzRMZW9mVjZjTFo1ZjVJNDRvUG9pSnlRZDBUWEtoV2sK
|
||||||
|
aGhPeUpkVEZ0QWxDM1VJZzlDWEZ2VnFuTFRCVDkzY2JLVWNQTUE2STMyRQotLS0g
|
||||||
|
cXhWR2lQWnkxOUZhRzhOTS96UDJWVmZEQVpZTkF1MmlpNCtEbDZzRGZaYwof4Y/t
|
||||||
|
N5osO/bY+ojbarYoCBq12NSaKKlL6MNy1OQZOuOF0IP1CZ0fLY+R9DgJcNol3I73
|
||||||
|
q4JyXbfohWtG/2NdIwhRXumQ/OnY1maVvg==
|
||||||
|
-----END AGE ENCRYPTED FILE-----
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
-----BEGIN AGE ENCRYPTED FILE-----
|
||||||
|
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IE1nSGFPdyAyRTF0
|
||||||
|
L3Y3ZVJ0YlJSbzR6cnNWeVNRd2czNUVKWmtQNFA3VFRlb053d1dRCmxmTGRGSFhL
|
||||||
|
UmlSdUVQNzVPcktIdE0yVWFhVGpGYVRPMEpNQll6Z0owNFEKLT4gc3NoLWVkMjU1
|
||||||
|
MTkgWXlTVU1RIHE5L09YNWFaT0JLT0o0YjdQY01GRDByeFVXeE9LMXNFNGFCWkFO
|
||||||
|
ZStBd28KamhUYzd1VXhlL3RqY3hlMG5UeGFJemY2ajRhVGZ2ZDJNb1hSRHkrUFNt
|
||||||
|
NAotPiBzc2gtZWQyNTUxOSBuanZYNUEgbDdMVzNTT1Y2VmVsZyt2WTh0RWdUVEpY
|
||||||
|
c0RoRWE2S2ZyZXFuTllFU1FVWQpmeDF0MEp2NEYxS2k1ZlJaTVNWMWdRRlJ1UWh2
|
||||||
|
Wm0xbHhGYXhoWGtDbVkwCi0+IHNzaC1lZDI1NTE5IENxSU9VQSBJeERSTUpPbzhu
|
||||||
|
NGQrZXRoWGJEalBlMHdQUmlsVkF2TEZBOStOZ3ExN2lzClRZeE5yZG1uY3ZRRDNy
|
||||||
|
am5uTjRiTnpLSkhURWZTNzgyVVdOVDA2WlpqZmsKLT4gc3NoLWVkMjU1MTkgejFP
|
||||||
|
Y1p3IGticUNqWDJ0RTJTZmdXdzVWM0xsejBvYUJ3MXZvNWw1OWE3aUJMTCtSQ2MK
|
||||||
|
KzMyZW5jZUNIV1puVFlLMEdyeUdoUUt3MjlzTUgvWlFob0QwME9ZZ1VVNAotLS0g
|
||||||
|
VU5nOFA0Nzd3ckhnRHdSNkVSNG9tZks5VmVoZnlmU1R6bzl4ZVdMcGlLTQqZWLkP
|
||||||
|
VdZPvgCJ8A9UcKWl+5f8Jjlc79d6ib8wwfMRl0zK4SNQJGgcXr6sFuieY3H4DzRb
|
||||||
|
MuqKZQBBIKtPAmrvmzcKgNSeiJoZjG801Jqd3lpkJEA=
|
||||||
|
-----END AGE ENCRYPTED FILE-----
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
-----BEGIN AGE ENCRYPTED FILE-----
|
||||||
|
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IE1nSGFPdyBSR2tx
|
||||||
|
b2FyZ2t0d2xONGIvYjJrcVU1VTNHT3RVbjlWT1IyUW1CM1BkNVNzCmJmNFFFbUR6
|
||||||
|
WG9ncmhuakFzVHhSVEtZUlR4dWg3cWRzUXc2ZmVpZ3NqZ1EKLT4gc3NoLWVkMjU1
|
||||||
|
MTkgWXlTVU1RIGFFRmFsVjdkTkFZY29XdWo4akVDaEZHMTdXRDY4N2U5WE13a1JD
|
||||||
|
QWdXMkUKbnVXazZpSzZqTHJqamFUdDJMMUpiTEhLeTJqcVNmV2dncjVvZlNNT09M
|
||||||
|
WQotPiBzc2gtZWQyNTUxOSBuanZYNUEgTzV0eGpSU2plaTFCTXZTbFB2R1VOQnFn
|
||||||
|
d01EUXcza3JuR3RFUzE3N2MzawpqT0ZRQ1hPTFcvZ2ZOQjNGcThYL1lSdURXbWlv
|
||||||
|
NkRSRERJQ1IvSHdMa2M4Ci0+IHNzaC1lZDI1NTE5IENxSU9VQSBvQjZkYVJjYy9H
|
||||||
|
L3BSVWRPczlOOGV2RkRBSGlIakF1cG1yQk9tbXNWdWlZCnZGaGxvdkZVWXp2THhK
|
||||||
|
RnRBQ2VSNkErU0VnOWlYbkY2U1JCZTlBSFFUK0UKLT4gc3NoLWVkMjU1MTkgejFP
|
||||||
|
Y1p3IFQrdUtDdENRK2dnN2t3dVBsN0oxYkNRSm43aDREa3ZJQjhvTWpxM0FWVEkK
|
||||||
|
OTNCVFRTclFFckFkQXBzWnBybWxKRm92TEFqRU5ZWkprdytJQm5RT2tOYwotLS0g
|
||||||
|
Nk5WZXhZM0VXaHpVK2EzeGFqNS9hZUlLQjlJRU9EMnVLL3VRV3RKTkVRcwpA8GqA
|
||||||
|
24oLFT1VIE5eNl/Ltd102W4J6jafmiizCEu3/7EULI/X5oh2LvjSjOuivW6y+Gbu
|
||||||
|
rXITu245mDM6ZqE2LikYR6134QSC2lmNvw==
|
||||||
|
-----END AGE ENCRYPTED FILE-----
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
-----BEGIN AGE ENCRYPTED FILE-----
|
||||||
|
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IE1nSGFPdyAyakVC
|
||||||
|
ZGZqMitTVVc0KzJSV0c3V3Ryc2JSWXp0V2I4YURmektyVGh5a2hBCjlCaGQ4SmxQ
|
||||||
|
VzhBRWw4SW9QamdVZDVvK3laVkNuWTRhMW1hR1ZmS1lqOWsKLT4gc3NoLWVkMjU1
|
||||||
|
MTkgWXlTVU1RIE5oVVdMWHZlSEJ2akc1UVcrdnNNOWgzaGFhb2VWNlNxQU5yQzM0
|
||||||
|
dGk3eGsKaE1Ba3BneC9yQTBpcXo3YWhqcDZheUJnbE5vS0Z0WUNzYnQ1a2o5OVN4
|
||||||
|
YwotPiBzc2gtZWQyNTUxOSBuanZYNUEgcitOTmNKS04xc01LNTZKbE9QblVKRUVr
|
||||||
|
ZHdyY0Q2VWtUQ1VOQnFZTjNpbwp0RmNTV2RwR2RlcG5odE81VEFxNGhJOVFYd3Zk
|
||||||
|
TU9IanIzMFkxVU1GUlQwCi0+IHNzaC1lZDI1NTE5IENxSU9VQSBmRC92WjRkTVFz
|
||||||
|
eGlFa1VhcEk1NVpkVnFVVkpZRTdzMGR1aWNuWW9ZTFFVCkFRaVM5a1hjcjV3dU1m
|
||||||
|
WHNnSWhSN1l4ZVEwUkhXZVg3UFRZQStSVllFcEEKLT4gc3NoLWVkMjU1MTkgejFP
|
||||||
|
Y1p3IFUreGtraXo5aXM2OTFKcjZkL2p0ZEVwaEFXL3B5R2M1Q1J2elZYVityRUkK
|
||||||
|
bk80bnp1UzgzdmFqV0RJaVFhaytPWnJpQ0Y4Wmg1M2xLbGJyUzZzazlMUQotLS0g
|
||||||
|
dlZiRzZVSkYwbEVDaEVzZUhoRUkwMUpTM3pyOWJBaHUzZG8vejdmVklBYwpirejN
|
||||||
|
5cR1roLwVsunUkn+gnaMCYk+tDlaZABGXAC94k9RQVF06KquxeK0S17KOeQNn9Gb
|
||||||
|
N70JDklLLfuDsWbry6rIDYqsiEmTKi0WXhn44E1PaXQ=
|
||||||
|
-----END AGE ENCRYPTED FILE-----
|
||||||
@@ -32,15 +32,11 @@ in
|
|||||||
reverseProxyAuth.enable = false;
|
reverseProxyAuth.enable = false;
|
||||||
enableBookConversion = true;
|
enableBookConversion = true;
|
||||||
enableBookUploading = true;
|
enableBookUploading = true;
|
||||||
|
# Point this directly to the folder containing your 'metadata.db' file
|
||||||
calibreLibrary = libraryPath;
|
calibreLibrary = libraryPath;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# metadata.db lives in /var/lib/calibre-web-db and is symlinked into the
|
|
||||||
# library dir; ProtectSystem=strict in the upstream module blocks writes
|
|
||||||
# through symlinks unless the real target path is also listed.
|
|
||||||
systemd.services.calibre-web.serviceConfig.ReadWritePaths = [ "/var/lib/calibre-web-db" ];
|
|
||||||
|
|
||||||
# Allow web traffic to Caddy
|
# Allow web traffic to Caddy
|
||||||
nmasur.presets.services.caddy.routes = [
|
nmasur.presets.services.caddy.routes = [
|
||||||
{
|
{
|
||||||
@@ -65,6 +61,13 @@ in
|
|||||||
# Grant user access to Calibre directories
|
# Grant user access to Calibre directories
|
||||||
users.users.${username}.extraGroups = [ "calibre-web" ];
|
users.users.${username}.extraGroups = [ "calibre-web" ];
|
||||||
|
|
||||||
|
# Ensure the service has explicit filesystem read/write access to the library path
|
||||||
|
# This fixes the "sqlite3.OperationalError: unable to open database file" bug
|
||||||
|
systemd.services.calibre-web.serviceConfig.ReadWritePaths = [
|
||||||
|
libraryPath
|
||||||
|
"/var/lib/calibre-web-db"
|
||||||
|
];
|
||||||
|
|
||||||
# Run a backup on a schedule
|
# Run a backup on a schedule
|
||||||
systemd.timers.calibre-backup = lib.mkIf config.nmasur.presets.services.litestream.enable {
|
systemd.timers.calibre-backup = lib.mkIf config.nmasur.presets.services.litestream.enable {
|
||||||
timerConfig = {
|
timerConfig = {
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Fix BASE_URL for downloading backups
|
||||||
|
systemd.services.mealie.environment.BASE_URL = lib.mkForce "https://${hostnames.recipes}";
|
||||||
|
|
||||||
nmasur.presets.services.caddy.routes = [
|
nmasur.presets.services.caddy.routes = [
|
||||||
{
|
{
|
||||||
match = [ { host = [ hostnames.recipes ]; } ];
|
match = [ { host = [ hostnames.recipes ]; } ];
|
||||||
|
|||||||
@@ -57,9 +57,10 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
# Extending time for home-manager build for things like nix-index cache
|
# Extending time for home-manager build for things like nix-index cache
|
||||||
systemd.services."home-manager-${username}" = {
|
# Should not be necessary with nix-index-database flake
|
||||||
serviceConfig.TimeoutStartSec = lib.mkForce "45m";
|
# systemd.services."home-manager-${username}" = {
|
||||||
};
|
# serviceConfig.TimeoutStartSec = lib.mkForce "45m";
|
||||||
|
# };
|
||||||
|
|
||||||
allowUnfreePackages = config.home-manager.users.${username}.allowUnfreePackages;
|
allowUnfreePackages = config.home-manager.users.${username}.allowUnfreePackages;
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,23 @@ in
|
|||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
actualbudget.enable = lib.mkDefault true;
|
actualbudget.enable = lib.mkDefault true;
|
||||||
|
actualtap = {
|
||||||
|
enable = lib.mkDefault true;
|
||||||
|
instances = {
|
||||||
|
budget1 = {
|
||||||
|
port = 3031;
|
||||||
|
path = "/actualtap1";
|
||||||
|
budgetIdFile = ../presets/services/actualtap/budget1-id.age;
|
||||||
|
apiKeyFile = ../presets/services/actualtap/budget1-api-key.age;
|
||||||
|
};
|
||||||
|
budget2 = {
|
||||||
|
port = 3032;
|
||||||
|
path = "/actualtap2";
|
||||||
|
budgetIdFile = ../presets/services/actualtap/budget2-id.age;
|
||||||
|
apiKeyFile = ../presets/services/actualtap/budget2-api-key.age;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
caddy.enable = lib.mkDefault true;
|
caddy.enable = lib.mkDefault true;
|
||||||
cloudflare.enable = lib.mkDefault true;
|
cloudflare.enable = lib.mkDefault true;
|
||||||
cloudflared.enable = lib.mkDefault true;
|
cloudflared.enable = lib.mkDefault true;
|
||||||
|
|||||||
Reference in New Issue
Block a user