Kitaab

NixOS containers

nix dev ops

published 2022-05-14 23:30

updated 2022-05-14 23:30

You can define a nixosConfiguration in your flake file, which has the module you're testing enabled in it. Then using nixos-container create <name> --flake .#<configuration name> and nixos-container start <name> Boom, you can now test the package & module in one flake without polluting your current environment

You can also log in to the containers by doing nixos-container root-login <name> and have a peak at what's going on