174 Commits

Author SHA1 Message Date
7a22e798fc autohotkey v2 for windows 2024-06-02 08:08:05 -04:00
196d2e53e0 Create caps-lock-ctrl.reg for windows 2024-06-02 07:43:15 -04:00
204621a0ba add gh-dash for checking prs 2024-05-28 16:32:46 -04:00
ab050582c1 fix: filetype patterns and add comment syntax for nvim 0.10 2024-05-28 11:08:22 -04:00
6cf4c4979d add notunes package to prevent apple music from opening randomly 2024-05-28 10:27:54 -04:00
ad0bb2d804 update neovim and others 2024-05-28 07:50:14 -04:00
5117b14388 add caddy pkg for flame 2024-05-14 20:23:59 +00:00
e6bde77984 add teams on macos 2024-05-14 16:01:21 -04:00
b546d5b43a update records for destroy 2024-05-09 16:58:14 -04:00
5aa0a935ad remove comments from tf 2024-05-09 16:55:48 -04:00
4555797667 fix: letsencrypt dupe cert limit 2024-05-09 15:07:51 -04:00
5edd1a50d3 move vmvariant to nixos only 2024-05-09 14:41:58 -04:00
a16e3ae3cb add values for destroy 2024-05-08 22:17:23 -04:00
edff6fc768 add teams on macos 2024-05-08 17:23:56 -04:00
45ec4e5a3f try switching from checksum to etag 2024-05-08 00:09:47 -04:00
48fbb2e2d9 fixes to n8n config 2024-05-07 23:46:03 -04:00
7ce9ed564e enforce that instance is running 2024-05-07 23:28:46 -04:00
8074276643 use terraform_data to fix data-based replacement 2024-05-07 23:23:28 -04:00
6edc828ece pass pkgs-caddy to arrow 2024-05-07 20:09:51 -04:00
4b22c774e2 try enabling checksum mode on s3 to get checksum values 2024-05-07 20:08:33 -04:00
b7e81e009c make sure to replace ami if s3 object changes 2024-05-07 20:04:04 -04:00
3d90674522 add ssm agent to wheel 2024-05-07 17:52:48 -04:00
0582b4a147 fix: dupe resource 2024-05-07 16:25:53 -04:00
c06cb27bcc register instance profile for ssm and allow ping 2024-05-07 16:24:12 -04:00
de106298d6 Revert "debug: terraform cycle"
This reverts commit b34997257c.
2024-05-07 15:37:28 -04:00
b34997257c debug: terraform cycle 2024-05-07 15:35:27 -04:00
ddfaf0064c fix: reference to removed var in tf 2024-05-07 15:29:08 -04:00
e561d5984b switch to uploading image to s3 without tf 2024-05-07 15:12:21 -04:00
de766b6893 add aws ssm agent for ami 2024-05-06 16:18:28 -04:00
654009ba74 free disk space to build 2024-05-06 15:08:37 -04:00
a7006af5ad allow n8n as unfree 2024-05-06 14:38:03 -04:00
452afd70c1 enable n8n on arrow 2024-05-06 14:26:24 -04:00
0c399fc269 fix: forgot to add host_ip to aws tf 2024-05-06 14:00:56 -04:00
e59c565e2f add enhanced networking required for some aws instances 2024-05-06 11:45:24 -04:00
d0e613f093 try using larger volume for snapshot 2024-05-06 11:19:46 -04:00
14538d83f5 fix: lost line from workflow 2024-05-06 10:39:00 -04:00
2d31f5726f setup s3 cache for aws 2024-05-06 10:38:09 -04:00
f4ed3f0ec6 try to add root device name for ami 2024-05-05 23:07:54 -04:00
d07abccbce fix: no default tags exist 2024-05-05 22:53:07 -04:00
0feb11b017 fix: point to actual location of vhd for arrow-aws 2024-05-05 20:57:08 -04:00
da559f808a add images bucket tf var 2024-05-05 18:14:07 -04:00
9ebdfa1071 fix: tf backend can't be a variable 2024-05-05 16:36:34 -04:00
5bd81813cb switch to my own fork of gh-collaborators to fix go 2024-05-05 16:17:06 -04:00
69b2332700 fix: xserver libinput renamed without xserver 2024-05-05 15:54:12 -04:00
d4708cd5f6 revert to earliest go module for gh-collaborator compatibility
even though should be built with buildGo120Module
2024-05-05 15:48:49 -04:00
962515c10e replace caddy-cloudflare overlay with nixpkgs pr plugin override 2024-05-05 15:18:43 -04:00
ee97213b9f replace snappymail repo with my own for stability 2024-05-05 15:17:27 -04:00
97ccf1c170 flake.lock: Update
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/285e26465a0bae510897ca04da26ce6307c652b4?narHash=sha256-kcBiIrmqzt3bNTr2GMBfAyA%2Bon8BEKO1iKzzDFQZkjI%3D' (2024-04-26)
  → 'github:nix-community/disko/d57058eb09dd5ec00c746df34fe0a603ea744370?narHash=sha256-W7%2BrtMzRmdovzndN2NYUv5xzkbMudtQ3jbyFuGk0O1E%3D' (2024-05-02)
• Updated input 'firefox-darwin':
    'github:bandithedoge/nixpkgs-firefox-darwin/7e82af679667cf9d56075dfa375b32c317aa708d?narHash=sha256-Ep8jPm%2BQ832byS7VtlkdXEEWGFhk5BMX0CjkVtC1G4E%3D' (2024-04-24)
  → 'github:bandithedoge/nixpkgs-firefox-darwin/7e9014891eebabffa68351e3360da3fbc59b8066?narHash=sha256-kTAMHZ1DDGauq3f5IzPw%2BEtVOgWdctLPUMJiqciqOx0%3D' (2024-05-05)
• Updated input 'home-manager':
    'github:nix-community/home-manager/c1609d584a6b5e9e6a02010f51bd368cb4782f8e?narHash=sha256-eT7DENhYy7EPLOqHI9zkIMD9RvMCXcqh6gGqOK5BWYQ%3D' (2024-04-27)
  → 'github:nix-community/home-manager/e0825ea2112d09d9f0680833cd716f6aee3b973f?narHash=sha256-02r2Qzh4fGYBPB/3Lj8vwPMtE6H/UchZnN7A/dQMHIA%3D' (2024-05-04)
• Updated input 'nextcloud-snappymail':
    'https://snappymail.eu/repository/nextcloud/snappymail-2.36.1-nextcloud.tar.gz?narHash=sha256-CsAUnbA/9XiVuk96pOK%2BE%2B%2Blp8BlJITtfExWcb9rqPk%3D' (2024-04-26)
  → 'https://snappymail.eu/repository/nextcloud/snappymail-2.36.1-nextcloud.tar.gz?narHash=sha256-6mel49dSTujJnpdUt1aOJ87duXU/DBqpuqgZOKP1YII%3D' (2024-04-24)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/7bb2ccd8cdc44c91edba16c48d2c8f331fb3d856?narHash=sha256-Drmja/f5MRHZCskS6mvzFqxEaZMeciScCTFxWVLqWEY%3D' (2024-04-25)
  → 'github:nixos/nixpkgs/63c3a29ca82437c87573e4c6919b09a24ea61b0f?narHash=sha256-4cPymbty65RvF1DWQfc%2BBc8B233A1BWxJnNULJKQ1EY%3D' (2024-05-02)
• Updated input 'nur':
    'github:nix-community/nur/1348a217ce75f5171b65873c5146b47e0d26bc83?narHash=sha256-SZTU/TQFzihktp/SPzY3yzMnrYi7EuaCIA/g4jNA8KU%3D' (2024-04-28)
  → 'github:nix-community/nur/49f72c695fb2f46c8aeb1549704246b9558b2011?narHash=sha256-G/dc755qMdAMvXuZsi1OFCzD49OWszdMSnp12%2B1eFcM%3D' (2024-05-05)
• Updated input 'nvim-lint-src':
    'github:mfussenegger/nvim-lint/f098232d70cebe90e27404928c9bc19ca7a5a7b5?narHash=sha256-QyS%2BxSIOVbJdf/vLU0o8fdZrQ%2BMssolTyg75ZSnP0fY%3D' (2024-04-16)
  → 'github:mfussenegger/nvim-lint/861a04313501563bb1b11f125ae9b7237a517b9b?narHash=sha256-aM4oWSZrZb660wEpLQnFyoBkH%2BMSi0WgfBIztk98Qtk%3D' (2024-04-30)
• Updated input 'nvim-tree-lua-src':
    'github:kyazdani42/nvim-tree.lua/5a18b9827491aa1aea710bc9b85c6b63ed0dad14?narHash=sha256-VMyVrgcgqx52QIy/q0oAuJNuxMNPAgPX3bi1LP27Iho%3D' (2024-04-25)
  → 'github:kyazdani42/nvim-tree.lua/64f61e4c913047a045ff90bd188dd3b54ee443cf?narHash=sha256-rY4FbuqBM4zOUkaA3QBc%2BUrpfTha8uGtp%2BlIzrYK%2Bcg%3D' (2024-05-04)
• Updated input 'nvim-treesitter-src':
    'github:nvim-treesitter/nvim-treesitter/0883ff05655117a3fc79ab295a640c4984cfd415?narHash=sha256-4VmW8xfayxIo4k6WA4423yTyLvzBTwidU7d8OuGH1vY%3D' (2024-04-27)
  → 'github:nvim-treesitter/nvim-treesitter/4e21361e15b1d4147830c5fe571556eb1b14e6f9?narHash=sha256-3Ae3ieCqckVAElTufJxgBRNXdWg81%2B%2BoI0qesKevcb4%3D' (2024-05-04)
• Updated input 'tree-sitter-python':
    'github:tree-sitter/tree-sitter-python/a22761025cdac6c314b7e3aa48fb44fa9e594d6a?narHash=sha256-L6iEej6bPqfaZdH5GNoJyNxZWdnIyn7%2BCut%2BzYnMI88%3D' (2024-04-05)
  → 'github:tree-sitter/tree-sitter-python/71778c2a472ed00a64abf4219544edbf8e4b86d7?narHash=sha256-hHQ5gK4dTRSdp0fLKarytU9vFhsBeQp7Ka61vFoIr7Y%3D' (2024-05-01)
• Updated input 'wsl':
    'github:nix-community/NixOS-WSL/4fb773cffed9bf1efdabcc01b25637eaeb4e8e9c?narHash=sha256-jgTn20s3qzar/IqhjQcEO%2BdIQbT4hBFIloVntiCURkA%3D' (2024-04-26)
  → 'github:nix-community/NixOS-WSL/acb893461a4bee4e77b1a27b1410d4995b52174c?narHash=sha256-rtv%2BnJJ12V7w68j8vIcGacfS1yuK1/dBgglSKWzYMTM%3D' (2024-04-29)
2024-05-05 03:44:32 +00:00
37e66f32c5 switch from go122 to go module 2024-05-04 23:21:01 -04:00
572459ba88 use full arn for aws oidc role 2024-05-04 23:15:45 -04:00
b47ca4c785 forgot to add permissions to run aws workflow 2024-05-04 23:11:49 -04:00
8f0f7911b0 test out arrow on aws 2024-05-04 23:05:55 -04:00
c0356cab62 add gamescope and mangohud 2024-05-04 23:05:40 -04:00
b98ced2939 fix bad hashes 2024-05-03 17:26:56 -04:00
aea3359236 flake.lock: Update
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/a816daa384dd754b7586f51157fc2e1a44e76073?narHash=sha256-PJbmbf%2B5z924b/wq7jzEFCUtrOc7s1J%2B8qRZu3fVAQc%3D' (2024-04-25)
  → 'github:nix-community/disko/285e26465a0bae510897ca04da26ce6307c652b4?narHash=sha256-kcBiIrmqzt3bNTr2GMBfAyA%2Bon8BEKO1iKzzDFQZkjI%3D' (2024-04-26)
• Updated input 'home-manager':
    'github:nix-community/home-manager/0c5704eceefcb7bb238a958f532a86e3b59d76db?narHash=sha256-4AItZA3EQIiSNAxliuYEJumw/LaVfrMv84gYyrs0r3U%3D' (2024-04-25)
  → 'github:nix-community/home-manager/c1609d584a6b5e9e6a02010f51bd368cb4782f8e?narHash=sha256-eT7DENhYy7EPLOqHI9zkIMD9RvMCXcqh6gGqOK5BWYQ%3D' (2024-04-27)
• Updated input 'nextcloud-snappymail':
    'https://snappymail.eu/repository/nextcloud/snappymail-2.36.1-nextcloud.tar.gz?narHash=sha256-CsAUnbA/9XiVuk96pOK%2BE%2B%2Blp8BlJITtfExWcb9rqPk%3D' (2024-04-25)
  → 'https://snappymail.eu/repository/nextcloud/snappymail-2.36.1-nextcloud.tar.gz?narHash=sha256-6mel49dSTujJnpdUt1aOJ87duXU/DBqpuqgZOKP1YII%3D' (2024-04-24)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/572af610f6151fd41c212f897c71f7056e3fb518?narHash=sha256-cfh1hi%2B6muQMbi9acOlju3V1gl8BEaZBXBR9jQfQi4U%3D' (2024-04-23)
  → 'github:nixos/nixpkgs/7bb2ccd8cdc44c91edba16c48d2c8f331fb3d856?narHash=sha256-Drmja/f5MRHZCskS6mvzFqxEaZMeciScCTFxWVLqWEY%3D' (2024-04-25)
• Updated input 'nur':
    'github:nix-community/nur/23ec6b3cf4882a7b39685837368af00744d8cb6e?narHash=sha256-I7oJlmcyCo0EuqGiIgJYY/OtqzyJz7pdq71sLD5mnyQ%3D' (2024-04-25)
  → 'github:nix-community/nur/1348a217ce75f5171b65873c5146b47e0d26bc83?narHash=sha256-SZTU/TQFzihktp/SPzY3yzMnrYi7EuaCIA/g4jNA8KU%3D' (2024-04-28)
• Updated input 'nvim-treesitter-src':
    'github:nvim-treesitter/nvim-treesitter/19c6b0c4c9b35962e45b782e2b85a3214d2ac4d5?narHash=sha256-1K%2Bvg99QjM7UiMLMN7m4trZYFR33BwyHZlsPOe6UOqE%3D' (2024-04-25)
  → 'github:nvim-treesitter/nvim-treesitter/0883ff05655117a3fc79ab295a640c4984cfd415?narHash=sha256-4VmW8xfayxIo4k6WA4423yTyLvzBTwidU7d8OuGH1vY%3D' (2024-04-27)
• Updated input 'wsl':
    'github:nix-community/NixOS-WSL/f41f95c2c187a49a4ef98b5d00fdf1a68c5f88ba?narHash=sha256-q3zu2D5HVphfAMZ070o/K9IPxw5DLsLkvwr7H1b5fpE%3D' (2024-04-24)
  → 'github:nix-community/NixOS-WSL/4fb773cffed9bf1efdabcc01b25637eaeb4e8e9c?narHash=sha256-jgTn20s3qzar/IqhjQcEO%2BdIQbT4hBFIloVntiCURkA%3D' (2024-04-26)
2024-04-28 03:44:30 +00:00
760a016842 replace nil ls with nixd language server
remove nixlang dedicated module
2024-04-25 13:25:25 -04:00
f59c228803 fix: snappymail requires update 2024-04-25 16:57:30 +00:00
951570c88c flake.lock: Update
Flake lock file updates:

• Updated input 'base16-nvim-src':
    'github:RRethy/base16-nvim/b3e9ec6a82c05b562cd71f40fe8964438a9ba64a?narHash=sha256-l0BO2boIy6mwK8ISWS3D68f8egqHYwsGSAnzjbB5aOE%3D' (2024-02-17)
  → 'github:RRethy/base16-nvim/eec6882101dd189117f79c5d18d389d20cfc0415?narHash=sha256-p3HWYasmi0gVUM5l9jLWL4Iy37Uxnvbj3SO/cMCpDBg%3D' (2024-04-18)
• Updated input 'darwin':
    'github:lnl7/nix-darwin/36524adc31566655f2f4d55ad6b875fb5c1a4083?narHash=sha256-sXcesZWKXFlEQ8oyGHnfk4xc9f2Ip0X/%2BYZOq3sKviI%3D' (2024-03-30)
  → 'github:lnl7/nix-darwin/230a197063de9287128e2c68a7a4b0cd7d0b50a7?narHash=sha256-lc75rgRQLdp4Dzogv5cfqOg6qYc5Rp83oedF2t0kDp8%3D' (2024-04-24)
• Updated input 'disko':
    'github:nix-community/disko/8d4ae698eaac8bd717e23507da2ca8b345bec4b5?narHash=sha256-T0eT2lMbcK7RLelkx0qx4SiFpOS/0dt0aSfLB%2BWsGV8%3D' (2024-04-12)
  → 'github:nix-community/disko/a816daa384dd754b7586f51157fc2e1a44e76073?narHash=sha256-PJbmbf%2B5z924b/wq7jzEFCUtrOc7s1J%2B8qRZu3fVAQc%3D' (2024-04-25)
• Updated input 'firefox-darwin':
    'github:bandithedoge/nixpkgs-firefox-darwin/10e4a50241d6bbae62754efda7bc4b48dd4aa2c1?narHash=sha256-LlFkVfdF9GfB02gFNHjnLOV0AQYFY7gWATlniTALeaM%3D' (2024-04-14)
  → 'github:bandithedoge/nixpkgs-firefox-darwin/7e82af679667cf9d56075dfa375b32c317aa708d?narHash=sha256-Ep8jPm%2BQ832byS7VtlkdXEEWGFhk5BMX0CjkVtC1G4E%3D' (2024-04-24)
• Updated input 'home-manager':
    'github:nix-community/home-manager/630a0992b3627c64e34f179fab68e3d48c6991c0?narHash=sha256-Noot8H0EZEAFRQWyGxh9ryvhK96xpIqKbh78X447JWs%3D' (2024-04-14)
  → 'github:nix-community/home-manager/0c5704eceefcb7bb238a958f532a86e3b59d76db?narHash=sha256-4AItZA3EQIiSNAxliuYEJumw/LaVfrMv84gYyrs0r3U%3D' (2024-04-25)
• Updated input 'kitty-scrollback-nvim-src':
    'github:mikesmithgh/kitty-scrollback.nvim/2d4c6970e9b6155b857755a5499cdce313d923b3?narHash=sha256-wDNYvNa9UEHg6lRKaonN%2B6vg4XJ4umUaVriziEJejKE%3D' (2024-04-05)
  → 'github:mikesmithgh/kitty-scrollback.nvim/22f524f1fa9c7660804a1800ed0fe981c5d392c8?narHash=sha256-LICARktpc04vaHpFuAFDrZsYKy2HJme6LMtoXMi7jJ8%3D' (2024-04-25)
• Updated input 'nextcloud-external':
    'https://github.com/nextcloud-releases/external/releases/download/v5.3.1/external-v5.3.1.tar.gz?narHash=sha256-RCL2RP5twRDLxI/KfAX6QLYQOzqZmSWsfrC5ZQIwTD4%3D' (2023-11-10)
  → 'https://github.com/nextcloud-releases/external/releases/download/v5.3.1/external-v5.3.1.tar.gz?narHash=sha256-RCL2RP5twRDLxI/KfAX6QLYQOzqZmSWsfrC5ZQIwTD4%3D' (2023-11-10)
• Updated input 'nextcloud-snappymail':
    'https://snappymail.eu/repository/nextcloud/snappymail-2.32.0-nextcloud.tar.gz?narHash=sha256-UeZXoZFEPJj7zEVNTXJ3IYNt/wI7VFq3Pjh1ubMHCBo%3D' (2024-04-14)
  → 'https://snappymail.eu/repository/nextcloud/snappymail-2.32.0-nextcloud.tar.gz?narHash=sha256-o4UghtYKc3Bh9IoKnOwjHCIKHt6tZ5vPdLjHFpIPmE0%3D' (2023-12-26)
• Updated input 'nixos-generators':
    'github:nix-community/nixos-generators/d942db8df8ee860556a38754f15b8d03bf7e6933?narHash=sha256-yYlxv1sg/TNl6hghjAe0ct%2B/p5PwXiT1mpuaExjhR88%3D' (2024-04-08)
  → 'github:nix-community/nixos-generators/722b512eb7e6915882f39fff0e4c9dd44f42b77e?narHash=sha256-3yh0nqI1avYUmmtqqTW3EVfwaLE%2B9ytRWxsA5aWtmyI%3D' (2024-04-22)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/1042fd8b148a9105f3c0aca3a6177fd1d9360ba5?narHash=sha256-3sbWO1mbpWsLepZGbWaMovSO7ndZeFqDSdX0hZ9nVyw%3D' (2024-04-10)
  → 'github:nixos/nixpkgs/572af610f6151fd41c212f897c71f7056e3fb518?narHash=sha256-cfh1hi%2B6muQMbi9acOlju3V1gl8BEaZBXBR9jQfQi4U%3D' (2024-04-23)
• Updated input 'nur':
    'github:nix-community/nur/1e6e9f41f0fbdcba7ca505a7d54128bc2f1053d6?narHash=sha256-zON2LEPO98NiUtOItgu%2BVz1uWkrUbt5zJbzf5XCm71Y%3D' (2024-04-14)
  → 'github:nix-community/nur/23ec6b3cf4882a7b39685837368af00744d8cb6e?narHash=sha256-I7oJlmcyCo0EuqGiIgJYY/OtqzyJz7pdq71sLD5mnyQ%3D' (2024-04-25)
• Updated input 'nvim-lint-src':
    'github:mfussenegger/nvim-lint/4055dc856d5ac8f6b85748006fd8fa6457e086e8?narHash=sha256-FgHWOiF%2BoMXVISP/k2rt7epEEjFS/sYLnEpe85B5Ox0%3D' (2024-04-09)
  → 'github:mfussenegger/nvim-lint/f098232d70cebe90e27404928c9bc19ca7a5a7b5?narHash=sha256-QyS%2BxSIOVbJdf/vLU0o8fdZrQ%2BMssolTyg75ZSnP0fY%3D' (2024-04-16)
• Updated input 'nvim-tree-lua-src':
    'github:kyazdani42/nvim-tree.lua/81eb8d519233c105f30dc0a278607e62b20502fd?narHash=sha256-6pbOeklf%2BotsJIjt9IUyUfuTAedShnwERYq1IfhyrJs%3D' (2024-04-06)
  → 'github:kyazdani42/nvim-tree.lua/5a18b9827491aa1aea710bc9b85c6b63ed0dad14?narHash=sha256-VMyVrgcgqx52QIy/q0oAuJNuxMNPAgPX3bi1LP27Iho%3D' (2024-04-25)
• Updated input 'nvim-treesitter-src':
    'github:nvim-treesitter/nvim-treesitter/d2f4c7830377d6d036e9621ae696dbd28f089897?narHash=sha256-rtE1H24sKekGwTIMh7VXkwKVCbJtn8ms4ioK9gF%2BKxY%3D' (2024-04-14)
  → 'github:nvim-treesitter/nvim-treesitter/19c6b0c4c9b35962e45b782e2b85a3214d2ac4d5?narHash=sha256-1K%2Bvg99QjM7UiMLMN7m4trZYFR33BwyHZlsPOe6UOqE%3D' (2024-04-25)
• Updated input 'tree-sitter-puppet':
    'github:amaanq/tree-sitter-puppet/5849f9694197a6e822872945b415429c285fdd54?narHash=sha256-Lwfiby7amjTIOz8QRoC4RdZyFPfFikmQ2sqta4akyH8%3D' (2024-03-03)
  → 'github:amaanq/tree-sitter-puppet/584522f32495d648b18a53ccb52d988e60de127d?narHash=sha256-%2BzMgzyuGerJ8l%2Bi5ZtWnmGr3i4fFiSLD5FssyKESsmI%3D' (2024-04-20)
• Updated input 'tree-sitter-vimdoc':
    'github:neovim/tree-sitter-vimdoc/a75a932449675bbd260213a95f4cd8b3193286f0?narHash=sha256-spj8h1ZDY%2B6sWi%2BFCALapBsG%2Big9H1u3bjkI2%2BUP0ds%3D' (2024-03-23)
  → 'github:neovim/tree-sitter-vimdoc/b711df784dd43d0a8ed8ddbfca0ddcc3239d94b4?narHash=sha256-%2BQbLL5EC3oNiwd7h7MW/mutHhGPUHhbYTQcu6x6atcI%3D' (2024-04-22)
• Updated input 'wsl':
    'github:nix-community/NixOS-WSL/0479d4c1ebeb314c5281b4aa7109def821a1b27b?narHash=sha256-VgCqYB%2BymQuZmno8B82L8piyENo5xTNuqubnACYoBRk%3D' (2024-04-13)
  → 'github:nix-community/NixOS-WSL/f41f95c2c187a49a4ef98b5d00fdf1a68c5f88ba?narHash=sha256-q3zu2D5HVphfAMZ070o/K9IPxw5DLsLkvwr7H1b5fpE%3D' (2024-04-24)
2024-04-25 16:30:29 +00:00
c066d27909 switch from proton-ge overlay to nixpkgs proton-ge-bin 2024-04-25 12:21:34 -04:00
e43fc0f8db move all files to new nixfmt rfc 2024-04-20 09:42:06 -04:00
b23efc4d77 bpc repo moved to github 2024-04-17 21:03:41 -04:00
2258e68bc2 reformat and remove unnecessary edition from rustfmt 2024-04-14 21:46:15 -04:00
bb23e9fdbe flake.lock: Update
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/79eab0e82cb126bf4ac170f44af82479f0895ab5' (2024-04-08)
  → 'github:nix-community/disko/8d4ae698eaac8bd717e23507da2ca8b345bec4b5' (2024-04-12)
• Updated input 'firefox-darwin':
    'github:bandithedoge/nixpkgs-firefox-darwin/49b3ee7dbb9fdbb6388bd5d47895a9a9992b771e' (2024-04-09)
  → 'github:bandithedoge/nixpkgs-firefox-darwin/10e4a50241d6bbae62754efda7bc4b48dd4aa2c1' (2024-04-14)
• Updated input 'home-manager':
    'github:nix-community/home-manager/b00d0e4fe9cba0047f54e77418ddda5f17e6ef2c' (2024-04-09)
  → 'github:nix-community/home-manager/630a0992b3627c64e34f179fab68e3d48c6991c0' (2024-04-14)
• Updated input 'nextcloud-snappymail':
    'https://snappymail.eu/repository/nextcloud/snappymail-2.32.0-nextcloud.tar.gz?narHash=sha256-UeZXoZFEPJj7zEVNTXJ3IYNt/wI7VFq3Pjh1ubMHCBo%3D' (2024-04-09)
  → 'https://snappymail.eu/repository/nextcloud/snappymail-2.32.0-nextcloud.tar.gz?narHash=sha256-UeZXoZFEPJj7zEVNTXJ3IYNt/wI7VFq3Pjh1ubMHCBo%3D' (2024-04-14)
• Updated input 'nur':
    'github:nix-community/nur/ee4ce451f46a08778d1a9f9837eff0750714b08b' (2024-04-09)
  → 'github:nix-community/nur/1e6e9f41f0fbdcba7ca505a7d54128bc2f1053d6' (2024-04-14)
• Updated input 'nvim-treesitter-src':
    'github:nvim-treesitter/nvim-treesitter/c16f66cca0c38b4e21371d8330b7f2ad6404f6dc' (2024-04-09)
  → 'github:nvim-treesitter/nvim-treesitter/d2f4c7830377d6d036e9621ae696dbd28f089897' (2024-04-14)
• Updated input 'tree-sitter-bash':
    'github:tree-sitter/tree-sitter-bash/f3f26f47a126797c011c311cec9d449d855c3eab' (2024-03-13)
  → 'github:tree-sitter/tree-sitter-bash/f8fb3274f72a30896075585b32b0c54cad65c086' (2024-04-11)
• Updated input 'wsl':
    'github:nix-community/NixOS-WSL/aef95bdb6800a3a2af7aa7083d6df03067da6592' (2024-03-15)
  → 'github:nix-community/NixOS-WSL/0479d4c1ebeb314c5281b4aa7109def821a1b27b' (2024-04-13)
• Updated input 'wsl/flake-utils':
    'github:numtide/flake-utils/1ef2e671c3b0c19053962c07dbda38332dcebf26' (2024-01-15)
  → 'github:numtide/flake-utils/b1d9ab70662946ef0850d488da1c9019f3a9752a' (2024-03-11)
2024-04-14 12:32:23 +00:00
358206f6fb arrow image package derivation 2024-04-14 08:28:39 -04:00
402d168304 remove aws and clean up arrow 2024-04-14 08:08:57 -04:00
1865f6985e automatically fetch notes 2024-04-14 04:21:59 +00:00
c338ff5579 color update and decrypt git zfs dataset 2024-04-14 04:07:04 +00:00
bf58cf62d3 fix dns issues with ipv6 and local bind 2024-04-14 03:43:58 +00:00
520f0587c8 increase aerc check-mail timeout
due to purelymail backend (issue 213)
2024-04-13 09:49:56 -04:00
81f2c6372e required update to nixpkgs bc electron doesn't work 2024-04-13 09:49:41 -04:00
b4b2a7f511 temp: don't have latest.xpi for bpc 2024-04-13 09:49:41 -04:00
bc2d0a347d replace white background diagram with transparent 2024-04-13 09:09:54 -04:00
07137fdd91 apply new nix fmt specification 2024-04-13 09:03:44 -04:00
e8e0c97e59 temp: replace bpc-uploads with my own version
because it was removed from gitlab
2024-04-13 09:02:41 -04:00
83496bcad1 no reason to have 122 in firewall 2024-04-13 09:01:56 -04:00
7d82e18c4d update flake and fix nixfmt after update 2024-04-09 17:54:22 -04:00
3c2a971fc4 fix: arrow as host must include filesystems 2024-04-09 17:06:13 -04:00
742fba29f9 include SSL CA in docs 2024-04-02 07:59:04 -07:00
56da4afb5b update gh collaborators to latest go builder 2024-04-02 07:58:30 -07:00
2088d82252 add cleanup step for dns record after tf destroy 2024-03-30 19:47:43 +00:00
566a654f5b don't enable dyndns for services not running 2024-03-30 14:48:56 -04:00
1462214a8e remove league of legends option 2024-03-30 14:47:49 -04:00
efc7daf5fc fix: don't enable thelounge dyndns everywhere 2024-03-30 14:40:24 -04:00
fa582fcc34 fix: chained ternary operator in workflow 2024-03-30 14:32:30 -04:00
c66cedf146 use variable for vultr plan 2024-03-30 14:30:02 -04:00
8dde578676 try multiple ternary option for arrow workflow 2024-03-30 14:07:36 -04:00
5e1534451d don't enable cloudflare-dyndns unless domain list is non-empty 2024-03-30 18:03:52 +00:00
c4a1c7564c remove league of legends as anticheat no longer supports linux 2024-03-30 13:48:26 -04:00
0de2c429f2 fix path for transmission if not in download 2024-03-30 13:48:10 -04:00
eb6b72a25c try updating workflow name 2024-03-30 13:07:06 -04:00
0618fc3962 try binding to wait for identity service to complete
and see if remainafterexit fixes one of the issues
2024-03-30 13:01:34 -04:00
1b7e4687e4 fix: add default value for noproxy dns 2024-03-30 12:34:37 -04:00
9f33371daf update arrow images bucket to use single subdomain 2024-03-30 11:59:18 -04:00
bbc529287d fix: add second no-proxy dyndns for minecraft and others 2024-03-30 15:56:58 +00:00
f757e4a894 add cloudflare-dyndns domains for flame 2024-03-30 15:41:18 +00:00
5cb7b87e74 fix: can't restart systemd from post while also a requirement
oneshot requirements wait for programs to exit anyway
2024-03-30 15:41:07 +00:00
a853352a57 don't sign commits globally, only for personal 2024-03-27 15:02:20 -04:00
a15c05491e git ssh signing 2024-03-26 13:07:26 -04:00
82f7da5858 add temp comment for ldap host option 2024-03-26 12:23:41 -04:00
5d34ed5a68 reset launcher location on every launch 2024-03-26 12:23:27 -04:00
f73c52e2b7 fix: mac dock persistent-apps correction 2024-03-26 12:23:01 -04:00
fecd66465d remove wappalyzer completely 2024-03-26 12:01:32 -04:00
9b0d363909 fix: mac dock persistent-apps now supported directly 2024-03-26 12:01:13 -04:00
400d45df39 add ssm session manager for aws 2024-03-26 11:21:32 -04:00
634805d36d fix: ocr file not found errors 2024-03-26 11:17:54 -04:00
db051a737e switch restart script to multiline script 2024-03-24 21:52:34 -04:00
cbf0d2680c fix: multiline execstartpost 2024-03-24 19:23:41 -04:00
316439dc9a fix: chmod for ssh keys 2024-03-24 18:51:35 -04:00
edaf95cc1c fix: forgot to add auth to ssh 2024-03-24 18:50:23 -04:00
5f867fa2dd fix: typo 2024-03-24 18:31:28 -04:00
bdaf63da20 try to restart services after waiting for identity file 2024-03-24 18:25:26 -04:00
c12d54314e fix: home-manager won't start with low mem
issue caused by nix-index memory usage
2024-03-24 18:25:18 -04:00
f50bbeba94 increase grub boot delay for switching os 2024-03-24 18:04:43 -04:00
848c8aac5f Host key verification 2024-03-24 17:39:38 -04:00
488b5d61fd switch ssh wait with a script 2024-03-24 15:34:12 -04:00
6b5892eb1d make identity wait a finite amount 2024-03-24 15:15:07 -04:00
c3be92dcaf fix: s3 cp failing in github actions 2024-03-24 15:06:50 -04:00
64bee30b17 fixes to cloudflare dyndns and ssh 2024-03-24 15:04:40 -04:00
568fdc7491 temp: skip wait for identity 2024-03-24 14:55:17 -04:00
8585574100 more aws config changes 2024-03-24 14:39:18 -04:00
6b37ba13c9 tf init with definition in main 2024-03-24 14:36:23 -04:00
efac745bdd add skip account id to the backend init 2024-03-24 14:31:22 -04:00
7e0a0bbbd2 try mixing up secrets 2024-03-24 14:29:51 -04:00
16e228b7b0 fix: formatting for just the specific folder 2024-03-24 14:24:09 -04:00
277c400248 forgot to add access key vars to s3 cmd 2024-03-24 14:22:57 -04:00
2b03dd5198 try updated caddy vendorhash 2024-03-24 14:04:28 -04:00
bdd922d318 fix: boolean input in gh action 2024-03-24 14:00:38 -04:00
6b2dfb4aa9 fix: tf formatting 2024-03-24 13:59:36 -04:00
67ab65fa16 introduce arrow host and deployment 2024-03-24 13:16:20 -04:00
b06ebc7185 update proton-ge 2024-03-23 09:36:03 -04:00
a30b189207 remove unnecessary firefox addons 2024-03-18 22:48:27 -04:00
eb3c1f7a4c Revert "kvm replaces hdmi monitor w displayport"
This reverts commit bbdfeb645e.
2024-03-18 22:48:12 -04:00
c697cd4e38 flake.lock: Update
Flake lock file updates:

• Updated input 'bypass-paywalls-clean':
    'gitlab:magnolia1234/bpc-uploads/6e9521ff11ed960d865268078dff00d81e859fbf' (2024-02-26)
  → 'gitlab:magnolia1234/bpc-uploads/0ca7c6a857e4e6c3e508228168e8de70e21cee3a' (2024-03-04)
• Updated input 'darwin':
    'github:lnl7/nix-darwin/17c2ca3c7537a2512224242b84e1ea3c08e79b92' (2024-03-03)
  → 'github:lnl7/nix-darwin/550340062c16d7ef8c2cc20a3d2b97bcd3c6b6f6' (2024-03-07)
• Updated input 'disko':
    'github:nix-community/disko/bde7dd352c07d43bd5b8245e6c39074a391fdd46' (2024-03-01)
  → 'github:nix-community/disko/72818e54ec29427f8d9f9cfa6fc859d01ca6dc66' (2024-03-09)
• Updated input 'firefox-darwin':
    'github:bandithedoge/nixpkgs-firefox-darwin/144a94dc71410d9655e4e73ac4579e9b7405572b' (2024-03-03)
  → 'github:bandithedoge/nixpkgs-firefox-darwin/e9883b75736b2d33787c9326d27d719a644b1c35' (2024-03-10)
• Updated input 'home-manager':
    'github:nix-community/home-manager/2f3367769a93b226c467551315e9e270c3f78b15' (2024-02-29)
  → 'github:nix-community/home-manager/b0b0c3d94345050a7f86d1ebc6c56eea4389d030' (2024-03-09)
• Updated input 'kitty-scrollback-nvim-src':
    'github:mikesmithgh/kitty-scrollback.nvim/93b4286c4e2c9d4a73ccbefb3adbc688d3ed5fe4' (2024-02-21)
  → 'github:mikesmithgh/kitty-scrollback.nvim/c3014974e4cd498a534ff814761ef794ebb85d01' (2024-03-10)
• Updated input 'nextcloud-snappymail':
    'https://snappymail.eu/repository/nextcloud/snappymail-2.32.0-nextcloud.tar.gz?narHash=sha256-UeZXoZFEPJj7zEVNTXJ3IYNt/wI7VFq3Pjh1ubMHCBo%3D' (2024-03-03)
  → 'https://snappymail.eu/repository/nextcloud/snappymail-2.32.0-nextcloud.tar.gz?narHash=sha256-UeZXoZFEPJj7zEVNTXJ3IYNt/wI7VFq3Pjh1ubMHCBo%3D' (2024-03-10)
• Updated input 'nixos-generators':
    'github:nix-community/nixos-generators/2c9562e7624fa1b50983fc18d504bf86202bef49' (2024-02-29)
  → 'github:nix-community/nixos-generators/bef32a05496d9480b02be586fa7827748b9e597b' (2024-03-08)
• Updated input 'nixos-generators/nixlib':
    'github:nix-community/nixpkgs.lib/479831ed8b3c9c7b80533999f880c7d0bf6a491b' (2024-02-25)
  → 'github:nix-community/nixpkgs.lib/7873d84a89ae6e4841528ff7f5697ddcb5bdfe6c' (2024-03-03)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/1536926ef5621b09bba54035ae2bb6d806d72ac8' (2024-02-29)
  → 'github:nixos/nixpkgs/9df3e30ce24fd28c7b3e2de0d986769db5d6225d' (2024-03-06)
• Updated input 'nur':
    'github:nix-community/nur/7cf254f2153f2d0cde346c6ea3ff158acf6a6609' (2024-03-03)
  → 'github:nix-community/nur/ff870a7e359c3f34fc1144c6c35f76003d6c17e7' (2024-03-10)
• Updated input 'nvim-tree-lua-src':
    'github:kyazdani42/nvim-tree.lua/efafd73efa9bc8c26282aed563ba0f01c7465b06' (2024-03-03)
  → 'github:kyazdani42/nvim-tree.lua/041dbd18f440207ad161503a384e7c82d575db66' (2024-03-09)
• Updated input 'nvim-treesitter-src':
    'github:nvim-treesitter/nvim-treesitter/e3e5ff4ebddcbfa8f5798253ebd1f9b449e8ee69' (2024-03-02)
  → 'github:nvim-treesitter/nvim-treesitter/7ff51f53b0efb6228df2e8539b51bb2e737b77f3' (2024-03-09)
• Updated input 'tree-sitter-puppet':
    'github:amaanq/tree-sitter-puppet/3641b9e854ac9c84c7576e71c4c9a357bcfd9550' (2024-02-18)
  → 'github:amaanq/tree-sitter-puppet/5849f9694197a6e822872945b415429c285fdd54' (2024-03-03)
• Updated input 'tree-sitter-python':
    'github:tree-sitter/tree-sitter-python/22d3f87bdafac2782e907330babe4af574f5d0b4' (2024-02-27)
  → 'github:tree-sitter/tree-sitter-python/03e88c170cb23142559a406b6e7621c4af3128f5' (2024-03-06)
• Updated input 'wsl':
    'github:nix-community/NixOS-WSL/3257ad7f173b0314c8a42fec450fa6556495b97c' (2024-02-29)
  → 'github:nix-community/NixOS-WSL/e0b9e6c8ff35c7a28cb6baa02d85a9737a2ee4e9' (2024-03-09)
2024-03-10 03:44:43 +00:00
661ef8dcbf significantly improved ldapsearch with jq
improve ldapsearch secondary queries
2024-03-08 09:27:33 -05:00
ec09db42e6 use built-in git diff highlight by default 2024-03-06 11:47:57 -05:00
3403924105 add difftastic for more fancy diffs 2024-03-06 11:22:35 -05:00
3d234072f6 add delta for fancy diffs 2024-03-06 11:19:37 -05:00
b39cda6b84 fix: zfs noauto encrypted pool still requesting passphrase on reboot 2024-03-04 13:01:07 +00:00
47be4291a3 flake.lock: Update
Flake lock file updates:

• Updated input 'bypass-paywalls-clean':
    'gitlab:magnolia1234/bpc-uploads/47c602fb1253ff05b3654da4a6d375978f6a43fd' (2024-02-12)
  → 'gitlab:magnolia1234/bpc-uploads/6e9521ff11ed960d865268078dff00d81e859fbf' (2024-02-26)
• Updated input 'darwin':
    'github:lnl7/nix-darwin/0e6857fa1d632637488666c08e7b02c08e3178f8' (2024-02-18)
  → 'github:lnl7/nix-darwin/17c2ca3c7537a2512224242b84e1ea3c08e79b92' (2024-03-03)
• Updated input 'disko':
    'github:nix-community/disko/d8a4377cd8eec23668ea3fae07efee9d5782cb91' (2024-02-18)
  → 'github:nix-community/disko/bde7dd352c07d43bd5b8245e6c39074a391fdd46' (2024-03-01)
• Updated input 'firefox-darwin':
    'github:bandithedoge/nixpkgs-firefox-darwin/2ab9b39e98497584ba952cacb8dfadf8492fd28d' (2024-02-18)
  → 'github:bandithedoge/nixpkgs-firefox-darwin/144a94dc71410d9655e4e73ac4579e9b7405572b' (2024-03-03)
• Updated input 'home-manager':
    'github:nix-community/home-manager/3d6791b3897b526c82920a2ab5f61d71985b3cf8' (2024-02-15)
  → 'github:nix-community/home-manager/2f3367769a93b226c467551315e9e270c3f78b15' (2024-02-29)
• Updated input 'kitty-scrollback-nvim-src':
    'github:mikesmithgh/kitty-scrollback.nvim/78dd609368aa20bd6fbd801cce73ea30787ebe21' (2024-02-13)
  → 'github:mikesmithgh/kitty-scrollback.nvim/93b4286c4e2c9d4a73ccbefb3adbc688d3ed5fe4' (2024-02-21)
• Updated input 'nextcloud-snappymail':
    'https://snappymail.eu/repository/nextcloud/snappymail-2.32.0-nextcloud.tar.gz?narHash=sha256-UeZXoZFEPJj7zEVNTXJ3IYNt/wI7VFq3Pjh1ubMHCBo%3D' (2024-01-21)
  → 'https://snappymail.eu/repository/nextcloud/snappymail-2.32.0-nextcloud.tar.gz?narHash=sha256-UeZXoZFEPJj7zEVNTXJ3IYNt/wI7VFq3Pjh1ubMHCBo%3D' (2024-03-03)
• Updated input 'nixos-generators':
    'github:nix-community/nixos-generators/0aa24e93f75370454f0e03747b6836ac2a2c9fca' (2024-02-14)
  → 'github:nix-community/nixos-generators/2c9562e7624fa1b50983fc18d504bf86202bef49' (2024-02-29)
• Updated input 'nixos-generators/nixlib':
    'github:nix-community/nixpkgs.lib/f5af57d3ef9947a70ac86e42695231ac1ad00c25' (2023-09-03)
  → 'github:nix-community/nixpkgs.lib/479831ed8b3c9c7b80533999f880c7d0bf6a491b' (2024-02-25)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/5863c27340ba4de8f83e7e3c023b9599c3cb3c80' (2024-02-16)
  → 'github:nixos/nixpkgs/1536926ef5621b09bba54035ae2bb6d806d72ac8' (2024-02-29)
• Updated input 'nur':
    'github:nix-community/nur/c4296c55625e5394c142d5c07c00cddb76d5241b' (2024-02-18)
  → 'github:nix-community/nur/7cf254f2153f2d0cde346c6ea3ff158acf6a6609' (2024-03-03)
• Updated input 'nvim-lint-src':
    'github:mfussenegger/nvim-lint/31be66c27214174a28fc092ffcf4bb3e8f6cfd43' (2024-02-16)
  → 'github:mfussenegger/nvim-lint/e824adb9bc01647f71e55457353a68f0f37f9931' (2024-02-29)
• Updated input 'nvim-tree-lua-src':
    'github:kyazdani42/nvim-tree.lua/d35a8d5ec6358ada4b058431b367b32360737466' (2024-02-18)
  → 'github:kyazdani42/nvim-tree.lua/efafd73efa9bc8c26282aed563ba0f01c7465b06' (2024-03-03)
• Updated input 'nvim-treesitter-src':
    'github:nvim-treesitter/nvim-treesitter/5e4b657181516e4aaf03ccbb4b21eca3b62b07dc' (2024-02-18)
  → 'github:nvim-treesitter/nvim-treesitter/e3e5ff4ebddcbfa8f5798253ebd1f9b449e8ee69' (2024-03-02)
• Updated input 'tree-sitter-lua':
    'github:MunifTanjim/tree-sitter-lua/9668709211b2e683f27f414454a8b51bf0a6bda1' (2023-09-07)
  → 'github:MunifTanjim/tree-sitter-lua/04c9579dcb917255b2e5f8199df4ae7f587d472f' (2024-02-21)
• Updated input 'tree-sitter-puppet':
    'github:amaanq/tree-sitter-puppet/9ce9a5f7d64528572aaa8d59459ba869e634086b' (2023-07-24)
  → 'github:amaanq/tree-sitter-puppet/3641b9e854ac9c84c7576e71c4c9a357bcfd9550' (2024-02-18)
• Updated input 'tree-sitter-python':
    'github:tree-sitter/tree-sitter-python/deba2badc88afd18e6cbd4341ee3c18c3a9bb4ed' (2024-02-14)
  → 'github:tree-sitter/tree-sitter-python/22d3f87bdafac2782e907330babe4af574f5d0b4' (2024-02-27)
• Updated input 'tree-sitter-vimdoc':
    'github:neovim/tree-sitter-vimdoc/ed8695ad8de39c3f073da130156f00b1148e2891' (2024-01-17)
  → 'github:neovim/tree-sitter-vimdoc/016ad75faa854e4e13bc40c517015183b795eed9' (2024-03-02)
• Updated input 'wsl':
    'github:nix-community/NixOS-WSL/c8ddba82ca6b791be1acaae4b336ff8e857ec70b' (2024-02-12)
  → 'github:nix-community/NixOS-WSL/3257ad7f173b0314c8a42fec450fa6556495b97c' (2024-02-29)
2024-03-03 03:44:57 +00:00
67f7506636 update size for git repos and kitty scrollback 2024-02-28 16:11:03 -05:00
bbdfeb645e kvm replaces hdmi monitor w displayport 2024-02-28 07:55:18 -05:00
7f60d88f30 automatically use autosquash for rebase 2024-02-28 07:55:03 -05:00
8babcf342b convert nextcloud db from mysql to postgres 2024-02-25 22:31:02 +00:00
a5ec39cd2a map users to generic postgres roles 2024-02-25 21:14:04 +00:00
63434c8309 docs: add new users to thelounge 2024-02-25 19:03:58 +00:00
1a5fe54d06 jujutsu shell integration setting deprecated 2024-02-25 19:01:59 +00:00
b2cfdc1fdf add thelounge irc client 2024-02-25 18:50:00 +00:00
3a4568bc69 add gc for home-manager
move gc options into nixpkgs file
2024-02-19 09:45:00 -05:00
203bb6a13a increase generation cleanup limit
just in case it fails from one upgrade week to the next
2024-02-19 14:28:50 +00:00
4bfd65acb3 fix: new disko format of disks wouldn't boot 2024-02-19 14:28:13 +00:00
d636de890c try to add firefox as mime html reader 2024-02-18 10:35:01 -05:00
1e9401eef2 update disko config to new format 2024-02-18 09:41:48 -05:00
ea67467cbf fix: alias nvim-base16 is still in vim-plugins
not sure what it means so i had to package it myself
2024-02-18 09:26:23 -05:00
fc6bdeb1ad temp: himalaya notmuch broken but config still works 2024-02-18 09:06:15 -05:00
2758637953 fix typo in readme 2024-02-16 22:47:32 -05:00
f747c80c2a update proton-ge and improve install to steam 2024-02-16 22:26:17 -05:00
013f67c0a8 partially fill out vars for git 2024-02-16 20:56:28 -05:00
fb145e5772 monochrome polybar icons 2024-02-16 20:56:03 -05:00
408b329684 temp: disable jj fish integration 2024-02-13 09:49:32 -05:00
ad70457600 fix: compress menu bar icons 2024-02-13 09:49:22 -05:00
f54f7b6e2e fix: launching obsidian built by nix on macos 2024-02-13 09:48:56 -05:00
2700efa6e4 increase format timeout in neovim 2024-02-11 22:28:05 -05:00
e44adf4568 rust-analyzer: ignore direnv folder 2024-02-11 16:20:23 -05:00
471b258ff7 update flake.lock 2024-02-11 16:20:06 -05:00
ac6329baf6 patch kitty-scrollback-nvim because health check depends on git 2024-02-10 21:41:19 -05:00
a61ac456a9 fix: neovim refactor adjusted reference for kitty-scrollback 2024-02-10 21:15:28 -05:00
cf77adb366 neovim lsp refactor
remove null-ls (archived, deprecated)
replace formatting with conform.nvim
replace diagnostics with nvim-lint
fixed issue where overlay neovim plugins weren't being applied
2024-02-10 21:04:37 -05:00
2217568a59 clean up commented xdg mime associations 2024-02-10 09:18:37 -05:00
05deb5b979 fix paperless permissions with umask
instead of running a systemd service timer
2024-02-10 01:40:04 +00:00
8621e2375d fix: nextcloud extraOptions renamed 2024-02-10 01:37:21 +00:00
25975da0c1 reenable visidata on mac 2024-02-09 10:33:17 -05:00
a79719c21a fix: atuin search keybind 2024-02-09 09:51:29 -05:00
5aea58df79 clean up hammerspoon on m3 w display
for some reason, i need to multiply x to line up half-max frames
2024-02-08 15:28:46 -05:00
1833bfddfb prefer kitty to not start fullscreen on m3 macbook pro 2024-02-07 23:14:06 -05:00
234 changed files with 7387 additions and 5891 deletions

166
.github/workflows/arrow-aws.yml vendored Normal file
View File

