Compare commits

..

7 commits

Author SHA1 Message Date
cy
389df0cb5c generate and upload sd image 2025-01-24 03:20:56 -05:00
cy
00e6f6267b apply rpi config error fix 2025-01-24 01:36:39 -05:00
cy
af950da1f5 also build machines on arm cuz we have pi now 2025-01-24 01:36:39 -05:00
cy
b5796b3c23 try to fix everything 2025-01-24 01:36:39 -05:00
cy
f3b7da2918 fix typo and bootloader path 2025-01-24 01:36:39 -05:00
cy
d866d9c0e3 add hardware-config for pancake 2025-01-24 01:36:39 -05:00
cy
83b8a9d765 pancake: init 2025-01-24 01:36:39 -05:00
41 changed files with 465 additions and 706 deletions

View file

@ -8,11 +8,13 @@ jobs:
strategy: strategy:
matrix: matrix:
machine: machine:
- chunk # - chunk
- ytnix # - ytnix
- titan # - titan
- pancake
os: os:
- ubuntu-latest # - ubuntu-latest
- ubuntu-24.04-arm
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
continue-on-error: true continue-on-error: true
steps: steps:
@ -65,7 +67,14 @@ jobs:
purge-primary-key: never purge-primary-key: never
# always save the cache # always save the cache
save-always: true save-always: true
- run: nix build -L .#nixosConfigurations.${{ matrix.machine }}.config.system.build.toplevel # - run: nix build -L .#nixosConfigurations.${{ matrix.machine }}.config.system.build.toplevel
# - run: nix run -L github:nix-community/nixos-generators -- --flake .#pancake -f sd-aarch64 --system aarch64-linux
- run: nix build -L .#nixosConfigurations.pancake.config.formats.sd-aarch64
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: image
path: result/
build-homes: build-homes:
strategy: strategy:
matrix: matrix:

View file

@ -108,8 +108,3 @@ creation_rules:
- age: - age:
- *chunk - *chunk
- *cy - *cy
- path_regex: secrets/yt/(.*).yaml$
key_groups:
- age:
- *yt
- *cy

263
flake.lock generated
View file

