- Notifications
You must be signed in to change notification settings - Fork3
My nix config for all my machines
License
rasmus-kirk/nix-config
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This repository contains my Nix configurations. Feel free to explore anduse any part that inspires you.
Features:
- Single flake setup
- Agenix for secrets management
- Home-Manager integration
- Modularization
- Automatic module options documentation generation athttps://nix.rasmuskirk.com/
- NAS setup
Directions:
configurations/home-manager
:- Home-Manager configurations for my devices (deck, NAS, and work).
configurations/nixos
:- NixOS configurations for my devices.
modules/home-manager
:- Home-Manager modules generalizing configuration for various tools.
modules/nixos
:- NixOS modules generalizing configuration for various tools.
pubkeys
:- Public keys for my devices.
docs
:- Files required for building the documentation hosted athttps://nix.rasmuskirk.com/.
The Home-Manager configurations are fairly straightforward since they mostlyreuse modules, but the NixOS configuration has some notable features:
The modules allow configuration to be reused efficiently and withoutduplication between machines. For example, I want to share configurationbetween my NAS and my work laptop for programs such as my editor,file manager, git, shell and more.
An example follows below:
kirk={helix.enable=true;yazi={enable=true;configDir=configDir;};git={enable=true;userEmail="mail@rasmuskirk.com";userName="rasmus-kirk";};zsh.enable=true;fonts.enable=true;terminalTools.enable=true;};
kirk={helix={enable=true;installMostLsps=false;extraPackages=withpkgs;[nilmarksmannodePackages_latest.bash-language-server];};yazi={enable=true;configDir=configDir;};git={enable=true;userEmail="mail@rasmuskirk.com";userName="rasmus-kirk";};zsh.enable=true;fonts.enable=true;terminalTools.enable=true;};
The options I’ve created allow for different behaviors across devices, whileavoiding redundant configuration snippets. Although these modules are designedfor personal use, it's possible for others to reuse them:
{description="My NixOS configuration";inputs={nixpkgs.url="github:nixos/nixpkgs/nixos-unstable";kirk-modules.url="github:rasmus-kirk/nix-config";kirk-modules.inputs.nixpkgs.follows="nixpkgs";home-manager.url="github:nix-community/home-manager/release-23.11";home-manager.inputs.nixpkgs.follows="nixpkgs";};outputs=inputs @{self,nixpkgs,kirk-modules,flake-parts, ...}:letinherit(self)outputs;in{homeConfigurations={myMachine=home-manager.lib.homeManagerConfiguration{pkgs=nixpkgs.legacyPackages.x86_64-linux;extraSpecialArgs={inheritinputsoutputs;};modules=[./configurations/home-manager/my-machine/home.nixkirk-modules.homeManagerModules.default];};};};}
The Nix modules include built-in compilation of module options toMarkdown. I further convert this Markdown into HTML using Pandoc, whichis then deployed via GitHub Pages. You can find the module documentationhere. For more details, seethisrepo.
About
My nix config for all my machines
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.