- Install NixOS as usual, set up user shell with git.
- Clone this repo to
~/dotfiles
,cd
into it, rename username. - Optionally create a machine specific file
root/etc/nixos/machines/<name>.nix
. stow
the config files to home-manager and root dirs:
stow home
sudo stow root -t /
Edit /etc/nixos/configuration.nix
as usual and only import ./machines/<name>.nix
:
{ config, pkgs, ... }:
{
imports = [
./machines/thinkpad.nix
];
}
...or just add machine specific configuration there:
{ config, pkgs, ... }:
{
imports = [
./common.nix
];
boot.initrd.kernelModules = [ "i915" ];
services.xserver.videoDrivers = [ "modesetting" ];
}
- Run
nixos-rebuild switch
andhome-manager switch
.
The "filesystem files" are symlinks to their equivalents in ~/dotfiles
, you
can edit either. When adding some file, run stow -R home/
or
sudo stow -R root/ -t /
.