{"id":23529557,"url":"https://github.com/jaid/nix","last_synced_at":"2025-07-01T04:05:23.216Z","repository":{"id":267168542,"uuid":"900433541","full_name":"Jaid/nix","owner":"Jaid","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-22T18:38:34.000Z","size":264,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-29T06:59:27.252Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jaid.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","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,"zenodo":null}},"created_at":"2024-12-08T19:01:07.000Z","updated_at":"2025-06-22T18:38:37.000Z","dependencies_parsed_at":"2025-01-02T00:22:33.802Z","dependency_job_id":"64cefbdc-b69e-46a0-b40f-149d7fb0a051","html_url":"https://github.com/Jaid/nix","commit_stats":null,"previous_names":["jaid/nix"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Jaid/nix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jaid%2Fnix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jaid%2Fnix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jaid%2Fnix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jaid%2Fnix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jaid","download_url":"https://codeload.github.com/Jaid/nix/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jaid%2Fnix/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262893638,"owners_count":23380710,"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-12-25T21:12:23.985Z","updated_at":"2025-07-01T04:05:23.197Z","avatar_url":"https://github.com/Jaid.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nix setup\n\n## Installation\n\nThis can be executed from a GUI-less live system session.\n\n```bash\ndevice=${device:-/dev/sda}\nbootDevicePartition=${bootDevicePartition:-${device}1}\nrootDevicePartition=${rootDevicePartition:-${device}2}\nsudo parted $device -- mklabel gpt\nsudo parted $device -- mkpart ESP fat32 1MiB 512MiB\nsudo parted $device -- set 1 esp on\nsudo parted $device -- mkpart root ext4 512MiB 100%\nsudo mkfs.vfat -F32 -n boot $bootDevicePartition\nsudo mkfs.ext4 -L root $rootDevicePartition\nsudo mount /dev/disk/by-label/root /mnt\nsudo mkdir /mnt/boot\nsudo mount -o umask=077 /dev/disk/by-label/boot /mnt/boot\nsudo nixos-generate-config --root /mnt\nsudo nixos-install --flake github:Jaid/nix#tower --no-write-lock-file --impure\n```\n\n## Useful scripts\n\n### Rebuilding the running NixOS system\n\n```bash \n#!/usr/bin/env -S bash -o errexit -o pipefail -o nounset\nsudo nixos-rebuild --option auto-optimise-store true --option extra-experimental-features flakes --option extra-experimental-features nix-command --option accept-flake-config true switch --flake \"github:Jaid/nix#$(hostname)\"\n```\n\n### Test system in a QEMU VM\n\n```bash\n#!/usr/bin/env -S bash -o errexit -o pipefail -o nounset\ntarget=tower\ntempFolder=$(mktemp --directory)\nnix build \"Jaid/nix#nixosConfigurations.$target.config.system.build.vm\" --option auto-optimise-store true --option accept-flake-config true --out-link \"$tempFolder/link\"\nTMPDIR=$tempFolder NIX_DISK_IMAGE=$tempFolder/disk.qcow2 $tempFolder/link/bin/run-$target-vm -m 4G\n```\n\n### Show flake metadata\n\n```bash\n#!/usr/bin/env -S nix shell --quiet github:NixOS/nixpkgs/nixos-unstable#yq github:NixOS/nixpkgs/nixos-unstable#bat --command bash -o errexit -o pipefail -o nounset\nnix flake metadata github:Jaid/nix --json | yq --yaml-output --yaml-output-grammar-version 1.2 | bat --language yaml --pager '' --plain --force-colorization\n```\n\n### Check flake\n\n```bash \n#!/usr/bin/env -S bash -o errexit -o pipefail -o nounset\nnix flake check github:Jaid/nix --verbose --show-trace\n```\n\n### Cleaning\n\n```bash\n#!/usr/bin/env -S nix shell --quiet github:NixOS/nixpkgs/nixos-unstable#gdu --command bash -o errexit -o pipefail -o nounset\nnix shell --quiet github:NixOS/nixpkgs/nixos-unstable#gdu --command gdu --non-interactive --summarize --si /nix/store\nnix store gc\nnix shell --quiet github:NixOS/nixpkgs/nixos-unstable#gdu --command gdu --non-interactive --summarize --si /nix/store\n```\n\n### Dump current dconf\n```bash\n#!/usr/bin/env -S nix shell --quiet github:NixOS/nixpkgs/nixos-unstable#dconf github:NixOS/nixpkgs/nixos-unstable#bat --command bash -o errexit -o pipefail -o nounset\ndconf dump / | bat --paging never --language ini --decorations never\n```\n\n## Links\n\n### Docs\n\n- [nix.dev](https://nix.dev/reference) ([source](https://github.com/NixOS/nix.dev/tree/master/source))\n- [Nix manual](https://nix.dev/manual/nix/rolling)\n- [NixOS manual](https://nixos.org/manual/nixos/stable)\n- [nixpkgs manual](https://nixos.org/manual/nixpkgs/stable)\n- [Home-Manager manual](https://nix-community.github.io/home-manager)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaid%2Fnix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaid%2Fnix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaid%2Fnix/lists"}