@ -32,11 +32,11 @@
"nixpkgs": "nixpkgs_4" "nixpkgs": "nixpkgs_4"
}, },
"locked": { "locked": {
"lastModified": 1737621947, "lastModified": 1733424942,
"narHash": "sha256-8HFvG7fvIFbgtaYAY2628Tb89fA55nPm2jSiNs0/Cws=", "narHash": "sha256-5t7Sl6EkOaoP4FvzLmH7HFDbdl9SizmLh53RjDQCbWQ=",
"owner": "cachix", "owner": "cachix",
"repo": "cachix", "repo": "cachix",
"rev": "f65a3cd5e339c223471e64c051434616e18cc4f5", "rev": "8b6b0e4694b9aa78b2ea4c93bff6e1a222dc7e4a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -120,11 +120,11 @@
"rocksdb": "rocksdb" "rocksdb": "rocksdb"
}, },
"locked": { "locked": {
"lastModified": 1738132650, "lastModified": 1737153653,
"narHash": "sha256-ryebu2VoopIpr5+DuHIs2/x60u+3EzRJexYRWVJn2AE=", "narHash": "sha256-yNdxoVZX13QUDJYM6zTMY9ExvacTqB+f0MLvDreSW8U=",
"owner": "girlbossceo", "owner": "girlbossceo",
"repo": "conduwuit", "repo": "conduwuit",
"rev": "eb7d893c8675f955fa770c8ae6f1c32a2394284c", "rev": "5b8464252c2c03edf65e43153be026dbb768a12a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -157,11 +157,11 @@
}, },
"crane_2": { "crane_2": {
"locked": { "locked": {
"lastModified": 1737689766, "lastModified": 1737563566,
"narHash": "sha256-ivVXYaYlShxYoKfSo5+y5930qMKKJ8CLcAoIBPQfJ6s=", "narHash": "sha256-GLJvkOG29XCynQm8XWPyykMRqIhxKcBARVu7Ydrz02M=",
"owner": "ipetkov", "owner": "ipetkov",
"repo": "crane", "repo": "crane",
"rev": "6fe74265bbb6d016d663b1091f015e2976c4a527", "rev": "849376434956794ebc7a6b487d31aace395392ba",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -255,11 +255,11 @@
"rust-analyzer-src": "rust-analyzer-src" "rust-analyzer-src": "rust-analyzer-src"
}, },
"locked": { "locked": {
"lastModified": 1737786656, "lastModified": 1736836313,
"narHash": "sha256-ubCW9Jy7ZUOF354bWxTgLDpVnTvIpNr6qR4H/j7I0oo=", "narHash": "sha256-zdZ7/T6yG0/hzoVOiNpDiR/sW3zR6oSMrfIFJK2BrrE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "fenix", "repo": "fenix",
"rev": "2f721f527886f801403f389a9cabafda8f1e3b7f", "rev": "056c9393c821a4df356df6ce7f14c722dc8717ec",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -369,11 +369,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1738453229, "lastModified": 1736143030,
"narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=", "narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd", "rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -562,11 +562,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1738448366, "lastModified": 1737669579,
"narHash": "sha256-4ATtQqBlgsGqkHTemta0ydY6f7JBRXz4Hf574NHQpkg=", "narHash": "sha256-v9WQ3c4ctwPMfdBZMZxpdM9xXev4uChce4BxOpvsu0E=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "18fa9f323d8adbb0b7b8b98a8488db308210ed93", "rev": "7b9ece1bf3c8780cde9b975b28c2d9ccd7e9cdb9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -656,11 +656,11 @@
"liburing": { "liburing": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1737600516, "lastModified": 1736719310,
"narHash": "sha256-EKyLQ3pbcjoU5jH5atge59F4fzuhTsb6yalUj6Ve2t8=", "narHash": "sha256-Turvx60THwzTiUHb49WV3upUgsPuktr7tVy2Lwu2xJg=",
"owner": "axboe", "owner": "axboe",
"repo": "liburing", "repo": "liburing",
"rev": "6c509e2b0c881a13b83b259a221bf15fc9b3f681", "rev": "3124a4619e4daf26b06d48ccf0186a947070c415",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -683,11 +683,11 @@
"pre-commit-hooks": "pre-commit-hooks" "pre-commit-hooks": "pre-commit-hooks"
}, },
"locked": { "locked": {
"lastModified": 1738446528, "lastModified": 1737655283,
"narHash": "sha256-NYL/r7EXSyYP7nXuYGvGYMI9QtztGjVaKKofBt/pCv8=", "narHash": "sha256-yAFGeCZXUL3GqDMeFcUEOC4m459Ld7j54Rxo8cmyuSQ=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "a51380645f61b33d37a536b596d16c481f7b84a6", "rev": "963b687443b44df6c5cbdf3426454d92830d9100",
"revCount": 17342, "revCount": 16671,
"type": "git", "type": "git",
"url": "https://git.lix.systems/lix-project/lix" "url": "https://git.lix.systems/lix-project/lix"
}, },
@ -710,11 +710,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1738176840, "lastModified": 1737675503,
"narHash": "sha256-NG3IRvRs3u3btVCN861FqHvgOwqcNT/Oy6PBG86F5/E=", "narHash": "sha256-FUWpqPOsEJwK8oomffat+lgKnoxJHArRlWo2j17EhxQ=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "621aae0f3cceaffa6d73a4fb0f89c08d338d729e", "rev": "3e18a1ceec7df4514f5a045441e5f98dd003db09",
"revCount": 133, "revCount": 131,
"type": "git", "type": "git",
"url": "https://git.lix.systems/lix-project/nixos-module" "url": "https://git.lix.systems/lix-project/nixos-module"
}, },
@ -737,11 +737,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable" "xwayland-satellite-unstable": "xwayland-satellite-unstable"
}, },
"locked": { "locked": {
"lastModified": 1738502867, "lastModified": 1737627930,
"narHash": "sha256-92cVHcxV7j00BquLo5I4G8EwKzrq2AlHuD3AQV9r+T8=", "narHash": "sha256-oaAatwNVaX36xmI2AKIVu2oG07XJmHq2T+Y66hEprd8=",
"owner": "sodiboo", "owner": "sodiboo",
"repo": "niri-flake", "repo": "niri-flake",
"rev": "cf0be7affb15e21727d137c029146fe7df2bc6d0", "rev": "f79aa307f4bc0bfbabee404e6354fd2a1edfcb01",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -770,11 +770,11 @@
"niri-unstable": { "niri-unstable": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1738479340, "lastModified": 1737623252,
"narHash": "sha256-sutel7RKfu9eIJsjswSzptCIvKELbXQCSldt0PtwSd0=", "narHash": "sha256-orq/c8lOUrZfCHQhfuLEJtMZpfBYhMtGv1Xuz99Pxj0=",
"owner": "YaLTeR", "owner": "YaLTeR",
"repo": "niri", "repo": "niri",
"rev": "d5592743cb04cef3fe50c987b7ba9349c5090dbd", "rev": "128b01e04905d833214f52a3c6fab308bcc15ce0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -832,11 +832,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1738277753, "lastModified": 1737504076,
"narHash": "sha256-iyFcCOk0mmDiv4ut9mBEuMxMZIym3++0qN1rQBg8FW0=", "narHash": "sha256-/B4XJnzYU/6K1ZZOBIgsa3K4pqDJrnC2579c44c+4rI=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "49b807fa7c37568d7fbe2aeaafb9255c185412f9", "rev": "65cc1fa8e36ceff067daf6cfb142331f02f524d3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -883,26 +883,6 @@
"type": "github" "type": "github"
} }
}, },
"nix-ld": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1737361468,
"narHash": "sha256-+CtIrQZ22MOAOHcpg1zbhX/fVkmEc8A8lYVpXAbXElQ=",
"owner": "nix-community",
"repo": "nix-ld",
"rev": "7f15f8622b63b907fef137689f4528a9447d9377",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-ld",
"type": "github"
}
},
"nix2container": { "nix2container": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -919,6 +899,55 @@
"type": "github" "type": "github"
} }
}, },
"nixlib": {
"locked": {
"lastModified": 1736643958,
"narHash": "sha256-tmpqTSWVRJVhpvfSN9KXBvKEXplrwKnSZNAoNPf/S/s=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "1418bc28a52126761c02dd3d89b2d8ca0f521181",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixos-generators": {
"inputs": {
"nixlib": "nixlib",
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1737057290,
"narHash": "sha256-3Pe0yKlCc7EOeq1X/aJVDH0CtNL+tIBm49vpepwL1MQ=",
"owner": "nix-community",
"repo": "nixos-generators",
"rev": "d002ce9b6e7eb467cd1c6bb9aef9c35d191b5453",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixos-generators",
"type": "github"
}
},
"nixos-hardware": {
"locked": {
"lastModified": 1737590910,
"narHash": "sha256-qM/y6Dtpu9Wmf5HqeZajQdn+cS0aljdYQQQnrvx+LJE=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "9368027715d8dde4b84c79c374948b5306fdd2db",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixos-hardware",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1726042813, "lastModified": 1726042813,
@ -967,6 +996,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-rpi": {
"locked": {
"lastModified": 1737645144,
"narHash": "sha256-QPTPf1ccrGTIgKA+/a3MIqrKiUbxhUSRUCQll86kUl8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d4e529a24b66b0341f2b866c5abe3ad8a96be2d7",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d4e529a24b66b0341f2b866c5abe3ad8a96be2d7",
"type": "github"
}
},
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1724316499, "lastModified": 1724316499,
@ -1065,16 +1110,32 @@
}, },
"nixpkgs_5": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1738487426, "lastModified": 1736657626,
"narHash": "sha256-hnB0V0R/aKASnTBeTthFvW60uydv1xswWD4weqSuSfg=", "narHash": "sha256-FWlPMUzp0lkQBdhKlPqtQdqmp+/C+1MBiEytaYfrCTY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2f9e2f85cb14a46410a1399aa9ea7ecf433e422e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_6": {
"locked": {
"lastModified": 1737569578,
"narHash": "sha256-6qY0pk2QmUtBT9Mywdvif0i/CLVgpCjMUn6g9vB+f3M=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8ed1fafea6a613d962f6a84c1153d34dc8b06d83", "rev": "47addd76727f42d351590c905d9d1905ca895b82",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixos-unstable-small", "ref": "nixos-24.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -1102,11 +1163,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1738517265, "lastModified": 1737667561,
"narHash": "sha256-ZzulGUIHZhvcSHx+1ucCJkIcn27r9H+cSzCCpKxJcls=", "narHash": "sha256-BKUapQPTji3V2uxymGq62/UWF1XMjfHvKd565jj1HlA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "56d0c4579e022b44a3e324f722fa23a6f4295798", "rev": "aab2b81792567237c104b90c3936e073d28a9ac6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1125,11 +1186,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1738445998, "lastModified": 1737372689,
"narHash": "sha256-wF2ZcRKF37re161jrXtNyjGMBDsIFtPeDvmIVfp8f7w=", "narHash": "sha256-nH3zK2ki0fd5o5qvbGHxukE4qnOLJa1uCzoDObG5vrE=",
"owner": "NuschtOS", "owner": "NuschtOS",
"repo": "search", "repo": "search",
"rev": "381d84a7422a4dbfef6a9c7703dbaf42036ae1c3", "rev": "570cc17bbc25650eb7d69e4fcda8cfd2f1656922",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1154,29 +1215,6 @@
"type": "github" "type": "github"
} }
}, },
"plasma-manager": {
"inputs": {
"home-manager": [
"home-manager"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1736549395,
"narHash": "sha256-XzwkB62Tt5UYoL1jXiHzgk/qz2fUpGHExcSIbyGTtI0=",
"owner": "nix-community",
"repo": "plasma-manager",
"rev": "a53af7f1514ef4cce8620a9d6a50f238cdedec8b",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "plasma-manager",
"type": "github"
}
},
"pre-commit-hooks": { "pre-commit-hooks": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -1223,11 +1261,11 @@
"rocksdb": { "rocksdb": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1737828695, "lastModified": 1734469478,
"narHash": "sha256-8Ev6zzhNPU798JNvU27a7gj5X+6SDG3jBweUkQ59DbA=", "narHash": "sha256-IcQ4N8xADYal79K+ONmNq4RLlIwdgUqgrVzgNgiIaG8=",
"owner": "girlbossceo", "owner": "girlbossceo",
"repo": "rocksdb", "repo": "rocksdb",
"rev": "a4d9230dcc9d03be428b9a728133f8f646c0065c", "rev": "8b4808e7de2fbb5d119d8d72cdca76d8ab84bc47",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1250,12 +1288,13 @@
"lix": "lix", "lix": "lix",
"lix-module": "lix-module", "lix-module": "lix-module",
"niri": "niri", "niri": "niri",
"nix-ld": "nix-ld", "nixos-generators": "nixos-generators",
"nixpkgs": "nixpkgs_5", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_6",
"nixpkgs-garage": "nixpkgs-garage", "nixpkgs-garage": "nixpkgs-garage",
"nixpkgs-rpi": "nixpkgs-rpi",
"nixvim": "nixvim", "nixvim": "nixvim",
"nvim-github-theme": "nvim-github-theme", "nvim-github-theme": "nvim-github-theme",
"plasma-manager": "plasma-manager",
"rust-overlay": "rust-overlay", "rust-overlay": "rust-overlay",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"treefmt": "treefmt" "treefmt": "treefmt"
@ -1264,11 +1303,11 @@
"rust-analyzer-src": { "rust-analyzer-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1737728869, "lastModified": 1736690231,
"narHash": "sha256-U4pl3Hi0lT6GP4ecN3q9wdD2sdaKMbmD/5NJ1NdJ9AM=", "narHash": "sha256-g9gyxX+F6CrkT5gRIMKPnCPom0o9ZDzYnzzeNF86D6Q=",
"owner": "rust-lang", "owner": "rust-lang",
"repo": "rust-analyzer", "repo": "rust-analyzer",
"rev": "6e4c29f7ce18cea7d3d31237a4661ab932eab636", "rev": "8364ef299790cb6ec22b9e09e873c97dbe9f2cb5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1285,11 +1324,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1738463259, "lastModified": 1737599167,
"narHash": "sha256-+5QJpiRpkh1ALvKcMEpPyGwkPZfaynsYF4SFdNW5UfQ=", "narHash": "sha256-S2rHCrQWCDVp63XxL/AQbGr1g5M8Zx14C7Jooa4oM8o=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "e2bb8c205a069514535f083742c7da8dfb6e02b9", "rev": "38374302ae9edf819eac666d1f276d62c712dd06",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1305,11 +1344,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1738291974, "lastModified": 1737411508,
"narHash": "sha256-wkwYJc8cKmmQWUloyS9KwttBnja2ONRuJQDEsmef320=", "narHash": "sha256-j9IdflJwRtqo9WpM0OfAZml47eBblUHGNQTe62OUqTw=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "4c1251904d8a08c86ac6bc0d72cc09975e89aef7", "rev": "015d461c16678fc02a2f405eb453abb509d4e1d4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1355,11 +1394,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1738070913, "lastModified": 1737483750,
"narHash": "sha256-j6jC12vCFsTGDmY2u1H12lMr62fnclNjuCtAdF1a4Nk=", "narHash": "sha256-5An1wq5U8sNycOBBg3nsDDgpwBmR9liOpDGlhliA6Xo=",
"owner": "numtide", "owner": "numtide",
"repo": "treefmt-nix", "repo": "treefmt-nix",
"rev": "bebf27d00f7d10ba75332a0541ac43676985dea3", "rev": "f2cc121df15418d028a59c9737d38e3a90fbaf8f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1388,11 +1427,11 @@
"xwayland-satellite-unstable": { "xwayland-satellite-unstable": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1737837494, "lastModified": 1736487362,
"narHash": "sha256-wIMowP8Juas4ZwMRcpc+58sZ0kKTDu8fm13THPmv/F8=", "narHash": "sha256-4kGoOA7FgK9N2mzS+TFEn41kUUNY6KwdiA/0rqlr868=",
"owner": "Supreeeme", "owner": "Supreeeme",
"repo": "xwayland-satellite", "repo": "xwayland-satellite",
"rev": "3944c9a0e40e5629f16ad023bbc90dac80d35a0f", "rev": "8f55e27f63a749881c4bbfbb6b1da028342a91d1",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -2,7 +2,7 @@
description = "cy's flake"; description = "cy's flake";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small"; nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
sops-nix = { sops-nix = {
url = "github:Mic92/sops-nix"; url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -68,15 +68,9 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-compat.follows = "flake-compat"; inputs.flake-compat.follows = "flake-compat";
}; };
nix-ld = { nixos-hardware.url = "github:nixos/nixos-hardware";
url = "github:nix-community/nix-ld"; nixpkgs-rpi.url = "github:nixos/nixpkgs/d4e529a24b66b0341f2b866c5abe3ad8a96be2d7";
inputs.nixpkgs.follows = "nixpkgs"; nixos-generators.url = "github:nix-community/nixos-generators";
};
plasma-manager = {
url = "github:nix-community/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
nixpkgs-garage.url = "github:cything/nixpkgs/garage-module"; # unmerged PR nixpkgs-garage.url = "github:cything/nixpkgs/garage-module"; # unmerged PR
@ -98,7 +92,6 @@
"https://nix-community.cachix.org" "https://nix-community.cachix.org"
"https://cache.garnix.io" "https://cache.garnix.io"
"https://cything.cachix.org" "https://cything.cachix.org"
"https://aseipp-nix-cache.global.ssl.fastly.net"
]; ];
extra-trusted-public-keys = [ extra-trusted-public-keys = [
"central:uWhjva6m6dhC2hqNisjn2hXGvdGBs19vPkA1dPEuwFg=" "central:uWhjva6m6dhC2hqNisjn2hXGvdGBs19vPkA1dPEuwFg="
@ -135,6 +128,9 @@
... ...
}: }:
{ {
# make pkgs available to `perSystem`
_module.args.pkgs = inputs'.nixpkgs.legacyPackages;
treefmt = { treefmt = {
projectRootFile = "flake.nix"; projectRootFile = "flake.nix";
programs.nixfmt.enable = true; programs.nixfmt.enable = true;
@ -145,16 +141,16 @@
settings.global.excludes = [ settings.global.excludes = [
"secrets/*" "secrets/*"
"**/*.png" # tries to format a png file "**/*.png" # tries to format a png file??
]; ];
}; };
}; };
flake = flake =
let let
pkgs = import nixpkgs { pkgsFor = system: import nixpkgs {
config.allowUnfree = true; config.allowUnfree = true;
system = "x86_64-linux"; system = system;
overlays = [ overlays = [
inputs.niri.overlays.niri inputs.niri.overlays.niri
inputs.rust-overlay.overlays.default inputs.rust-overlay.overlays.default
@ -171,22 +167,21 @@
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ modules = [
{ {
nixpkgs = { inherit pkgs; }; nixpkgs.pkgs = pkgsFor "x86_64-linux";
} }
./hosts/ytnix ./hosts/ytnix
inputs.sops-nix.nixosModules.sops inputs.sops-nix.nixosModules.sops
./modules ./modules
inputs.lanzaboote.nixosModules.lanzaboote inputs.lanzaboote.nixosModules.lanzaboote
inputs.niri.nixosModules.niri inputs.niri.nixosModules.niri
inputs.lix-module.nixosModules.default # inputs.lix-module.nixosModules.default # broken
inputs.nix-ld.nixosModules.nix-ld
]; ];
}; };
chunk = lib.nixosSystem { chunk = lib.nixosSystem {
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ modules = [
{ {
nixpkgs = { inherit pkgs; }; nixpkgs.pkgs = pkgsFor "x86_64-linux";
disabledModules = [ disabledModules = [
"services/web-servers/garage.nix" "services/web-servers/garage.nix"
]; ];
@ -202,7 +197,7 @@
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ modules = [
{ {
nixpkgs = { inherit pkgs; }; nixpkgs.pkgs = pkgsFor "x86_64-linux";
} }
./hosts/titan ./hosts/titan
disko.nixosModules.disko disko.nixosModules.disko
@ -210,6 +205,19 @@
./modules ./modules
]; ];
}; };
pancake = lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [
{
nixpkgs.pkgs = pkgsFor "aarch64-linux";
}
inputs.nixos-hardware.nixosModules.raspberry-pi-3
inputs.nixos-generators.nixosModules.all-formats
./hosts/pancake
./modules
];
};
}; };
homeConfigurations = homeConfigurations =
let let
@ -217,18 +225,17 @@
in in
{ {
"yt@ytnix" = lib.homeManagerConfiguration { "yt@ytnix" = lib.homeManagerConfiguration {
inherit pkgs; pkgs = pkgsFor "x86_64-linux";
extraSpecialArgs = { inherit inputs; }; extraSpecialArgs = { inherit inputs; };
modules = [ modules = [
./home/yt/ytnix.nix ./home/yt/ytnix.nix
inputs.nixvim.homeManagerModules.nixvim inputs.nixvim.homeManagerModules.nixvim
inputs.niri.homeModules.config inputs.niri.homeModules.config
inputs.plasma-manager.homeManagerModules.plasma-manager
]; ];
}; };
"yt@chunk" = lib.homeManagerConfiguration { "yt@chunk" = lib.homeManagerConfiguration {
inherit pkgs; pkgs = pkgsFor "x86_64-linux";
extraSpecialArgs = { inherit inputs; }; extraSpecialArgs = { inherit inputs; };
modules = [ modules = [
./home/yt/chunk.nix ./home/yt/chunk.nix
@ -237,7 +244,7 @@
}; };
"codespace@codespace" = lib.homeManagerConfiguration { "codespace@codespace" = lib.homeManagerConfiguration {
inherit pkgs; pkgs = pkgsFor "x86_64-linux";
extraSpecialArgs = { inherit inputs; }; extraSpecialArgs = { inherit inputs; };
modules = [ modules = [
./home/yt/codespace.nix ./home/yt/codespace.nix

View file

@ -58,7 +58,6 @@
"ctrl+f2" = "detach_tab"; "ctrl+f2" = "detach_tab";
# hints # hints
# > basically means the preceding key is a prefix (think tmux)
"kitty_mod+o>o" = "open_url_with_hints"; "kitty_mod+o>o" = "open_url_with_hints";
"kitty_mod+o>p" = "kitten hints --type path --program -"; "kitty_mod+o>p" = "kitten hints --type path --program -";
"kitty_mod+o>n" = "kitten hints --type line --program -"; "kitty_mod+o>n" = "kitten hints --type line --program -";
@ -67,6 +66,4 @@
"kitty_mod+o>l" = "kitten hints --type linenum"; "kitty_mod+o>l" = "kitten hints --type linenum";
}; };
}; };
programs.zsh.shellAliases."ssh" = "kitten ssh";
} }

View file

@ -50,7 +50,7 @@ in
natural-scroll = true; natural-scroll = true;
click-method = "clickfinger"; click-method = "clickfinger";
}; };
warp-mouse-to-focus = false; warp-mouse-to-focus = true;
focus-follows-mouse.enable = false; focus-follows-mouse.enable = false;
}; };
@ -71,25 +71,19 @@ in
}; };
window-rules = [ window-rules = [
{
matches = [
{ app-id = "mpv"; }
{ app-id = "Bitwarden"; }
{
app-id = "ghidra-Ghidra";
# pop-up windows
title = "^win(.*)";
}
];
open-floating = true;
}
{ {
matches = [ matches = [
{ {
app-id = "anki"; app-id = "anki";
title = "Add"; title = "Add";
} }
{ app-id = "mpv"; }
{ app-id = "Bitwarden"; }
]; ];
open-floating = true;
}
{
matches = [ { app-id = "anki"; } ];
default-column-width.proportion = .25; default-column-width.proportion = .25;
} }
{ {
@ -102,7 +96,6 @@ in
{ app-id = "com.mitchellh.ghostt"; } { app-id = "com.mitchellh.ghostt"; }
{ app-id = "org.kde.okular"; } { app-id = "org.kde.okular"; }
{ app-id = "kitty"; } { app-id = "kitty"; }
{ app-id = "VSCodium"; }
]; ];
default-column-width.proportion = .5; default-column-width.proportion = .5;
} }

