{"id":27312283,"url":"https://github.com/soratenshi/nixos-config","last_synced_at":"2025-06-20T12:34:07.830Z","repository":{"id":41237606,"uuid":"431250972","full_name":"SoraTenshi/nixos-config","owner":"SoraTenshi","description":"A collection of my (hopefully) growing NixOS Config","archived":false,"fork":false,"pushed_at":"2025-06-15T00:06:11.000Z","size":15932,"stargazers_count":22,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-17T07:56:24.665Z","etag":null,"topics":["ags","eww","flakes","helix","hyprland","macos","nix","nix-darwin","nixos","tokyo-night-storm"],"latest_commit_sha":null,"homepage":"","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/SoraTenshi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-11-23T20:56:25.000Z","updated_at":"2025-06-13T22:40:26.000Z","dependencies_parsed_at":"2023-02-19T00:00:48.803Z","dependency_job_id":"523c7db3-6418-44f6-b074-01e9ebbe04bf","html_url":"https://github.com/SoraTenshi/nixos-config","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SoraTenshi/nixos-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoraTenshi%2Fnixos-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoraTenshi%2Fnixos-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoraTenshi%2Fnixos-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoraTenshi%2Fnixos-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SoraTenshi","download_url":"https://codeload.github.com/SoraTenshi/nixos-config/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoraTenshi%2Fnixos-config/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260945142,"owners_count":23086953,"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":["ags","eww","flakes","helix","hyprland","macos","nix","nix-darwin","nixos","tokyo-night-storm"],"created_at":"2025-04-12T06:39:35.576Z","updated_at":"2025-06-20T12:34:02.781Z","avatar_url":"https://github.com/SoraTenshi.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# My NixOS Configuration\nA collection of my (hopefully) growing NixOS Config\n\nShoutout to:\n- [@CRTified](https://github.com/crtified) for introducing me to it :)\n\n- [Wil T](https://www.youtube.com/channel/UCLsaznoh7qsE8sc3XQurubw) as he posts a lot of helpfule videos about Nix(OS) and also is essentially\nthe reason i could write this tutorial.\n\n## Installation from Live-CD\nSince my brain is very wonky, i rather want to type this down so that in the case, \nwhen i actually want to swap permanently to Linux (from Windows) i am able to reproduce my full system.\n\n### Step 1: Partition drives.\n\nI would do it the following way:\n\nSet-up the main (boot) partition as GPT (EFI) which has 2 partitions as follows:\n\n`/dev/sda1` as boot drive which is +~ 200M in size and formatted as `FAT32`\n`/dev/sda2` as 'rest' drive, formatted as `ext4`\n\nHint: using `lsblk` shows your connected drives.\n\nTo do this, i preferr using `fdisk`. \n\n### Step 2: Formatting\n\nSimple enough, there is an easy formular to do that:\n\n```sh\nsudo mkfs.fat -F 32 /dev/sda1\nsudo fatlabel /dev/sda1 NIXBOOT\nsudo mkfs.ext4 /dev/sda2 -L NIXMAIN\n```\n\nThe names are as simply described within /nixos-config/nixos/hardware-configuration.nix\n\n### Step 3: Mounting\n\nStraight forward process.\n\n```sh\nsudo mount /dev/disk/by-label/NIXMAIN /mnt\nsudo mkdir /mnt/boot\nsudo mount /dev/disk/by-label/NIXBOOT /mnt/boot\n```\n\n### Step 4: Swapfile\n\nAlso very easy to understand, a swapfile is essentially 'extended memory' where the CPU can use the size of the \nswapfile as extra Memory once its space runs out.\n\n```sh\nsudo dd if=/dev/zero of=/mnt/.swapfile bs=1024 count=2097152\nsudo chmod 600 /mnt/.swapfile\nsudo mkswap /mnt/.swapfile\n```\n\nNow this is a bit more interesting.\n\nTo have a better overview of what the `dd` command does: `if` can be unfolded to 'infile' so what i want to use to write the file with.\n`/dev/zero` is just zeros as the name implies.\n\n`of` is the target 'outfile'\n\n`bs=1024` is the 'blocksize'\n\n`count=2097152` is a magic number, esentially blocksize and count will be multiplied together, to get the final size of the swapfile. \nMultiplying those numbers together will get you around `2GiB`.\n\n### Step 5: Actual configuration\n\nThis process is also straight forward:\n\n```sh\nsudo nixos-generate-config --root /mnt\n```\n\nFrom here, this repository takes over.\n\n**However**: Do **NOT** overwrite the `hardware-configuration.nix` but rather use the one in this repository as some kind of template.\n\nOnce everything is done, the fun part begins:\n\n```sh\nsudo nixos-install\n```\n\nAnd that's essentially it. \n\nAfter some time you will most likely be prompted to type in a new `superuser` password, just type in the actual password and that's it for the standard configuration.\n\n### Step 6: Home-Manager\n\nJust add the Home-Manager to your `nix-channel` and let it do the magic.\n\n```sh\nsudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-[your-nixos-version].tar.gz home-manager\nsudo nix-channel --update\n```\n\nFor more information regarding the Home-Manager, [use this Link](https://nix-community.github.io/home-manager/index.html)\n\n### Step 7: Flakes\n\nWith the recent changes i adopted my configuration to make use of Nix flakes.\n\nKeep in mind that flakes can only be used with the `nix flake` feature enabled.\ne.g.: \n```nix\n{\n  nix = {\n    package = pkgs.nixUnstable;\n    extraOptions = ''\n      experimental-features = nix-command flakes\n    '';\n  };\n}\n```\n\nFor now the usage of the flakes is (to install a flake profile):\n```sh\nsudo nixos-rebuild switch --flake '.#[profile]'\n```\n\nThis is however most likely not the final version of it, as hardware information configuration are completely absent for now.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoratenshi%2Fnixos-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoratenshi%2Fnixos-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoratenshi%2Fnixos-config/lists"}