Skip to content

RafDevX/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Raf's NixOS Configuration

This repository contains my personal configuration files. Structure will improve (slowly) over time.

Deploying

Current Host

sudo nixos-rebuild switch --flake .

Remote Host

nixos-rebuild switch --flake .#avior --target-host avior.rso.pt --use-remote-sudo

Updating

Run

nix flake update
git add flake.lock
git commit -m "update flake.lock to latest upstream"
sudo nixos-rebuild switch --flake .

Profiles vs Modules

First of all: a profile is a module. However, here NixOS modules are semantically split into 3 families:

  • Host configuration: the main parent, living at hosts/<name>/default.nix that decides which components are necessary for each particular host and sets whichever options are relevant;
  • Profiles: small units of configurations, living in profiles/, that can be selectively applied for each host (or not) by directly mentioning them in the main host configuration's imports declaration (or in another, more encompassing profile); and
  • Modules: more complex blocks of configuration, living in modules/, that shine in flexibility and often wrap service definitions with a new, simpler interface. They take in their own options, and are always included indiscriminately for all hosts (though usually guarded behind an enable option).

In general, use a module if it needs to be flexible and thus relies on taking in multiple options; otherwise, use a profile if the only option it would have is an enable one (because the profiles mechanism is precisely intended to replace singular enable options).

On the other hand, if it would take no options whatsoever (i.e., always enabled), then it should also be a module, since profiles are designed for conditional inclusion, and in this case there is no condition.

About

General configuration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published