View file

@ -24,7 +24,7 @@
extraPlugins = [ extraPlugins = [
(pkgs.vimUtils.buildVimPlugin { (pkgs.vimUtils.buildVimPlugin {
name = "github-theme"; name = "gitub-theme";
src = inputs.nvim-github-theme; src = inputs.nvim-github-theme;
}) })
]; ];
@ -71,41 +71,6 @@
key = "<C-e>"; key = "<C-e>";
mode = "i"; mode = "i";
} }
# quick chat with copilot
{
key = "<leader>ccq";
action.__raw = ''
function()
local input = vim.fn.input("Quick chat: ")
if input ~= "" then
require("CopilotChat").ask(input, { selection = require("CopilotChat.select").buffer })
end
end
'';
mode = [
"n"
"v"
];
}
# ask perplexity a quick question
{
key = "<leader>ccs";
action.__raw = ''
function()
local input = vim.fn.input("Perplexity: ")
if input ~= "" then
require("CopilotChat").ask(input, {
agent = "perplexityai",
selection = false,
})
end
end
'';
mode = [
"n"
"v"
];
}
]; ];
plugins.cmp = { plugins.cmp = {
@ -206,11 +171,7 @@
plugins.treesitter = { plugins.treesitter = {
enable = true; enable = true;
nixGrammars = true; nixGrammars = true;
settings = { settings.indent.enable = true;
indent.enable = true;
auto_install = true;
highlight.enable = true;
};
}; };
plugins.fzf-lua = { plugins.fzf-lua = {
enable = true; enable = true;
@ -232,13 +193,6 @@
settings.current_line_blame = true; settings.current_line_blame = true;
}; };
plugins.copilot-chat = {
enable = true;
settings = {
model = "claude-3.5-sonnet";
};
};
plugins.cmp-buffer.enable = true; plugins.cmp-buffer.enable = true;
plugins.cmp-emoji.enable = true; plugins.cmp-emoji.enable = true;
plugins.cmp-nvim-lsp.enable = true; plugins.cmp-nvim-lsp.enable = true;

View file

@ -1,80 +0,0 @@
{ ... }:
{
programs.plasma = {
enable = true;
overrideConfig = true;
immutableByDefault = true;
workspace = {
lookAndFeel = "org.ide.breezedark.desktop";
cursor = {
theme = "Bibata-Modern-Classic";
size = 23;
};
};
fonts = {
general = {
family = "IBM Plex Mono";
pointSize = 12;
};
};
input.keyboard = {
numlockOnStartup = "on";
options = [ "ctrl:nocaps" ];
};
# Meta key is actually the Super key in KDE
hotkeys.commands = {
"launch-terminal" = {
name = "launch terminal";
key = "Meta+Return";
command = "kitty";
};
"launch-browser" = {
name = "launch browser";
key = "Meta+B";
command = "librewolf";
};
};
shortcuts = {
kwin = {
"Switch Window Down" = "Meta+J";
"Switch Window Left" = "Meta+H";
"Switch Window Right" = "Meta+L";
"Switch Window Up" = "Meta+K";
"Window Quick Tile Down" = "Meta+Shift+J";
"Window Quick Tile Left" = "Meta+Shift+H";
"Window Quick Tile Right" = "Meta+Shift+L";
"Window Quick Tile Up" = "Meta+Shift+K";
"Window Close" = "Meta+Ctrl+Q";
"Window Maximize" = "Meta+W";
"Window Minimize" = "Meta+Shift+-";
"Window Fullscreen" = "Meta+F";
"Window Shrink Horizontal" = "Meta+-";
};
ksmserver = {
"Lock Session" = [
"Screensaver"
"Meta+Ctrl+L"
];
};
};
configFile = {
# save RAM
baloofilerc."Basic Settings"."Indexing-Enabled" = false;
};
# looks like KDE overrides services.logind settings
powerdevil.AC = {
whenLaptopLidClosed = "hibernate";
};
powerdevil.battery = {
whenLaptopLidClosed = "hibernate";
};
};
}

View file

@ -8,33 +8,11 @@
mutableExtensionsDir = false; mutableExtensionsDir = false;
extensions = with pkgs.vscode-extensions; [ extensions = with pkgs.vscode-extensions; [
vscodevim.vim vscodevim.vim
jnoortheen.nix-ide jnoortheen.nix-ide # nix language support
editorconfig.editorconfig editorconfig.editorconfig # editorconfig
github.github-vscode-theme dracula-theme.theme-dracula # color scheme
github.copilot tomoki1207.pdf # pdf viewer
rust-lang.rust-analyzer yzhang.markdown-all-in-one # markdown tools
]; ];
userSettings = {
"workbench.colorTheme" = "GitHub Dark Default";
"files.autoSave" = "afterDelay";
"nix.enableLanguageServer" = true;
"nix.serverPath" = "nixd";
"editor.fontFamily" = "IBM Plex Mono";
"editor.fontSize" = 16;
"editor.wordWrap" = "on";
# vim mode settings
"vim.handleKeys" = {
"<C-b>" = false; # file tree toggle
};
"vim.normalModeKeyBindings" = [
{
"before" = [ ";" ];
"after" = [ ":" ];
"silent" = true;
}
];
"workbench.startupEditor" = "none";
};
}; };
} }