@ -0,0 +1,166 @@
name: Arrow (AWS)
run-name: Arrow (AWS) - ${{ inputs.rebuild && 'Rebuild and ' || '' }}${{ inputs.action == 'create' && 'Create' || ( inputs.action == 'destroy' && 'Destroy' || 'No Action' ) }}
env:
TERRAFORM_DIRECTORY: hosts/arrow/aws
DEPLOY_IDENTITY_BASE64: ${{ secrets.DEPLOY_IDENTITY_BASE64 }}
ARROW_IDENTITY_BASE64: ${{ secrets.ARROW_IDENTITY_BASE64 }}
ZONE_NAME: masu.rs
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
on:
workflow_dispatch:
inputs:
rebuild:
type: boolean
default: false
action:
type: choice
required: true
default: create
options:
- create
- destroy
- nothing
size:
type: choice
required: false
options:
- t3a.small # 2 GB RAM / $10
permissions:
id-token: write
contents: write
jobs:
build-deploy:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout Repo Code
uses: actions/checkout@v4
- name: Free Disk Space (Ubuntu)
if: inputs.rebuild && inputs.action != 'destroy'
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
# Enable access to KVM, required to build an image
- name: Enable KVM group perms
if: inputs.rebuild && inputs.action != 'destroy'
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
# Login to AWS
- name: AWS Assume Role
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::286370965832:role/github_actions_admin
aws-region: us-east-1
# Install Nix
- name: Install Nix
if: inputs.rebuild && inputs.action != 'destroy'
uses: cachix/install-nix-action@v20
# Build the image
- name: Build Image
if: inputs.rebuild && inputs.action != 'destroy'
run: nix build .#arrow-aws
- name: Upload Image to S3
if: inputs.rebuild && inputs.action != 'destroy'
run: |
aws s3 cp \
result/nixos-amazon-image-*.vhd \
s3://${{ secrets.IMAGES_BUCKET }}/arrow.vhd \
# Installs the Terraform binary and some other accessory functions.
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
# Checks whether Terraform is formatted properly. If this fails, you
# should install the pre-commit hook.
- name: Check Formatting
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
run: |
terraform fmt -no-color -check -diff -recursive
# Connects to remote state backend and download providers.
- name: Terraform Init
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
run: |
terraform init \
-backend-config="bucket=${{ secrets.TERRAFORM_STATE_BUCKET }}" \
-backend-config="key=arrow.tfstate"
# Deploys infrastructure or changes to infrastructure.
- name: Terraform Apply
if: inputs.action == 'create'
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
env:
TF_VAR_ec2_size: ${{ inputs.size }}
TF_VAR_images_bucket: ${{ secrets.IMAGES_BUCKET }}
run: |
terraform apply \
-auto-approve \
-input=false
# Removes infrastructure.
- name: Terraform Destroy
if: inputs.action == 'destroy'
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
env:
TF_VAR_ec2_size: ${{ inputs.size }}
TF_VAR_images_bucket: ${{ secrets.IMAGES_BUCKET }}
run: |
terraform destroy \
-auto-approve \
-input=false
- name: Get Host IP
if: inputs.action == 'create'
id: host
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
run: terraform output -raw host_ip
- name: Wait on SSH
if: inputs.action == 'create'
run: |
for i in $(seq 1 15); do
if $(nc -z -w 3 ${{ steps.host.outputs.stdout }} 22); then
exit 0
fi
sleep 10
done
- name: Write Identity Keys to Files
if: inputs.action == 'create'
run: |
echo "${{ env.DEPLOY_IDENTITY_BASE64 }}" | base64 -d > deploy_ed25519
chmod 0600 deploy_ed25519
echo "${{ env.ARROW_IDENTITY_BASE64 }}" | base64 -d > arrow_ed25519
chmod 0600 arrow_ed25519
- name: Copy Identity File to Host
if: inputs.action == 'create'
run: |
ssh -i deploy_ed25519 -o StrictHostKeyChecking=accept-new noah@${{ steps.host.outputs.stdout }} 'mkdir -pv .ssh'
scp -i deploy_ed25519 arrow_ed25519 noah@${{ steps.host.outputs.stdout }}:~/.ssh/id_ed25519
- name: Wipe Records
if: ${{ inputs.action == 'destroy' }}
run: |
RECORD_ID=$(curl --request GET \
--url https://api.cloudflare.com/client/v4/zones/${{ env.CLOUDFLARE_ZONE_ID }}/dns_records \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer ${{ env.CLOUDFLARE_API_TOKEN }}" | jq -r '.result[] | select(.name == "n8n2.${{ env.ZONE_NAME }}") | .id')
curl --request DELETE \
--url https://api.cloudflare.com/client/v4/zones/${{ env.CLOUDFLARE_ZONE_ID }}/dns_records/${RECORD_ID} \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer ${{ env.CLOUDFLARE_API_TOKEN }}"

154
.github/workflows/arrow.yml vendored Normal file
View File

@ -0,0 +1,154 @@
name: Arrow
run-name: Arrow - ${{ inputs.rebuild && 'Rebuild and ' || '' }}${{ inputs.action == 'create' && 'Create' || ( inputs.action == 'destroy' && 'Destroy' || 'No Action' ) }}
env:
TERRAFORM_DIRECTORY: hosts/arrow/vultr
DEPLOY_IDENTITY_BASE64: ${{ secrets.DEPLOY_IDENTITY_BASE64 }}
ARROW_IDENTITY_BASE64: ${{ secrets.ARROW_IDENTITY_BASE64 }}
CLOUDFLARE_R2_ENDPOINT: "${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com"
AWS_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_R2_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_R2_SECRET_KEY }}
AWS_DEFAULT_REGION: auto
AWS_ENDPOINT_URL_S3: "https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com"
TF_VAR_vultr_api_key: ${{ secrets.VULTR_API_KEY }}
ZONE_NAME: masu.rs
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
on:
workflow_dispatch:
inputs:
rebuild:
type: boolean
default: false
action:
type: choice
required: true
default: create
options:
- create
- destroy
- nothing
plan:
type: choice
required: false
options:
- vc2-1c-1gb # 25 GB / $5
- vc2-1c-2gb # 55 GB / $10 (default)
- vc2-2c-2gb # 65 GB / $15
- vc2-2c-4gb # 80 GB / $20
- vc2-4c-8gb # 160 GB / $40
- vc2-6c-16gb # 320 GB / $80
jobs:
build-deploy:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout Repo Code
uses: actions/checkout@v4
# Enable access to KVM, required to build an image
- name: Enable KVM group perms
if: inputs.rebuild && inputs.action != 'destroy'
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
# Install Nix
- name: Install Nix
if: inputs.rebuild && inputs.action != 'destroy'
uses: cachix/install-nix-action@v17
# Build the image
- name: Build Image
if: inputs.rebuild && inputs.action != 'destroy'
run: nix build .#arrow
- name: Upload Image to S3
if: inputs.rebuild && inputs.action != 'destroy'
run: |
aws s3 cp \
result/iso/nixos.iso \
s3://noahmasur-arrow-images/arrow.iso \
--endpoint-url "https://${{ env.CLOUDFLARE_R2_ENDPOINT }}"
# Installs the Terraform binary and some other accessory functions.
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
# Checks whether Terraform is formatted properly. If this fails, you
# should install the pre-commit hook.
- name: Check Formatting
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
run: |
terraform fmt -no-color -check -diff -recursive
# Connects to remote state backend and download providers.
- name: Terraform Init
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
run: terraform init
# Deploys infrastructure or changes to infrastructure.
- name: Terraform Apply
if: inputs.action == 'create'
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
env:
TF_VAR_vultr_plan: ${{ inputs.plan }}
run: |
terraform apply \
-auto-approve \
-input=false
# Removes infrastructure.
- name: Terraform Destroy
if: inputs.action == 'destroy'
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
run: |
terraform destroy \
-auto-approve \
-input=false
- name: Get Host IP
if: inputs.action == 'create'
id: host
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
run: terraform output -raw host_ip
- name: Wait on SSH
if: inputs.action == 'create'
run: |
for i in $(seq 1 15); do
if $(nc -z -w 3 ${{ steps.host.outputs.stdout }} 22); then
exit 0
fi
sleep 10
done
- name: Write Identity Keys to Files
if: inputs.action == 'create'
run: |
echo "${{ env.DEPLOY_IDENTITY_BASE64 }}" | base64 -d > deploy_ed25519
chmod 0600 deploy_ed25519
echo "${{ env.ARROW_IDENTITY_BASE64 }}" | base64 -d > arrow_ed25519
chmod 0600 arrow_ed25519
- name: Copy Identity File to Host
if: inputs.action == 'create'
run: |
ssh -i deploy_ed25519 -o StrictHostKeyChecking=accept-new noah@${{ steps.host.outputs.stdout }} 'mkdir -pv .ssh'
scp -i deploy_ed25519 arrow_ed25519 noah@${{ steps.host.outputs.stdout }}:~/.ssh/id_ed25519
- name: Wipe Records
if: ${{ inputs.action == 'destroy' }}
run: |
RECORD_ID=$(curl --request GET \
--url https://api.cloudflare.com/client/v4/zones/${{ env.CLOUDFLARE_ZONE_ID }}/dns_records \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer ${{ env.CLOUDFLARE_API_TOKEN }}" | jq -r '.result[] | select(.name == "n8n2.${{ env.ZONE_NAME }}") | .id')
curl --request DELETE \
--url https://api.cloudflare.com/client/v4/zones/${{ env.CLOUDFLARE_ZONE_ID }}/dns_records/${RECORD_ID} \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer ${{ env.CLOUDFLARE_API_TOKEN }}"

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
.DS_Store .DS_Store
*.bak *.bak
*.db *.db
*.qcow2
**/.direnv/** **/.direnv/**
result result
private/** private/**

View File

@ -25,7 +25,7 @@ configuration may be difficult to translate to a non-Nix system.
| Dotfiles | [Home-Manager](https://github.com/nix-community/home-manager) | [Link](./modules/common) | | Dotfiles | [Home-Manager](https://github.com/nix-community/home-manager) | [Link](./modules/common) |
| Terminal | [Kitty](https://sw.kovidgoyal.net/kitty/) | [Link](./modules/common/applications/kitty.nix) | | Terminal | [Kitty](https://sw.kovidgoyal.net/kitty/) | [Link](./modules/common/applications/kitty.nix) |
| Shell | [Fish](https://fishshell.com/) | [Link](./modules/common/shell/fish) | | Shell | [Fish](https://fishshell.com/) | [Link](./modules/common/shell/fish) |
| Shell Prompt | [Starship](https://starship.rs/) | [Link](./modules/common/shell/starhip.nix) | | Shell Prompt | [Starship](https://starship.rs/) | [Link](./modules/common/shell/starship.nix) |
| Colorscheme | [Gruvbox](https://github.com/morhetz/gruvbox) | [Link](./colorscheme/gruvbox/default.nix) | | Colorscheme | [Gruvbox](https://github.com/morhetz/gruvbox) | [Link](./colorscheme/gruvbox/default.nix) |
| Wallpaper | [Road](https://gitlab.com/exorcist365/wallpapers/-/blob/master/gruvbox/road.jpg) | [Link](./hosts/tempest/default.nix) | | Wallpaper | [Road](https://gitlab.com/exorcist365/wallpapers/-/blob/master/gruvbox/road.jpg) | [Link](./hosts/tempest/default.nix) |
| Text Editor | [Neovim](https://neovim.io/) | [Link](./modules/common/neovim/config) | | Text Editor | [Neovim](https://neovim.io/) | [Link](./modules/common/neovim/config) |
@ -43,11 +43,7 @@ configuration may be difficult to translate to a non-Nix system.
# Diagram # Diagram
![Diagram](https://github.com/nmasur/dotfiles/assets/7386960/ed3e7202-09c4-4a9c-9b14-0272c01647f6) ![Diagram](https://github.com/nmasur/dotfiles/assets/7386960/4cc22285-cea1-4831-b387-a82241184381)
- [flake.nix](./flake.nix)
- [hosts](./hosts/)
- [modules](./modules/)
--- ---

View File

@ -1,4 +1,5 @@
{ pkgs, ... }: rec { { pkgs, ... }:
rec {
# Show quick helper # Show quick helper
default = import ./help.nix { inherit pkgs; }; default = import ./help.nix { inherit pkgs; };
@ -30,5 +31,4 @@
# Run neovim as an app # Run neovim as an app
neovim = import ./neovim.nix { inherit pkgs; }; neovim = import ./neovim.nix { inherit pkgs; };
nvim = neovim; nvim = neovim;
} }

View File

@ -1,19 +1,19 @@
{ pkgs, ... }: { { pkgs, ... }:
{
# nix run github:nmasur/dotfiles#encrypt-secret > private/mysecret.age # nix run github:nmasur/dotfiles#encrypt-secret > private/mysecret.age
type = "app"; type = "app";
program = builtins.toString (pkgs.writeShellScript "encrypt-secret" '' program = builtins.toString (
printf "\nEnter the secret data to encrypt for all hosts...\n\n" 1>&2 pkgs.writeShellScript "encrypt-secret" ''
read -p "Secret: " secret printf "\nEnter the secret data to encrypt for all hosts...\n\n" 1>&2
printf "\nEncrypting...\n\n" 1>&2 read -p "Secret: " secret
tmpfile=$(mktemp) printf "\nEncrypting...\n\n" 1>&2
echo "''${secret}" > ''${tmpfile} tmpfile=$(mktemp)
${pkgs.age}/bin/age --encrypt --armor --recipients-file ${ echo "''${secret}" > ''${tmpfile}
builtins.toString ../misc/public-keys ${pkgs.age}/bin/age --encrypt --armor --recipients-file ${builtins.toString ../misc/public-keys} $tmpfile
} $tmpfile rm $tmpfile
rm $tmpfile ''
''); );
} }

View File

@ -1,39 +1,41 @@
{ pkgs, ... }: { { pkgs, ... }:
{
# This script will partition and format drives; use at your own risk! # This script will partition and format drives; use at your own risk!
type = "app"; type = "app";
program = builtins.toString (pkgs.writeShellScript "format-root" '' program = builtins.toString (
set -e pkgs.writeShellScript "format-root" ''
set -e
DISK=$1 DISK=$1
if [ -z "''${DISK}" ]; then if [ -z "''${DISK}" ]; then
${pkgs.gum}/bin/gum style --width 50 --margin "1 2" --padding "2 4" \ ${pkgs.gum}/bin/gum style --width 50 --margin "1 2" --padding "2 4" \
--foreground "#fb4934" \ --foreground "#fb4934" \
"Missing required parameter." \ "Missing required parameter." \
"Usage: format-root -- <disk>" \ "Usage: format-root -- <disk>" \
"Flake example: nix run github:nmasur/dotfiles#format-root -- nvme0n1" "Flake example: nix run github:nmasur/dotfiles#format-root -- nvme0n1"
echo "(exiting)" echo "(exiting)"
exit 1 exit 1
fi fi
${pkgs.disko-packaged}/bin/disko \ ${pkgs.disko-packaged}/bin/disko \
--mode create \ --mode create \
--dry-run \ --dry-run \
--flake "path:$(pwd)#root" \ --flake "path:$(pwd)#root" \
--arg disk \""/dev/''${DISK}"\" --arg disk \""/dev/''${DISK}"\"
${pkgs.gum}/bin/gum confirm \ ${pkgs.gum}/bin/gum confirm \
"This will ERASE ALL DATA on the disk /dev/''${DISK}. Are you sure you want to continue?" \ "This will ERASE ALL DATA on the disk /dev/''${DISK}. Are you sure you want to continue?" \
--default=false --default=false
${pkgs.disko-packaged}/bin/disko \ ${pkgs.disko-packaged}/bin/disko \
--mode create \ --mode create \
--flake "path:$(pwd)#root" \ --flake "path:$(pwd)#root" \
--arg disk "/dev/''${DISK}" --arg disk "/dev/''${DISK}"
'');
''
);
} }

View File

@ -1,23 +1,25 @@
{ pkgs, ... }: { { pkgs, ... }:
{
type = "app"; type = "app";
program = builtins.toString (pkgs.writeShellScript "default" '' program = builtins.toString (
${pkgs.gum}/bin/gum style --margin "1 2" --padding "0 2" --foreground "15" --background "55" "Options" pkgs.writeShellScript "default" ''
${pkgs.gum}/bin/gum format --type=template -- ' {{ Italic "Run with" }} {{ Color "15" "69" " nix run github:nmasur/dotfiles#" }}{{ Color "15" "62" "someoption" }}{{ Color "15" "69" " " }}.' ${pkgs.gum}/bin/gum style --margin "1 2" --padding "0 2" --foreground "15" --background "55" "Options"
echo "" ${pkgs.gum}/bin/gum format --type=template -- ' {{ Italic "Run with" }} {{ Color "15" "69" " nix run github:nmasur/dotfiles#" }}{{ Color "15" "62" "someoption" }}{{ Color "15" "69" " " }}.'
echo "" echo ""
${pkgs.gum}/bin/gum format --type=template -- \ echo ""
' {{ Color "15" "57" " readme " }} {{ Italic "Documentation for this repository." }}' \ ${pkgs.gum}/bin/gum format --type=template -- \
' {{ Color "15" "57" " rebuild " }} {{ Italic "Switch to this configuration." }}' \ ' {{ Color "15" "57" " readme " }} {{ Italic "Documentation for this repository." }}' \
' {{ Color "15" "57" " installer " }} {{ Italic "Format and install from nothing." }}' \ ' {{ Color "15" "57" " rebuild " }} {{ Italic "Switch to this configuration." }}' \
' {{ Color "15" "57" " neovim " }} {{ Italic "Test out the Neovim package." }}' \ ' {{ Color "15" "57" " installer " }} {{ Italic "Format and install from nothing." }}' \
' {{ Color "15" "57" " loadkey " }} {{ Italic "Load an ssh key for this machine using melt." }}' \ ' {{ Color "15" "57" " neovim " }} {{ Italic "Test out the Neovim package." }}' \
' {{ Color "15" "57" " encrypt-secret " }} {{ Italic "Encrypt a secret for all machines." }}' \ ' {{ Color "15" "57" " loadkey " }} {{ Italic "Load an ssh key for this machine using melt." }}' \
' {{ Color "15" "57" " reencrypt-secrets " }} {{ Italic "Reencrypt all secrets when new machine is added." }}' \ ' {{ Color "15" "57" " encrypt-secret " }} {{ Italic "Encrypt a secret for all machines." }}' \
' {{ Color "15" "57" " netdata " }} {{ Italic "Connect a machine to Netdata cloud." }}' ' {{ Color "15" "57" " reencrypt-secrets " }} {{ Italic "Reencrypt all secrets when new machine is added." }}' \
echo "" ' {{ Color "15" "57" " netdata " }} {{ Italic "Connect a machine to Netdata cloud." }}'
echo "" echo ""
''); echo ""
''
);
} }

View File

@ -1,48 +1,50 @@
{ pkgs, ... }: { { pkgs, ... }:
{
# Inspired by https://github.com/cleverca22/nix-tests/blob/master/kexec/justdoit.nix # Inspired by https://github.com/cleverca22/nix-tests/blob/master/kexec/justdoit.nix
# This script will partition and format drives; use at your own risk! # This script will partition and format drives; use at your own risk!
type = "app"; type = "app";
program = builtins.toString (pkgs.writeShellScript "installer" '' program = builtins.toString (
set -e pkgs.writeShellScript "installer" ''
set -e
DISK=$1 DISK=$1
FLAKE=$2 FLAKE=$2
PARTITION_PREFIX="" PARTITION_PREFIX=""
if [ -z "$DISK" ] || [ -z "$FLAKE" ]; then if [ -z "$DISK" ] || [ -z "$FLAKE" ]; then
${pkgs.gum}/bin/gum style --width 50 --margin "1 2" --padding "2 4" \ ${pkgs.gum}/bin/gum style --width 50 --margin "1 2" --padding "2 4" \
--foreground "#fb4934" \ --foreground "#fb4934" \
"Missing required parameter." \ "Missing required parameter." \
"Usage: installer -- <disk> <host>" \ "Usage: installer -- <disk> <host>" \
"Example: installer -- nvme0n1 tempest" \ "Example: installer -- nvme0n1 tempest" \
"Flake example: nix run github:nmasur/dotfiles#installer -- nvme0n1 tempest" "Flake example: nix run github:nmasur/dotfiles#installer -- nvme0n1 tempest"
echo "(exiting)" echo "(exiting)"
exit 1 exit 1
fi fi
case "$DISK" in nvme*) case "$DISK" in nvme*)
PARTITION_PREFIX="p" PARTITION_PREFIX="p"
esac esac
${pkgs.gum}/bin/gum confirm \ ${pkgs.gum}/bin/gum confirm \
"This will ERASE ALL DATA on the disk /dev/''${DISK}. Are you sure you want to continue?" \ "This will ERASE ALL DATA on the disk /dev/''${DISK}. Are you sure you want to continue?" \
--default=false --default=false
${pkgs.parted}/bin/parted /dev/''${DISK} -- mklabel gpt ${pkgs.parted}/bin/parted /dev/''${DISK} -- mklabel gpt
${pkgs.parted}/bin/parted /dev/''${DISK} -- mkpart primary 512MiB 100% ${pkgs.parted}/bin/parted /dev/''${DISK} -- mkpart primary 512MiB 100%
${pkgs.parted}/bin/parted /dev/''${DISK} -- mkpart ESP fat32 1MiB 512MiB ${pkgs.parted}/bin/parted /dev/''${DISK} -- mkpart ESP fat32 1MiB 512MiB
${pkgs.parted}/bin/parted /dev/''${DISK} -- set 3 esp on ${pkgs.parted}/bin/parted /dev/''${DISK} -- set 3 esp on
mkfs.ext4 -L nixos /dev/''${DISK}''${PARTITION_PREFIX}1 mkfs.ext4 -L nixos /dev/''${DISK}''${PARTITION_PREFIX}1
mkfs.fat -F 32 -n boot /dev/''${DISK}''${PARTITION_PREFIX}2 mkfs.fat -F 32 -n boot /dev/''${DISK}''${PARTITION_PREFIX}2
mount /dev/disk/by-label/nixos /mnt mount /dev/disk/by-label/nixos /mnt
mkdir --parents /mnt/boot mkdir --parents /mnt/boot
mount /dev/disk/by-label/boot /mnt/boot mount /dev/disk/by-label/boot /mnt/boot
${pkgs.nixos-install-tools}/bin/nixos-install --flake github:nmasur/dotfiles#''${FLAKE}
'');
${pkgs.nixos-install-tools}/bin/nixos-install --flake github:nmasur/dotfiles#''${FLAKE}
''
);
} }

View File

@ -1,13 +1,15 @@
{ pkgs, ... }: { { pkgs, ... }:
{
type = "app"; type = "app";
program = builtins.toString (pkgs.writeShellScript "loadkey" '' program = builtins.toString (
printf "\nEnter the seed phrase for your SSH key...\n" pkgs.writeShellScript "loadkey" ''
printf "\nThen press ^D when complete.\n\n" printf "\nEnter the seed phrase for your SSH key...\n"
mkdir -p ~/.ssh/ printf "\nThen press ^D when complete.\n\n"
${pkgs.melt}/bin/melt restore ~/.ssh/id_ed25519 mkdir -p ~/.ssh/
printf "\n\nContinuing activation.\n\n" ${pkgs.melt}/bin/melt restore ~/.ssh/id_ed25519
''); printf "\n\nContinuing activation.\n\n"
''
);
} }

View File

@ -1,12 +1,12 @@
{ pkgs, ... }: { { pkgs, ... }:
{
type = "app"; type = "app";
program = "${ program = "${
(import ../modules/common/neovim/package { (import ../modules/common/neovim/package {
inherit pkgs; inherit pkgs;
colors = (import ../colorscheme/nord).dark; colors = (import ../colorscheme/nord).dark;
}) })
}/bin/nvim"; }/bin/nvim";
} }

View File

@ -1,19 +1,21 @@
{ pkgs, ... }: { { pkgs, ... }:
{
type = "app"; type = "app";
program = builtins.toString (pkgs.writeShellScript "netdata-cloud" '' program = builtins.toString (
if [ "$EUID" -ne 0 ]; then pkgs.writeShellScript "netdata-cloud" ''
echo "Please run as root" if [ "$EUID" -ne 0 ]; then
exit 1 echo "Please run as root"
fi exit 1
mkdir --parents --mode 0750 /var/lib/netdata/cloud.d fi
printf "\nEnter the claim token for netdata cloud...\n\n" mkdir --parents --mode 0750 /var/lib/netdata/cloud.d
read -p "Token: " token printf "\nEnter the claim token for netdata cloud...\n\n"
echo "''${token}" > /var/lib/netdata/cloud.d/token read -p "Token: " token
chown -R netdata:netdata /var/lib/netdata echo "''${token}" > /var/lib/netdata/cloud.d/token
${pkgs.netdata}/bin/netdata-claim.sh -id=$(uuidgen) chown -R netdata:netdata /var/lib/netdata
printf "\n\nNow restart netdata service.\n\n" ${pkgs.netdata}/bin/netdata-claim.sh -id=$(uuidgen)
''); printf "\n\nNow restart netdata service.\n\n"
''
);
} }

View File

@ -1,9 +1,11 @@
{ pkgs, ... }: { { pkgs, ... }:
{
type = "app"; type = "app";
program = builtins.toString (pkgs.writeShellScript "readme" '' program = builtins.toString (
${pkgs.glow}/bin/glow --pager ${builtins.toString ../README.md} pkgs.writeShellScript "readme" ''
''); ${pkgs.glow}/bin/glow --pager ${builtins.toString ../README.md}
''
);
} }

View File

@ -1,15 +1,17 @@
{ pkgs, ... }: { { pkgs, ... }:
{
type = "app"; type = "app";
program = builtins.toString (pkgs.writeShellScript "rebuild" '' program = builtins.toString (
echo ${pkgs.system} pkgs.writeShellScript "rebuild" ''
SYSTEM=${if pkgs.stdenv.isDarwin then "darwin" else "linux"} echo ${pkgs.system}
if [ "$SYSTEM" == "darwin" ]; then SYSTEM=${if pkgs.stdenv.isDarwin then "darwin" else "linux"}
sudo darwin-rebuild switch --flake ${builtins.toString ../.} if [ "$SYSTEM" == "darwin" ]; then
else sudo darwin-rebuild switch --flake ${builtins.toString ../.}
doas nixos-rebuild switch --flake ${builtins.toString ../.} else
fi doas nixos-rebuild switch --flake ${builtins.toString ../.}
''); fi
''
);
} }

View File

@ -1,27 +1,27 @@
{ pkgs, ... }: { { pkgs, ... }:
{
# nix run github:nmasur/dotfiles#reencrypt-secrets ./private # nix run github:nmasur/dotfiles#reencrypt-secrets ./private
type = "app"; type = "app";
program = builtins.toString (pkgs.writeShellScript "reencrypt-secrets" '' program = builtins.toString (
if [ $# -eq 0 ]; then pkgs.writeShellScript "reencrypt-secrets" ''
echo "Must provide directory to reencrypt." if [ $# -eq 0 ]; then
exit 1 echo "Must provide directory to reencrypt."
fi exit 1
encrypted=$1 fi
for encryptedfile in ''${1}/*; do encrypted=$1
tmpfile=$(mktemp) for encryptedfile in ''${1}/*; do
echo "Decrypting ''${encryptedfile}..." tmpfile=$(mktemp)
${pkgs.age}/bin/age --decrypt \ echo "Decrypting ''${encryptedfile}..."
--identity ~/.ssh/id_ed25519 $encryptedfile > $tmpfile ${pkgs.age}/bin/age --decrypt \
echo "Encrypting ''${encryptedfile}..." --identity ~/.ssh/id_ed25519 $encryptedfile > $tmpfile
${pkgs.age}/bin/age --encrypt --armor --recipients-file ${ echo "Encrypting ''${encryptedfile}..."
builtins.toString ../misc/public-keys ${pkgs.age}/bin/age --encrypt --armor --recipients-file ${builtins.toString ../misc/public-keys} $tmpfile > $encryptedfile
} $tmpfile > $encryptedfile rm $tmpfile
rm $tmpfile done
done echo "Finished."
echo "Finished." ''
''); );
} }

View File

@ -16,9 +16,7 @@
base0B = "#dbbc7f"; # Strings, Inherited Class, Markup Code, Diff Inserted base0B = "#dbbc7f"; # Strings, Inherited Class, Markup Code, Diff Inserted
base0C = "#e69875"; # Support, Regular Expressions, Escape Characters, ... base0C = "#e69875"; # Support, Regular Expressions, Escape Characters, ...
base0D = "#a7c080"; # Functions, Methods, Attribute IDs, Headings base0D = "#a7c080"; # Functions, Methods, Attribute IDs, Headings
base0E = base0E = "#e67e80"; # Keywords, Storage, Selector, Markup Italic, Diff Changed
"#e67e80"; # Keywords, Storage, Selector, Markup Italic, Diff Changed base0F = "#d699b6"; # Deprecated, Opening/Closing Embedded Language Tags, ...
base0F =
"#d699b6"; # Deprecated, Opening/Closing Embedded Language Tags, ...
}; };
} }

View File

@ -2,8 +2,7 @@
{ {
name = "gruvbox-dark"; # Dark, Medium name = "gruvbox-dark"; # Dark, Medium
author = author = "Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox), ElRastaOk (https://www.reddit.com/user/ElRastaOk)";
"Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox), ElRastaOk (https://www.reddit.com/user/ElRastaOk)";
dark = { dark = {
base00 = "#1D2122"; # ---- This is the change from normal gruvbox base00 = "#1D2122"; # ---- This is the change from normal gruvbox
base01 = "#3c3836"; # --- base01 = "#3c3836"; # ---

View File

@ -1,7 +1,6 @@
{ {
name = "gruvbox"; # Dark, Medium name = "gruvbox"; # Dark, Medium
author = author = "Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox)";
"Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox)";
dark = { dark = {
base00 = "#282828"; # ---- base00 = "#282828"; # ----
base01 = "#3c3836"; # --- base01 = "#3c3836"; # ---

View File

@ -1,41 +1,38 @@
{ disk, ... }: { { disk, ... }:
{
disk = { disk = {
boot = { boot = {
type = "disk"; type = "disk";
device = disk; device = disk;
content = { content = {
type = "table"; type = "gpt";
format = "gpt"; partitions = {
partitions = [
# Boot partition # Boot partition
{ ESP = rec {
name = "ESP"; size = "512MiB";
start = "0"; type = "EF00";
end = "512MiB"; label = "boot";
fs-type = "fat32"; device = "/dev/disk/by-label/${label}";
bootable = true;
content = { content = {
type = "filesystem"; type = "filesystem";
format = "vfat"; format = "vfat";
mountpoint = "/boot"; mountpoint = "/boot";
extraArgs = [ "-n boot" ]; extraArgs = [ "-n ${label}" ];
}; };
} };
# Root partition ext4 # Root partition ext4
{ root = rec {
name = "root"; size = "100%";
start = "512MiB"; label = "nixos";
end = "100%"; device = "/dev/disk/by-label/${label}";
part-type = "primary";
bootable = true;
content = { content = {
type = "filesystem"; type = "filesystem";
format = "ext4"; format = "ext4";
mountpoint = "/"; mountpoint = "/";
extraArgs = [ "-L nixos" ]; extraArgs = [ "-L ${label}" ];
}; };
} };
]; };
}; };
}; };
}; };

View File

@ -1,4 +1,5 @@
{ pool, disks, ... }: { { pool, disks, ... }:
{
disk = lib.genAttrs disks (disk: { disk = lib.genAttrs disks (disk: {
"${disk}" = { "${disk}" = {
type = "disk"; type = "disk";
@ -6,16 +7,18 @@
content = { content = {
type = "table"; type = "table";
format = "gpt"; format = "gpt";
partitions = [{ partitions = [
type = "partition"; {
name = "zfs"; type = "partition";
start = "128MiB"; name = "zfs";
end = "100%"; start = "128MiB";
content = { end = "100%";
type = "zfs"; content = {
pool = pool; type = "zfs";
}; pool = pool;
}]; };
}
];
}; };
}; };
}); });

View File

@ -57,6 +57,7 @@ Launch a new shell. Then use Nix to switch to the macOS configuration:
```bash ```bash
sudo rm /etc/bashrc sudo rm /etc/bashrc
sudo rm /etc/nix/nix.conf sudo rm /etc/nix/nix.conf
export NIX_SSL_CERT_FILE="$HOME/Documents/t2-ca-bundle.pem"
nix \ nix \
--extra-experimental-features flakes \ --extra-experimental-features flakes \
--extra-experimental-features nix-command \ --extra-experimental-features nix-command \

View File

@ -63,3 +63,20 @@ Use this mysqldump command:
sudo -u nextcloud mysqldump -S /run/mysqld/mysqld.sock --default-character-set=utf8mb4 nextcloud > backup.sql sudo -u nextcloud mysqldump -S /run/mysqld/mysqld.sock --default-character-set=utf8mb4 nextcloud > backup.sql
``` ```
## Converting to Postgres
Same as MySQL, but run this command instead:
```
sudo -u nextcloud nextcloud-occ db:convert-type pgsql nextcloud /run/postgresql/ nextcloud
```
Then set the `dbtype` to `pgsql`.
## Backing Up Postgres Database
Use this pg_dump command:
```
sudo -u nextcloud pg_dump nextcloud > backup.sql
```

299
flake.lock generated
View File

@ -1,22 +1,5 @@
{ {
"nodes": { "nodes": {
"Comment-nvim-src": {
"flake": false,
"locked": {
"lastModified": 1681214440,
"narHash": "sha256-48hy+hiaDJLlgWqC7IeZI3dT+VwWkRo4atQbyPxu/ys=",
"owner": "numToStr",
"repo": "Comment.nvim",
"rev": "e51f2b142d88bb666dcaa77d93a07f4b419aca70",
"type": "github"
},
"original": {
"owner": "numToStr",
"ref": "v0.8.0",
"repo": "Comment.nvim",
"type": "github"
}
},
"baleia-nvim-src": { "baleia-nvim-src": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -33,47 +16,47 @@
"type": "github" "type": "github"
} }
}, },
"bufferline-nvim-src": { "base16-nvim-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1706180994, "lastModified": 1716483968,
"narHash": "sha256-/iGzUDJaodkUyWpwim8UtwaRuarfu/Nk6wxVApk+QxY=", "narHash": "sha256-GRF/6AobXHamw8TZ3FjL7SI6ulcpwpcohsIuZeCSh2A=",
"owner": "akinsho", "owner": "RRethy",
"repo": "bufferline.nvim", "repo": "base16-nvim",
"rev": "d6cb9b7cac52887bcac65f8698e67479553c0748", "rev": "6ac181b5733518040a33017dde654059cd771b7c",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "akinsho", "owner": "RRethy",
"ref": "v4.5.0", "repo": "base16-nvim",
"repo": "bufferline.nvim",
"type": "github" "type": "github"
} }
}, },
"bypass-paywalls-clean": { "bufferline-nvim-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1706880406, "lastModified": 1716555412,
"narHash": "sha256-8z2Gc3ITluXXbDij4Ltahpkxs7zdnMITvIAjotab/QU=", "narHash": "sha256-8PCkY1zrlMrPGnQOb7MjqDXNlkeX46jrT4ScIL+MOwM=",
"owner": "magnolia1234", "owner": "akinsho",
"repo": "bpc-uploads", "repo": "bufferline.nvim",
"rev": "c91cfd510390ab5a138f412ad2890b2cb2a2eafd", "rev": "99337f63f0a3c3ab9519f3d1da7618ca4f91cffe",
"type": "gitlab" "type": "github"
}, },
"original": { "original": {
"owner": "magnolia1234", "owner": "akinsho",
"repo": "bpc-uploads", "ref": "v4.6.1",
"type": "gitlab" "repo": "bufferline.nvim",
"type": "github"
} }
}, },
"cmp-nvim-lsp-src": { "cmp-nvim-lsp-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1702205473, "lastModified": 1715931395,
"narHash": "sha256-/0sh9vJBD9pUuD7q3tNSQ1YLvxFMNykdg5eG+LjZAA8=", "narHash": "sha256-CT1+Z4XJBVsl/RqvJeGmyitD6x7So0ylXvvef5jh7I8=",
"owner": "hrsh7th", "owner": "hrsh7th",
"repo": "cmp-nvim-lsp", "repo": "cmp-nvim-lsp",
"rev": "5af77f54de1b16c34b23cba810150689a3a90312", "rev": "39e2eda76828d88b773cc27a3f61d2ad782c922d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -89,11 +72,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1706833576, "lastModified": 1716511055,
"narHash": "sha256-w7BL0EWRts+nD1lbLECIuz6fRzmmV+z8oWwoY7womR0=", "narHash": "sha256-5Fe/DGgvMhPEMl9VdVxv3zvwRcwNDmW5eRJ0gk72w7U=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "bdbae6ecff8fcc322bf6b9053c0b984912378af7", "rev": "0bea8222f6e83247dd13b055d83e64bce02ee532",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -110,11 +93,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1706491084, "lastModified": 1716773194,
"narHash": "sha256-eaEv+orTmr2arXpoE4aFZQMVPOYXCBEbLgK22kOtkhs=", "narHash": "sha256-rskkGmWlvYFb+CXedBiL8eWEuED0Es0XR4CkJ11RQKY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "f67ba6552845ea5d7f596a24d57c33a8a9dc8de9", "rev": "10986091e47fb1180620b78438512b294b7e8f67",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -126,16 +109,16 @@
"fidget-nvim-src": { "fidget-nvim-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1704696337, "lastModified": 1716093309,
"narHash": "sha256-uAX/RGfOmsUIUaDepNwUpK8MBaTMBJ4rLZ69y0MwpNE=", "narHash": "sha256-Gpk/G0ByOAIE8uX4Xr94CvAjJBSJMEOwBuvrhmYYGsg=",
"owner": "j-hui", "owner": "j-hui",
"repo": "fidget.nvim", "repo": "fidget.nvim",
"rev": "3a93300c076109d86c7ce35ec67a8034ae6ba9db", "rev": "ef99df04a1c53a453602421bc0f756997edc8289",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "j-hui", "owner": "j-hui",
"ref": "v1.2.0", "ref": "v1.4.5",
"repo": "fidget.nvim", "repo": "fidget.nvim",
"type": "github" "type": "github"
} }
@ -147,11 +130,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1707007453, "lastModified": 1716857077,
"narHash": "sha256-vs7uACn2/8GOApZJv52gAVsLfpjQWFgkHN2QJ7aVkl8=", "narHash": "sha256-IvdZLdbPqJFkIbcDjMCMbdhrHjhS6k0SZk9IvJAI/fI=",
"owner": "bandithedoge", "owner": "bandithedoge",
"repo": "nixpkgs-firefox-darwin", "repo": "nixpkgs-firefox-darwin",
"rev": "d839feb516758ad28bc1cef43008d55e749c1d6a", "rev": "539f092808e92ffbab69d8dc307f7db88d721a9c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -199,11 +182,11 @@
"systems": "systems_2" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1705309234, "lastModified": 1710146030,
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -215,11 +198,11 @@
"hmts-nvim-src": { "hmts-nvim-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1706900289, "lastModified": 1715076655,
"narHash": "sha256-kw3YJ21nhs/x9Jp7kvnL+9FuiSgLB1hO/ON3QeeZx9g=", "narHash": "sha256-vDTqJQzLyg0nmlC+CrLnPkYti1rPxmvRW8eQq/9Zg+M=",
"owner": "calops", "owner": "calops",
"repo": "hmts.nvim", "repo": "hmts.nvim",
"rev": "ba1239972a1f56b94252d4f85a43e777ac419662", "rev": "19a91816c123173a4551a6a04f2882338f20db1d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -235,11 +218,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1706985585, "lastModified": 1716847642,
"narHash": "sha256-ptshv4qXiC6V0GCfpABz88UGGPNwqs5tAxaRUKbk1Qo=", "narHash": "sha256-rjEswRV0o23eBBils8lJXyIGha+l/VjV73IPg+ztxgk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "1ca210648a6ca9b957efde5da957f3de6b1f0c45", "rev": "10c7c219b7dae5795fb67f465a0d86cbe29f25fa",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -252,11 +235,11 @@
"kitty-scrollback-nvim-src": { "kitty-scrollback-nvim-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1706891759, "lastModified": 1716487246,
"narHash": "sha256-p7RPqLHO6D5CCTDQzUrEqTu9+jg+V7wtYfGbY4qjE9A=", "narHash": "sha256-yHyco+ftcpJAVWhwA8ItKa0IZgNJZjCQQjuyVG93xUs=",
"owner": "mikesmithgh", "owner": "mikesmithgh",
"repo": "kitty-scrollback.nvim", "repo": "kitty-scrollback.nvim",
"rev": "12f7687ac049d46a987c39b2b4f657fdf540fa4e", "rev": "08960ad9a96ff6ea6269157dbd4a8a499f7a4311",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -307,14 +290,14 @@
"nextcloud-snappymail": { "nextcloud-snappymail": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1707018069, "lastModified": 1714909152,
"narHash": "sha256-UeZXoZFEPJj7zEVNTXJ3IYNt/wI7VFq3Pjh1ubMHCBo=", "narHash": "sha256-CsAUnbA/9XiVuk96pOK+E++lp8BlJITtfExWcb9rqPk=",
"type": "tarball", "type": "tarball",
"url": "https://snappymail.eu/repository/nextcloud/snappymail-2.32.0-nextcloud.tar.gz" "url": "https://github.com/nmasur/snappymail-nextcloud/releases/download/v2.36.1/snappymail-2.36.1-nextcloud.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
"url": "https://snappymail.eu/repository/nextcloud/snappymail-2.32.0-nextcloud.tar.gz" "url": "https://github.com/nmasur/snappymail-nextcloud/releases/download/v2.36.1/snappymail-2.36.1-nextcloud.tar.gz"
} }
}, },
"nix2vim": { "nix2vim": {
@ -325,11 +308,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1706886721, "lastModified": 1715598267,
"narHash": "sha256-iDYxsE5xYoK8Ww2TYZDmgRQNIZl+QHJfChOxWh45g0k=", "narHash": "sha256-xriYT6Tu6THN0n3ZOVLy3C0x61OVQOe9U1XvLhg463M=",
"owner": "gytis-ivaskevicius", "owner": "gytis-ivaskevicius",
"repo": "nix2vim", "repo": "nix2vim",
"rev": "29253dcf0f645a44847006d436b096369ef42fd8", "rev": "fa1b1cbf6c17883143fcbbc840e5ecf6557af072",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -340,11 +323,11 @@
}, },
"nixlib": { "nixlib": {
"locked": { "locked": {
"lastModified": 1693701915, "lastModified": 1712450863,
"narHash": "sha256-waHPLdDYUOHSEtMKKabcKIMhlUOHPOOPQ9UyFeEoovs=", "narHash": "sha256-K6IkdtMtq9xktmYPj0uaYc8NsIqHuaAoRBaMgu9Fvrw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs.lib", "repo": "nixpkgs.lib",
"rev": "f5af57d3ef9947a70ac86e42695231ac1ad00c25", "rev": "3c62b6a12571c9a7f65ab037173ee153d539905f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -361,11 +344,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1706085261, "lastModified": 1716210724,
"narHash": "sha256-7PgpHRHyShINcqgevPP1fJ6N8kM5ZSOJnk3QZBrOCQ0=", "narHash": "sha256-iqQa3omRcHGpWb1ds75jS9ruA5R39FTmAkeR3J+ve1w=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixos-generators", "repo": "nixos-generators",
"rev": "896f6589db5b25023b812bbb6c1f5d3a499b1132", "rev": "d14b286322c7f4f897ca4b1726ce38cb68596c94",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -376,11 +359,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1706732774, "lastModified": 1716509168,
"narHash": "sha256-hqJlyJk4MRpcItGYMF+3uHe8HvxNETWvlGtLuVpqLU0=", "narHash": "sha256-4zSIhSRRIoEBwjbPm3YiGtbd8HDWzFxJjw5DYSDy1n8=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b8b232ae7b8b144397fdb12d20f592e5e7c1a64d", "rev": "bfb7a882678e518398ce9a31a881538679f6f092",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -390,29 +373,29 @@
"type": "github" "type": "github"
} }
}, },
"null-ls-nvim-src": { "nixpkgs-caddy": {
"flake": false,
"locked": { "locked": {
"lastModified": 1691810493, "lastModified": 1699107987,
"narHash": "sha256-cWA0rzkOp/ekVKaFee7iea1lhnqKtWUIU+fW5M950wI=", "narHash": "sha256-nWXETr4Oqy/vOfzgWyMY04qzEN2iREFJc5ycQ3XNu0A=",
"owner": "jose-elias-alvarez", "owner": "jpds",
"repo": "null-ls.nvim", "repo": "nixpkgs",
"rev": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7", "rev": "a33b02fa9d664f31dadc8a874eb1a5dbaa9f4ecf",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "jose-elias-alvarez", "owner": "jpds",
"repo": "null-ls.nvim", "ref": "caddy-external-plugins",
"repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1707013032, "lastModified": 1716892974,
"narHash": "sha256-9kEY/D0Q6sF+p6vJRefVXDK4QQdwK4Q0lSQdsYICad0=", "narHash": "sha256-THmLi8tNElts9aPkHV68tyON6LgaMvfrmu8j4h4v6Aw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nur", "repo": "nur",
"rev": "ab432acea15134873882610c0e936a882319bc8a", "rev": "f45a1ca97c3e7b5ec5d970977b5ec44b5f466857",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -421,19 +404,35 @@
"type": "github" "type": "github"
} }
}, },
"nvim-lint-src": {
"flake": false,
"locked": {
"lastModified": 1716409152,
"narHash": "sha256-L5G634dM8kFWH+WxLCaMx+XY6Pzd++m0O4qRH1dS5PA=",
"owner": "mfussenegger",
"repo": "nvim-lint",
"rev": "e19842a05aae484957ad20710444757bc0a61d63",
"type": "github"
},
"original": {
"owner": "mfussenegger",
"repo": "nvim-lint",
"type": "github"
}
},
"nvim-lspconfig-src": { "nvim-lspconfig-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1701687137, "lastModified": 1716281382,
"narHash": "sha256-qFjFofA2LoD4yRfx4KGfSCpR3mDkpFaagcm+TVNPqco=", "narHash": "sha256-foJ7a59N0a3QaBW24PtwbyYDQVlIsFxiatADLO/hQvc=",
"owner": "neovim", "owner": "neovim",
"repo": "nvim-lspconfig", "repo": "nvim-lspconfig",
"rev": "cf3dd4a290084a868fac0e2e876039321d57111c", "rev": "0b8165cf95806bc4bb8f745bb0c92021b2ed4b98",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "neovim", "owner": "neovim",
"ref": "v0.1.7", "ref": "v0.1.8",
"repo": "nvim-lspconfig", "repo": "nvim-lspconfig",
"type": "github" "type": "github"
} }
@ -441,11 +440,11 @@
"nvim-tree-lua-src": { "nvim-tree-lua-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1706571452, "lastModified": 1716876666,
"narHash": "sha256-b0LIqLC8cCRX1NyJx4eH5c4v5Fqqw5mMleAnQ2VRctM=", "narHash": "sha256-rj/LdWQUSBcbxsUKfZp7N/qVC9/sWc/5PYwHVpBRm2U=",
"owner": "kyazdani42", "owner": "kyazdani42",
"repo": "nvim-tree.lua", "repo": "nvim-tree.lua",
"rev": "f39f7b6fcd3865ac2146de4cb4045286308f2935", "rev": "5a87ffe35c4739ffb6b62052572583ad277a20ae",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -457,11 +456,11 @@
"nvim-treesitter-src": { "nvim-treesitter-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1706952848, "lastModified": 1716878762,
"narHash": "sha256-pNjEODR+QJPDL58O4NM7SjzZEN8D3bXDHbKLNOS3fL8=", "narHash": "sha256-gXlbgvF9dtHof8xDSxGsACGCInMucjT3jiKB1T+VOm8=",
"owner": "nvim-treesitter", "owner": "nvim-treesitter",
"repo": "nvim-treesitter", "repo": "nvim-treesitter",
"rev": "4fbf150a1621d52f17b099506e1a32f107079210", "rev": "ea2b137f35fb1e87a6471ec311805920fdf45745",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -471,19 +470,6 @@
"type": "github" "type": "github"
} }
}, },
"proton-ge": {
"flake": false,
"locked": {
"lastModified": 1700610476,
"narHash": "sha256-IoClZ6hl2lsz9OGfFgnz7vEAGlSY2+1K2lDEEsJQOfU=",
"type": "tarball",
"url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-25/GE-Proton8-25.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-25/GE-Proton8-25.tar.gz"
}
},
"ren": { "ren": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -503,11 +489,11 @@
"rep": { "rep": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1705833236, "lastModified": 1707216692,
"narHash": "sha256-hm+v+b97z1HnY/7QHZxc0GygCq9W0mJauyjnz48ddaM=", "narHash": "sha256-/dH+mNtNHaYFndVhoqmz4Sc3HeemoQt1HGD98mb9Qhw=",
"owner": "robenkleene", "owner": "robenkleene",
"repo": "rep-grep", "repo": "rep-grep",
"rev": "365acc5d599934e94dc066eb85b7ddd684ba508b", "rev": "10510d47e392cb9d30a861c69f702fd194b3fa88",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -518,10 +504,9 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"Comment-nvim-src": "Comment-nvim-src",
"baleia-nvim-src": "baleia-nvim-src", "baleia-nvim-src": "baleia-nvim-src",
"base16-nvim-src": "base16-nvim-src",
"bufferline-nvim-src": "bufferline-nvim-src", "bufferline-nvim-src": "bufferline-nvim-src",
"bypass-paywalls-clean": "bypass-paywalls-clean",
"cmp-nvim-lsp-src": "cmp-nvim-lsp-src", "cmp-nvim-lsp-src": "cmp-nvim-lsp-src",
"darwin": "darwin", "darwin": "darwin",
"disko": "disko", "disko": "disko",
@ -537,12 +522,12 @@
"nix2vim": "nix2vim", "nix2vim": "nix2vim",
"nixos-generators": "nixos-generators", "nixos-generators": "nixos-generators",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"null-ls-nvim-src": "null-ls-nvim-src", "nixpkgs-caddy": "nixpkgs-caddy",
"nur": "nur", "nur": "nur",
"nvim-lint-src": "nvim-lint-src",
"nvim-lspconfig-src": "nvim-lspconfig-src", "nvim-lspconfig-src": "nvim-lspconfig-src",
"nvim-tree-lua-src": "nvim-tree-lua-src", "nvim-tree-lua-src": "nvim-tree-lua-src",
"nvim-treesitter-src": "nvim-treesitter-src", "nvim-treesitter-src": "nvim-treesitter-src",
"proton-ge": "proton-ge",
"ren": "ren", "ren": "ren",
"rep": "rep", "rep": "rep",
"telescope-nvim-src": "telescope-nvim-src", "telescope-nvim-src": "telescope-nvim-src",
@ -593,16 +578,16 @@
"telescope-nvim-src": { "telescope-nvim-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1701167040, "lastModified": 1716532947,
"narHash": "sha256-H5RpyWMluE+Yxg7xFX43AZTVW+Yg70DF3FmEGXBUSNg=", "narHash": "sha256-e1ulhc4IIvUgpjKQrSqPY4WpXuez6wlxL6Min9U0o5Q=",
"owner": "nvim-telescope", "owner": "nvim-telescope",
"repo": "telescope.nvim", "repo": "telescope.nvim",
"rev": "d90956833d7c27e73c621a61f20b29fdb7122709", "rev": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nvim-telescope", "owner": "nvim-telescope",
"ref": "0.1.5", "ref": "0.1.8",
"repo": "telescope.nvim", "repo": "telescope.nvim",
"type": "github" "type": "github"
} }
@ -626,16 +611,16 @@
"toggleterm-nvim-src": { "toggleterm-nvim-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1701858874, "lastModified": 1713792255,
"narHash": "sha256-vJApw7XY2wOX9InfWcah+hkNxBfS1+kQUWr4ITxRmgA=", "narHash": "sha256-mM5bGgAemsRJD9U6U5K6ia5qb8NaTusM99x6xrtEBfw=",
"owner": "akinsho", "owner": "akinsho",
"repo": "toggleterm.nvim", "repo": "toggleterm.nvim",
"rev": "cbd041d91b90cd3c02df03fe6133208888f8e008", "rev": "066cccf48a43553a80a210eb3be89a15d789d6e6",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "akinsho", "owner": "akinsho",
"ref": "v2.9.0", "ref": "v2.11.0",
"repo": "toggleterm.nvim", "repo": "toggleterm.nvim",
"type": "github" "type": "github"
} }
@ -643,11 +628,11 @@
"tree-sitter-bash": { "tree-sitter-bash": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1705686017, "lastModified": 1715005250,
"narHash": "sha256-+Mpks0FyQLl26TX63J6WhaAl/QDUR1k9wSUY5SFwL+w=", "narHash": "sha256-rCuQbnQAOnQWKYreNH80nlL+0A1qbWbjMvtczcoWPrY=",
"owner": "tree-sitter", "owner": "tree-sitter",
"repo": "tree-sitter-bash", "repo": "tree-sitter-bash",
"rev": "f7239f638d3dc16762563a9027faeee518ce1bd9", "rev": "2fbd860f802802ca76a6661ce025b3a3bca2d3ed",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -660,11 +645,11 @@
"tree-sitter-ini": { "tree-sitter-ini": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1699877527, "lastModified": 1716889525,
"narHash": "sha256-dYPeVTNWO4apY5dsjsKViavU7YtLeGTp6BzEemXhsEU=", "narHash": "sha256-IyHrIxcmuzs60zUiJv4E3nSkhSkgbcaLDUdeDx5mlHk=",
"owner": "justinmk", "owner": "justinmk",
"repo": "tree-sitter-ini", "repo": "tree-sitter-ini",
"rev": "bcb84a2d4bcd6f55b911c42deade75c8f90cb0c5", "rev": "87176e524f0a98f5be75fa44f4f0ff5c6eac069c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -676,11 +661,11 @@
"tree-sitter-lua": { "tree-sitter-lua": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1694072484, "lastModified": 1710150044,
"narHash": "sha256-5t5w8KqbefInNbA12/jpNzmky/uOUhsLjKdEqpl1GEc=", "narHash": "sha256-uFaEptW4wPrqgHfB1mYmVltf+4no61L2cPgpsr5qBIU=",
"owner": "MunifTanjim", "owner": "MunifTanjim",
"repo": "tree-sitter-lua", "repo": "tree-sitter-lua",
"rev": "9668709211b2e683f27f414454a8b51bf0a6bda1", "rev": "a24dab177e58c9c6832f96b9a73102a0cfbced4a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -693,11 +678,11 @@
"tree-sitter-puppet": { "tree-sitter-puppet": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1690231696, "lastModified": 1713617121,
"narHash": "sha256-YEjjy9WLwITERYqoeSVrRYnwVBIAwdc4o0lvAK9wizw=", "narHash": "sha256-+zMgzyuGerJ8l+i5ZtWnmGr3i4fFiSLD5FssyKESsmI=",
"owner": "amaanq", "owner": "amaanq",
"repo": "tree-sitter-puppet", "repo": "tree-sitter-puppet",
"rev": "9ce9a5f7d64528572aaa8d59459ba869e634086b", "rev": "584522f32495d648b18a53ccb52d988e60de127d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -709,11 +694,11 @@
"tree-sitter-python": { "tree-sitter-python": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1700218345, "lastModified": 1714528221,
"narHash": "sha256-hXNxa895SyNOG7PH2vAIkWbcMjZDjWYDsCafBZuvnT0=", "narHash": "sha256-hHQ5gK4dTRSdp0fLKarytU9vFhsBeQp7Ka61vFoIr7Y=",
"owner": "tree-sitter", "owner": "tree-sitter",
"repo": "tree-sitter-python", "repo": "tree-sitter-python",
"rev": "4bfdd9033a2225cc95032ce77066b7aeca9e2efc", "rev": "71778c2a472ed00a64abf4219544edbf8e4b86d7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -726,11 +711,11 @@
"tree-sitter-rasi": { "tree-sitter-rasi": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1678701563, "lastModified": 1716296585,
"narHash": "sha256-2nYZoLcrxxxiOJEySwHUm93lzMg8mU+V7LIP63ntFdA=", "narHash": "sha256-sPrIVgGGaBaXeqHNxjcdJ/S2FvxyV6rD9UPKU/tpspw=",
"owner": "Fymyte", "owner": "Fymyte",
"repo": "tree-sitter-rasi", "repo": "tree-sitter-rasi",
"rev": "371dac6bcce0df5566c1cfebde69d90ecbeefd2d", "rev": "6c9bbcfdf5f0f553d9ebc01750a3aa247a37b8aa",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -742,11 +727,11 @@
"tree-sitter-vimdoc": { "tree-sitter-vimdoc": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1705491128, "lastModified": 1713806200,
"narHash": "sha256-q5Ln8WPFrtKBfZnaAAlMh3Q/eczEt6wCMZAtx+ISCKg=", "narHash": "sha256-+QbLL5EC3oNiwd7h7MW/mutHhGPUHhbYTQcu6x6atcI=",
"owner": "neovim", "owner": "neovim",
"repo": "tree-sitter-vimdoc", "repo": "tree-sitter-vimdoc",
"rev": "ed8695ad8de39c3f073da130156f00b1148e2891", "rev": "b711df784dd43d0a8ed8ddbfca0ddcc3239d94b4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -780,11 +765,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1706867893, "lastModified": 1716640344,
"narHash": "sha256-c5bADvtL35S3vsJaXR5YWTXe08W0gSwOrTOXfpJB4Ac=", "narHash": "sha256-AZKQs+KrL70le0RZH8XqZJMc2SahU4LpfEJ2Vd5SWzM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NixOS-WSL", "repo": "NixOS-WSL",
"rev": "bcae8dc73b931b7f0fc65f1f1ef93dc379dfd66b", "rev": "020cd466170204e448b24b246045599fce69ad91",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -796,11 +781,11 @@
"zenyd-mpv-scripts": { "zenyd-mpv-scripts": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1706283438, "lastModified": 1707704915,
"narHash": "sha256-hpLZDtt5q18aZ8d9LHfT852wtBosKUTJ7Bx+cbjBLcg=", "narHash": "sha256-9P/8q/OZXfaJMS08acQP4h3/zUA5mKRQee0JmkXcz1w=",
"owner": "zenyd", "owner": "zenyd",
"repo": "mpv-scripts", "repo": "mpv-scripts",
"rev": "7100d19d18d111ce77fc9e6e8947c0d542a86397", "rev": "9bdce0050144cb24f92475f7bdd77180e0e4c26b",
"type": "github" "type": "github"
}, },
"original": { "original": {

305
flake.nix
View File

@ -7,6 +7,9 @@
# Used for system packages # Used for system packages
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# Used for caddy plugins
nixpkgs-caddy.url = "github:jpds/nixpkgs/caddy-external-plugins";
# Used for MacOS system config # Used for MacOS system config
darwin = { darwin = {
url = "github:lnl7/nix-darwin/master"; url = "github:lnl7/nix-darwin/master";
@ -22,8 +25,7 @@
# Used for user packages and dotfiles # Used for user packages and dotfiles
home-manager = { home-manager = {
url = "github:nix-community/home-manager/master"; url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = inputs.nixpkgs.follows = "nixpkgs"; # Use system packages list for their inputs
"nixpkgs"; # Use system packages list for their inputs
}; };
# Community packages; used for Firefox extensions # Community packages; used for Firefox extensions
@ -60,29 +62,24 @@
}; };
# Neovim plugins # Neovim plugins
base16-nvim-src = {
url = "github:RRethy/base16-nvim";
flake = false;
};
nvim-lspconfig-src = { nvim-lspconfig-src = {
# https://github.com/neovim/nvim-lspconfig/tags # https://github.com/neovim/nvim-lspconfig/tags
url = "github:neovim/nvim-lspconfig/v0.1.7"; url = "github:neovim/nvim-lspconfig/v0.1.8";
flake = false; flake = false;
}; };
cmp-nvim-lsp-src = { cmp-nvim-lsp-src = {
url = "github:hrsh7th/cmp-nvim-lsp"; url = "github:hrsh7th/cmp-nvim-lsp";
flake = false; flake = false;
}; };
null-ls-nvim-src = {
url = "github:jose-elias-alvarez/null-ls.nvim";
flake = false;
};
baleia-nvim-src = { baleia-nvim-src = {
# https://github.com/m00qek/baleia.nvim/tags # https://github.com/m00qek/baleia.nvim/tags
url = "github:m00qek/baleia.nvim"; url = "github:m00qek/baleia.nvim";
flake = false; flake = false;
}; };
Comment-nvim-src = {
# https://github.com/numToStr/Comment.nvim/releases
url = "github:numToStr/Comment.nvim/v0.8.0";
flake = false;
};
nvim-treesitter-src = { nvim-treesitter-src = {
# https://github.com/nvim-treesitter/nvim-treesitter/tags # https://github.com/nvim-treesitter/nvim-treesitter/tags
url = "github:nvim-treesitter/nvim-treesitter/master"; url = "github:nvim-treesitter/nvim-treesitter/master";
@ -90,7 +87,7 @@
}; };
telescope-nvim-src = { telescope-nvim-src = {
# https://github.com/nvim-telescope/telescope.nvim/releases # https://github.com/nvim-telescope/telescope.nvim/releases
url = "github:nvim-telescope/telescope.nvim/0.1.5"; url = "github:nvim-telescope/telescope.nvim/0.1.8";
flake = false; flake = false;
}; };
telescope-project-nvim-src = { telescope-project-nvim-src = {
@ -99,12 +96,12 @@
}; };
toggleterm-nvim-src = { toggleterm-nvim-src = {
# https://github.com/akinsho/toggleterm.nvim/tags # https://github.com/akinsho/toggleterm.nvim/tags
url = "github:akinsho/toggleterm.nvim/v2.9.0"; url = "github:akinsho/toggleterm.nvim/v2.11.0";
flake = false; flake = false;
}; };
bufferline-nvim-src = { bufferline-nvim-src = {
# https://github.com/akinsho/bufferline.nvim/releases # https://github.com/akinsho/bufferline.nvim/releases
url = "github:akinsho/bufferline.nvim/v4.5.0"; url = "github:akinsho/bufferline.nvim/v4.6.1";
flake = false; flake = false;
}; };
nvim-tree-lua-src = { nvim-tree-lua-src = {
@ -117,13 +114,17 @@
}; };
fidget-nvim-src = { fidget-nvim-src = {
# https://github.com/j-hui/fidget.nvim/tags # https://github.com/j-hui/fidget.nvim/tags
url = "github:j-hui/fidget.nvim/v1.2.0"; url = "github:j-hui/fidget.nvim/v1.4.5";
flake = false; flake = false;
}; };
kitty-scrollback-nvim-src = { kitty-scrollback-nvim-src = {
url = "github:mikesmithgh/kitty-scrollback.nvim"; url = "github:mikesmithgh/kitty-scrollback.nvim";
flake = false; flake = false;
}; };
nvim-lint-src = {
url = "github:mfussenegger/nvim-lint";
flake = false;
};
# Tree-Sitter Grammars # Tree-Sitter Grammars
tree-sitter-bash = { tree-sitter-bash = {
@ -171,78 +172,66 @@
flake = false; flake = false;
}; };
# GE version of Proton for game compatibility
# Alternatively, could consider using https://github.com/fufexan/nix-gaming
proton-ge = {
# https://github.com/GloriousEggroll/proton-ge-custom/releases
url =
"https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-25/GE-Proton8-25.tar.gz";
flake = false;
};
# Firefox addon from outside the extension store
bypass-paywalls-clean = {
# https://gitlab.com/magnolia1234/bpc-uploads/-/commits/master/?ref_type=HEADS
url = "gitlab:magnolia1234/bpc-uploads";
flake = false;
};
# Nextcloud Apps # Nextcloud Apps
nextcloud-news = { nextcloud-news = {
# https://github.com/nextcloud/news/releases # https://github.com/nextcloud/news/releases
url = url = "https://github.com/nextcloud/news/releases/download/25.0.0-alpha3/news.tar.gz";
"https://github.com/nextcloud/news/releases/download/25.0.0-alpha3/news.tar.gz";
flake = false; flake = false;
}; };
nextcloud-external = { nextcloud-external = {
# https://github.com/nextcloud-releases/external/releases # https://github.com/nextcloud-releases/external/releases
url = url = "https://github.com/nextcloud-releases/external/releases/download/v5.3.1/external-v5.3.1.tar.gz";
"https://github.com/nextcloud-releases/external/releases/download/v5.3.1/external-v5.3.1.tar.gz";
flake = false; flake = false;
}; };
nextcloud-cookbook = { nextcloud-cookbook = {
# https://github.com/christianlupus-nextcloud/cookbook-releases/releases/ # https://github.com/christianlupus-nextcloud/cookbook-releases/releases/
url = url = "https://github.com/christianlupus-nextcloud/cookbook-releases/releases/download/v0.11.0/cookbook-0.11.0.tar.gz";
"https://github.com/christianlupus-nextcloud/cookbook-releases/releases/download/v0.11.0/cookbook-0.11.0.tar.gz";
flake = false; flake = false;
}; };
nextcloud-snappymail = { nextcloud-snappymail = {
# https://github.com/the-djmaze/snappymail/releases # https://github.com/the-djmaze/snappymail/releases
url = # https://snappymail.eu/repository/nextcloud
"https://snappymail.eu/repository/nextcloud/snappymail-2.32.0-nextcloud.tar.gz"; url = "https://github.com/nmasur/snappymail-nextcloud/releases/download/v2.36.1/snappymail-2.36.1-nextcloud.tar.gz";
flake = false; flake = false;
}; };
}; };
outputs = { nixpkgs, ... }@inputs: outputs =
{ nixpkgs, ... }@inputs:
let let
# Global configuration for my systems # Global configuration for my systems
globals = let baseName = "masu.rs"; globals =
in rec { let
user = "noah"; baseName = "masu.rs";
fullName = "Noah Masur"; in
gitName = fullName; rec {
gitEmail = "7386960+nmasur@users.noreply.github.com"; user = "noah";
mail.server = "noahmasur.com"; fullName = "Noah Masur";
mail.imapHost = "imap.purelymail.com"; gitName = fullName;
mail.smtpHost = "smtp.purelymail.com"; gitEmail = "7386960+nmasur@users.noreply.github.com";
dotfilesRepo = "https://github.com/nmasur/dotfiles"; mail.server = "noahmasur.com";
hostnames = { mail.imapHost = "imap.purelymail.com";
git = "git.${baseName}"; mail.smtpHost = "smtp.purelymail.com";
influxdb = "influxdb.${baseName}"; dotfilesRepo = "https://github.com/nmasur/dotfiles";
metrics = "metrics.${baseName}"; hostnames = {
prometheus = "prom.${baseName}"; git = "git.${baseName}";
paperless = "paper.${baseName}"; influxdb = "influxdb.${baseName}";
secrets = "vault.${baseName}"; irc = "irc.${baseName}";
stream = "stream.${baseName}"; metrics = "metrics.${baseName}";
content = "cloud.${baseName}"; minecraft = "minecraft.${baseName}";
books = "books.${baseName}"; n8n = "n8n2.${baseName}";
download = "download.${baseName}"; prometheus = "prom.${baseName}";
paperless = "paper.${baseName}";
secrets = "vault.${baseName}";
stream = "stream.${baseName}";
content = "cloud.${baseName}";
books = "books.${baseName}";
download = "download.${baseName}";
transmission = "transmission.${baseName}";
};
}; };
};
# Common overlays to always use # Common overlays to always use
overlays = [ overlays = [
@ -252,28 +241,30 @@
(import ./overlays/calibre-web.nix) (import ./overlays/calibre-web.nix)
(import ./overlays/disko.nix inputs) (import ./overlays/disko.nix inputs)
(import ./overlays/tree-sitter.nix inputs) (import ./overlays/tree-sitter.nix inputs)
(import ./overlays/caddy.nix inputs)
(import ./overlays/mpv-scripts.nix inputs) (import ./overlays/mpv-scripts.nix inputs)
(import ./overlays/nextcloud-apps.nix inputs) (import ./overlays/nextcloud-apps.nix inputs)
(import ./overlays/betterlockscreen.nix) (import ./overlays/betterlockscreen.nix)
(import ./overlays/proton-ge.nix inputs)
(import ./overlays/gh-collaborators.nix) (import ./overlays/gh-collaborators.nix)
(import ./overlays/bypass-paywalls-clean.nix inputs)
(import ./overlays/ren-rep.nix inputs) (import ./overlays/ren-rep.nix inputs)
]; ];
# System types to support. # System types to support.
supportedSystems = supportedSystems = [
[ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]; "x86_64-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
];
# Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'. # Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
forAllSystems = nixpkgs.lib.genAttrs supportedSystems; forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
in
in rec { rec {
# Contains my full system builds, including home-manager # Contains my full system builds, including home-manager
# nixos-rebuild switch --flake .#tempest # nixos-rebuild switch --flake .#tempest
nixosConfigurations = { nixosConfigurations = {
arrow = import ./hosts/arrow { inherit inputs globals overlays; };
tempest = import ./hosts/tempest { inherit inputs globals overlays; }; tempest = import ./hosts/tempest { inherit inputs globals overlays; };
hydra = import ./hosts/hydra { inherit inputs globals overlays; }; hydra = import ./hosts/hydra { inherit inputs globals overlays; };
flame = import ./hosts/flame { inherit inputs globals overlays; }; flame = import ./hosts/flame { inherit inputs globals overlays; };
@ -283,78 +274,141 @@
# Contains my full Mac system builds, including home-manager # Contains my full Mac system builds, including home-manager
# darwin-rebuild switch --flake .#lookingglass # darwin-rebuild switch --flake .#lookingglass
darwinConfigurations = { darwinConfigurations = {
lookingglass = lookingglass = import ./hosts/lookingglass { inherit inputs globals overlays; };
import ./hosts/lookingglass { inherit inputs globals overlays; };
}; };
# For quickly applying home-manager settings with: # For quickly applying home-manager settings with:
# home-manager switch --flake .#tempest # home-manager switch --flake .#tempest
homeConfigurations = { homeConfigurations = {
tempest = tempest = nixosConfigurations.tempest.config.home-manager.users.${globals.user}.home;
nixosConfigurations.tempest.config.home-manager.users.${globals.user}.home; lookingglass = darwinConfigurations.lookingglass.config.home-manager.users."Noah.Masur".home;
lookingglass =
darwinConfigurations.lookingglass.config.home-manager.users."Noah.Masur".home;
}; };
# Disk formatting, only used once # Disk formatting, only used once
diskoConfigurations = { root = import ./disks/root.nix; }; diskoConfigurations = {
root = import ./disks/root.nix;
packages = let
aws = system:
import ./hosts/aws { inherit inputs globals overlays system; };
staff = system:
import ./hosts/staff { inherit inputs globals overlays system; };
neovim = system:
let pkgs = import nixpkgs { inherit system overlays; };
in import ./modules/common/neovim/package {
inherit pkgs;
colors = (import ./colorscheme/gruvbox-dark).dark;
};
in {
x86_64-linux.aws = aws "x86_64-linux";
x86_64-linux.staff = staff "x86_64-linux";
# Package Neovim config into standalone package
x86_64-linux.neovim = neovim "x86_64-linux";
x86_64-darwin.neovim = neovim "x86_64-darwin";
aarch64-linux.neovim = neovim "aarch64-linux";
aarch64-darwin.neovim = neovim "aarch64-darwin";
}; };
packages =
let
staff =
system:
import ./hosts/staff {
inherit
inputs
globals
overlays
system
;
};
neovim =
system:
let
pkgs = import nixpkgs { inherit system overlays; };
in
import ./modules/common/neovim/package {
inherit pkgs;
colors = (import ./colorscheme/gruvbox-dark).dark;
};
in
{
x86_64-linux.staff = staff "x86_64-linux";
x86_64-linux.arrow = inputs.nixos-generators.nixosGenerate rec {
system = "x86_64-linux";
format = "iso";
specialArgs = {
pkgs-caddy = import inputs.nixpkgs-caddy { inherit system; };
};
modules = import ./hosts/arrow/modules.nix { inherit inputs globals overlays; };
};
x86_64-linux.arrow-aws = inputs.nixos-generators.nixosGenerate rec {
system = "x86_64-linux";
format = "amazon";
specialArgs = {
pkgs-caddy = import inputs.nixpkgs-caddy { inherit system; };
};
modules = import ./hosts/arrow/modules.nix { inherit inputs globals overlays; } ++ [
(
{ ... }:
{
boot.kernelPackages = inputs.nixpkgs.legacyPackages.x86_64-linux.linuxKernel.packages.linux_6_6;
amazonImage.sizeMB = 16 * 1024;
permitRootLogin = "prohibit-password";
boot.loader.systemd-boot.enable = inputs.nixpkgs.lib.mkForce false;
boot.loader.efi.canTouchEfiVariables = inputs.nixpkgs.lib.mkForce false;
services.amazon-ssm-agent.enable = true;
users.users.ssm-user.extraGroups = [ "wheel" ];
}
)
];
};
# Package Neovim config into standalone package
x86_64-linux.neovim = neovim "x86_64-linux";
x86_64-darwin.neovim = neovim "x86_64-darwin";
aarch64-linux.neovim = neovim "aarch64-linux";
aarch64-darwin.neovim = neovim "aarch64-darwin";
};
# Programs that can be run by calling this flake # Programs that can be run by calling this flake
apps = forAllSystems (system: apps = forAllSystems (
let pkgs = import nixpkgs { inherit system overlays; }; system:
in import ./apps { inherit pkgs; }); let
pkgs = import nixpkgs { inherit system overlays; };
in
import ./apps { inherit pkgs; }
);
# Development environments # Development environments
devShells = forAllSystems (system: devShells = forAllSystems (
let pkgs = import nixpkgs { inherit system overlays; }; system:
in { let
pkgs = import nixpkgs { inherit system overlays; };
in
{
# Used to run commands and edit files in this repo # Used to run commands and edit files in this repo
default = pkgs.mkShell { default = pkgs.mkShell {
buildInputs = with pkgs; [ git stylua nixfmt shfmt shellcheck ]; buildInputs = with pkgs; [
git
stylua
nixfmt-rfc-style
shfmt
shellcheck
];
}; };
}
);
}); checks = forAllSystems (
system:
let
pkgs = import nixpkgs { inherit system overlays; };
in
{
neovim =
pkgs.runCommand "neovim-check-health" { buildInputs = [ inputs.self.packages.${system}.neovim ]; }
''
mkdir -p $out
export HOME=$TMPDIR
nvim -c "checkhealth" -c "write $out/health.log" -c "quitall"
checks = forAllSystems (system: # Check for errors inside the health log
let pkgs = import nixpkgs { inherit system overlays; }; if $(grep "ERROR" $out/health.log); then
in { cat $out/health.log
neovim = pkgs.runCommand "neovim-check-health" { exit 1
buildInputs = [ inputs.self.packages.${system}.neovim ]; fi
} '' '';
mkdir -p $out }
export HOME=$TMPDIR );
nvim -c "checkhealth" -c "write $out/health.log" -c "quitall"
# Check for errors inside the health log formatter = forAllSystems (
if $(grep "ERROR" $out/health.log); then system:
cat $out/health.log let
exit 1 pkgs = import nixpkgs { inherit system overlays; };
fi in
''; pkgs.nixfmt-rfc-style
}); );
# Templates for starting other projects quickly # Templates for starting other projects quickly
templates = rec { templates = rec {
@ -375,7 +429,10 @@
path = ./templates/haskell; path = ./templates/haskell;
description = "Haskell template"; description = "Haskell template";
}; };
rust = {
path = ./templates/rust;
description = "Rust template";
};
}; };
}; };
} }

98
hosts/arrow/aws/ec2.tf Normal file
View File

@ -0,0 +1,98 @@
resource "aws_instance" "instance" {
ami = aws_ami.image.id
iam_instance_profile = aws_iam_instance_profile.instance.name
instance_type = var.ec2_size
vpc_security_group_ids = [aws_security_group.instance.id]
tags = {
Name = "aws-nixos"
}
lifecycle {
create_before_destroy = true
}
}
resource "aws_ec2_instance_state" "instance" {
instance_id = aws_instance.instance.id
state = "running"
}
data "aws_vpc" "vpc" {
default = true
}
resource "aws_security_group" "instance" {
name = "aws-nixos"
description = "Allow SSH and HTTPS"
vpc_id = data.aws_vpc.vpc.id
ingress {
description = "Ping"
from_port = -1
to_port = -1
protocol = "icmp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
description = "SSH"
from_port = 22
to_port = 22
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
description = "HTTPS"
from_port = 443
to_port = 443
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
ipv6_cidr_blocks = ["::/0"]
}
}
# Setup IAM for the instance to use SSM
data "aws_iam_policy_document" "ec2_assume_role" {
statement {
actions = ["sts:AssumeRole"]
principals {
type = "Service"
identifiers = ["ec2.amazonaws.com"]
}
}
}
data "aws_iam_policy_document" "instance_profile" {
statement {
actions = [
"s3:ListAllMyBuckets",
]
resources = ["*"]
}
}
resource "aws_iam_role" "instance_profile" {
name = "nixos"
assume_role_policy = data.aws_iam_policy_document.ec2_assume_role.json
inline_policy {
name = "instance-profile"
policy = data.aws_iam_policy_document.instance_profile.json
}
}
resource "aws_iam_role_policy_attachment" "instance_ssm" {
role = aws_iam_role.instance_profile.name
policy_arn = "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore"
}
resource "aws_iam_instance_profile" "instance" {
name = "nixos"
role = aws_iam_role.instance_profile.name
}

View File

@ -1,13 +1,23 @@
locals { # locals {
image_file = one(fileset(path.root, "result/nixos-amazon-image-*.vhd")) # image_file = one(fileset(path.root, "../../../result/nixos-amazon-image-*.vhd"))
# }
#
# # Upload image to S3
# resource "aws_s3_object" "image" {
# bucket = var.images_bucket
# key = basename(local.image_file)
# source = local.image_file
# etag = filemd5(local.image_file)
# }
# Use existing image in S3
data "aws_s3_object" "image" {
bucket = var.images_bucket
key = "arrow.vhd"
} }
# Upload to S3 resource "terraform_data" "image_replacement" {
resource "aws_s3_object" "image" { input = data.aws_s3_object.image.etag
bucket = "your_bucket_name"
key = basename(local.image_file)
source = local.image_file
etag = filemd5(local.image_file)
} }
# Setup IAM access for the VM Importer # Setup IAM access for the VM Importer
@ -26,11 +36,11 @@ data "aws_iam_policy_document" "vmimport" {
actions = [ actions = [
"s3:GetBucketLocation", "s3:GetBucketLocation",
"s3:GetObject", "s3:GetObject",
"s3:ListBucket", "s3:ListBucket",
] ]
resources = [ resources = [
"arn:aws:s3:::${aws_s3_object.image.bucket}", "arn:aws:s3:::${data.aws_s3_object.image.bucket}",
"arn:aws:s3:::${aws_s3_object.image.bucket}/*", "arn:aws:s3:::${data.aws_s3_object.image.bucket}/*",
] ]
} }
statement { statement {
@ -58,23 +68,28 @@ resource "aws_ebs_snapshot_import" "image" {
disk_container { disk_container {
format = "VHD" format = "VHD"
user_bucket { user_bucket {
s3_bucket = aws_s3_object.image.bucket s3_bucket = data.aws_s3_object.image.bucket
s3_key = aws_s3_object.image.key s3_key = data.aws_s3_object.image.key
} }
} }
role_name = aws_iam_role.vmimport.name role_name = aws_iam_role.vmimport.name
lifecycle {
replace_triggered_by = [terraform_data.image_replacement]
}
} }
# Convert to AMI # Convert to AMI
resource "aws_ami" "image" { resource "aws_ami" "image" {
description = "Created with NixOS." description = "Created with NixOS."
name = replace(basename(local.image_file), "/\\.vhd$/", "") name = replace(basename(data.aws_s3_object.image.key), "/\\.vhd$/", "")
virtualization_type = "hvm" virtualization_type = "hvm"
root_device_name = "/dev/xvda"
ena_support = true
ebs_block_device { ebs_block_device {
device_name = "/dev/xvda" device_name = "/dev/xvda"
snapshot_id = aws_ebs_snapshot_import.image.id snapshot_id = aws_ebs_snapshot_import.image.id
volume_size = 8 volume_size = 17
} }
} }

13
hosts/arrow/aws/main.tf Normal file
View File

@ -0,0 +1,13 @@
terraform {
backend "s3" {
region = "us-east-1"
dynamodb_table = "terraform-state-lock"
}
required_version = ">= 1.0.0"
required_providers {
aws = {
source = "hashicorp/aws"
version = "5.42.0"
}
}
}

View File

@ -0,0 +1,3 @@
output "host_ip" {
value = aws_instance.instance.public_ip
}

View File

@ -0,0 +1,10 @@
variable "ec2_size" {
type = string
description = "Size of instance to launch"
default = "t3a.small" # 2 GB RAM ($14/mo)
}
variable "images_bucket" {
description = "Name of the bucket in which to store the NixOS VM images."
type = string
}

41
hosts/arrow/default.nix Normal file
View File

@ -0,0 +1,41 @@
# The Arrow
# System configuration for temporary VM
{
inputs,
globals,
overlays,
...
}:
inputs.nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = {
pkgs-caddy = import inputs.nixpkgs-caddy { inherit system; };
};
modules = import ./modules.nix { inherit inputs globals overlays; } ++ [
{
# This is the root filesystem containing NixOS
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
# This is the boot filesystem for Grub
fileSystems."/boot" = {
device = "/dev/disk/by-label/boot";
fsType = "vfat";
};
virtualisation.vmVariant = {
virtualisation.forwardPorts = [
{
from = "host";
host.port = 2222;
guest.port = 22;
}
];
};
}
];
}

32
hosts/arrow/modules.nix Normal file
View File

@ -0,0 +1,32 @@
{
inputs,
globals,
overlays,
}:
[
globals
inputs.home-manager.nixosModules.home-manager
{
nixpkgs.overlays = overlays;
networking.hostName = "arrow";
physical = false;
server = true;
gui.enable = false;
theme.colors = (import ../../colorscheme/gruvbox).dark;
publicKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s personal"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKpPU2G9rSF8Q6waH62IJexDCQ6lY+8ZyVufGE3xMDGw deploy"
];
identityFile = "/home/${globals.user}/.ssh/id_ed25519";
cloudflare.enable = true;
services.openssh.enable = true;
services.caddy.enable = true;
services.n8n.enable = true;
# nix-index seems to eat up too much memory for Vultr
home-manager.users.${globals.user}.programs.nix-index.enable = inputs.nixpkgs.lib.mkForce false;
}
../../modules/common
../../modules/nixos
]

78
hosts/arrow/vultr/main.tf Normal file
View File

@ -0,0 +1,78 @@
terraform {
backend "s3" {
bucket = "noahmasur-terraform"
key = "arrow.tfstate"
region = "auto"
skip_credentials_validation = true
skip_metadata_api_check = true
skip_region_validation = true
skip_requesting_account_id = true
skip_s3_checksum = true
use_path_style = true
/*
ENVIRONMENT VARIABLES
---------------------
AWS_ACCESS_KEY_ID - R2 token
AWS_SECRET_ACCESS_KEY - R2 secret
AWS_ENDPOINT_URL_S3 - R2 location: https://ACCOUNT_ID.r2.cloudflarestorage.com
*/
}
required_version = ">= 1.0.0"
required_providers {
aws = {
source = "hashicorp/aws"
version = "5.42.0"
}
vultr = {
source = "vultr/vultr"
version = "2.19.0"
}
}
}
variable "vultr_api_key" {
type = string
description = "API key for Vultr management"
sensitive = true
}
# https://api.vultr.com/v2/plans
variable "vultr_plan" {
type = string
description = "Size of instance to launch"
default = "vc2-1c-2gb" # 55 GB SSD ($10/mo)
}
provider "aws" {
region = "auto"
skip_credentials_validation = true
skip_metadata_api_check = true
skip_region_validation = true
skip_requesting_account_id = true
}
provider "vultr" {
api_key = var.vultr_api_key
}
resource "vultr_iso_private" "image" {
# url = "https://${var.cloudflare_account_id}.r2.cloudflarestorage.com/${data.aws_s3_bucket.images.id}/${aws_s3_object.image.key}"
url = "https://arrow-images.masu.rs/arrow.iso"
}
resource "vultr_instance" "arrow" {
plan = var.vultr_plan
region = "ewr"
iso_id = vultr_iso_private.image.id
label = "arrow"
tags = ["arrow"]
enable_ipv6 = false
disable_public_ipv4 = false
backups = "disabled"
ddos_protection = false
activation_email = false
}
output "host_ip" {
value = vultr_instance.arrow.main_ip
}

