Created
September 8, 2023 14:37
-
-
Save offlinehacker/a509d112dfbe693d3673e44feb48064b to your computer and use it in GitHub Desktop.
Ubuntu dev lxc profile with cloud-init
This file contains hidden or 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
config: | |
user.user-data: | | |
#cloud-config | |
package_upgrade: true | |
packages: | |
- vim | |
- nano | |
- git | |
- curl | |
- wget | |
- nix-bin | |
- direnv | |
- openssh-server | |
- docker.io | |
# add code user | |
users: | |
- name: default | |
- name: code | |
ssh-authorized-keys: | |
- 'ssh-rsa ....' | |
sudo: ALL=(ALL) NOPASSWD:ALL | |
groups: users | |
shell: /bin/bash | |
locale: en_US.UTF-8 | |
timezone: Europe/Ljubljana | |
write_files: | |
- path: /etc/nix/nix.conf | |
content: | | |
# see https://nixos.org/nix/manual/#sec-conf-file | |
sandbox = true | |
experimental-features = nix-command flakes | |
runcmd: | |
- usermod -a -G nix-users,docker code | |
- systemctl enable nix-daemon.service nix-daemon.socket ssh.service | |
- systemctl start nix-daemon.socket ssh.service | |
- cp /usr/share/doc/nix-bin/examples/nix-profile-daemon.sh /etc/profile.d/nix-profile-daemon.sh | |
description: Default LXD profile | |
devices: | |
eth0: | |
name: eth0 | |
network: lxdbr0 | |
type: nic | |
root: | |
path: / | |
pool: default | |
type: disk | |
name: ubuntu-dev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment