{"id":13685730,"url":"https://github.com/librephoenix/nixos-config","last_synced_at":"2025-05-15T16:09:39.303Z","repository":{"id":162563490,"uuid":"637069218","full_name":"librephoenix/nixos-config","owner":"librephoenix","description":"Nix noob trying to build his system","archived":false,"fork":false,"pushed_at":"2024-10-25T11:28:19.000Z","size":20433,"stargazers_count":590,"open_issues_count":4,"forks_count":56,"subscribers_count":11,"default_branch":"main","last_synced_at":"2024-10-30T02:48:04.277Z","etag":null,"topics":["config","dotfiles","dotfiles-linux","linux","linux-dotfiles","nix","nixos","nixos-config","nixos-configuration","nixos-dotfiles"],"latest_commit_sha":null,"homepage":"","language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/librephoenix.png","metadata":{"files":{"readme":"README.org","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}},"created_at":"2023-05-06T12:11:49.000Z","updated_at":"2024-10-27T12:19:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"836e3b2f-902f-417e-8080-0216630db525","html_url":"https://github.com/librephoenix/nixos-config","commit_stats":{"total_commits":856,"total_committers":2,"mean_commits":428.0,"dds":0.4661214953271028,"last_synced_commit":"8ef3a383922771656a71109307be86beebc86b68"},"previous_names":["librephoenix/nixos-config-mirror","librephoenix/nixos-config"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librephoenix%2Fnixos-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librephoenix%2Fnixos-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librephoenix%2Fnixos-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librephoenix%2Fnixos-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/librephoenix","download_url":"https://codeload.github.com/librephoenix/nixos-config/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247737770,"owners_count":20987718,"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":["config","dotfiles","dotfiles-linux","linux","linux-dotfiles","nix","nixos","nixos-config","nixos-configuration","nixos-dotfiles"],"created_at":"2024-08-02T14:00:56.614Z","updated_at":"2025-04-07T22:06:12.588Z","avatar_url":"https://github.com/librephoenix.png","language":"Nix","funding_links":[],"categories":["Nix"],"sub_categories":[],"readme":"#+title: NixOS Config\n#+author: Emmet\n\n[[https://gitlab.com/librephoenix/nixos-config][Main Repo Link (GitLab)]]\n\n[[https://github.com/librephoenix/nixos-config][Mirror Repo Link (GitHub)]]\n\n[[https://codeberg.org/librephoenix/nixos-config][Mirror Repo Link (Codeberg)]]\n\n** What is this repository?\nThese are my dotfiles (configuration files) for my NixOS setup(s).\n\nHere is my main setup:\n[[desktop.png]]\n\n** My Themes\n[[https://github.com/danth/stylix#readme][Stylix]] (and [[https://github.com/SenchoPens/base16.nix#readme][base16.nix]], of course) is amazing, allowing you to theme your entire system with base16-themes.\n\nUsing this I have [[./themes][55+ themes]] (I add more sometimes) I can switch between on-the-fly. Visit the [[./themes][themes directory]] for more info and screenshots!\n\n** Install\nI wrote some reinstall notes for myself [[./install.org][here (install.org)]].\n\nTLDR: You should™ be able to install my dotfiles to a fresh NixOS system with the following experimental script:\n#+begin_src sh :noeval\nnix-shell -p git --command \"nix run --experimental-features 'nix-command flakes' gitlab:librephoenix/nixos-config\"\n#+end_src\n\nDisclaimer: Ultimately, I can't gaurantee this will work for anyone other than myself, so /use this at your own discretion/. Also my dotfiles are /highly/ opinionated, which you will discover immediately if you try them out.\n\nPotential Errors: I've only tested it working on UEFI with the default EFI mount point of =/boot=. I've added experimental legacy (BIOS) boot support, but it does rely on a quick and dirty script to find the grub device. If you are testing it using some weird boot configuration for whatever reason, try modifying =bootMountPath= (UEFI) or =grubDevice= (legacy BIOS) in =flake.nix= before install, or else it will complain about not being able to install the bootloader.\n\nNote: If you're installing this to a VM, Hyprland won't work unless 3D acceleration is enabled.\n\nSecurity Disclaimer: If you install or copy my =homelab= or =worklab= profiles, /CHANGE THE PUBLIC SSH KEYS UNLESS YOU WANT ME TO BE ABLE TO SSH INTO YOUR SERVER. YOU CAN CHANGE OR REMOVE THE SSH KEY IN THE RELEVANT CONFIGURATION.NIX/:\n- [[./profiles/homelab/configuration.nix][configuration.nix]] for homelab profile\n- [[./profiles/worklab/configuration.nix][configuration.nix]] for worklab profile\n\n** Modules\nSeparate Nix files can be imported as modules using an import block:\n#+BEGIN_SRC nix\nimports = [ ./import1.nix\n            ./import2.nix\n            ...\n          ];\n#+END_SRC\n\nThis conveniently allows configurations to be (*cough cough) /modular/ (ba dum, tssss).\n\nI have my modules separated into two groups:\n- System-level - stored in the [[./system][system directory]]\n  - System-level modules are imported into configuration.nix, which is what is sourced into [[./flake.nix][my flake (flake.nix)]]\n- User-level - stored in the [[./user][user directory]] (managed by home-manager)\n  - User-level modules are imported into home.nix, which is also sourced into [[./flake.nix][my flake (flake.nix)]]\n\nMore detailed information on these specific modules are in the [[./system][system directory]] and [[./user][user directory]] respectively.\n\n** Patches\nIn some cases, since I use =nixpgs-unstable=, I must patch nixpkgs. This can be done inside of a flake via:\n#+BEGIN_SRC nix\n    nixpkgs-patched = (import nixpkgs { inherit system; }).applyPatches {\n      name = \"nixpkgs-patched\";\n      src = nixpkgs;\n      patches = [ ./example-patch.nix ];\n    };\n\n    # configure pkgs\n    pkgs = import nixpkgs-patched { inherit system; };\n\n    # configure lib\n    lib = nixpkgs.lib;\n#+END_SRC\n\nPatches can either be local or remote, so you can even import unmerged pull requests by using =fetchpatch= and the raw patch url, i.e: https://github.com/NixOS/nixpkgs/pull/example.patch.\n\nI currently curate patches local to this repo in the [[./patches][patches]] directory.\n\n** Profiles\nI separate my configurations into [[./profiles][profiles]] (essentially system templates), i.e:\n- [[./profiles/personal][Personal]] - What I would run on a personal laptop/desktop\n- [[./profiles/work][Work]] - What I would run on a work laptop/desktop (if they let me bring my own OS :P)\n- [[./profiles/homelab][Homelab]] - What I would run on a server or homelab\n- [[./profiles/wsl][WSL]] - What I would run underneath Windows Subystem for Linux\n\nMy profile can be conveniently selected in [[./flake.nix][my flake.nix]] by setting the =profile= variable.\n\nMore detailed information on these profiles is in the [[./profiles][profiles directory]].\n\n** Nix Wrapper Script\nSome Nix commands are confusing, really long to type out, or require me to be in the directory with my dotfiles. To solve this, I wrote a [[./system/bin/phoenix.nix][wrapper script called phoenix]], which calls various scripts in the root of this directory.\n\nTLDR:\n- =phoenix sync= - Synchronize system and home-manager state with config files (essentially =nixos-rebuild switch= + =home-manager switch=)\n  - =phoenix sync system= - Only synchronize system state (essentially =nixos-rebuild switch=)\n  - =phoenix sync user= - Only synchronize home-manager state (essentially =home-manager switch=)\n- =phoenix update= - Update all flake inputs without synchronizing system and home-manager states\n- =phoenix upgrade= - Update flake.lock and synchronize system and home-manager states (=phoenix update= + =phoenix sync=)\n- =phoenix refresh= - Call synchronization posthooks (mainly to refresh stylix and some dependent daemons)\n- =phoenix pull= - Pull changes from upstream git and attempt to merge local changes (I use this to update systems other than my main system)\n- =phoenix harden= - Ensure that all \"system-level\" files cannot be edited by an unprivileged user\n- =phoenix soften= - Relax permissions so all dotfiles can be edited by a normal user (use temporarily for git or other operations)\n- =phoenix gc= - Garbage collect the system and user nix stores\n  - =phoenix gc full= - Delete everything not currently in use\n  - =phoenix gc 15d= - Delete everything older than 15 days\n  - =phoenix gc 30d= - Delete everything older than 30 days\n  - =phoenix gc Xd= - Delete everything older than X days\n\n** Star History\nDidn't think this would get that many [[https://star-history.com/#librephoenix/nixos-config\u0026Date][stars on GitHub]], yet here we are:\n[[https://api.star-history.com/svg?repos=librephoenix/nixos-config\u0026type=Date.png]]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibrephoenix%2Fnixos-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibrephoenix%2Fnixos-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibrephoenix%2Fnixos-config/lists"}