Wie Sie sehen, sehen sie nix! https://docs.hacc.space
 
 
 
 
Go to file
stuebinm 7e00264911 update inputs to nixos-22.11
(note that simple-nixos-mailserver is not updated since it doesn't
have a 22.11 release yet)
2022-12-16 22:56:28 +01:00
common make fish my default shell 2022-11-26 00:08:38 +01:00
hosts/parsons remove lantifa: apparently dead 2022-12-13 23:52:48 +01:00
modules remove apparently unneeded disabledModules 2022-11-11 16:30:38 +01:00
pkgs don't vendor the netbox package definition 2022-12-09 14:08:17 +01:00
services remove lantifa: apparently dead 2022-12-13 23:52:48 +01:00
websites solve some TODOs 2022-11-11 16:30:38 +01:00
.gitignore add deploy-rs gc roots to .gitignore 2022-11-19 15:18:32 +01:00
LICENSE add a LICENSE-file 2022-10-06 19:31:59 +02:00
README.md flake-enabled readme 🎉 2022-11-14 18:42:33 +01:00
default.nix sources: update nixpkgs to 21.05 2021-08-07 12:05:25 +00:00
flake.lock update inputs to nixos-22.11 2022-12-16 22:56:28 +01:00
flake.nix update inputs to nixos-22.11 2022-12-16 22:56:28 +01:00

README.md

hacc nixfiles

welcome to hacc nixfiles (haccfiles). this is the code describing our nix-based infrastructure.

structure

  • flake.nix: Entrypoint & dependencies
  • common/: configuration common to all hosts
  • modules/: home-grown modules for hacc-specific services
  • pkgs/: packages we built and don't want to upstream
  • hosts/: configuration.nix per host (currently there's only one of those)
  • services/: all services we run; imported in appropriate host config
  • websites/: static websites we deploy somewhere

working with the haccfiles

You will need a flake-enabled nix installation, and have your ssh config set up so that ssh parsons will connect to parsons.hacc.space.

It's recommended to use deploy_rs:

deploy .#parsons -k [--dry-activate]

Alternatively, using just nixos-rebuild:

nixos-rebuild --flake .#parsons --target-host parsons \
  --use-remote-sudo --use-substitutes [test|switch|dry-activate]

If for some reason you have nix but not nixos-rebuild, you can still build the system closure using:

nix build .#nixosConfigurations.parsons.config.system.build.toplevel

(but you might have trouble deploying it)

I don't want to build this long dependency / want a cached version!

If it's still available on parsons from a previous deploy, do:

nix copy --from ssh://parsons /nix/store/...

Note: don't just copy the .drv file (which Nix complains about if it can't build something), that's just the description of how to build it! If you don't know the actual outpath, look in the .drv file (should start with Derive([("out","[the path you want]"...)

committing to haccfiles

  • Things on main should always reflect the config that's actually deployed on parsons, except during testing / debugging sessions
  • split up commits, every commit is one atomic change
  • follow the commit format: "place: $change"
    • place: e.g. modules/$module, services/$service ...
    • change: describe your change. Please wrap your lines sensibly (or configure your editor to do this for you)
  • Exception: autogenerated messages (merge commits, reverts, etc)
  • don't overuse merge commits, try to rebase things if possible with reasonable effort