View file

@ -44,11 +44,7 @@
rebase = true; rebase = true;
autostash = true; autostash = true;
}; };
merge = { merge.tool = "vimdiff";
tool = "vimdiff";
keepBackup = false;
prompt = false;
};
rebase = { rebase = {
stat = true; stat = true;
autoStash = true; autoStash = true;
@ -56,10 +52,12 @@
updateRefs = true; updateRefs = true;
}; };
help.autocorrect = 1; help.autocorrect = 1;
"mergetool \"vimdiff\"".cmd = "nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'"; mergetool = {
prompt = false;
path = "nvim-open";
};
}; };
}; };
programs.ripgrep.enable = true; programs.ripgrep.enable = true;
programs.man.generateCaches = true; programs.man.generateCaches = true;
programs.fd.enable = true;
} }

View file

@ -1,6 +1,5 @@
{ {
pkgs, pkgs,
lib,
... ...
}: }:
{ {
@ -10,8 +9,6 @@
../niri ../niri
../irssi.nix ../irssi.nix
../kitty.nix ../kitty.nix
../vscode.nix
../plasma.nix
]; ];
home = { home = {
username = "yt"; username = "yt";
@ -22,32 +19,32 @@
systemd.user.startServices = "sd-switch"; systemd.user.startServices = "sd-switch";
# keep this commented when using plasma qt = {
# otherwise "system settings" in KDE will not function enable = true;
# qt = { platformTheme.name = "kde";
# enable = true; style.name = "breeze-dark";
# platformTheme.name = "kde"; style.package = pkgs.kdePackages.breeze;
# style.name = "breeze-dark"; };
# style.package = pkgs.kdePackages.breeze;
# };
# this one too gtk = {
# gtk = { enable = true;
# enable = true; cursorTheme = {
# theme = { package = pkgs.bibata-cursors;
# package = pkgs.adw-gtk3; name = "Bibata-Modern";
# name = "adw-gtk3-dark"; };
# }; theme = {
# iconTheme = { package = pkgs.adw-gtk3;
# package = pkgs.adwaita-icon-theme; name = "adw-gtk3-dark";
# name = "Adwaita"; };
# }; iconTheme = {
# }; package = pkgs.adwaita-icon-theme;
name = "Adwaita";
};
};
home.pointerCursor = { home.pointerCursor = {
package = pkgs.bibata-cursors; package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic"; name = "Bibata-Modern";
size = 23;
gtk.enable = true; gtk.enable = true;
x11.enable = true; x11.enable = true;
}; };
@ -109,21 +106,6 @@
github-cli github-cli
fuzzel fuzzel
nixpkgs-review nixpkgs-review
just
hugo
ghidra-bin
sequoia
sccache
awscli2
lldb
(cutter.withPlugins (p: with p; [
rz-ghidra
jsdec
sigdb
]))
ida-free
patchelf
radare2
]; ];
programs.waybar.enable = true; programs.waybar.enable = true;
@ -161,36 +143,10 @@
''; '';
}; };
services.gnome-keyring.enable = true;
programs.direnv = { programs.direnv = {
enable = true; enable = true;
nix-direnv.enable = true; nix-direnv.enable = true;
}; };
programs.git.extraConfig = {
user = {
signingKey = "~/.ssh/id.key";
};
gpg.format = "ssh";
commit.gpgsign = true;
core.sshCommand = "ssh -i ~/.ssh/id.key";
};
home.sessionVariables = {
# to make ghidra work on xwayland
_JAVA_AWT_WM_NONREPARENTING = 1;
# sccache stuff
RUSTC_WRAPPER = "${lib.getExe pkgs.sccache}";
SCCACHE_BUCKET = "sccache";
SCCACHE_REGION = "earth";
SCCACHE_ENDPOINT = "https://sccache.s3.cy7.sh";
SCCACHE_ALLOW_CORE_DUMPS = "true";
SCCACHE_S3_USE_SSL = "true";
SCCACHE_CACHE_MULTIARCH = "true";
SCCACHE_LOG_LEVEL = "warn";
AWS_DEFAULT_REGION = "earth";
AWS_ENDPOINT_URL = "https://s3.cy7.sh";
AWS_ACCESS_KEY_ID = "$(cat /run/secrets/aws/key_id)";
AWS_SECRET_ACCESS_KEY = "$(cat /run/secrets/aws/key_secret)";
};
} }

View file

@ -39,6 +39,11 @@
initExtra = '' initExtra = ''
# disable control+s to pause terminal # disable control+s to pause terminal
unsetopt FLOW_CONTROL unsetopt FLOW_CONTROL
# manually integrate fzf cause we need to make sure zsh-vi-mode
# won't override C-r
function zvm_after_init() {
eval "$(${pkgs.fzf}/bin/fzf --zsh)"
}
# useful emacs mode bindings # useful emacs mode bindings
bindkey -M viins "^E" end-of-line bindkey -M viins "^E" end-of-line

89
hosts/chunk/Caddyfile Normal file
View file

@ -0,0 +1,89 @@
{
acme_ca https://acme.zerossl.com/v2/DV90
acme_eab {
key_id {$EAB_KEY_ID}
mac_key {$EAB_MAC_KEY}
}
}
(common) {
encode zstd gzip
header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
}
git.cything.io {
import common
# wrap in route so things are evaluated in the order written
route {
# rewrite gitlab URIs to make it work with forgejo
uri path_regexp /-/ /
uri replace /blob/ /src/
redir https://git.cy7.sh{uri} permanent
}
}
git.cy7.sh {
import common
reverse_proxy localhost:3000
}
rss.cy7.sh {
import common
reverse_proxy localhost:8080
}
photos.cy7.sh {
import common
reverse_proxy localhost:2283
}
chat.cything.io {
import common
reverse_proxy localhost:8448
}
pass.cy7.sh {
import common
reverse_proxy localhost:8081
}
dns.cything.io {
import common
reverse_proxy localhost:8082
}
pad.cything.io {
import common
reverse_proxy localhost:8085
}
red.cything.io {
import common
reverse_proxy localhost:8087
}
grafana.cything.io {
import common
reverse_proxy localhost:8088
}
element.cything.io {
import common
reverse_proxy localhost:8089
}
cache.cything.io {
import common
reverse_proxy localhost:8090
}
s3.cy7.sh {
import common
reverse_proxy localhost:3900
}
admin.s3.cy7.sh {
import common
reverse_proxy localhost:3903
}

View file

@ -21,9 +21,4 @@
]; ];
}; };
}; };
services.caddy.virtualHosts."dns.cything.io".extraConfig = ''
import common
reverse_proxy localhost:8082
'';
} }

View file

@ -31,9 +31,4 @@
}; };
}; };
}; };
services.caddy.virtualHosts."cache.cything.io".extraConfig = ''
import common
reverse_proxy localhost:8090
'';
} }

View file

@ -10,9 +10,4 @@
allow_check_for_updates = true; allow_check_for_updates = true;
}; };
}; };
services.caddy.virtualHosts."chat.cything.io".extraConfig = ''
import common
reverse_proxy localhost:8448
'';
} }

View file

@ -1,4 +1,6 @@
{ {
config,
lib,
pkgs, pkgs,
... ...
}: }:
@ -73,11 +75,8 @@
}; };
}; };
boot = { boot.loader.grub.enable = true;
loader.grub.enable = true; boot.loader.grub.device = "/dev/vda";
loader.grub.device = "/dev/vda";
kernelPackages = pkgs.linuxPackages_latest;
};
system.stateVersion = "24.05"; system.stateVersion = "24.05";
@ -181,13 +180,11 @@
programs.gnupg.agent.enable = true; programs.gnupg.agent.enable = true;
programs.git.enable = true; programs.git.enable = true;
my.caddy.enable = true; services.caddy = {
services.caddy.virtualHosts."cy7.sh" = { enable = true;
serverAliases = [ "www.cy7.sh" ]; configFile = ./Caddyfile;
extraConfig = '' environmentFile = config.sops.secrets."caddy/env".path;
import common logFormat = lib.mkForce "level INFO";
redir https://cything.io temporary
'';
}; };
# container stuff # container stuff

View file

@ -7,9 +7,4 @@
port = 8112; port = 8112;
}; };
}; };
services.caddy.virtualHosts."t.cy7.sh".extraConfig = ''
import common
reverse_proxy localhost:8112
'';
} }

View file

@ -25,9 +25,4 @@
${pkgs.podman}/bin/podman network create element-net ${pkgs.podman}/bin/podman network create element-net
''; '';
}; };
services.caddy.virtualHosts."element.cy7.sh".extraConfig = ''
import common
reverse_proxy localhost:8089
'';
} }

View file

@ -1,8 +1,7 @@
{ pkgs, ... }: { ... }:
{ {
services.forgejo = { services.forgejo = {
enable = true; enable = true;
package = pkgs.forgejo; # uses forgejo-lts by default
user = "git"; user = "git";
group = "git"; group = "git";
settings = { settings = {
@ -17,7 +16,7 @@
service.DISABLE_REGISTRATION = true; service.DISABLE_REGISTRATION = true;
ui = { ui = {
AMBIGUOUS_UNICODE_DETECTION = false; AMBIGUOUS_UNICODE_DETECTION = false;
DEFAULT_THEME = "forgejo-dark"; DEFAULT_THEME = "gitea-dark";
}; };
actions.ENABLED = false; actions.ENABLED = false;
repository.ENABLE_PUSH_CREATE_USER = true; repository.ENABLE_PUSH_CREATE_USER = true;
@ -30,24 +29,4 @@
name = "git"; name = "git";
}; };
}; };
services.caddy.virtualHosts."git.cy7.sh".extraConfig = ''
import common
# renamed repo
uri replace /cy/infra /cy/nixos-config
reverse_proxy localhost:3000
'';
services.caddy.virtualHosts."git.cything.io".extraConfig = ''
import common
# wrap in route so things are evaluated in the order written
route {
# rewrite gitlab URIs to make it work with forgejo
uri path_regexp /-/ /
uri replace /blob/ /src/
redir https://git.cy7.sh{uri} permanent
}
'';
} }

View file

@ -8,12 +8,6 @@
s3_api = { s3_api = {
s3_region = "earth"; s3_region = "earth";
api_bind_addr = "[::]:3900"; api_bind_addr = "[::]:3900";
root_domain = ".s3.cy7.sh";
};
s3_web = {
bind_addr = "[::]:3902";
root_domain = ".web.s3.cy7.sh";
index = "index.html";
}; };
admin.api_bind_addr = "[::]:3903"; admin.api_bind_addr = "[::]:3903";
rpc_bind_addr = "[::]:3901"; rpc_bind_addr = "[::]:3901";
@ -22,22 +16,4 @@
}; };
environmentFile = config.sops.secrets."garage/env".path; environmentFile = config.sops.secrets."garage/env".path;
}; };
services.caddy.virtualHosts = {
"s3.cy7.sh" = {
serverAliases = [ "*.s3.cy7.sh" ];
extraConfig = ''
import common
reverse_proxy localhost:3900
'';
};
"*.web.s3.cy7.sh".extraConfig = ''
import common
reverse_proxy localhost:3902
'';
"admin.s3.cy7.sh".extraConfig = ''
import common
reverse_proxy localhost:3903
'';
};
} }

View file

@ -31,9 +31,4 @@
} }
]; ];
}; };
services.caddy.virtualHosts."grafana.cy7.sh".extraConfig = ''
import common
reverse_proxy localhost:8088
'';
} }

View file

@ -16,9 +16,4 @@
protocolUseSSL = true; protocolUseSSL = true;
}; };
}; };
services.caddy.virtualHosts."pad.cy7.sh".extraConfig = ''
import common
reverse_proxy localhost:8085
'';
} }

View file

@ -95,9 +95,4 @@ in
${pkgs.podman}/bin/podman network create immich-net ${pkgs.podman}/bin/podman network create immich-net
''; '';
}; };
services.caddy.virtualHosts."photos.cy7.sh".extraConfig = ''
import common
reverse_proxy localhost:2283
'';
} }

View file

@ -9,9 +9,4 @@
FORCE_REFRESH_INTERVAL = 0; # don't rate limit me FORCE_REFRESH_INTERVAL = 0; # don't rate limit me
}; };
}; };
services.caddy.virtualHosts."rss.cy7.sh".extraConfig = ''
import common
reverse_proxy localhost:8080
'';
} }

View file

@ -10,9 +10,4 @@
REDLIB_ROBOTS_DISABLE_INDEXING = "on"; REDLIB_ROBOTS_DISABLE_INDEXING = "on";
}; };
}; };
services.caddy.virtualHosts."red.cy7.sh".extraConfig = ''
import common
reverse_proxy localhost:8087
'';
} }

View file

@ -1,12 +1,8 @@
{ config, ... }: { config, ... }: {
{
services.tailscale = { services.tailscale = {
enable = true; enable = true;
authKeyFile = config.sops.secrets."tailscale/auth".path; authKeyFile = config.sops.secrets."tailscale/auth".path;
extraUpFlags = [ extraUpFlags = [ "--advertise-exit-node" ];
"--advertise-exit-node"
"--accept-dns=false"
];
useRoutingFeatures = "server"; useRoutingFeatures = "server";
openFirewall = true; openFirewall = true;
}; };

View file

@ -10,9 +10,4 @@
DATABASE_URL = "postgresql://vaultwarden:vaultwarden@127.0.0.1:5432/vaultwarden"; DATABASE_URL = "postgresql://vaultwarden:vaultwarden@127.0.0.1:5432/vaultwarden";
}; };
}; };
services.caddy.virtualHosts."pass.cy7.sh".extraConfig = ''
import common
reverse_proxy localhost:8081
'';
} }

View file

@ -9,21 +9,6 @@
"root" "root"
"@wheel" "@wheel"
]; ];
trusted-public-keys = [
"central:uWhjva6m6dhC2hqNisjn2hXGvdGBs19vPkA1dPEuwFg="
"niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
"cything.cachix.org-1:xqW1W5NNL+wrM9wfSELb0MLj/harD2ZyB4HbdaMyvPI="
];
substituters = [
"https://aseipp-nix-cache.global.ssl.fastly.net"
"https://cache.cything.io/central"
"https://niri.cachix.org"
"https://nix-community.cachix.org"
"https://cache.garnix.io"
"https://cything.cachix.org"
];
}; };
channel.enable = false; channel.enable = false;
optimise = { optimise = {
@ -37,8 +22,8 @@
options = "--delete-older-than 14d"; options = "--delete-older-than 14d";
}; };
extraOptions = '' extraOptions = ''
builders-use-substitutes = true builders-use-substitutes = true
''; '';
registry.nixpkgs.flake = inputs.nixpkgs; registry.nixpkgs.flake = inputs.nixpkgs;
}; };
time.timeZone = "America/Toronto"; time.timeZone = "America/Toronto";

70
hosts/pancake/default.nix Normal file
View file

@ -0,0 +1,70 @@
{
modulesPath,
pkgs,
lib,
inputs,
...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
(modulesPath + "/profiles/qemu-guest.nix")
../common.nix
# ./hardware-configuration.nix
../zsh.nix
];
services.openssh = {
enable = true;
settings.PasswordAuthentication = false;
};
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPdhAQYy0+vS+QmyCd0MAbqbgzyMGcsuuFyf6kg2yKge yt@ytlinux"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINyn2+OoRN4nExti+vFQ1NHEZip0slAoCH9C5/FzvgZD yt@ytnix"
];
system.stateVersion = "24.05";
environment.systemPackages = with pkgs; [
curl
git
];
# network stuff
networking.hostName = "pancake";
networking.firewall = {
enable = true;
allowedTCPPorts = [
22
80
443
];
allowedUDPPorts = [
443
];
};
networking.wireless.enable = true;
networking.wireless.networks = {
"36 Halsey" = {
psk = "Canada2022";
};
"cy" = {
psk = "12345678";
};
};
hardware.enableRedistributableFirmware = true;
users.users.yt.extraGroups = [
"wheel"
];
security.sudo.enable = true;
security.sudo.wheelNeedsPassword = false;
users.users.root.initialHashedPassword = "";
users.users.yt.initialHashedPassword = "";
# remove this after https://github.com/NixOS/nixpkgs/pull/375165 lands on unstable
# boot.kernelPackages = lib.mkForce inputs.nixpkgs-rpi.legacyPackages.aarch64-linux.linuxKernel.packages.linux_rpi3;
}

View file

@ -0,0 +1,38 @@
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/cb6f0e18-5add-4177-ab98-e9f0235e06b3";
fsType = "ext4";
};
fileSystems."/boot/firmware" =
{ device = "/dev/disk/by-uuid/D3E6-3F09";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.eth0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
}

View file

@ -13,16 +13,14 @@
cything.io { cything.io {
import common import common
reverse_proxy localhost:8084
header /.well-known/matrix/* Content-Type application/json header /.well-known/matrix/* Content-Type application/json
header /.well-known/matrix/* Access-Control-Allow-Origin * header /.well-known/matrix/* Access-Control-Allow-Origin *
header /.well-known/matrix/* Access-Control-Allow-Methods GET,POST,PUT,DELETE,OPTIONS,PATCH,HEAD header /.well-known/matrix/* Access-Control-Allow-Methods GET,POST,PUT,DELETE,OPTIONS,PATCH,HEAD
header /.well-known/matrix/* Access-Control-Allow-Headers X-Requested-With,Content-Type,Authorization,Origin,Accept header /.well-known/matrix/* Access-Control-Allow-Headers X-Requested-With,Content-Type,Authorization,Origin,Accept
route { respond /.well-known/matrix/server {"m.server":"chat.cything.io:443"}
respond /.well-known/matrix/server {"m.server":"chat.cything.io:443"} respond /.well-known/matrix/client {"m.server":{"base_url":"https://chat.cything.io"},"m.homeserver":{"base_url":"https://chat.cything.io"},"org.matrix.msc3575.proxy":{"url":"https://chat.cything.io"}}
respond /.well-known/matrix/client {"m.server":{"base_url":"https://chat.cything.io"},"m.homeserver":{"base_url":"https://chat.cything.io"},"org.matrix.msc3575.proxy":{"url":"https://chat.cything.io"}}
redir https://cy7.sh/posts{uri} permanent
}
} }
www.cything.io { www.cything.io {

View file

@ -36,14 +36,6 @@
"tailscale/auth" = { "tailscale/auth" = {
sopsFile = ../../secrets/services/tailscale.yaml; sopsFile = ../../secrets/services/tailscale.yaml;
}; };
"aws/key_id" = {
sopsFile = ../../secrets/yt/aws.yaml;
owner = "yt";
};
"aws/key_secret" = {
sopsFile = ../../secrets/yt/aws.yaml;
owner = "yt";
};
}; };
boot = { boot = {
@ -174,8 +166,6 @@
haskell-language-server haskell-language-server
ghc ghc
sbctl # secure boot sbctl # secure boot
wine-wayland
wine64
]; ];
environment.sessionVariables = { environment.sessionVariables = {
@ -189,12 +179,6 @@
services.displayManager = { services.displayManager = {
enable = true; enable = true;
autoLogin.user = "yt"; autoLogin.user = "yt";
defaultSession = "plasma";
sddm = {
enable = true;
wayland.enable = true;
autoNumlock = true;
};
}; };
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
@ -284,56 +268,12 @@
programs.virt-manager.enable = true; programs.virt-manager.enable = true;
services.usbmuxd.enable = true; services.usbmuxd.enable = true;
programs.nix-ld.dev = { programs.nix-ld.enable = true;
enable = true;
# nix run github:thiagokokada/nix-alien#nix-alien-find-libs ./<binary>
libraries = with pkgs; [
mesa
extest
stdenv.cc.cc
libGL
fontconfig
libxkbcommon
zlib
libxml2
dbus
freetype
egl-wayland
waylandpp
cairo
xcb-util-cursor
libplist
p11-kit
kdePackages.qtwayland
qt6.qtwayland
libsForQt5.qt5.qtwayland
xorg.libX11
xorg.libxcb
xorg.xcbutilwm
xorg.xcbutilimage
xorg.xcbutilkeysyms
xorg.xcbutilrenderutil
xorg.libXScrnSaver
xorg.libXcomposite
xorg.libXcursor
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXi
xorg.libXrandr
xorg.libXrender
xorg.libXtst
xorg.libxkbfile
xorg.libxshmfence
];
};
programs.evolution.enable = true; programs.evolution.enable = true;
xdg.portal = { xdg.portal = {
enable = true; enable = true;
wlr.enable = true; wlr.enable = true;
xdgOpenUsePortal = true;
extraPortals = with pkgs; [ xdg-desktop-portal-gtk xdg-desktop-portal-gnome ];
}; };
programs.obs-studio = { programs.obs-studio = {
@ -384,15 +324,4 @@
services.udev.extraHwdb = '' services.udev.extraHwdb = ''
SUBSYSTEM=="usb", SYSFS{idVendor}=="090c", SYSFS{idProduct}=="1000", ACTION=="add", GROUP="users", MODE="0664" SUBSYSTEM=="usb", SYSFS{idVendor}=="090c", SYSFS{idProduct}=="1000", ACTION=="add", GROUP="users", MODE="0664"
''; '';
programs.ssh = {
askPassword = "${pkgs.seahorse}/libexec/seahorse/ssh-askpass";
startAgent = true;
enableAskPassword = true;
};
services.desktopManager.plasma6 = {
enable = true;
enableQt5Integration = true;
};
} }

View file

@ -1,5 +1,4 @@
{ config, ... }: { config, ... }: {
{
services.tailscale = { services.tailscale = {
enable = true; enable = true;
authKeyFile = config.sops.secrets."tailscale/auth".path; authKeyFile = config.sops.secrets."tailscale/auth".path;
@ -7,7 +6,6 @@
useRoutingFeatures = "client"; useRoutingFeatures = "client";
extraUpFlags = [ extraUpFlags = [
"--exit-node=100.122.132.30" "--exit-node=100.122.132.30"
"--accept-dns=false"
]; ];
}; };
} }

View file

@ -1,10 +1,6 @@
update: update:
git branch -D update || true
git switch -c update git switch -c update
nix flake update git push
git add flake.lock
git commit -s -m "flake update"
git push -f
git switch main git switch main
upgrade: upgrade:

View file

@ -1,40 +0,0 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.my.caddy;
in
{
options.my.caddy = {
enable = lib.mkEnableOption "caddy reverse proxy";
};
config = lib.mkIf cfg.enable {
services.caddy = {
enable = true;
package = pkgs.caddy.withPlugins {
plugins = [
# error message will tell you the correct version tag to use
# (still need the @ to pass nix config check)
"github.com/caddy-dns/cloudflare@v0.0.0-20240703190432-89f16b99c18e"
];
hash = "sha256-jCcSzenewQiW897GFHF9WAcVkGaS/oUu63crJu7AyyQ=";
};
logFormat = lib.mkForce "level INFO";
acmeCA = "https://acme-v02.api.letsencrypt.org/directory";
extraConfig = ''
(common) {
encode zstd gzip
header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
}
'';
globalConfig = ''
acme_dns cloudflare {$CLOUDFLARE_KEY}
'';
environmentFile = config.sops.secrets."caddy/env".path;
};
};
}

View file

@ -2,6 +2,5 @@
{ {
imports = [ imports = [
./backup.nix ./backup.nix
./caddy.nix
]; ];
} }

View file

@ -2,7 +2,6 @@ let
overlays = [ overlays = [
./conduwuit ./conduwuit
./attic ./attic
./vscode.nix
]; ];
importedOverlays = map (m: import m) overlays; importedOverlays = map (m: import m) overlays;
in in

View file

@ -1,14 +0,0 @@
final: prev: {
vscode-extensions = prev.vscode-extensions // {
github = prev.vscode-extensions.github // {
codespaces = prev.vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
publisher = "github";
name = "codespaces";
version = "1.17.3";
hash = "sha256-idJFYHJ4yeqpFZBX55Y0v1yfzgqyhS0MrC4yIto7i7w=";
};
};
};
};
}

View file

@ -1,5 +1,5 @@
caddy: caddy:
env: ENC[AES256_GCM,data:XyxcCVT+rwlS7A3xzUgGqpMoLwhfUJo2++zPTgoPt3q6Edt14bYQJsoSJXnKx/lGg/0ilNfEEg8AEnru/Mzx0bWedSdWuZ380l8wlLiucqQThhEBhEJlyd94BMNzhxFdj82w0ejp4oWb5By/WjkFNesvAyxPIo/Ir4S+fTgGpA1iO2Ms8Pdjp00qeXYsK1CfjaXOYlEP+8BxntN2JKLYb8Cgs7dLmHfUwP6gTFKlTukUTtQZYUw336q3TtGy,iv:Ab/E0ljUBxzWlXfAC2BXCYxlgo0ErvKFaubgVjFR3OU=,tag:Yr24/DofYS2lM6f2/1LQ3Q==,type:str] env: ENC[AES256_GCM,data:uVCkVky5MRRhN+g4f634nBjvpcI5Ldy+eOKXg7eGu9foswTHA1SXDs67+Wuvo/jaPw7Zg67xKZRHnoTon1udQzyfu0T6pmVKfsUPewITYCd+qLTanFz6uVRUHzpUVwjCZNqB8gxNr/BiZ70NG4vQXRjgd3zKFrQYQBr4zSaP2vK1pRdbuQ==,iv:dQBfX4X8huUp2dqY3tEGW+BPZ/XADT10ptt85R7X+AY=,tag:cvMbFjkRHoxxnNfz8dGv5g==,type:str]
sops: sops:
kms: [] kms: []
gcp_kms: [] gcp_kms: []
@ -33,8 +33,8 @@ sops:
Q2hBZE1FOHJ3aW5rVmoyK045eG11cmsKFOmP5iWONREZvxu0rM+fKMPQKgnYq5LH Q2hBZE1FOHJ3aW5rVmoyK045eG11cmsKFOmP5iWONREZvxu0rM+fKMPQKgnYq5LH
AKMZFsP7nnUxjdCXEA18sDg4Rf0qp8i3uQK3D6P7417j9ye/YZA4BQ== AKMZFsP7nnUxjdCXEA18sDg4Rf0qp8i3uQK3D6P7417j9ye/YZA4BQ==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
lastmodified: "2025-01-30T17:26:39Z" lastmodified: "2024-12-17T03:25:37Z"
mac: ENC[AES256_GCM,data:saoalvnwHsv0CTw/cRZqibnH9oGoZTNwGUT7RePKRa8OwNzbUEzQt+Z1WrmmWoqR+omQXLE+lpOPv6uNYxvAWnIelzCGeBBCMSBxtjlTUsjts7oFo7d9C5SdTIOkzotDxryvjRupb0P7hAmEqcSUKRZipJy5MVR7VXR1XZ4fIPM=,iv:VaP05zj8L2pygi1/M4BnOV3Inf0ssaWMu+aTBkdDMys=,tag:nuZT8GMB4F0T5dHnTvHOhA==,type:str] mac: ENC[AES256_GCM,data:bhFBLkT2q6HGtTPtHLVZkKZn00Lbm11/u3qSR19lU2E1SsQ7mpukvCqcTxNWtJ+HHth6yJJfgM6XABKq/9/598L2MgGuF3C/GGS3xpjwHh5RyV8t1lV8cqDaZGjGOMGx35lFQ6DoXOreQrtP/f7MKzf+nVNFr1NbTR8YhqR1xDU=,iv:+fjYlbyIyM9nLagrvE+PUhC2pT7QTsTSQX7ELZ7Wuhs=,tag:GWQv6VmIsWwFzb4bUr5CLg==,type:str]
pgp: [] pgp: []
unencrypted_suffix: _unencrypted unencrypted_suffix: _unencrypted
version: 3.9.4 version: 3.9.2

View file

@ -1,32 +0,0 @@
aws:
key_id: ENC[AES256_GCM,data:vxa8IS5zVOStsQaQNoPy36MeCw2KD2Th5tg=,iv:TrPukr/bpkGysf1YigBlXwaCu0H1FM6ivCVQEgnst6A=,tag:yrlcsDkLkH7U2i3JgjDaBA==,type:str]
key_secret: ENC[AES256_GCM,data:R9hFgtylEW1RphrP7/9Hi7HIb7gcQX1WDEVfnUTTzh+/0LM2Rb9CdkaleO8wNlcyYVE/jUKtqdqqrospAJ7+Zw==,iv:3+yCVqH441+oXFLI5usaQdhnE3GFhbJjMsYeRvk8xEw=,tag:STxA32cSdwPBikXyVEP5+Q==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age1sy0at69err83qyml2vqu8xvwjccfws447aaadfvacj2qluw3p45s2mtrw8
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBKaUZKbTVjZ1NEWlE5RzZT
T1dKdkRQajEva0tpRXhxYUlYWmw1b3MwSFZvCmhteVJ2VGhVNnZTZkJlem1OT3dL
dGlQTWdOUlo3TXNOS0wvNlpqVWpZSFEKLS0tIC9DNjY3OW1zWUlRQ1ZEOGlBRk9R
azQxMGhQejQ5M0N1YjFtSW5uVnRCQ3MKtt26G2PxIry/lppOT/NUX8jebEb5NgqO
HuHj7WT51Gtotfgb22VfGeOCaw9+pPYSjdk9WV4z57r7Z/lylALKRw==
-----END AGE ENCRYPTED FILE-----
- recipient: age10h6pg5qdpc4t0rpmksfv788a57f04n83zgqaezkjjn65nkhv547s0vxfdn
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBPaVIwbExDUjJiVFpHOFJu
dk1SUHc5UDRFUENsbkg2RmQvazdEZ1NKeEhvCjVCNzdwRFN0aUZJL0pVSTI1RUxv
Ymhhc0tsSENVa1VUKzRBZk5IcjEvNFUKLS0tIFpPNlRXOVYyVnpyUmtLMTFqNlZ0
UlYrTExEUVc0dURLR1czN3BnYzZ2VGMKCbAgM50jvs9VciA1Pb/VY+2I4x62LBGe
j7eHkfTFc8Gnk/rZA9/ZJDLFr/FUPMQWK/NVoz6oLjO6oVFXqN6OqA==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2025-01-30T17:45:09Z"
mac: ENC[AES256_GCM,data:uXnJ8DCs1ZZ72PFAmSQpqvVH2UYvRX8AeUC00A6WsgNL9sz6H0b7PwXBn4SucHACwLwilMVKYpFGE1pPMsIgpHxU5coNhvTfth/ChY1KS73LAwrJUAyUoFI3mumPkklj7b/u1CbBfhuhA2QoZVl+d9BGQn5CQu3+BySUmcT+P9k=,iv:H/hUTBDNcsGBP5TA/7U1QMZogZvuoPuEAg/tBCpbf9w=,tag:W7rH84Na/tHPuJlA9tRXEQ==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.9.4