deathbymanatee's nixos dotfiles
- Internet connection (duh)
- NixOS installed and working with a user account set up
- hardware-configuration.nix created
- SSH key enabled and set up (contributors only)
See tree.md for the current overall file structure.
git clone --recurse-submodules git@github.com:deathbymanatee/nixos-dotfiles.git ~/.config/nixos/- CD into .config/nixos
- make new host directory in
hosts/ - copy your
hardware-configuration.nixfrom/etc/nixos/into your new host folder - create a
user.nixfile inside of your new host folder and include configuration options you want - users, modules, environment packages, home-manager modules, etc.- copy previous configurations if you need a starting place
- add an entry to the nixosConfigurations attribute set in
flake.nixmatching the network hostname you configured inuser.nix. here, you need to add the following to the modules attribute:home-manager.nixosModules.home-manager./modules/system/configuration.nix./hosts/<your-hostname>/user.nix
- once you configure to your liking, run
sudo nixos-build switch --flake .#your-hostnamefor a first time installation
I opted to abstain configuring individual programs using Nix and home-manager, as it created a read-only filesystem nightmare for someone who's configurations are (mostly) always being updated. I also didn't feel like doing a full rebuild or home-switch when experimenting with one or two changes at a time. I instead chose to use mkOutOfStoreSymlink and used relative paths to the various modules' config directories which seems to be working much better for my use case.
Certain modules require a core.nix component for configuring system services. You will need to include them inside the imports list in your user.nix configuration file.
To enable plasma and my plasma config, you will need to import ./modules/plasma/core.nix into your ./hosts/hostname/user.nix file to enable the necessary system level services.
Import modules/sway/core.nix into your top level import statement in user.nix. Then, enable the sway home module.
In order for backlight controls, storage volume mounting, audio control, and the like to work, your user must be a member of the following groups:
inputseataudiovideopowerstorage
cdinto./modules/- Create a directory for your module:
mkdir modulename - Create a
default.nixfile:touch default.nix - Copy the
template.nixcontents, paste it intodefault.nix, and replace instances ofPROGRAMwith your module's name - Add your
home.OPTIONconfiguration options inside of themkIfblock - Include your module in the
modules/default.niximportslist - Enable your module inside of your
user.nixfile home configuration block