Skip to content

Instantly share code, notes, and snippets.

@dln
Created June 16, 2024 19:20
Show Gist options
  • Save dln/98acc7f52639335745f4203ce20d36df to your computer and use it in GitHub Desktop.
Save dln/98acc7f52639335745f4203ce20d36df to your computer and use it in GitHub Desktop.
dev container for systemd-nspawn
{ pkgs, modulesPath, ... }:
{
imports = [
(modulesPath + "/profiles/minimal.nix")
./nspawn-image.nix
];
boot.isContainer = true;
networking.hostName = "nixos";
# activate Nix Flakes
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
virtualisation = {
containers = {
enable = true;
containersConf.settings = {
containers.keyring = false;
};
};
oci-containers.backend = "podman";
podman = {
enable = true;
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
};
};
environment.systemPackages = with pkgs; [
atuin
bat
bottom
broot
btrfs-progs
cargo
conmon
crun
delta
direnv
doas
doas-sudo-shim
eza
fish
fre
fuse-overlayfs
fzf
git
git-branchless
git-town
gitui
go-task
jless
jq
just
k9s
kubectl
ldns
neovim
podman
podman-compose
procs
ripgrep
skopeo
slirp4netns
starship
tmux
vim
wget
zstd
];
system.stateVersion = "23.11";
# When bootstrapped, use `machinectl shell nixos` and run `passwd` there.
users.users.root.initialHashedPassword = "";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment