{"id":20090876,"url":"https://github.com/raehik/nixos-cfgs","last_synced_at":"2025-05-06T03:30:54.532Z","repository":{"id":158297965,"uuid":"609250539","full_name":"raehik/nixos-cfgs","owner":"raehik","description":"my NixOS system configs","archived":false,"fork":false,"pushed_at":"2025-04-02T13:58:46.000Z","size":108,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-02T14:49:53.211Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raehik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-03T17:34:51.000Z","updated_at":"2025-04-02T13:58:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"0d0a472d-0b3c-44d2-991f-4e18ced0176c","html_url":"https://github.com/raehik/nixos-cfgs","commit_stats":{"total_commits":78,"total_committers":1,"mean_commits":78.0,"dds":0.0,"last_synced_commit":"c0f118a6d77a04b85fd7d6037ccb8787f9a95abb"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raehik%2Fnixos-cfgs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raehik%2Fnixos-cfgs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raehik%2Fnixos-cfgs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raehik%2Fnixos-cfgs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raehik","download_url":"https://codeload.github.com/raehik/nixos-cfgs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252616107,"owners_count":21776920,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T16:26:54.878Z","updated_at":"2025-05-06T03:30:54.247Z","avatar_url":"https://github.com/raehik.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# raehik's NixOS system configurations\nI don't know much about Nix yet. This is my initial barebones system\nconfiguration wrapped into a flake. home-manager exists, but isn't used very\nmuch.\n\n## Deleting old generations\n```\nsudo nix-collect-garbage -d\nsudo nixos-rebuild boot --flake .\n```\n\n`nixos-rebuild` figure out `/boot`. It's stupid and annoying, sorry.\n\n## Initalizing a new system\nOnce your drive is prepped and mounted:\n\n`sudo nixos-install --flake .#\u003csystem\u003e --root \u003croot mount\u003e`\n\nNote that Nix is smart enough to use its local store! (That blew my mind a bit.)\n\nRemember to fiddle with Lanzaboote if you're using it. Go systemd-boot first,\nthen swap to Lanzaboote module.\n\n`cryptsetup status \u003cmapper name\u003e` helps assert some config.\n\n### Drive\nFor NVMe SSDs, consider setting the LBA format to 4096 bytes. This should give\nbetter performance.\n\nCheck with `sudo nvme id-ns -H \u003cNVMe device\u003e`. Look for \"LBA Format\".\n\nNote that as of 2023-12-03, nvme-cli won't work with a drive plugged in via a\nUSB enclosure. M.2 slot it and run Linux via another drive.\n\nOn 2023-12-03, raehik had a drive that reported it could handle 4k LBA size\n(though both it and 512-byte were stated \"best\"), but he got a 0x2001 invalid\nopcode error on trying. Seems that lots of drives are just shit.\n\n### Device\n512 MB EFI partition, rest for LUKS.\n\n`mkfs.fat -F 32 \u003cdevice\u003e`\n\n### Filesystem\nCurrently suggesting BTRFS.\n\n#### BTRFS\nOn 2023-12-03, when raehik BTRFS formatted an NVMe SSD via an USB enclosure, it\nshowed no for \"SSD Detected\" after formatting. Some defaults used to change for\nSSDs. From what I could see, no more, so maybe it's a some vestigial field,\nwritten but not read. Unsure.\n\n```\nmkfs.btrfs \u003cdevice\u003e\nmount \u003cdevice\u003e /mnt\nbtrfs subvolume create /mnt/root\nbtrfs subvolume create /mnt/nix\nbtrfs subvolume create /mnt/home\numount /mnt\nmount -o compress=zstd,subvol=root \u003cdevice\u003e /mnt\nsudo mkdir /mnt/{nix,home}\nmount -o compress=zstd,subvol=nix,noatime \u003cdevice\u003e /mnt/nix\nmount -o compress=zstd,subvol=home \u003cdevice\u003e /mnt/home\n# ...\n```\n\nNo relevant options for filesystem or subvolume creation. (All happens on\nmount.)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraehik%2Fnixos-cfgs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraehik%2Fnixos-cfgs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraehik%2Fnixos-cfgs/lists"}