Mostly declarative configuration for my computers, using Nix & flakes Currently serves 2 work machines:
- chunky-notebook : NixOS + home-manager
- work-laptop : home-manager on top of Ubuntu
Most treasured goodies:
- Emacs : with native-comp & pgtk, courtesy of “nix-community/emacs-overlay” with Doom Emacs config that’s being setup manually
- xmonad : comfortable tiling wm, for which I copy-pasted configs with xmobar, autorandr setup for monitor detection
- ability to reuse configuration between Ubuntu+Nix and NixOS I’d like it to have less technical debt & better documentation, but it works
in `config.nix` add
nix = {
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command flakes
'';
};
and apply the config
and apply config with
sudo nixos-rebuild switch --flake ~/dotfiles/.#chunky-notebook
Any “home-manager” related updates are also done with that command
so on first installation either:
- use `nix shell nixpkgs#cachix; cachix use nix-community` to enable cache for “emacsPgtkGcc”
- disable “emacsPgtkGcc” for first installation and then add `nix-community` cache
(expected to be imported on `home-manager.users.<user>` level, if in future would want OS level modules would need to figure out anew) Read in the flake.nix, passed with inputs.self.nixosProfiles Could contain NixOS configuration & options as well as Home-Manager configuraitons, options & xdg files
Idea is to keep relevant nix configuration close to managed dotfiles and join configurations for applications that are managed in tandem
Intended for grouping in the Roles, so that Roles could be imported for machines
(expected to be imported on `home-manager.users.<user>` level, if in future would want OS level modules would need to figure out anew) Option - is a value that can be set differently and which influences some part of configuration
My own modules are:
- autorandr sharing window configuration, by individual computer defining monitor fingerprints
- screenlocker setting different ‘lock’ command, to share code between NixOS & Ubuntu installed ‘xscreensaver’
(doesn’t work yet - only Home-Manager common file there) Planned to combine lot’s of applications and settings so that machines would only need to specify their roles, and limited amount of profiles
- make `cachix add nix-community` declarative
- !! `cachix add nix-community` is manual for now
- Manage the personal server with NixOS too