View File

@ -1,27 +0,0 @@
{ inputs, system, globals, overlays, ... }:
inputs.nixos-generators.nixosGenerate {
inherit system;
format = "amazon";
modules = [
globals
inputs.home-manager.nixosModules.home-manager
{
nixpkgs.overlays = overlays;
networking.hostName = "sheep";
gui.enable = false;
theme.colors = (import ../../colorscheme/gruvbox).dark;
passwordHash = null;
publicKey =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
# AWS settings require this
permitRootLogin = "prohibit-password";
}
../../modules/common
../../modules/nixos
../../modules/nixos/services/sshd.nix
] ++ [
# Required to fix diskSize errors during build
({ ... }: { amazonImage.sizeMB = 16 * 1024; })
];
}

View File

@ -1,280 +0,0 @@
name: 'Terraform'
env:
AWS_ACCOUNT_NUMBER: ''
AWS_PLAN_ROLE_NAME: github_actions_plan
AWS_APPLY_ROLE_NAME: github_actions_admin
# Always required. Used for authenticating to AWS, but can also act as your
# default region if you don't want to specify in the provider configuration.
AWS_REGION: us-east-1
# You must change these to fit your project.
TF_VAR_project: change-me
TF_VAR_label: change-me
TF_VAR_owner: Your Name Here
# If storing Terraform in a subdirectory, specify it here.
TERRAFORM_DIRECTORY: .
# Pinned versions of tools to use.
# Check for new releases:
# - https://github.com/hashicorp/terraform/releases
# - https://github.com/fugue/regula/releases
# - https://github.com/terraform-linters/tflint/releases
TERRAFORM_VERSION: 1.2.6
REGULA_VERSION: 2.9.0
TFLINT_VERSION: 0.39.1
# Terraform configuration options
TERRAFORM_PARALLELISM: 10
# These variables are passed to Terraform based on GitHub information.
TF_VAR_repo: ${{ github.repository }}
# This workflow is triggered in the following ways.
on:
# Any push or merge to these branches.
push:
branches:
- dev
- prod
# Any pull request targeting these branches (plan only).
pull_request:
branches:
- dev
- prod
# Any manual trigger on these branches.
workflow_dispatch:
branches:
- dev
- prod
# -------------------------------------------------------------------
# The rest of this workflow can operate without adjustments. Edit the
# below content at your own risk!
# -------------------------------------------------------------------
# Used to connect to AWS IAM
permissions:
id-token: write
contents: read
pull-requests: write
# Only run one workflow at a time for each Terraform state. This prevents
# lockfile conflicts, especially during PR vs push.
concurrency: terraform-${{ github.base_ref || github.ref }}
jobs:
terraform:
name: 'Terraform'
# Change this if you need to run your deployment on-prem.
runs-on: ubuntu-latest
steps:
# Downloads the current repo code to the runner.
- name: Checkout Repo Code
uses: actions/checkout@v3
# Enable access to KVM, required to build an image
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
# Login to AWS
- name: AWS Assume Role
uses: aws-actions/configure-aws-credentials@v1.6.1
with:
role-to-assume: ${{ env.AWS_ROLE_ARN }}
aws-region: ${{ env.AWS_REGION }}
# Install Nix
- name: Install Nix
uses: cachix/install-nix-action@v17
with:
extra_nix_config: |
substituters = s3://insert-cache-bucket https://cache.nixos.org/
trusted-public-keys = insert-cache-bucket:M6PsZjHXcLvbQyPUBLICKEYGVoNwI84g1FBQzouRU= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
# Build the image
- name: Build Image
run: nix build .#aws
# Copy the image to S3
- name: Upload Image to Cache
env:
NIX_CACHE_PRIVATE_KEY: ${{ secrets.NIX_CACHE_PRIVATE_KEY }}
run: |
echo "$NIX_CACHE_PRIVATE_KEY" > cache.key
nix store sign --key-file cache.key $(readlink result)
nix copy --to s3://t2-aws-nixos-test $(readlink result)
rm cache.key
# Exports all GitHub Secrets as environment variables prefixed by
# "TF_VAR_", which exposes them to Terraform. The name of each GitHub
# Secret must match its Terraform variable name exactly.
- name: Export Secrets to Terraform Variables
env:
ALL_SECRETS: ${{ toJson(secrets) }}
run: |
echo "$ALL_SECRETS" \
| jq "to_entries | .[] | \"TF_VAR_\" + ( .key | ascii_downcase ) + \"=\" + .value" \
| tr -d \" >> $GITHUB_ENV
# Installs the Terraform binary and some other accessory functions.
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: ${{ env.TERRAFORM_VERSION }}
# Checks whether Terraform is formatted properly. If this fails, you
# should install the pre-commit hook.
- name: Check Formatting
run: |
terraform fmt -no-color -check -diff -recursive
# Downloads a Terraform code lint test.
- uses: terraform-linters/setup-tflint@v1
name: Setup TFLint
with:
tflint_version: v${{ env.TFLINT_VERSION }}
# Sets up linting with this codebase.
- name: Init TFLint
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
run: tflint --init
# Lints the current code.
- name: Run TFLint
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
run: |
tflint -f compact
find ./modules/* -type d -maxdepth 0 | xargs -I __ tflint -f compact --disable-rule=terraform_required_providers --disable-rule=terraform_required_version __
# Connects to remote state backend and download providers.
- name: Terraform Init
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
run: |
terraform init \
-backend-config="role_arn=${{ env.AWS_STATE_ROLE_ARN }}" \
-backend-config="region=us-east-1" \
-backend-config="workspace_key_prefix=accounts/${{ env.AWS_ACCOUNT_NUMBER }}/${{ github.repository }}" \
-backend-config="key=state.tfstate" \
-backend-config="dynamodb_table=global-tf-state-lock"
# Set the Terraform Workspace to the current branch name.
- name: Set Terraform Workspace
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
shell: bash
run: |
export WORKSPACE=${{ github.base_ref || github.ref_name }}
terraform workspace select ${WORKSPACE} || terraform workspace new $WORKSPACE
echo "TF_WORKSPACE=$(echo ${WORKSPACE} | sed 's/\//_/g')" >> $GITHUB_ENV
# Checks differences between current code and infrastructure state.
- name: Terraform Plan
id: plan
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
run: |
terraform plan \
-input=false \
-no-color \
-out=tfplan \
-parallelism=${TERRAFORM_PARALLELISM} \
-var-file=variables-${TF_WORKSPACE}.tfvars
# Gets the results of the plan for pull requests.
- name: Terraform Show Plan
id: show
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
run: terraform show -no-color tfplan
# Adds the results of the plan to the pull request.
- name: Comment Plan
uses: actions/github-script@v6
if: github.event_name == 'pull_request'
env:
STDOUT: "```terraform\n${{ steps.show.outputs.stdout }}```"
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
// 1. Retrieve existing bot comments for the PR
const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
})
const botComment = comments.find(comment => {
return comment.user.type === 'Bot' && comment.body.includes('Terraform Format and Style')
})
// 2. Prepare format of the comment
const output = `#### Terraform Format and Style 🖌\`${{ steps.fmt.outcome }}\`
#### Terraform Initialization ⚙️\`${{ steps.init.outcome }}\`
#### Terraform Validation 🤖\`${{ steps.validate.outcome }}\`
<details><summary>Validation Output</summary>
\`\`\`\n
${{ steps.validate.outputs.stdout }}
\`\`\`
</details>
#### Terraform Plan 📖\`${{ steps.plan.outcome }}\`
<details><summary>Show Plan</summary>
\`\`\`\n
${process.env.PLAN}
\`\`\`
</details>
*Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`, Working Directory: \`${{ env.tf_actions_working_dir }}\`, Workflow: \`${{ github.workflow }}\`*`;
// 3. If we have a comment, update it, otherwise create a new one
if (botComment) {
github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: botComment.id,
body: output
})
} else {
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: output
})
}
# Downloads Regula and checks whether the plan meets compliance requirements.
- name: Regula Compliance Check
shell: bash
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
run: |
REGULA_URL="https://github.com/fugue/regula/releases/download/v${REGULA_VERSION}/regula_${REGULA_VERSION}_Linux_x86_64.tar.gz"
curl -sL "$REGULA_URL" -o regula.tar.gz
tar xzf regula.tar.gz
terraform show -json tfplan | ./regula run
# Deploys infrastructure or changes to infrastructure.
- name: Terraform Apply
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
working-directory: ${{ env.TERRAFORM_DIRECTORY }}
run: |
terraform apply \
-auto-approve \
-input=false \
-parallelism=${TERRAFORM_PARALLELISM} \
tfplan

View File

@ -7,11 +7,18 @@
# https://blog.korfuri.fr/posts/2022/08/nixos-on-an-oracle-free-tier-ampere-machine/ # https://blog.korfuri.fr/posts/2022/08/nixos-on-an-oracle-free-tier-ampere-machine/
# These days, probably use nixos-anywhere instead. # These days, probably use nixos-anywhere instead.
{ inputs, globals, overlays, ... }: {
inputs,
globals,
overlays,
...
}:
inputs.nixpkgs.lib.nixosSystem { inputs.nixpkgs.lib.nixosSystem rec {
system = "aarch64-linux"; system = "aarch64-linux";
specialArgs = { }; specialArgs = {
pkgs-caddy = import inputs.nixpkgs-caddy { inherit system; };
};
modules = [ modules = [
globals globals
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
@ -26,7 +33,11 @@ inputs.nixpkgs.lib.nixosSystem {
# Not sure what's necessary but too afraid to remove anything # Not sure what's necessary but too afraid to remove anything
imports = [ (inputs.nixpkgs + "/nixos/modules/profiles/qemu-guest.nix") ]; imports = [ (inputs.nixpkgs + "/nixos/modules/profiles/qemu-guest.nix") ];
boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" "usbhid" ]; boot.initrd.availableKernelModules = [
"xhci_pci"
"virtio_pci"
"usbhid"
];
# File systems must be declared in order to boot # File systems must be declared in order to boot
@ -49,7 +60,9 @@ inputs.nixpkgs.lib.nixosSystem {
gui.enable = false; gui.enable = false;
# Still require colors for programs like Neovim, K9S # Still require colors for programs like Neovim, K9S
theme = { colors = (import ../../colorscheme/gruvbox).dark; }; theme = {
colors = (import ../../colorscheme/gruvbox).dark;
};
# Programs and services # Programs and services
atuin.enable = true; atuin.enable = true;
@ -59,6 +72,7 @@ inputs.nixpkgs.lib.nixosSystem {
giteaRunner.enable = true; giteaRunner.enable = true;
services.caddy.enable = true; services.caddy.enable = true;
services.grafana.enable = true; services.grafana.enable = true;
services.thelounge.enable = true;
services.openssh.enable = true; services.openssh.enable = true;
services.victoriametrics.enable = true; services.victoriametrics.enable = true;
services.influxdb2.enable = true; services.influxdb2.enable = true;
@ -71,8 +85,7 @@ inputs.nixpkgs.lib.nixosSystem {
enable = true; enable = true;
id = "bd250ee1-ed2e-42d2-b627-039f1eb5a4d2"; id = "bd250ee1-ed2e-42d2-b627-039f1eb5a4d2";
credentialsFile = ../../private/cloudflared-flame.age; credentialsFile = ../../private/cloudflared-flame.age;
ca = ca = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBK/6oyVqjFGX3Uvrc3VS8J9sphxzAnRzKC85xgkHfYgR3TK6qBGXzHrknEj21xeZrr3G2y1UsGzphWJd9ZfIcdA= open-ssh-ca@cloudflareaccess.org";
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBK/6oyVqjFGX3Uvrc3VS8J9sphxzAnRzKC85xgkHfYgR3TK6qBGXzHrknEj21xeZrr3G2y1UsGzphWJd9ZfIcdA= open-ssh-ca@cloudflareaccess.org";
}; };
# Nextcloud backup config # Nextcloud backup config
@ -83,8 +96,9 @@ inputs.nixpkgs.lib.nixosSystem {
}; };
# Disable passwords, only use SSH key # Disable passwords, only use SSH key
publicKey = publicKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s"; "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s personal"
];
# # Wireguard config for Transmission # # Wireguard config for Transmission
# wireguard.enable = true; # wireguard.enable = true;
@ -114,7 +128,6 @@ inputs.nixpkgs.lib.nixosSystem {
# # VPN port forwarding # # VPN port forwarding
# services.transmission.settings.peer-port = 57599; # services.transmission.settings.peer-port = 57599;
} }
]; ];
} }

View File

@ -3,7 +3,12 @@
# See [readme](../README.md) to explain how this file works. # See [readme](../README.md) to explain how this file works.
{ inputs, globals, overlays, ... }: {
inputs,
globals,
overlays,
...
}:
inputs.nixpkgs.lib.nixosSystem { inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
@ -32,8 +37,7 @@ inputs.nixpkgs.lib.nixosSystem {
startMenuLaunchers = true; startMenuLaunchers = true;
nativeSystemd = true; nativeSystemd = true;
wslConf.network.generateResolvConf = true; # Turn off if it breaks VPN wslConf.network.generateResolvConf = true; # Turn off if it breaks VPN
interop.includePath = interop.includePath = false; # Including Windows PATH will slow down Neovim command mode
false; # Including Windows PATH will slow down Neovim command mode
}; };
neovim.enable = true; neovim.enable = true;
@ -41,7 +45,6 @@ inputs.nixpkgs.lib.nixosSystem {
mail.aerc.enable = true; mail.aerc.enable = true;
mail.himalaya.enable = true; mail.himalaya.enable = true;
dotfiles.enable = true; dotfiles.enable = true;
nixlang.enable = true;
lua.enable = true; lua.enable = true;
} }
]; ];

View File

@ -1,7 +1,12 @@
# The Looking Glass # The Looking Glass
# System configuration for my work Macbook # System configuration for my work Macbook
{ inputs, globals, overlays, ... }: {
inputs,
globals,
overlays,
...
}:
inputs.darwin.lib.darwinSystem { inputs.darwin.lib.darwinSystem {
system = "aarch64-darwin"; system = "aarch64-darwin";
@ -9,11 +14,14 @@ inputs.darwin.lib.darwinSystem {
modules = [ modules = [
../../modules/common ../../modules/common
../../modules/darwin ../../modules/darwin
(globals // rec { (
user = "Noah.Masur"; globals
gitName = "Noah-Masur_1701"; // rec {
gitEmail = "${user}@take2games.com"; user = "Noah.Masur";
}) gitName = "Noah-Masur_1701";
gitEmail = "${user}@take2games.com";
}
)
inputs.home-manager.darwinModules.home-manager inputs.home-manager.darwinModules.home-manager
{ {
nixpkgs.overlays = [ inputs.firefox-darwin.overlay ] ++ overlays; nixpkgs.overlays = [ inputs.firefox-darwin.overlay ] ++ overlays;
@ -35,7 +43,6 @@ inputs.darwin.lib.darwinSystem {
discord.enable = true; discord.enable = true;
firefox.enable = true; firefox.enable = true;
dotfiles.enable = true; dotfiles.enable = true;
nixlang.enable = true;
terraform.enable = true; terraform.enable = true;
python.enable = true; python.enable = true;
rust.enable = true; rust.enable = true;

View File

@ -1,43 +1,53 @@
# The Staff # The Staff
# ISO configuration for my USB drive # ISO configuration for my USB drive
{ inputs, system, overlays, ... }: {
inputs,
system,
overlays,
...
}:
inputs.nixos-generators.nixosGenerate { inputs.nixos-generators.nixosGenerate {
inherit system; inherit system;
format = "install-iso"; format = "install-iso";
modules = [{ modules = [
nixpkgs.overlays = overlays; {
networking.hostName = "staff"; nixpkgs.overlays = overlays;
users.extraUsers.root.openssh.authorizedKeys.keys = [ networking.hostName = "staff";
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s" users.extraUsers.root.openssh.authorizedKeys.keys = [
]; "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s"
services.openssh = {
enable = true;
ports = [ 22 ];
allowSFTP = true;
settings = {
GatewayPorts = "no";
X11Forwarding = false;
PasswordAuthentication = false;
PermitRootLogin = "yes";
};
};
environment.systemPackages =
let pkgs = import inputs.nixpkgs { inherit system overlays; };
in with pkgs; [
git
vim
wget
curl
(import ../../modules/common/neovim/package {
inherit pkgs;
colors = (import ../../colorscheme/gruvbox).dark;
})
]; ];
nix.extraOptions = '' services.openssh = {
experimental-features = nix-command flakes enable = true;
warn-dirty = false ports = [ 22 ];
''; allowSFTP = true;
}]; settings = {
GatewayPorts = "no";
X11Forwarding = false;
PasswordAuthentication = false;
PermitRootLogin = "yes";
};
};
environment.systemPackages =
let
pkgs = import inputs.nixpkgs { inherit system overlays; };
in
with pkgs;
[
git
vim
wget
curl
(import ../../modules/common/neovim/package {
inherit pkgs;
colors = (import ../../colorscheme/gruvbox).dark;
})
];
nix.extraOptions = ''
experimental-features = nix-command flakes
warn-dirty = false
'';
}
];
} }

View File

@ -1,9 +1,12 @@
# The Swan # The Swan
# System configuration for my home NAS server # System configuration for my home NAS server
# See [readme](../README.md) to explain how this file works. {
inputs,
{ inputs, globals, overlays, ... }: globals,
overlays,
...
}:
inputs.nixpkgs.lib.nixosSystem { inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
@ -23,8 +26,13 @@ inputs.nixpkgs.lib.nixosSystem {
networking.hostName = "swan"; networking.hostName = "swan";
# Not sure what's necessary but too afraid to remove anything # Not sure what's necessary but too afraid to remove anything
boot.initrd.availableKernelModules = boot.initrd.availableKernelModules = [
[ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ]; "xhci_pci"
"ahci"
"nvme"
"usb_storage"
"sd_mod"
];
# Required for transcoding # Required for transcoding
boot.initrd.kernelModules = [ "amdgpu" ]; boot.initrd.kernelModules = [ "amdgpu" ];
@ -56,8 +64,19 @@ inputs.nixpkgs.lib.nixosSystem {
devices = (import ../../disks/root.nix { disk = "/dev/nvme0n1"; }); devices = (import ../../disks/root.nix { disk = "/dev/nvme0n1"; });
}; };
# Automatically load the ZFS pool on boot boot.zfs = {
boot.zfs.extraPools = [ "tank" ]; # Automatically load the ZFS pool on boot
extraPools = [ "tank" ];
# Only try to decrypt datasets with keyfiles
requestEncryptionCredentials = [
"tank/archive"
"tank/generic"
"tank/nextcloud"
"tank/generic/git"
];
# If password is requested and fails, continue to boot eventually
passwordTimeout = 300;
};
# Theming # Theming
@ -65,7 +84,9 @@ inputs.nixpkgs.lib.nixosSystem {
gui.enable = false; gui.enable = false;
# Still require colors for programs like Neovim, K9S # Still require colors for programs like Neovim, K9S
theme = { colors = (import ../../colorscheme/gruvbox).dark; }; theme = {
colors = (import ../../colorscheme/gruvbox-dark).dark;
};
# Programs and services # Programs and services
atuin.enable = true; atuin.enable = true;
@ -90,8 +111,7 @@ inputs.nixpkgs.lib.nixosSystem {
enable = true; enable = true;
id = "646754ac-2149-4a58-b51a-e1d0a1f3ade2"; id = "646754ac-2149-4a58-b51a-e1d0a1f3ade2";
credentialsFile = ../../private/cloudflared-swan.age; credentialsFile = ../../private/cloudflared-swan.age;
ca = ca = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCHF/UMtJqPFrf6f6GRY0ZFnkCW7b6sYgUTjTtNfRj1RdmNic1NoJZql7y6BrqQinZvy7nsr1UFDNWoHn6ah3tg= open-ssh-ca@cloudflareaccess.org";
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCHF/UMtJqPFrf6f6GRY0ZFnkCW7b6sYgUTjTtNfRj1RdmNic1NoJZql7y6BrqQinZvy7nsr1UFDNWoHn6ah3tg= open-ssh-ca@cloudflareaccess.org";
}; };
# Send regular backups and litestream for DBs to an S3-like bucket # Send regular backups and litestream for DBs to an S3-like bucket
@ -102,8 +122,9 @@ inputs.nixpkgs.lib.nixosSystem {
}; };
# Disable passwords, only use SSH key # Disable passwords, only use SSH key
publicKey = publicKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s"; "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s personal"
];
} }
]; ];
} }

View File

@ -1,9 +1,12 @@
# The Tempest # The Tempest
# System configuration for my desktop # System configuration for my desktop
# See [readme](../README.md) to explain how this file works. {
inputs,
{ inputs, globals, overlays, ... }: globals,
overlays,
...
}:
inputs.nixpkgs.lib.nixosSystem { inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
@ -20,8 +23,14 @@ inputs.nixpkgs.lib.nixosSystem {
networking.hostName = "tempest"; networking.hostName = "tempest";
# Not sure what's necessary but too afraid to remove anything # Not sure what's necessary but too afraid to remove anything
boot.initrd.availableKernelModules = boot.initrd.availableKernelModules = [
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; "nvme"
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
];
# Graphics and VMs # Graphics and VMs
boot.initrd.kernelModules = [ "amdgpu" ]; boot.initrd.kernelModules = [ "amdgpu" ];
@ -101,8 +110,8 @@ inputs.nixpkgs.lib.nixosSystem {
mail.himalaya.enable = true; mail.himalaya.enable = true;
keybase.enable = true; keybase.enable = true;
mullvad.enable = false; mullvad.enable = false;
nixlang.enable = true;
rust.enable = true; rust.enable = true;
terraform.enable = true;
yt-dlp.enable = true; yt-dlp.enable = true;
gaming = { gaming = {
dwarf-fortress.enable = true; dwarf-fortress.enable = true;
@ -110,27 +119,23 @@ inputs.nixpkgs.lib.nixosSystem {
steam.enable = true; steam.enable = true;
legendary.enable = true; legendary.enable = true;
lutris.enable = true; lutris.enable = true;
leagueoflegends.enable = true;
ryujinx.enable = true; ryujinx.enable = true;
}; };
services.vmagent.enable = true; # Enables Prometheus metrics services.vmagent.enable = true; # Enables Prometheus metrics
services.openssh.enable = services.openssh.enable = true; # Required for Cloudflare tunnel and identity file
true; # Required for Cloudflare tunnel and identity file
# Allows private remote access over the internet # Allows private remote access over the internet
cloudflareTunnel = { cloudflareTunnel = {
enable = true; enable = true;
id = "ac133a82-31fb-480c-942a-cdbcd4c58173"; id = "ac133a82-31fb-480c-942a-cdbcd4c58173";
credentialsFile = ../../private/cloudflared-tempest.age; credentialsFile = ../../private/cloudflared-tempest.age;
ca = ca = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPY6C0HmdFCaxYtJxFr3qV4/1X4Q8KrYQ1hlme3u1hJXK+xW+lc9Y9glWHrhiTKilB7carYTB80US0O47gI5yU4= open-ssh-ca@cloudflareaccess.org";
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPY6C0HmdFCaxYtJxFr3qV4/1X4Q8KrYQ1hlme3u1hJXK+xW+lc9Y9glWHrhiTKilB7carYTB80US0O47gI5yU4= open-ssh-ca@cloudflareaccess.org";
}; };
# Allows requests to force machine to wake up # Allows requests to force machine to wake up
# This network interface might change, needs to be set specifically for each machine. # This network interface might change, needs to be set specifically for each machine.
# Or set usePredictableInterfaceNames = false # Or set usePredictableInterfaceNames = false
networking.interfaces.enp5s0.wakeOnLan.enable = true; networking.interfaces.enp5s0.wakeOnLan.enable = true;
} }
]; ];
} }

View File

@ -4,3 +4,4 @@ ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHVknmPi7sG6ES0G0jcsvebzKGWWaMfJTYgvOue6EULI flame ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHVknmPi7sG6ES0G0jcsvebzKGWWaMfJTYgvOue6EULI flame
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ9mwXlZnIALt9SnH3FOZvdgHLM5ZqwYUERXBbM7Rwh6 swan ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ9mwXlZnIALt9SnH3FOZvdgHLM5ZqwYUERXBbM7Rwh6 swan
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC3yHivgEXr2ecwe58h9bkhwTYivf3GwL8xenQKMeiUb tempest ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC3yHivgEXr2ecwe58h9bkhwTYivf3GwL8xenQKMeiUb tempest
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICmGHIWBZzRx35/yFgnPJSHN2+35WJ30G9c5tDhPsCrl arrow

9
modules/aws/default.nix Normal file
View File

@ -0,0 +1,9 @@
{ ... }:
{
# AWS settings require this
permitRootLogin = "prohibit-password";
# Make sure disk size is large enough
# https://github.com/nix-community/nixos-generators/issues/150
amazonImage.sizeMB = 16 * 1024;
}

View File

@ -1,4 +1,10 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}:
{
options = { options = {
_1password = { _1password = {
@ -10,9 +16,16 @@
}; };
config = lib.mkIf (config.gui.enable && config._1password.enable) { config = lib.mkIf (config.gui.enable && config._1password.enable) {
unfreePackages = [ "1password" "_1password-gui" "1password-cli" ]; unfreePackages = [
"1password"
"_1password-gui"
"1password-cli"
];
home-manager.users.${config.user} = { home-manager.users.${config.user} = {
home.packages = with pkgs; [ _1password-gui _1password ]; home.packages = with pkgs; [
_1password-gui
_1password
];
}; };
# https://1password.community/discussion/135462/firefox-extension-does-not-connect-to-linux-app # https://1password.community/discussion/135462/firefox-extension-does-not-connect-to-linux-app
@ -26,5 +39,4 @@
firefox firefox
''; '';
}; };
} }

View File

@ -1,4 +1,10 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}:
{
options = { options = {
alacritty = { alacritty = {
@ -28,7 +34,9 @@
opacity = 1.0; opacity = 1.0;
}; };
scrolling.history = 10000; scrolling.history = 10000;
font = { size = 14.0; }; font = {
size = 14.0;
};
key_bindings = [ key_bindings = [
# Used for word completion in fish_user_key_bindings # Used for word completion in fish_user_key_bindings
{ {

View File

@ -1,4 +1,5 @@
{ ... }: { { ... }:
{
imports = [ imports = [
./1password.nix ./1password.nix
@ -12,5 +13,4 @@
./slack.nix ./slack.nix
./yt-dlp.nix ./yt-dlp.nix
]; ];
} }

View File

@ -1,4 +1,10 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}:
{
options = { options = {
discord = { discord = {

View File

@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }: {
config,
pkgs,
lib,
...
}:
{ {
@ -16,15 +21,13 @@
unfreePackages = [ unfreePackages = [
(lib.mkIf config._1password.enable "onepassword-password-manager") (lib.mkIf config._1password.enable "onepassword-password-manager")
"okta-browser-plugin" "okta-browser-plugin"
"wappalyzer"
]; ];
home-manager.users.${config.user} = { home-manager.users.${config.user} = {
programs.firefox = { programs.firefox = {
enable = true; enable = true;
package = package = if pkgs.stdenv.isDarwin then pkgs.firefox-bin else pkgs.firefox;
if pkgs.stdenv.isDarwin then pkgs.firefox-bin else pkgs.firefox;
profiles.default = { profiles.default = {
id = 0; id = 0;
name = "default"; name = "default";
@ -32,7 +35,6 @@
# https://nur.nix-community.org/repos/rycee/ # https://nur.nix-community.org/repos/rycee/
extensions = with pkgs.nur.repos.rycee.firefox-addons; [ extensions = with pkgs.nur.repos.rycee.firefox-addons; [
(lib.mkIf config._1password.enable onepassword-password-manager) (lib.mkIf config._1password.enable onepassword-password-manager)
pkgs.bypass-paywalls-clean
darkreader darkreader
don-t-fuck-with-paste don-t-fuck-with-paste
facebook-container facebook-container
@ -41,43 +43,33 @@
okta-browser-plugin okta-browser-plugin
reddit-enhancement-suite reddit-enhancement-suite
return-youtube-dislikes return-youtube-dislikes
snowflake
sponsorblock sponsorblock
ublock-origin ublock-origin
ublacklist ublacklist
vimium vimium
wappalyzer
]; ];
settings = { settings = {
"app.update.auto" = false; "app.update.auto" = false;
"browser.aboutConfig.showWarning" = false; "browser.aboutConfig.showWarning" = false;
"browser.warnOnQuit" = false; "browser.warnOnQuit" = false;
"browser.quitShortcut.disabled" = "browser.quitShortcut.disabled" = if pkgs.stdenv.isLinux then true else false;
if pkgs.stdenv.isLinux then true else false;
"browser.theme.dark-private-windows" = true; "browser.theme.dark-private-windows" = true;
"browser.toolbars.bookmarks.visibility" = false; "browser.toolbars.bookmarks.visibility" = false;
"browser.startup.page" = 3; # Restore previous session "browser.startup.page" = 3; # Restore previous session
"browser.newtabpage.enabled" = false; # Make new tabs blank "browser.newtabpage.enabled" = false; # Make new tabs blank
"trailhead.firstrun.didSeeAboutWelcome" = "trailhead.firstrun.didSeeAboutWelcome" = true; # Disable welcome splash
true; # Disable welcome splash
"dom.forms.autocomplete.formautofill" = false; # Disable autofill "dom.forms.autocomplete.formautofill" = false; # Disable autofill
"extensions.formautofill.creditCards.enabled" = "extensions.formautofill.creditCards.enabled" = false; # Disable credit cards
false; # Disable credit cards
"dom.payments.defaults.saveAddress" = false; # Disable address save "dom.payments.defaults.saveAddress" = false; # Disable address save
"general.autoScroll" = true; # Drag middle-mouse to scroll "general.autoScroll" = true; # Drag middle-mouse to scroll
"services.sync.prefs.sync.general.autoScroll" = "services.sync.prefs.sync.general.autoScroll" = false; # Prevent disabling autoscroll
false; # Prevent disabling autoscroll
"extensions.pocket.enabled" = false; "extensions.pocket.enabled" = false;
"toolkit.legacyUserProfileCustomizations.stylesheets" = "toolkit.legacyUserProfileCustomizations.stylesheets" = true; # Allow userChrome.css
true; # Allow userChrome.css
"layout.css.color-mix.enabled" = true; "layout.css.color-mix.enabled" = true;
"ui.systemUsesDarkTheme" = "ui.systemUsesDarkTheme" = if config.theme.dark == true then 1 else 0;
if config.theme.dark == true then 1 else 0; "media.ffmpeg.vaapi.enabled" = true; # Enable hardware video acceleration
"media.ffmpeg.vaapi.enabled" =
true; # Enable hardware video acceleration
"cookiebanners.ui.desktop.enabled" = true; # Reject cookie popups "cookiebanners.ui.desktop.enabled" = true; # Reject cookie popups
"devtools.command-button-screenshot.enabled" = "devtools.command-button-screenshot.enabled" = true; # Scrolling screenshot of entire page
true; # Scrolling screenshot of entire page
"svg.context-properties.content.enabled" = true; # Sidebery styling "svg.context-properties.content.enabled" = true; # Sidebery styling
}; };
userChrome = '' userChrome = ''
@ -163,28 +155,34 @@
extraConfig = ""; extraConfig = "";
}; };
}; };
xsession.windowManager.i3.config.keybindings = xdg.mimeApps = {
lib.mkIf pkgs.stdenv.isLinux { associations.added = {
"${ "text.html" = [ "firefox.desktop" ];
config.home-manager.users.${config.user}.xsession.windowManager.i3.config.modifier
}+Shift+b" = "exec ${
# Don't name the script `firefox` or it will affect grep
builtins.toString (pkgs.writeShellScript "focus-ff.sh" ''
count=$(ps aux | grep -c firefox)
if [ "$count" -eq 1 ]; then
i3-msg "exec --no-startup-id firefox"
sleep 0.5
fi
i3-msg "[class=firefox] focus"
'')
}";
}; };
defaultApplications = {
"text.html" = [ "firefox.desktop" ];
};
};
xsession.windowManager.i3.config.keybindings = lib.mkIf pkgs.stdenv.isLinux {
"${
config.home-manager.users.${config.user}.xsession.windowManager.i3.config.modifier
}+Shift+b" = "exec ${
# Don't name the script `firefox` or it will affect grep
builtins.toString (
pkgs.writeShellScript "focus-ff.sh" ''
count=$(ps aux | grep -c firefox)
if [ "$count" -eq 1 ]; then
i3-msg "exec --no-startup-id firefox"
sleep 0.5
fi
i3-msg "[class=firefox] focus"
''
)
}";
};
}; };
}; };
} }

View File

@ -1,4 +1,10 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}:
{
options = { options = {
kitty = { kitty = {
@ -13,20 +19,19 @@
# Set the Rofi-Systemd terminal for viewing logs # Set the Rofi-Systemd terminal for viewing logs
# Using optionalAttrs because only available in NixOS # Using optionalAttrs because only available in NixOS
environment = { } // lib.attrsets.optionalAttrs environment =
(builtins.hasAttr "sessionVariables" config.environment) { { }
// lib.attrsets.optionalAttrs (builtins.hasAttr "sessionVariables" config.environment) {
sessionVariables.ROFI_SYSTEMD_TERM = "${pkgs.kitty}/bin/kitty"; sessionVariables.ROFI_SYSTEMD_TERM = "${pkgs.kitty}/bin/kitty";
}; };
home-manager.users.${config.user} = { home-manager.users.${config.user} = {
# Set the i3 terminal # Set the i3 terminal
xsession.windowManager.i3.config.terminal = xsession.windowManager.i3.config.terminal = lib.mkIf pkgs.stdenv.isLinux "kitty";
lib.mkIf pkgs.stdenv.isLinux "kitty";
# Set the Rofi terminal for running programs # Set the Rofi terminal for running programs
programs.rofi.terminal = programs.rofi.terminal = lib.mkIf pkgs.stdenv.isLinux "${pkgs.kitty}/bin/kitty";
lib.mkIf pkgs.stdenv.isLinux "${pkgs.kitty}/bin/kitty";
# Display images in the terminal # Display images in the terminal
programs.fish.shellAliases = { programs.fish.shellAliases = {
@ -48,16 +53,14 @@
# Kitty scrollback nvim # Kitty scrollback nvim
"kitty_mod+h" = "kitty_scrollback_nvim"; "kitty_mod+h" = "kitty_scrollback_nvim";
"kitty_mod+g" = "kitty_mod+g" = "kitty_scrollback_nvim --config ksb_builtin_last_cmd_output";
"kitty_scrollback_nvim --config ksb_builtin_last_cmd_output";
}; };
settings = { settings = {
# Required for kitty-scrollback.nvim # Required for kitty-scrollback.nvim
allow_remote_control = "socket-only"; allow_remote_control = "socket-only";
listen_on = "unix:/tmp/kitty"; listen_on = "unix:/tmp/kitty";
action_alias = action_alias = "kitty_scrollback_nvim kitten ${pkgs.vimPlugins.kitty-scrollback-nvim}/python/kitty_scrollback_nvim.py";
"kitty_scrollback_nvim kitten ${pkgs.kitty-scrollback-nvim}/python/kitty_scrollback_nvim.py";
# Colors (adapted from: https://github.com/kdrag0n/base16-kitty/blob/master/templates/default-256.mustache) # Colors (adapted from: https://github.com/kdrag0n/base16-kitty/blob/master/templates/default-256.mustache)
background = config.theme.colors.base00; background = config.theme.colors.base00;
@ -103,8 +106,8 @@
color21 = config.theme.colors.base06; color21 = config.theme.colors.base06;
# Scrollback # Scrollback
scrolling_lines = 10000; scrollback_lines = 10000;
scrollback_pager_history_size = 10; # MB scrollback_pager_history_size = 300; # MB
# Window # Window
window_padding_width = 6; window_padding_width = 6;

View File

@ -1,4 +1,10 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}:
{
options = { options = {
media = { media = {
@ -44,7 +50,10 @@
"image/*" = [ "nsxiv.desktop" ]; "image/*" = [ "nsxiv.desktop" ];
}; };
associations.removed = { associations.removed = {
"application/pdf" = [ "mupdf.desktop" "wine-extension-pdf.desktop" ]; "application/pdf" = [
"mupdf.desktop"
"wine-extension-pdf.desktop"
];
}; };
defaultApplications = { defaultApplications = {
"application/pdf" = [ "pwmt.zathura-cb.desktop" ]; "application/pdf" = [ "pwmt.zathura-cb.desktop" ];
@ -53,9 +62,6 @@
"image/*" = [ "nsxiv.desktop" ]; "image/*" = [ "nsxiv.desktop" ];
}; };
}; };
}; };
}; };
} }

View File

@ -1,4 +1,10 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}:
{
options = { options = {
obsidian = { obsidian = {
@ -18,7 +24,5 @@
# Broken on 2023-12-11 # Broken on 2023-12-11
# https://forum.obsidian.md/t/electron-25-is-now-eol-please-upgrade-to-a-newer-version/72878/8 # https://forum.obsidian.md/t/electron-25-is-now-eol-please-upgrade-to-a-newer-version/72878/8
nixpkgs.config.permittedInsecurePackages = [ "electron-25.9.0" ]; nixpkgs.config.permittedInsecurePackages = [ "electron-25.9.0" ];
}; };
} }

View File

@ -1,4 +1,10 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}:
{
options = { options = {
qbittorrent = { qbittorrent = {
@ -14,8 +20,6 @@
home-manager.users.${config.user} = { home-manager.users.${config.user} = {
home.packages = with pkgs; [ qbittorrent ]; home.packages = with pkgs; [ qbittorrent ];
}; };
}; };
} }

View File

@ -1,4 +1,10 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}:
{
options = { options = {
slack = { slack = {
@ -15,5 +21,4 @@
home.packages = with pkgs; [ slack ]; home.packages = with pkgs; [ slack ];
}; };
}; };
} }

View File

@ -1,4 +1,10 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}:
{
options = { options = {
yt-dlp = { yt-dlp = {
@ -27,9 +33,6 @@
}; };
programs.fish.shellAbbrs.yt = "yt-dlp"; programs.fish.shellAbbrs.yt = "yt-dlp";
}; };
}; };
} }

View File

@ -1,7 +1,19 @@
{ config, lib, pkgs, ... }: { {
config,
lib,
pkgs,
...
}:
{
imports = imports = [
[ ./applications ./mail ./neovim ./programming ./repositories ./shell ]; ./applications
./mail
./neovim
./programming
./repositories
./shell
];
options = { options = {
user = lib.mkOption { user = lib.mkOption {
@ -17,8 +29,7 @@
download = lib.mkOption { download = lib.mkOption {
type = lib.types.str; type = lib.types.str;
description = "XDG directory for downloads"; description = "XDG directory for downloads";
default = default = if pkgs.stdenv.isDarwin then "$HOME/Downloads" else "$HOME/downloads";
if pkgs.stdenv.isDarwin then "$HOME/Downloads" else "$HOME/downloads";
}; };
}; };
identityFile = lib.mkOption { identityFile = lib.mkOption {
@ -47,10 +58,9 @@
homePath = lib.mkOption { homePath = lib.mkOption {
type = lib.types.path; type = lib.types.path;
description = "Path of user's home directory."; description = "Path of user's home directory.";
default = builtins.toPath (if pkgs.stdenv.isDarwin then default = builtins.toPath (
"/Users/${config.user}" if pkgs.stdenv.isDarwin then "/Users/${config.user}" else "/home/${config.user}"
else );
"/home/${config.user}");
}; };
dotfilesPath = lib.mkOption { dotfilesPath = lib.mkOption {
type = lib.types.path; type = lib.types.path;
@ -75,6 +85,10 @@
type = lib.types.str; type = lib.types.str;
description = "Hostname for metrics server."; description = "Hostname for metrics server.";
}; };
minecraft = lib.mkOption {
type = lib.types.str;
description = "Hostname for Minecraft server.";
};
paperless = lib.mkOption { paperless = lib.mkOption {
type = lib.types.str; type = lib.types.str;
description = "Hostname for document server (paperless-ngx)."; description = "Hostname for document server (paperless-ngx).";
@ -107,63 +121,48 @@
type = lib.types.str; type = lib.types.str;
description = "Hostname for download services."; description = "Hostname for download services.";
}; };
irc = lib.mkOption {
type = lib.types.str;
description = "Hostname for IRC services.";
};
n8n = lib.mkOption {
type = lib.types.str;
description = "Hostname for n8n automation.";
};
transmission = lib.mkOption {
type = lib.types.str;
description = "Hostname for peer2peer downloads (Transmission).";
};
}; };
}; };
config = let stateVersion = "23.05"; config =
in { let
stateVersion = "23.05";
in
{
nix = { # Basic common system packages for all devices
environment.systemPackages = with pkgs; [
git
vim
wget
curl
];
# Enable features in Nix commands # Use the system-level nixpkgs instead of Home Manager's
extraOptions = '' home-manager.useGlobalPkgs = true;
experimental-features = nix-command flakes
warn-dirty = false
'';
gc = { # Install packages to /etc/profiles instead of ~/.nix-profile, useful when
automatic = true; # using multiple profiles for one user
options = "--delete-older-than 7d"; home-manager.useUserPackages = true;
};
settings = { # Allow specified unfree packages (identified elsewhere)
# Retrieves package object based on string name
# Add community Cachix to binary cache nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.unfreePackages;
# Don't use with macOS because blocked by corporate firewall
builders-use-substitutes = true;
substituters = lib.mkIf (!pkgs.stdenv.isDarwin)
[ "https://nix-community.cachix.org" ];
trusted-public-keys = lib.mkIf (!pkgs.stdenv.isDarwin) [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
# Scans and hard links identical files in the store
# Not working with macOS: https://github.com/NixOS/nix/issues/7273
auto-optimise-store = lib.mkIf (!pkgs.stdenv.isDarwin) true;
};
# Pin a state version to prevent warnings
home-manager.users.${config.user}.home.stateVersion = stateVersion;
home-manager.users.root.home.stateVersion = stateVersion;
}; };
# Basic common system packages for all devices
environment.systemPackages = with pkgs; [ git vim wget curl ];
# Use the system-level nixpkgs instead of Home Manager's
home-manager.useGlobalPkgs = true;
# Install packages to /etc/profiles instead of ~/.nix-profile, useful when
# using multiple profiles for one user
home-manager.useUserPackages = true;
# Allow specified unfree packages (identified elsewhere)
# Retrieves package object based on string name
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) config.unfreePackages;
# Pin a state version to prevent warnings
home-manager.users.${config.user}.home.stateVersion = stateVersion;
home-manager.users.root.home.stateVersion = stateVersion;
};
} }

View File

@ -1,4 +1,10 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}:
{
options.mail.aerc.enable = lib.mkEnableOption "Aerc email."; options.mail.aerc.enable = lib.mkEnableOption "Aerc email.";
@ -75,7 +81,9 @@
"<Esc>" = ":clear<Enter>"; "<Esc>" = ":clear<Enter>";
}; };
"messages:folder=Drafts" = { "<Enter>" = ":recall<Enter>"; }; "messages:folder=Drafts" = {
"<Enter>" = ":recall<Enter>";
};
view = { view = {
"/" = ":toggle-key-passthrough <Enter> /"; "/" = ":toggle-key-passthrough <Enter> /";
@ -148,21 +156,19 @@
"<C-p>" = ":prev-tab<Enter>"; "<C-p>" = ":prev-tab<Enter>";
"<C-n>" = ":next-tab<Enter>"; "<C-n>" = ":next-tab<Enter>";
}; };
}; };
extraConfig = { extraConfig = {
general.unsafe-accounts-conf = true; general.unsafe-accounts-conf = true;
viewer = { pager = "${pkgs.less}/bin/less -R"; }; viewer = {
pager = "${pkgs.less}/bin/less -R";
};
filters = { filters = {
"text/plain" = "${pkgs.aerc}/libexec/aerc/filters/colorize"; "text/plain" = "${pkgs.aerc}/libexec/aerc/filters/colorize";
"text/calendar" = "text/calendar" = "${pkgs.gawk}/bin/awk -f ${pkgs.aerc}/libexec/aerc/filters/calendar";
"${pkgs.gawk}/bin/awk -f ${pkgs.aerc}/libexec/aerc/filters/calendar"; "text/html" = "${pkgs.aerc}/libexec/aerc/filters/html | ${pkgs.aerc}/libexec/aerc/filters/colorize"; # Requires w3m, dante
"text/html" =
"${pkgs.aerc}/libexec/aerc/filters/html | ${pkgs.aerc}/libexec/aerc/filters/colorize"; # Requires w3m, dante
# "text/*" = # "text/*" =
# ''${pkgs.bat}/bin/bat -fP --file-name="$AERC_FILENAME "''; # ''${pkgs.bat}/bin/bat -fP --file-name="$AERC_FILENAME "'';
"message/delivery-status" = "message/delivery-status" = "${pkgs.aerc}/libexec/aerc/filters/colorize";
"${pkgs.aerc}/libexec/aerc/filters/colorize";
"message/rfc822" = "${pkgs.aerc}/libexec/aerc/filters/colorize"; "message/rfc822" = "${pkgs.aerc}/libexec/aerc/filters/colorize";
"application/x-sh" = "${pkgs.bat}/bin/bat -fP -l sh"; "application/x-sh" = "${pkgs.bat}/bin/bat -fP -l sh";
"application/pdf" = "${pkgs.zathura}/bin/zathura -"; "application/pdf" = "${pkgs.zathura}/bin/zathura -";
@ -176,6 +182,7 @@
extraAccounts = { extraAccounts = {
check-mail = "5m"; check-mail = "5m";
check-mail-cmd = "${pkgs.isync}/bin/mbsync -a"; check-mail-cmd = "${pkgs.isync}/bin/mbsync -a";
check-mail-timeout = "15s";
}; };
}; };
@ -183,26 +190,27 @@
name = "aerc"; name = "aerc";
exec = "kitty aerc %u"; exec = "kitty aerc %u";
}; };
xsession.windowManager.i3.config.keybindings = xsession.windowManager.i3.config.keybindings = lib.mkIf pkgs.stdenv.isLinux {
lib.mkIf pkgs.stdenv.isLinux { "${
"${ config.home-manager.users.${config.user}.xsession.windowManager.i3.config.modifier
config.home-manager.users.${config.user}.xsession.windowManager.i3.config.modifier }+Shift+e" = "exec ${
}+Shift+e" = "exec ${ # Don't name the script `aerc` or it will affect grep
# Don't name the script `aerc` or it will affect grep builtins.toString (
builtins.toString (pkgs.writeShellScript "focus-mail.sh" '' pkgs.writeShellScript "focus-mail.sh" ''
count=$(ps aux | grep -c aerc) count=$(ps aux | grep -c aerc)
if [ "$count" -eq 1 ]; then if [ "$count" -eq 1 ]; then
i3-msg "exec --no-startup-id kitty --class aerc aerc" i3-msg "exec --no-startup-id kitty --class aerc aerc"
sleep 0.25 sleep 0.25
fi fi
i3-msg "[class=aerc] focus" i3-msg "[class=aerc] focus"
'') ''
}"; )
}; }";
};
programs.fish.shellAbbrs = { ae = "aerc"; };
programs.fish.shellAbbrs = {
ae = "aerc";
};
}; };
}; };
} }

View File

@ -1,6 +1,16 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}:
{
imports = [ ./himalaya.nix ./aerc.nix ./system.nix ]; imports = [
./himalaya.nix
./aerc.nix
./system.nix
];
options = { options = {
mail.enable = lib.mkEnableOption "Mail service."; mail.enable = lib.mkEnableOption "Mail service.";
@ -26,7 +36,9 @@
config = lib.mkIf config.mail.enable { config = lib.mkIf config.mail.enable {
home-manager.users.${config.user} = { home-manager.users.${config.user} = {
programs.mbsync = { enable = true; }; programs.mbsync = {
enable = true;
};
# Automatically check for mail and keep files synced locally # Automatically check for mail and keep files synced locally
services.mbsync = lib.mkIf pkgs.stdenv.isLinux { services.mbsync = lib.mkIf pkgs.stdenv.isLinux {
@ -44,8 +56,11 @@
# Better local mail search # Better local mail search
programs.notmuch = { programs.notmuch = {
enable = true; enable = true;
new.ignore = new.ignore = [
[ ".mbsyncstate.lock" ".mbsyncstate.journal" ".mbsyncstate.new" ]; ".mbsyncstate.lock"
".mbsyncstate.journal"
".mbsyncstate.new"
];
}; };
accounts.email = { accounts.email = {
@ -54,72 +69,71 @@
maildirBasePath = "${config.homePath}/mail"; maildirBasePath = "${config.homePath}/mail";
accounts = { accounts = {
home = let address = "${config.mail.user}@${config.mail.server}"; home =
in { let
userName = address; address = "${config.mail.user}@${config.mail.server}";
realName = config.fullName; in
primary = true; {
inherit address; userName = address;
aliases = map (user: "${user}@${config.mail.server}") [ realName = config.fullName;
"me" primary = true;
"hey" inherit address;
"admin" aliases = map (user: "${user}@${config.mail.server}") [
]; "me"
"hey"
"admin"
];
# Options for contact completion # Options for contact completion
alot = { }; alot = { };
imap = { imap = {
host = config.mail.imapHost; host = config.mail.imapHost;
port = 993; port = 993;
tls.enable = true; tls.enable = true;
}; };
# Watch for mail and run notifications or sync # Watch for mail and run notifications or sync
imapnotify = { imapnotify = {
enable = true; enable = true;
boxes = [ "Inbox" ]; boxes = [ "Inbox" ];
onNotify = "${pkgs.isync}/bin/mbsync -a"; onNotify = "${pkgs.isync}/bin/mbsync -a";
onNotifyPost = lib.mkIf onNotifyPost =
config.home-manager.users.${config.user}.services.dunst.enable lib.mkIf config.home-manager.users.${config.user}.services.dunst.enable
"${pkgs.libnotify}/bin/notify-send 'New mail arrived'"; "${pkgs.libnotify}/bin/notify-send 'New mail arrived'";
}; };
# Name of the directory in maildir for this account # Name of the directory in maildir for this account
maildir = { path = "main"; }; maildir = {
path = "main";
};
# Bi-directional syncing options for local files # Bi-directional syncing options for local files
mbsync = { mbsync = {
enable = true; enable = true;
create = "both"; create = "both";
expunge = "both"; expunge = "both";
remove = "both"; remove = "both";
patterns = [ "*" ]; patterns = [ "*" ];
extraConfig.channel = { extraConfig.channel = {
CopyArrivalDate = "yes"; # Sync time of original message CopyArrivalDate = "yes"; # Sync time of original message
};
};
# Enable indexing
notmuch.enable = true;
# Used to login and send and receive emails
passwordCommand = "${pkgs.age}/bin/age --decrypt --identity ~/.ssh/id_ed25519 ${pkgs.writeText "mailpass.age" (builtins.readFile ../../../private/mailpass.age)}";
smtp = {
host = config.mail.smtpHost;
port = 465;
tls.enable = true;
}; };
}; };
# Enable indexing
notmuch.enable = true;
# Used to login and send and receive emails
passwordCommand =
"${pkgs.age}/bin/age --decrypt --identity ~/.ssh/id_ed25519 ${
pkgs.writeText "mailpass.age"
(builtins.readFile ../../../private/mailpass.age)
}";
smtp = {
host = config.mail.smtpHost;
port = 465;
tls.enable = true;
};
};
}; };
}; };
}; };
}; };
} }

View File

@ -1,4 +1,5 @@
{ config, lib, ... }: { { config, lib, ... }:
{
options.mail.himalaya.enable = lib.mkEnableOption "Himalaya email."; options.mail.himalaya.enable = lib.mkEnableOption "Himalaya email.";
@ -6,20 +7,20 @@
home-manager.users.${config.user} = { home-manager.users.${config.user} = {
programs.himalaya = { enable = true; }; programs.himalaya = {
enable = true;
};
accounts.email.accounts.home.himalaya = { accounts.email.accounts.home.himalaya = {
enable = true; enable = true;
backend = "imap";
sender = "smtp";
settings = { settings = {
downloads-dir = config.userDirs.download; downloads-dir = config.userDirs.download;
smtp-insecure = true; smtp-insecure = true;
}; };
}; };
programs.fish.shellAbbrs = { hi = "himalaya"; }; programs.fish.shellAbbrs = {
hi = "himalaya";
};
}; };
}; };
} }

View File

@ -1,4 +1,10 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}:
{
config = lib.mkIf (config.mail.enable || config.server) { config = lib.mkIf (config.mail.enable || config.server) {
@ -8,17 +14,15 @@
# The system user for sending automatic notifications # The system user for sending automatic notifications
accounts.email.accounts.system = accounts.email.accounts.system =
let address = "system@${config.mail.server}"; let
in { address = "system@${config.mail.server}";
in
{
userName = address; userName = address;
realName = "NixOS System"; realName = "NixOS System";
primary = !config.mail.enable; # Only primary if mail not enabled primary = !config.mail.enable; # Only primary if mail not enabled
inherit address; inherit address;
passwordCommand = passwordCommand = "${pkgs.age}/bin/age --decrypt --identity ${config.identityFile} ${pkgs.writeText "mailpass-system.age" (builtins.readFile ../../../private/mailpass-system.age)}";
"${pkgs.age}/bin/age --decrypt --identity ${config.identityFile} ${
pkgs.writeText "mailpass-system.age"
(builtins.readFile ../../../private/mailpass-system.age)
}";
msmtp.enable = true; msmtp.enable = true;
smtp = { smtp = {
host = config.mail.smtpHost; host = config.mail.smtpHost;
@ -26,9 +30,6 @@
tls.enable = true; tls.enable = true;
}; };
}; };
}; };
}; };
} }

View File

@ -1,4 +1,5 @@
{ pkgs, ... }: { { pkgs, ... }:
{
# Plugin for aligning text programmatically # Plugin for aligning text programmatically

View File

@ -1,4 +1,5 @@
{ pkgs, ... }: { { pkgs, ... }:
{
# Shows buffers in a VSCode-style tab layout # Shows buffers in a VSCode-style tab layout
@ -11,7 +12,7 @@
diagnostics = "nvim_lsp"; diagnostics = "nvim_lsp";
always_show_bufferline = false; always_show_bufferline = false;
separator_style = "slant"; separator_style = "slant";
offsets = [{ filetype = "NvimTree"; }]; offsets = [ { filetype = "NvimTree"; } ];
}; };
}; };
lua = '' lua = ''

View File

@ -1,4 +1,10 @@
{ pkgs, lib, config, ... }: { {
pkgs,
lib,
config,
...
}:
{
# Sets Neovim colors based on Nix colorscheme # Sets Neovim colors based on Nix colorscheme
@ -8,7 +14,7 @@
}; };
config = { config = {
plugins = [ pkgs.vimPlugins.nvim-base16 ]; plugins = [ pkgs.vimPlugins.base16-nvim ];
setup.base16-colorscheme = config.colors; setup.base16-colorscheme = config.colors;
# Telescope isn't working, shut off for now # Telescope isn't working, shut off for now
@ -18,5 +24,4 @@
} }
''; '';
}; };
} }

View File

@ -1,4 +1,5 @@
{ pkgs, dsl, ... }: { { pkgs, dsl, ... }:
{
plugins = [ plugins = [
pkgs.vimPlugins.cmp-nvim-lsp pkgs.vimPlugins.cmp-nvim-lsp
@ -25,21 +26,15 @@
# Basic completion keybinds # Basic completion keybinds
mapping = { mapping = {
"['<C-n>']" = dsl.rawLua "['<C-n>']" = dsl.rawLua "require('cmp').mapping.select_next_item({ behavior = require('cmp').SelectBehavior.Insert })";
"require('cmp').mapping.select_next_item({ behavior = require('cmp').SelectBehavior.Insert })"; "['<C-p>']" = dsl.rawLua "require('cmp').mapping.select_prev_item({ behavior = require('cmp').SelectBehavior.Insert })";
"['<C-p>']" = dsl.rawLua "['<Down>']" = dsl.rawLua "require('cmp').mapping.select_next_item({ behavior = require('cmp').SelectBehavior.Select })";
"require('cmp').mapping.select_prev_item({ behavior = require('cmp').SelectBehavior.Insert })"; "['<Up>']" = dsl.rawLua "require('cmp').mapping.select_prev_item({ behavior = require('cmp').SelectBehavior.Select })";
"['<Down>']" = dsl.rawLua
"require('cmp').mapping.select_next_item({ behavior = require('cmp').SelectBehavior.Select })";
"['<Up>']" = dsl.rawLua
"require('cmp').mapping.select_prev_item({ behavior = require('cmp').SelectBehavior.Select })";
"['<C-d>']" = dsl.rawLua "require('cmp').mapping.scroll_docs(-4)"; "['<C-d>']" = dsl.rawLua "require('cmp').mapping.scroll_docs(-4)";
"['<C-f>']" = dsl.rawLua "require('cmp').mapping.scroll_docs(4)"; "['<C-f>']" = dsl.rawLua "require('cmp').mapping.scroll_docs(4)";
"['<C-e>']" = dsl.rawLua "require('cmp').mapping.abort()"; "['<C-e>']" = dsl.rawLua "require('cmp').mapping.abort()";
"['<CR>']" = dsl.rawLua "['<CR>']" = dsl.rawLua "require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Replace, select = true, })";
"require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Replace, select = true, })"; "['<C-r>']" = dsl.rawLua "require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Replace, select = true, })";
"['<C-r>']" = dsl.rawLua
"require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Replace, select = true, })";
"['<Esc>']" = dsl.rawLua '' "['<Esc>']" = dsl.rawLua ''
function(_) function(_)
cmp.mapping({ cmp.mapping({
@ -72,13 +67,19 @@
name = "rg"; # Grep for text from the current directory name = "rg"; # Grep for text from the current directory
keyword_length = 6; keyword_length = 6;
max_item_count = 10; max_item_count = 10;
option = { additional_arguments = "--ignore-case"; }; option = {
additional_arguments = "--ignore-case";
};
} }
]; ];
# Styling of the completion menu # Styling of the completion menu
formatting = { formatting = {
fields = [ "kind" "abbr" "menu" ]; fields = [
"kind"
"abbr"
"menu"
];
format = dsl.rawLua '' format = dsl.rawLua ''
function(entry, vim_item) function(entry, vim_item)
local kind_icons = { local kind_icons = {
@ -125,7 +126,6 @@
native_menu = false; # Use cmp menu instead of Vim menu native_menu = false; # Use cmp menu instead of Vim menu
ghost_text = true; # Show preview auto-completion ghost_text = true; # Show preview auto-completion
}; };
}; };
lua = '' lua = ''
@ -145,5 +145,4 @@
}), }),
}) })
''; '';
} }

View File

@ -1,4 +1,5 @@
{ pkgs, ... }: { { pkgs, ... }:
{
plugins = [ pkgs.vimPlugins.gitsigns-nvim ]; plugins = [ pkgs.vimPlugins.gitsigns-nvim ];
setup.gitsigns = { }; setup.gitsigns = { };
lua = builtins.readFile ./gitsigns.lua; lua = builtins.readFile ./gitsigns.lua;

View File

@ -1,120 +1,136 @@
{ pkgs, lib, config, dsl, ... }: { {
pkgs,
lib,
config,
dsl,
...
}:
{
# Terraform optional because non-free # Terraform optional because non-free
options.github = lib.mkEnableOption "Whether to enable GitHub features";
options.kubernetes =
lib.mkEnableOption "Whether to enable Kubernetes features";
options.python = lib.mkEnableOption "Whether to enable Python LSP";
options.terraform = lib.mkEnableOption "Whether to enable Terraform LSP"; options.terraform = lib.mkEnableOption "Whether to enable Terraform LSP";
options.github = lib.mkEnableOption "Whether to enable GitHub features";
options.kubernetes = lib.mkEnableOption "Whether to enable Kubernetes features";
config = config = {
plugins = [
pkgs.vimPlugins.nvim-lspconfig
pkgs.vimPlugins.conform-nvim
pkgs.vimPlugins.fidget-nvim
pkgs.vimPlugins.nvim-lint
];
let setup.fidget = { };
terraformFormat = if config.terraform then '' use.lspconfig.lua_ls.setup = dsl.callWith {
require("null-ls").builtins.formatting.terraform_fmt.with({ settings = {
command = "${pkgs.terraform}/bin/terraform", Lua = {
extra_filetypes = { "hcl" }, diagnostics = {
}), globals = [
'' else "vim"
""; "hs"
];
pythonFormat = if config.python then '' };
require("null-ls").builtins.formatting.black.with({ command = "${pkgs.black}/bin/black" }),
require("null-ls").builtins.diagnostics.ruff.with({ command = "${pkgs.ruff}/bin/ruff" }),
'' else
"";
in {
plugins = [
pkgs.vimPlugins.nvim-lspconfig
pkgs.vimPlugins.null-ls-nvim
pkgs.vimPlugins.fidget-nvim
];
setup.fidget = { };
use.lspconfig.lua_ls.setup = dsl.callWith {
settings = { Lua = { diagnostics = { globals = [ "vim" "hs" ]; }; }; };
capabilities =
dsl.rawLua "require('cmp_nvim_lsp').default_capabilities()";
cmd = [ "${pkgs.lua-language-server}/bin/lua-language-server" ];
};
use.lspconfig.nil_ls.setup = dsl.callWith {
cmd = [ "${pkgs.nil}/bin/nil" ];
capabilities =
dsl.rawLua "require('cmp_nvim_lsp').default_capabilities()";
};
use.lspconfig.pyright.setup = dsl.callWith {
cmd = if config.python then [
"${pkgs.pyright}/bin/pyright-langserver"
"--stdio"
] else
[ "echo" ];
};
use.lspconfig.terraformls.setup = dsl.callWith {
cmd = if config.terraform then [
"${pkgs.terraform-ls}/bin/terraform-ls"
"serve"
] else
[ "echo" ];
};
use.lspconfig.rust_analyzer.setup = dsl.callWith {
cmd = [ "${pkgs.rust-analyzer}/bin/rust-analyzer" ];
settings = {
"['rust-analyzer']" = { check = { command = "clippy"; }; };
}; };
}; };
capabilities = dsl.rawLua "require('cmp_nvim_lsp').default_capabilities()";
vim.api.nvim_create_augroup = dsl.callWith [ "LspFormatting" { } ]; cmd = [ "${pkgs.lua-language-server}/bin/lua-language-server" ];
lua = ''
${builtins.readFile ./lsp.lua}
-- Prevent infinite log size (change this when debugging)
vim.lsp.set_log_level("off")
require("null-ls").setup({
sources = {
require("null-ls").builtins.formatting.stylua.with({ command = "${pkgs.stylua}/bin/stylua" }),
require("null-ls").builtins.formatting.fish_indent.with({ command = "${pkgs.fish}/bin/fish_indent" }),
require("null-ls").builtins.formatting.nixfmt.with({ command = "${pkgs.nixfmt}/bin/nixfmt" }),
require("null-ls").builtins.formatting.rustfmt.with({ command = "${pkgs.rustfmt}/bin/rustfmt" }),
require("null-ls").builtins.diagnostics.shellcheck.with({ command = "${pkgs.shellcheck}/bin/shellcheck" }),
require("null-ls").builtins.formatting.shfmt.with({
command = "${pkgs.shfmt}/bin/shfmt",
extra_args = { "-i", "4", "-ci" },
}),
${pythonFormat}
${terraformFormat}
},
on_attach = function(client, bufnr)
if client.supports_method("textDocument/formatting") then
-- Auto-format on save
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
vim.api.nvim_create_autocmd("BufWritePre", {
group = augroup,
buffer = bufnr,
callback = function()
vim.lsp.buf.format({ bufnr = bufnr })
end,
})
-- Use internal formatting for bindings like gq.
vim.api.nvim_create_autocmd("LspAttach", {
callback = function(args)
vim.bo[args.buf].formatexpr = nil
end,
})
end
end,
})
'';
}; };
use.lspconfig.nixd.setup = dsl.callWith {
cmd = [ "${pkgs.nixd}/bin/nixd" ];
capabilities = dsl.rawLua "require('cmp_nvim_lsp').default_capabilities()";
};
use.lspconfig.pyright.setup = dsl.callWith {
cmd = [
"${pkgs.pyright}/bin/pyright-langserver"
"--stdio"
];
};
use.lspconfig.terraformls.setup = dsl.callWith {
cmd =
if config.terraform then
[
"${pkgs.terraform-ls}/bin/terraform-ls"
"serve"
]
else
[ "echo" ];
};
use.lspconfig.rust_analyzer.setup = dsl.callWith {
cmd = [ "${pkgs.rust-analyzer}/bin/rust-analyzer" ];
settings = {
"['rust-analyzer']" = {
check = {
command = "clippy";
};
files = {
excludeDirs = [ ".direnv" ];
};
};
};
};
setup.conform = {
format_on_save = {
# These options will be passed to conform.format()
timeout_ms = 1500;
lsp_fallback = true;
};
formatters_by_ft = {
lua = [ "stylua" ];
python = [ "black" ];
fish = [ "fish_indent" ];
nix = [ "nixfmt" ];
rust = [ "rustfmt" ];
sh = [ "shfmt" ];
terraform = if config.terraform then [ "terraform_fmt" ] else [ ];
hcl = if config.terraform then [ "terraform_fmt" ] else [ ];
};
formatters = {
lua.command = "${pkgs.stylua}/bin/stylua";
black.command = "${pkgs.black}/bin/black";
fish_indent.command = "${pkgs.fish}/bin/fish_indent";
nixfmt.command = "${pkgs.nixfmt-rfc-style}/bin/nixfmt";
rustfmt.command = "${pkgs.rustfmt}/bin/rustfmt";
shfmt = {
command = "${pkgs.shfmt}/bin/shfmt";
prepend_args = [
"-i"
"4"
"-ci"
];
};
terraform_fmt.command = if config.terraform then "${pkgs.terraform}/bin/terraform" else "";
};
};
use.lint = {
linters_by_ft = dsl.toTable {
python = [ "ruff" ];
sh = [ "shellcheck" ];
};
};
vim.api.nvim_create_autocmd = dsl.callWith [
(dsl.toTable [
"BufEnter"
"BufWritePost"
])
(dsl.rawLua "{ callback = function() require('lint').try_lint() end }")
];
lua = ''
${builtins.readFile ./lsp.lua}
local ruff = require('lint').linters.ruff; ruff.cmd = "${pkgs.ruff}/bin/ruff"
local shellcheck = require('lint').linters.shellcheck; shellcheck.cmd = "${pkgs.shellcheck}/bin/shellcheck"
-- Prevent infinite log size (change this when debugging)
vim.lsp.set_log_level("off")
'';
};
} }

View File

@ -1,19 +1,27 @@
{ pkgs, dsl, lib, ... }: { {
pkgs,
dsl,
lib,
...
}:
{
plugins = [ plugins = [
pkgs.vimPlugins.vim-surround # Keybinds for surround characters pkgs.vimPlugins.vim-surround # Keybinds for surround characters
pkgs.vimPlugins.vim-eunuch # File manipulation commands pkgs.vimPlugins.vim-eunuch # File manipulation commands
pkgs.vimPlugins.vim-fugitive # Git commands pkgs.vimPlugins.vim-fugitive # Git commands
pkgs.vimPlugins.vim-repeat # Better repeat using . pkgs.vimPlugins.vim-repeat # Better repeat using .
pkgs.vimPlugins.comment-nvim # Smart comment commands
pkgs.vimPlugins.glow-nvim # Markdown preview popup pkgs.vimPlugins.glow-nvim # Markdown preview popup
pkgs.vimPlugins.nvim-colorizer-lua # Hex color previews pkgs.vimPlugins.nvim-colorizer-lua # Hex color previews
pkgs.vimPlugins.which-key-nvim # Keybind helper pkgs.vimPlugins.which-key-nvim # Keybind helper
pkgs.kitty-scrollback-nvim # Scrollback pager for kitty pkgs.vimPlugins.kitty-scrollback-nvim # Scrollback pager for kitty
]; ];
# Initialize some plugins # Initialize some plugins
setup.Comment = { }; setup.colorizer = {
setup.colorizer = { user_default_options = { names = false; }; }; user_default_options = {
names = false;
};
};
setup.glow = { }; setup.glow = { };
setup.which-key = { }; setup.which-key = { };
setup.kitty-scrollback = { }; setup.kitty-scrollback = { };
@ -34,7 +42,6 @@
scrolloff = 3; # Margin of lines to see while scrolling scrolloff = 3; # Margin of lines to see while scrolling
splitright = true; # Vertical splits on the right side splitright = true; # Vertical splits on the right side
splitbelow = true; # Horizontal splits on the bottom side splitbelow = true; # Horizontal splits on the bottom side
pastetoggle = "<F3>"; # Use F3 to enter raw paste mode
clipboard = "unnamedplus"; # Uses system clipboard for yanking clipboard = "unnamedplus"; # Uses system clipboard for yanking
updatetime = 300; # Faster diagnostics updatetime = 300; # Faster diagnostics
mouse = "nv"; # Mouse interaction / scrolling mouse = "nv"; # Mouse interaction / scrolling
@ -54,12 +61,15 @@
vim.o.backup = true; # Easier to recover and more secure vim.o.backup = true; # Easier to recover and more secure
vim.bo.swapfile = false; # Instead of swaps, create backups vim.bo.swapfile = false; # Instead of swaps, create backups
vim.bo.undofile = true; # Keeps undos after quit vim.bo.undofile = true; # Keeps undos after quit
vim.o.backupdir = vim.o.backupdir = dsl.rawLua ''vim.fn.expand("~/.local/state/nvim/backup//")'';
dsl.rawLua ''vim.fn.expand("~/.local/state/nvim/backup//")'';
vim.o.undodir = dsl.rawLua ''vim.fn.expand("~/.local/state/nvim/undo//")''; vim.o.undodir = dsl.rawLua ''vim.fn.expand("~/.local/state/nvim/undo//")'';
# Required for nvim-cmp completion # Required for nvim-cmp completion
vim.opt.completeopt = [ "menu" "menuone" "noselect" ]; vim.opt.completeopt = [
"menu"
"menuone"
"noselect"
];
lua = lib.mkBefore '' lua = lib.mkBefore ''
vim.loader.enable() vim.loader.enable()

View File

@ -1,4 +1,5 @@
{ pkgs, ... }: { { pkgs, ... }:
{
plugins = [ pkgs.vimPlugins.lualine-nvim ]; plugins = [ pkgs.vimPlugins.lualine-nvim ];
setup.lualine = { setup.lualine = {
options = { options = {

View File

@ -1,12 +1,13 @@
{ pkgs, lib, config, ... }: { { pkgs, lib, ... }:
{
plugins = [ plugins = [
(pkgs.vimPlugins.nvim-treesitter.withPlugins (_plugins: (pkgs.vimPlugins.nvim-treesitter.withPlugins (
with pkgs.tree-sitter-grammars; _plugins: with pkgs.tree-sitter-grammars; [
[
tree-sitter-bash tree-sitter-bash
tree-sitter-c tree-sitter-c
tree-sitter-fish tree-sitter-fish
tree-sitter-hcl
tree-sitter-ini tree-sitter-ini
tree-sitter-json tree-sitter-json
tree-sitter-lua tree-sitter-lua
@ -14,28 +15,36 @@
tree-sitter-markdown-inline tree-sitter-markdown-inline
tree-sitter-nix tree-sitter-nix
tree-sitter-puppet tree-sitter-puppet
tree-sitter-python
tree-sitter-rasi tree-sitter-rasi
tree-sitter-toml tree-sitter-toml
tree-sitter-vimdoc tree-sitter-vimdoc
tree-sitter-yaml tree-sitter-yaml
] ++ (if config.python.enable then [ tree-sitter-python ] else [ ]) ]
++ (if config.terraform.enable then [ tree-sitter-hcl ] else [ ]))) ))
pkgs.vimPlugins.vim-matchup # Better % jumping in languages pkgs.vimPlugins.vim-matchup # Better % jumping in languages
pkgs.vimPlugins.playground # Tree-sitter experimenting pkgs.vimPlugins.playground # Tree-sitter experimenting
pkgs.vimPlugins.nginx-vim pkgs.vimPlugins.nginx-vim
pkgs.baleia-nvim # Clean ANSI from kitty scrollback pkgs.vimPlugins.vim-helm
# pkgs.hmts-nvim # Tree-sitter injections for home-manager pkgs.vimPlugins.baleia-nvim # Clean ANSI from kitty scrollback
# pkgs.vimPlugins.hmts-nvim # Tree-sitter injections for home-manager
(pkgs.vimUtils.buildVimPlugin { (pkgs.vimUtils.buildVimPlugin {
pname = "nmasur"; pname = "nmasur";
version = "0.1"; version = "0.1";
src = ../plugin; src = ../plugin;
}) })
] ++ (if config.kubernetes.enable then [ pkgs.vimPlugins.vim-helm ] else [ ]); ];
setup."nvim-treesitter.configs" = { setup."nvim-treesitter.configs" = {
highlight = { enable = true; }; highlight = {
indent = { enable = true; }; enable = true;
matchup = { enable = true; }; # Uses vim-matchup };
indent = {
enable = true;
};
matchup = {
enable = true;
}; # Uses vim-matchup
textobjects = { textobjects = {
select = { select = {
@ -69,5 +78,4 @@
-- Use HCL parser with .tf files -- Use HCL parser with .tf files
vim.treesitter.language.register('hcl', 'terraform') vim.treesitter.language.register('hcl', 'terraform')
''; '';
} }

View File

@ -1,4 +1,5 @@
{ pkgs, dsl, ... }: { { pkgs, dsl, ... }:
{
# Telescope is a fuzzy finder that can work with different sub-plugins # Telescope is a fuzzy finder that can work with different sub-plugins
@ -20,9 +21,15 @@
}; };
}; };
pickers = { pickers = {
find_files = { theme = "ivy"; }; find_files = {
oldfiles = { theme = "ivy"; }; theme = "ivy";
buffers = { theme = "dropdown"; }; };
oldfiles = {
theme = "ivy";
};
buffers = {
theme = "dropdown";
};
}; };
extensions = { extensions = {
fzy_native = { }; fzy_native = { };
@ -33,5 +40,4 @@
setup.project_nvim = { }; setup.project_nvim = { };
lua = builtins.readFile ./telescope.lua; lua = builtins.readFile ./telescope.lua;
} }

View File

@ -1,4 +1,10 @@
{ pkgs, dsl, config, ... }: { {
pkgs,
dsl,
config,
...
}:
{
# Toggleterm provides a floating terminal inside the editor for quick access # Toggleterm provides a floating terminal inside the editor for quick access
@ -15,5 +21,4 @@
${if config.github then (builtins.readFile ./github.lua) else ""} ${if config.github then (builtins.readFile ./github.lua) else ""}
${if config.kubernetes then (builtins.readFile ./kubernetes.lua) else ""} ${if config.kubernetes then (builtins.readFile ./kubernetes.lua) else ""}
''; '';
} }

View File

@ -1,8 +1,12 @@
{ pkgs, dsl, ... }: { { pkgs, dsl, ... }:
{
# This plugin creates a side drawer for navigating the current project # This plugin creates a side drawer for navigating the current project
plugins = [ pkgs.vimPlugins.nvim-tree-lua pkgs.vimPlugins.nvim-web-devicons ]; plugins = [
pkgs.vimPlugins.nvim-tree-lua
pkgs.vimPlugins.nvim-web-devicons
];
# Disable netrw eagerly # Disable netrw eagerly
# https://github.com/kyazdani42/nvim-tree.lua/commit/fb8735e96cecf004fbefb086ce85371d003c5129 # https://github.com/kyazdani42/nvim-tree.lua/commit/fb8735e96cecf004fbefb086ce85371d003c5129
@ -16,12 +20,14 @@
hijack_netrw = true; # Works as the file manager hijack_netrw = true; # Works as the file manager
sync_root_with_cwd = true; # Change project whenever currend dir changes sync_root_with_cwd = true; # Change project whenever currend dir changes
respect_buf_cwd = true; # Change to exact location of focused buffer respect_buf_cwd = true; # Change to exact location of focused buffer
update_focused_file = { # Change project based on the focused buffer update_focused_file = {
# Change project based on the focused buffer
enable = true; enable = true;
update_root = true; update_root = true;
ignore_list = { }; ignore_list = { };
}; };
diagnostics = { # Enable LSP and linter integration diagnostics = {
# Enable LSP and linter integration
enable = true; enable = true;
icons = { icons = {
hint = ""; hint = "";
@ -30,7 +36,8 @@
error = ""; error = "";
}; };
}; };
renderer = { # Show files with changes vs. current commit renderer = {
# Show files with changes vs. current commit
icons = { icons = {
glyphs = { glyphs = {
git = { git = {
@ -61,7 +68,8 @@
vim.keymap.set('n', 'v', api.node.open.vertical, opts('Open: Vertical Split')) vim.keymap.set('n', 'v', api.node.open.vertical, opts('Open: Vertical Split'))
end end
''; '';
view = { # Set look and feel view = {
# Set look and feel
width = 30; width = 30;
side = "left"; side = "left";
number = false; number = false;
@ -73,5 +81,4 @@
lua = '' lua = ''
vim.keymap.set("n", "<Leader>e", ":NvimTreeFindFileToggle<CR>", { silent = true }) vim.keymap.set("n", "<Leader>e", ":NvimTreeFindFileToggle<CR>", { silent = true })
''; '';
} }

View File

@ -1,18 +1,21 @@
{ config, pkgs, lib, ... }: {
config,
pkgs,
lib,
...
}:
let let
neovim = import ./package { neovim = import ./package {
inherit pkgs; inherit pkgs;
colors = config.theme.colors; colors = config.theme.colors;
c = config.c.enable; terraform = config.terraform.enable;
github = true; github = true;
kubernetes = config.kubernetes.enable; kubernetes = config.kubernetes.enable;
python = config.python.enable;
terraform = config.terraform.enable;
}; };
in
in { {
options.neovim.enable = lib.mkEnableOption "Neovim."; options.neovim.enable = lib.mkEnableOption "Neovim.";
@ -35,7 +38,9 @@ in {
# Create quick aliases for launching Neovim # Create quick aliases for launching Neovim
programs.fish = { programs.fish = {
shellAliases = { vim = "nvim"; }; shellAliases = {
vim = "nvim";
};
shellAbbrs = { shellAbbrs = {
v = lib.mkForce "nvim"; v = lib.mkForce "nvim";
vl = lib.mkForce "nvim -c 'normal! `0' -c 'bdelete 1'"; vl = lib.mkForce "nvim -c 'normal! `0' -c 'bdelete 1'";
@ -47,23 +52,22 @@ in {
# Requires removing some of the ANSI escape codes that are sent to the # Requires removing some of the ANSI escape codes that are sent to the
# scrollback using sed and baleia, as well as removing several # scrollback using sed and baleia, as well as removing several
# unnecessary features. # unnecessary features.
programs.kitty.settings.scrollback_pager = programs.kitty.settings.scrollback_pager = "${neovim}/bin/nvim --headless +'KittyScrollbackGenerateKittens' +'set nonumber' +'set norelativenumber' +'%print' +'quit!' 2>&1";
"${neovim}/bin/nvim --headless +'KittyScrollbackGenerateKittens' +'set nonumber' +'set norelativenumber' +'%print' +'quit!' 2>&1";
# Create a desktop option for launching Neovim from a file manager # Create a desktop option for launching Neovim from a file manager
# (Requires launching the terminal and then executing Neovim) # (Requires launching the terminal and then executing Neovim)
xdg.desktopEntries.nvim = lib.mkIf pkgs.stdenv.isLinux { xdg.desktopEntries.nvim = lib.mkIf pkgs.stdenv.isLinux {
name = "Neovim wrapper"; name = "Neovim wrapper";
exec = "kitty nvim %F"; exec = "kitty nvim %F";
mimeType = [ "text/plain" "text/markdown" ]; mimeType = [
"text/plain"
"text/markdown"
];
}; };
xdg.mimeApps.defaultApplications = lib.mkIf pkgs.stdenv.isLinux { xdg.mimeApps.defaultApplications = lib.mkIf pkgs.stdenv.isLinux {
"text/plain" = [ "nvim.desktop" ]; "text/plain" = [ "nvim.desktop" ];
"text/markdown" = [ "nvim.desktop" ]; "text/markdown" = [ "nvim.desktop" ];
}; };
}; };
}; };
} }

View File

@ -11,8 +11,22 @@ vim.filetype.add({
}) })
vim.api.nvim_create_autocmd("FileType", { vim.api.nvim_create_autocmd("FileType", {
pattern = "*.eml", pattern = "mail",
callback = function() callback = function()
vim.o.wrapmargin = 79 -- Wrap text automatically vim.o.wrapmargin = 79 -- Wrap text automatically
end, end,
}) })
vim.api.nvim_create_autocmd("FileType", {
pattern = "markdown",
callback = function()
vim.o.formatoptions = vim.o.formatopions + "a"
end,
})
vim.api.nvim_create_autocmd("FileType", {
pattern = "terraform",
callback = function()
vim.bo.commentstring = "# %s"
end,
})

View File

@ -26,13 +26,25 @@
# ] ++ extraConfig; # ] ++ extraConfig;
# } # }
{ pkgs, colors, terraform ? false, github ? false, kubernetes ? false, ... }: {
pkgs,
colors,
terraform ? false,
github ? false,
kubernetes ? false,
...
}:
# Comes from nix2vim overlay: # Comes from nix2vim overlay:
# https://github.com/gytis-ivaskevicius/nix2vim/blob/master/lib/neovim-builder.nix # https://github.com/gytis-ivaskevicius/nix2vim/blob/master/lib/neovim-builder.nix
pkgs.neovimBuilder { pkgs.neovimBuilder {
package = pkgs.neovim-unwrapped; package = pkgs.neovim-unwrapped;
inherit colors terraform github kubernetes; inherit
colors
terraform
github
kubernetes
;
imports = [ imports = [
../config/align.nix ../config/align.nix
../config/bufferline.nix ../config/bufferline.nix

View File

@ -1 +0,0 @@
{ lib, ... }: { options.c.enable = lib.mkEnableOption "C language tools."; }

View File

@ -1,13 +1,12 @@
{ ... }: { { ... }:
{
imports = [ imports = [
./haskell.nix ./haskell.nix
./kubernetes.nix ./kubernetes.nix
./lua.nix ./lua.nix
./nix.nix
./python.nix ./python.nix
./rust.nix ./rust.nix
./terraform.nix ./terraform.nix
]; ];
} }

View File

@ -1,14 +1,12 @@
{ config, lib, ... }: { { config, lib, ... }:
{
options.haskell.enable = lib.mkEnableOption "Haskell programming language."; options.haskell.enable = lib.mkEnableOption "Haskell programming language.";
config = lib.mkIf config.haskell.enable { config = lib.mkIf config.haskell.enable {
# Binary Cache for Haskell.nix # Binary Cache for Haskell.nix
nix.settings.trusted-public-keys = nix.settings.trusted-public-keys = [ "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" ];
[ "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" ];
nix.settings.substituters = [ "https://cache.iog.io" ]; nix.settings.substituters = [ "https://cache.iog.io" ];
}; };
} }

View File

@ -1,4 +1,10 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}:
{
options.kubernetes.enable = lib.mkEnableOption "Kubernetes tools."; options.kubernetes.enable = lib.mkEnableOption "Kubernetes tools.";
@ -99,12 +105,16 @@
views = { views = {
charts = { charts = {
bgColor = "default"; bgColor = "default";
defaultDialColors = defaultDialColors = [
[ config.theme.colors.base0D config.theme.colors.base08 ]; config.theme.colors.base0D
config.theme.colors.base08
];
# - *blue # - *blue
# - *red # - *red
defaultChartColors = defaultChartColors = [
[ config.theme.colors.base0D config.theme.colors.base08 ]; config.theme.colors.base0D
config.theme.colors.base08
];
# - *blue # - *blue
# - *red # - *red
}; };
@ -149,9 +159,6 @@
}; };
}; };
}; };
}; };
}; };
} }

View File

@ -1,4 +1,10 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}:
{
options.lua.enable = lib.mkEnableOption "Lua programming language."; options.lua.enable = lib.mkEnableOption "Lua programming language.";
@ -8,5 +14,4 @@
sumneko-lua-language-server # Lua LSP sumneko-lua-language-server # Lua LSP
]; ];
}; };
} }

View File

@ -1,18 +0,0 @@
{ config, pkgs, lib, ... }: {
options.nixlang.enable = lib.mkEnableOption "Nix programming language.";
config = lib.mkIf config.nixlang.enable {
home-manager.users.${config.user} = {
home.packages = with pkgs; [
nixfmt # Nix file formatter
nil # Nix language server
];
};
};
}

View File

@ -1,4 +1,10 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}:
{
options.python.enable = lib.mkEnableOption "Python programming language."; options.python.enable = lib.mkEnableOption "Python programming language.";
@ -13,10 +19,9 @@
python310Packages.flake8 # Python linter python310Packages.flake8 # Python linter
]; ];
programs.fish.shellAbbrs = { py = "python3"; }; programs.fish.shellAbbrs = {
py = "python3";
};
}; };
}; };
} }

View File

@ -1,4 +1,10 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}:
{
options.rust.enable = lib.mkEnableOption "Rust programming language."; options.rust.enable = lib.mkEnableOption "Rust programming language.";
@ -6,12 +12,16 @@
home-manager.users.${config.user} = { home-manager.users.${config.user} = {
programs.fish.shellAbbrs = { ca = "cargo"; }; programs.fish.shellAbbrs = {
ca = "cargo";
home.packages = with pkgs; [ cargo rustc clippy gcc ]; };
home.packages = with pkgs; [
cargo
rustc
clippy
gcc
];
}; };
}; };
} }

View File

@ -1,4 +1,10 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}:
{
options.terraform.enable = lib.mkEnableOption "Terraform tools."; options.terraform.enable = lib.mkEnableOption "Terraform tools.";
@ -15,9 +21,6 @@
terraform-ls # Language server terraform-ls # Language server
tflint # Linter tflint # Linter
]; ];
}; };
}; };
} }

View File

@ -1,5 +1,8 @@
{ ... }: { { ... }:
{
imports = [ ./dotfiles.nix ./notes.nix ];
imports = [
./dotfiles.nix
./notes.nix
];
} }

View File

@ -1,4 +1,10 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}:
{
# Allows me to make sure I can work on my dotfiles locally # Allows me to make sure I can work on my dotfiles locally
@ -11,23 +17,17 @@
home.activation = { home.activation = {
# Always clone dotfiles repository if it doesn't exist # Always clone dotfiles repository if it doesn't exist
cloneDotfiles = cloneDotfiles = config.home-manager.users.${config.user}.lib.dag.entryAfter [ "writeBoundary" ] ''
config.home-manager.users.${config.user}.lib.dag.entryAfter if [ ! -d "${config.dotfilesPath}" ]; then
[ "writeBoundary" ] '' $DRY_RUN_CMD mkdir --parents $VERBOSE_ARG $(dirname "${config.dotfilesPath}")
if [ ! -d "${config.dotfilesPath}" ]; then $DRY_RUN_CMD ${pkgs.git}/bin/git \
$DRY_RUN_CMD mkdir --parents $VERBOSE_ARG $(dirname "${config.dotfilesPath}") clone ${config.dotfilesRepo} "${config.dotfilesPath}"
$DRY_RUN_CMD ${pkgs.git}/bin/git \ fi
clone ${config.dotfilesRepo} "${config.dotfilesPath}" '';
fi
'';
}; };
# Set a variable for dotfiles repo, not necessary but convenient # Set a variable for dotfiles repo, not necessary but convenient
home.sessionVariables.DOTS = config.dotfilesPath; home.sessionVariables.DOTS = config.dotfilesPath;
}; };
}; };
} }

View File

@ -1,4 +1,10 @@
{ config, ... }: { {
config,
pkgs,
lib,
...
}:
{
# This is just a placeholder as I expect to interact with my notes in a # This is just a placeholder as I expect to interact with my notes in a
# certain location # certain location
@ -9,6 +15,22 @@
NOTES_PATH = "${config.homePath}/dev/personal/notes/content"; NOTES_PATH = "${config.homePath}/dev/personal/notes/content";
}; };
# Sync notes for Nextcloud automatically
systemd.user.timers.refresh-notes = lib.mkIf config.services.nextcloud.enable {
Timer = {
OnCalendar = "*-*-* *:0/10:50"; # Every 10 minutes
Unit = "refresh-notes.service";
};
};
systemd.user.services.refresh-notes = {
Unit.Description = "Get latest notes.";
Service = {
Type = "oneshot";
ExecStartPre = "${pkgs.git}/bin/git -C /data/git/notes reset --hard master";
ExecStart = "${pkgs.git}/bin/git -C /data/git/notes pull";
WorkingDirectory = config.homePath;
Environment = "PATH=${pkgs.openssh}/bin";
};
};
}; };
} }

View File

@ -1,4 +1,5 @@
{ config, lib, ... }: { { config, lib, ... }:
{
# Shell history sync # Shell history sync
@ -10,7 +11,10 @@
programs.atuin = { programs.atuin = {
enable = true; enable = true;
flags = [ "--disable-up-arrow" "--disable-ctrl-r" ]; flags = [
"--disable-up-arrow"
"--disable-ctrl-r"
];
settings = { settings = {
auto_sync = true; auto_sync = true;
update_check = false; update_check = false;
@ -27,13 +31,9 @@
keymap_mode = "vim-normal"; keymap_mode = "vim-normal";
}; };
}; };
}; };
# Give root user the same setup # Give root user the same setup
home-manager.users.root.programs.atuin = home-manager.users.root.programs.atuin = config.home-manager.users.${config.user}.programs.atuin;
config.home-manager.users.${config.user}.programs.atuin;
}; };
} }

View File

@ -1,12 +1,17 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}:
{
config = { config = {
home-manager.users.${config.user} = { home-manager.users.${config.user} = {
programs.bash = { programs.bash = {
enable = true; enable = true;
shellAliases = shellAliases = config.home-manager.users.${config.user}.programs.fish.shellAliases;
config.home-manager.users.${config.user}.programs.fish.shellAliases;
initExtra = ""; initExtra = "";
profileExtra = ""; profileExtra = "";
}; };
@ -14,7 +19,6 @@
programs.starship.enableBashIntegration = false; programs.starship.enableBashIntegration = false;
programs.zoxide.enableBashIntegration = true; programs.zoxide.enableBashIntegration = true;
programs.fzf.enableBashIntegration = true; programs.fzf.enableBashIntegration = true;
}; };
}; };
} }

View File

@ -31,6 +31,10 @@ STATUS=$?
# because tesseract adds .txt to the given file path anyways. So if we were to # because tesseract adds .txt to the given file path anyways. So if we were to
# specify /tmp/ocr.txt as the file path, tesseract would out the text to # specify /tmp/ocr.txt as the file path, tesseract would out the text to
# /tmp/ocr.txt.txt # /tmp/ocr.txt.txt
cd /tmp || {
echo "Failed to jump to directory."
exit 1
}
tesseract "$IMAGE_FILE" "${TEXT_FILE//\.txt/}" tesseract "$IMAGE_FILE" "${TEXT_FILE//\.txt/}"
# Check if the text was detected by checking number # Check if the text was detected by checking number

View File

@ -1,4 +1,10 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}:
{
# Convenience utilities from charm.sh # Convenience utilities from charm.sh
@ -12,7 +18,5 @@
charm # Manage account and filesystem charm # Manage account and filesystem
pop # Send emails from a TUI pop # Send emails from a TUI
]; ];
}; };
} }

View File

@ -1,4 +1,5 @@
{ ... }: { { ... }:
{
imports = [ imports = [
./atuin.nix ./atuin.nix
./bash ./bash
@ -12,5 +13,6 @@
./nixpkgs.nix ./nixpkgs.nix
./starship.nix ./starship.nix
./utilities.nix ./utilities.nix
./work.nix
]; ];
} }

View File

@ -1,10 +1,15 @@
{ config, ... }: { { config, ... }:
{
# Enables quickly entering Nix shells when changing directories # Enables quickly entering Nix shells when changing directories
home-manager.users.${config.user}.programs.direnv = { home-manager.users.${config.user}.programs.direnv = {
enable = true; enable = true;
nix-direnv.enable = true; nix-direnv.enable = true;
config = { whitelist = { prefix = [ config.dotfilesPath ]; }; }; config = {
whitelist = {
prefix = [ config.dotfilesPath ];
};
};
}; };
# programs.direnv.direnvrcExtra = '' # programs.direnv.direnvrcExtra = ''
@ -28,5 +33,4 @@
keep-outputs = true keep-outputs = true
keep-derivations = true keep-derivations = true
''; '';
} }

View File

@ -1,4 +1,10 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}:
{
users.users.${config.user}.shell = pkgs.fish; users.users.${config.user}.shell = pkgs.fish;
programs.fish.enable = true; # Needed for LightDM to remember username programs.fish.enable = true; # Needed for LightDM to remember username
@ -46,7 +52,9 @@
fish_user_key_bindings = { fish_user_key_bindings = {
body = builtins.readFile ./functions/fish_user_key_bindings.fish; body = builtins.readFile ./functions/fish_user_key_bindings.fish;
}; };
ip = { body = builtins.readFile ./functions/ip.fish; }; ip = {
body = builtins.readFile ./functions/ip.fish;
};
json = { json = {
description = "Tidy up JSON using jq"; description = "Tidy up JSON using jq";
body = "pbpaste | jq '.' | pbcopy"; # Need to fix for non-macOS body = "pbpaste | jq '.' | pbcopy"; # Need to fix for non-macOS
@ -112,8 +120,7 @@
moon = "curl wttr.in/Moon"; moon = "curl wttr.in/Moon";
# Cheat Sheets # Cheat Sheets
ssl = ssl = "openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr";
"openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr";
fingerprint = "ssh-keyscan myhost.com | ssh-keygen -lf -"; fingerprint = "ssh-keyscan myhost.com | ssh-keygen -lf -";
publickey = "ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub"; publickey = "ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub";
forloop = "for i in (seq 1 100)"; forloop = "for i in (seq 1 100)";
@ -122,7 +129,6 @@
dc = "$DOTS/bin/docker_cleanup"; dc = "$DOTS/bin/docker_cleanup";
dr = "docker run --rm -it"; dr = "docker run --rm -it";
db = "docker build . -t"; db = "docker build . -t";
}; };
shellInit = ""; shellInit = "";
}; };
@ -132,6 +138,5 @@
programs.starship.enableFishIntegration = true; programs.starship.enableFishIntegration = true;
programs.zoxide.enableFishIntegration = true; programs.zoxide.enableFishIntegration = true;
programs.fzf.enableFishIntegration = true; programs.fzf.enableFishIntegration = true;
}; };
} }

View File

@ -18,5 +18,5 @@ bind -M insert \cn 'commandline -r "nix shell nixpkgs#"'
bind -M default \cn 'commandline -r "nix shell nixpkgs#"' bind -M default \cn 'commandline -r "nix shell nixpkgs#"'
bind -M insert \x11F nix-fzf bind -M insert \x11F nix-fzf
bind -M default \x11F nix-fzf bind -M default \x11F nix-fzf
bind -M insert \ch _atuin_search --filter-mode global bind -M insert \ch '_atuin_search --filter-mode global'
bind -M default \ch _atuin_search --filter-mode global bind -M default \ch '_atuin_search --filter-mode global'

View File

@ -1,4 +1,5 @@
{ config, pkgs, ... }: { { config, pkgs, ... }:
{
# FZF is a fuzzy-finder for the terminal # FZF is a fuzzy-finder for the terminal
@ -25,17 +26,20 @@
''; '';
}; };
}; };
shellAbbrs = { lsf = "ls -lh | fzf"; }; shellAbbrs = {
lsf = "ls -lh | fzf";
};
}; };
# Global fzf configuration # Global fzf configuration
home.sessionVariables = let fzfCommand = "fd --type file"; home.sessionVariables =
in { let
FZF_DEFAULT_COMMAND = fzfCommand; fzfCommand = "fd --type file";
FZF_CTRL_T_COMMAND = fzfCommand; in
FZF_DEFAULT_OPTS = "-m --height 50% --border"; {
}; FZF_DEFAULT_COMMAND = fzfCommand;
FZF_CTRL_T_COMMAND = fzfCommand;
FZF_DEFAULT_OPTS = "-m --height 50% --border";
};
}; };
} }

View File

@ -1,8 +1,14 @@
{ config, pkgs, lib, ... }: {
config,
pkgs,
lib,
...
}:
let home-packages = config.home-manager.users.${config.user}.home.packages; let
home-packages = config.home-manager.users.${config.user}.home.packages;
in { in
{
options = { options = {
gitName = lib.mkOption { gitName = lib.mkOption {
@ -28,25 +34,60 @@ in {
userName = config.gitName; userName = config.gitName;
userEmail = config.gitEmail; userEmail = config.gitEmail;
extraConfig = { extraConfig = {
pager = { branch = "false"; }; core.pager = "${pkgs.git}/share/git/contrib/diff-highlight/diff-highlight | less -F";
safe = { directory = config.dotfilesPath; }; interactive.difffilter = "${pkgs.git}/share/git/contrib/diff-highlight/diff-highlight";
pull = { ff = "only"; }; pager = {
push = { autoSetupRemote = "true"; }; branch = "false";
init = { defaultBranch = "master"; }; };
safe = {
directory = config.dotfilesPath;
};
pull = {
ff = "only";
};
push = {
autoSetupRemote = "true";
};
init = {
defaultBranch = "master";
};
rebase = {
autosquash = "true";
};
gpg = {
format = "ssh";
ssh.allowedSignersFile = "~/.config/git/allowed-signers";
};
# commit.gpgsign = true;
# tag.gpgsign = true;
}; };
ignores = [ ".direnv/**" "result" ]; ignores = [
includes = [{ ".direnv/**"
path = "~/.config/git/personal"; "result"
condition = "gitdir:~/dev/personal/"; ];
}]; includes = [
{
path = "~/.config/git/personal";
condition = "gitdir:~/dev/personal/";
}
];
}; };
# Personal git config # Personal git config
# TODO: fix with variables # TODO: fix with variables
xdg.configFile."git/personal".text = '' xdg.configFile."git/personal".text = ''
[user] [user]
name = "Noah Masur" name = "${config.fullName}"
email = "7386960+nmasur@users.noreply.github.com" email = "7386960+nmasur@users.noreply.github.com"
signingkey = ~/.ssh/id_ed25519
[commit]
gpgsign = true
[tag]
gpgsign = true
'';
xdg.configFile."git/allowed-signers".text = ''
7386960+nmasur@users.noreply.github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s
''; '';
programs.fish.shellAbbrs = { programs.fish.shellAbbrs = {
@ -66,8 +107,7 @@ in {
gl = "git log --graph --decorate --oneline -20"; gl = "git log --graph --decorate --oneline -20";
gll = "git log --graph --decorate --oneline"; gll = "git log --graph --decorate --oneline";
gco = "git checkout"; gco = "git checkout";
gcom = '' gcom = ''git switch (git symbolic-ref refs/remotes/origin/HEAD | cut -d"/" -f4)'';
git switch (git symbolic-ref refs/remotes/origin/HEAD | cut -d"/" -f4)'';
gcob = "git switch -c"; gcob = "git switch -c";
gb = "git branch"; gb = "git branch";
gpd = "git push origin -d"; gpd = "git push origin -d";
@ -81,58 +121,63 @@ in {
}; };
# Required for fish commands # Required for fish commands
home.packages = with pkgs; [ fish fzf bat ]; home.packages = with pkgs; [
fish
fzf
bat
];
programs.fish.functions = lib.mkIf (builtins.elem pkgs.fzf home-packages programs.fish.functions =
&& builtins.elem pkgs.bat home-packages) { lib.mkIf (builtins.elem pkgs.fzf home-packages && builtins.elem pkgs.bat home-packages)
git = { body = builtins.readFile ./fish/functions/git.fish; }; {
git-add-fuzzy = { git = {
body = builtins.readFile ./fish/functions/git-add-fuzzy.fish; body = builtins.readFile ./fish/functions/git.fish;
};
git-add-fuzzy = {
body = builtins.readFile ./fish/functions/git-add-fuzzy.fish;
};
git-fuzzy-branch = {
argumentNames = "header";
body = builtins.readFile ./fish/functions/git-fuzzy-branch.fish;
};
git-checkout-fuzzy = {
body = ''
set branch (git-fuzzy-branch "checkout branch...")
and git checkout $branch
'';
};
git-delete-fuzzy = {
body = ''
set branch (git-fuzzy-branch "delete branch...")
and git branch -d $branch
'';
};
git-force-delete-fuzzy = {
body = ''
set branch (git-fuzzy-branch "force delete branch...")
and git branch -D $branch
'';
};
git-merge-fuzzy = {
body = ''
set branch (git-fuzzy-branch "merge from...")
and git merge $branch
'';
};
git-show-fuzzy = {
body = builtins.readFile ./fish/functions/git-show-fuzzy.fish;
};
git-commits = {
body = builtins.readFile ./fish/functions/git-commits.fish;
};
git-history = {
body = builtins.readFile ./fish/functions/git-history.fish;
};
uncommitted = {
description = "Find uncommitted git repos";
body = builtins.readFile ./fish/functions/uncommitted.fish;
};
}; };
git-fuzzy-branch = {
argumentNames = "header";
body = builtins.readFile ./fish/functions/git-fuzzy-branch.fish;
};
git-checkout-fuzzy = {
body = ''
set branch (git-fuzzy-branch "checkout branch...")
and git checkout $branch
'';
};
git-delete-fuzzy = {
body = ''
set branch (git-fuzzy-branch "delete branch...")
and git branch -d $branch
'';
};
git-force-delete-fuzzy = {
body = ''
set branch (git-fuzzy-branch "force delete branch...")
and git branch -D $branch
'';
};
git-merge-fuzzy = {
body = ''
set branch (git-fuzzy-branch "merge from...")
and git merge $branch
'';
};
git-show-fuzzy = {
body = builtins.readFile ./fish/functions/git-show-fuzzy.fish;
};
git-commits = {
body = builtins.readFile ./fish/functions/git-commits.fish;
};
git-history = {
body = builtins.readFile ./fish/functions/git-history.fish;
};
uncommitted = {
description = "Find uncommitted git repos";
body = builtins.readFile ./fish/functions/uncommitted.fish;
};
};
}; };
}; };
} }

View File

@ -1,40 +1,46 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}:
{
home-manager.users.${config.user} = { home-manager.users.${config.user} = {
programs.gh = programs.gh = lib.mkIf config.home-manager.users.${config.user}.programs.git.enable {
lib.mkIf config.home-manager.users.${config.user}.programs.git.enable { enable = true;
enable = true; gitCredentialHelper.enable = true;
gitCredentialHelper.enable = true; settings.git_protocol = "https";
settings.git_protocol = "https"; extensions = [
extensions = [ pkgs.gh-collaborators ]; pkgs.gh-collaborators
pkgs.gh-dash
];
};
programs.fish = lib.mkIf config.home-manager.users.${config.user}.programs.gh.enable {
shellAbbrs = {
ghr = "gh repo view -w";
gha = "gh run list | head -1 | awk '{ print \\$\\(NF-2\\) }' | xargs gh run view";
grw = "gh run watch";
grf = "gh run view --log-failed";
grl = "gh run view --log";
ghpr = "gh pr create && sleep 3 && gh run watch";
# https://github.com/cli/cli/discussions/4067
prs = "gh search prs --state=open --review-requested=@me";
}; };
functions = {
programs.fish = repos = {
lib.mkIf config.home-manager.users.${config.user}.programs.gh.enable { description = "Clone GitHub repositories";
shellAbbrs = { argumentNames = "organization";
ghr = "gh repo view -w"; body = ''
gha = set directory (gh-repos $organization)
"gh run list | head -1 | awk '{ print \\$\\(NF-2\\) }' | xargs gh run view"; and cd $directory
grw = "gh run watch"; '';
grf = "gh run view --log-failed";
grl = "gh run view --log";
ghpr = "gh pr create && sleep 3 && gh run watch";
# https://github.com/cli/cli/discussions/4067
prs = "gh search prs --state=open --review-requested=@me";
};
functions = {
repos = {
description = "Clone GitHub repositories";
argumentNames = "organization";
body = ''
set directory (gh-repos $organization)
and cd $directory
'';
};
}; };
}; };
};
home.packages = [ home.packages = [
(pkgs.writeShellScriptBin "gh-repos" '' (pkgs.writeShellScriptBin "gh-repos" ''
@ -48,7 +54,7 @@
esac esac
selected=$(gh repo list "$organization" \ selected=$(gh repo list "$organization" \
--limit 50 \ --limit 100 \
--no-archived \ --no-archived \
--json=name,description,isPrivate,updatedAt,primaryLanguage \ --json=name,description,isPrivate,updatedAt,primaryLanguage \
| jq -r '.[] | .name + "," + if .description == "" then "-" else .description |= gsub(","; " ") | .description end + "," + .updatedAt + "," + .primaryLanguage.name' \ | jq -r '.[] | .name + "," + if .description == "" then "-" else .description |= gsub(","; " ") | .description end + "," + .updatedAt + "," + .primaryLanguage.name' \
@ -76,7 +82,5 @@
} }
'') '')
]; ];
}; };
} }

View File

@ -1,21 +1,18 @@
{ config, ... }: { { config, ... }:
{
config = { config = {
home-manager.users.${config.user}.programs.jujutsu = { home-manager.users.${config.user}.programs.jujutsu = {
enable = true; enable = true;
enableFishIntegration = true;
# https://github.com/martinvonz/jj/blob/main/docs/config.md # https://github.com/martinvonz/jj/blob/main/docs/config.md
settings = { settings = {
user = { user = {
name = config.home-manager.users.${config.user}.programs.git.userName; name = config.home-manager.users.${config.user}.programs.git.userName;
email = email = config.home-manager.users.${config.user}.programs.git.userEmail;
config.home-manager.users.${config.user}.programs.git.userEmail;
}; };
}; };
}; };
}; };
} }

View File

@ -1,4 +1,10 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}:
{
home-manager.users.${config.user} = { home-manager.users.${config.user} = {
programs.fish = { programs.fish = {
@ -62,16 +68,22 @@
# Create nix-index if doesn't exist # Create nix-index if doesn't exist
home.activation.createNixIndex = home.activation.createNixIndex =
let cacheDir = "${config.homePath}/.cache/nix-index"; let
in lib.mkIf cacheDir = "${config.homePath}/.cache/nix-index";
config.home-manager.users.${config.user}.programs.nix-index.enable in
(config.home-manager.users.${config.user}.lib.dag.entryAfter lib.mkIf config.home-manager.users.${config.user}.programs.nix-index.enable (
[ "writeBoundary" ] '' config.home-manager.users.${config.user}.lib.dag.entryAfter [ "writeBoundary" ] ''
if [ ! -d ${cacheDir} ]; then if [ ! -d ${cacheDir} ]; then
$DRY_RUN_CMD ${pkgs.nix-index}/bin/nix-index -f ${pkgs.path} $DRY_RUN_CMD ${pkgs.nix-index}/bin/nix-index -f ${pkgs.path}
fi fi
''); ''
);
# Set automatic generation cleanup for home-manager
nix.gc = {
automatic = config.nix.gc.automatic;
options = config.nix.gc.options;
};
}; };
nix = { nix = {
@ -86,8 +98,35 @@
}; };
# For security, only allow specific users # For security, only allow specific users
settings.allowed-users = [ "@wheel" config.user ]; settings.allowed-users = [
"@wheel"
config.user
];
# Enable features in Nix commands
extraOptions = ''
experimental-features = nix-command flakes
warn-dirty = false
'';
gc = {
automatic = true;
options = "--delete-older-than 10d";
};
settings = {
# Add community Cachix to binary cache
# Don't use with macOS because blocked by corporate firewall
builders-use-substitutes = true;
substituters = lib.mkIf (!pkgs.stdenv.isDarwin) [ "https://nix-community.cachix.org" ];
trusted-public-keys = lib.mkIf (!pkgs.stdenv.isDarwin) [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
# Scans and hard links identical files in the store
# Not working with macOS: https://github.com/NixOS/nix/issues/7273
auto-optimise-store = lib.mkIf (!pkgs.stdenv.isDarwin) true;
};
}; };
} }

View File

@ -1,4 +1,10 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}:
{
home-manager.users.${config.user}.programs.starship = { home-manager.users.${config.user}.programs.starship = {
enable = true; enable = true;
@ -29,7 +35,9 @@
truncate_to_repo = true; truncate_to_repo = true;
truncation_length = 100; truncation_length = 100;
}; };
git_branch = { format = "[$symbol$branch]($style)"; }; git_branch = {
format = "[$symbol$branch]($style)";
};
git_commit = { git_commit = {
format = "( @ [$hash]($style) )"; format = "( @ [$hash]($style) )";
only_detached = false; only_detached = false;
@ -56,8 +64,9 @@
format = "[$symbol $name]($style)"; format = "[$symbol $name]($style)";
symbol = ""; symbol = "";
}; };
python = { format = "[\${version}\\(\${virtualenv}\\)]($style)"; }; python = {
format = "[\${version}\\(\${virtualenv}\\)]($style)";
};
}; };
}; };
} }

View File

@ -10,8 +10,8 @@ let
.terraform/ .terraform/
.target/ .target/
/Library/''; /Library/'';
in
in { {
config = { config = {
@ -20,6 +20,8 @@ in {
home.packages = with pkgs; [ home.packages = with pkgs; [
age # Encryption age # Encryption
bc # Calculator bc # Calculator
delta # Fancy diffs
difftastic # Other fancy diffs
dig # DNS lookup dig # DNS lookup
fd # find fd # find
htop # Show system processes htop # Show system processes
@ -68,9 +70,6 @@ in {
body = "${pkgs.prettyping}/bin/prettyping --nolegend $target"; body = "${pkgs.prettyping}/bin/prettyping --nolegend $target";
}; };
}; };
}; };
}; };
} }

Some files were not shown because too many files have changed in this diff Show More