Created
June 16, 2024 19:20
-
-
Save dln/98acc7f52639335745f4203ce20d36df to your computer and use it in GitHub Desktop.
dev container for systemd-nspawn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ 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