Commit Graph

85 Commits

Author SHA1 Message Date
Hoang Nguyen be19369633
roles: add devd role
Make device_manager configurable on setup (mdev, mdevd, udev) utilizing
the new introduced 'setup-devd' script.
2022-05-20 23:56:47 +07:00
Hoang Nguyen fbef64fdf8
user: make shell configurable, update new realtime config 2022-05-16 16:24:58 +07:00
Hoang Nguyen 40923b16ab
roles: add waydroid; nftables: refactor firewall rules 2022-05-10 23:18:19 +07:00
Hoang Nguyen 26a97d88d4
README: update link to dotfiles 2022-04-17 21:03:47 +07:00
Hoang Nguyen 68d4ac38eb
Yep yep
- nftables: don't masquerade on IPv6 addresses as SNAT doesn't exist in
  IPv6 realm (yet?)
- use `pamd`, `sysctl`, `kernel_blacklist`, `pam_limits`, `mount` Ansible
  modules instead of copying files to the right places
- zram: use loops to dynamically configure zram devices
2022-04-17 19:02:21 +07:00
Hoang Nguyen 3764a538ed
Convert networking stuff to templates
- unbound: add `network_interfaces` variable to control
  /etc/network/interfaces (check interfaces(5))
- nftables: add `libvirt_bridges` and `opened_ports` to
  dynamically generate firewall rules
2022-04-04 13:34:07 +07:00
Hoang Nguyen f737a21719
roles: add 'container' role with podman/nerdctl option
Also enable cgroup v2 explicitly for openrc
2022-03-29 01:15:28 +07:00
Hoang Nguyen f89d1e6d8b
usbguard: restart the service after applying policies 2022-03-28 22:36:44 +07:00
Hoang Nguyen 81c89d0ecb
usbguard: generate policy for connected devices
Also nftables: don't start the service right away (the nftables module
might not be loaded immediately)
2022-03-22 00:23:24 +07:00
Hoang Nguyen a3595c7e21
unbound: delete 'trust-ad' option of resolv.conf
It is glibc specific.
2022-03-08 23:31:38 +07:00
Hoang Nguyen de212d9c3e
user: remove the user from kvm group
Comply with the previous commit
2022-03-05 21:48:31 +07:00
Hoang Nguyen fb1174d0bd
libvirt: allow normal user alone is enough 2022-03-05 16:46:57 +07:00
Hoang Nguyen aca746072d
Fix some lint errors 2022-03-05 13:21:46 +07:00
Hoang Nguyen 9c7cd305db
usbguard: correct permission on config file 2022-03-02 11:58:39 +07:00
Hoang Nguyen 3d492af701
Update README 2022-02-28 15:41:10 +07:00
Hoang Nguyen d1bc71e7f7
Add usbguard role + refactor apk packages 2022-02-27 23:06:06 +07:00
Hoang Nguyen 74bad76431
README: encourage installing only 'ansible-core' 2022-02-27 19:39:13 +07:00
Hoang Nguyen 9796d5beb0
Add Vagrantfile for testing
Also fix some edge cases when testing
2022-02-27 19:20:25 +07:00
Hoang Nguyen 55fcacf5a0
Update README 2022-02-21 15:29:51 +07:00
Hoang Nguyen e7917e143f
Use 'grep -E' instead of 'egrep' 2022-02-18 16:06:08 +07:00
Hoang Nguyen 2dc9852601
essential: make console font configurable 2022-02-17 23:33:22 +07:00
Hoang Nguyen 838516335d
Add acpi events
Also separate seat management into 'seat' role
2022-02-17 11:48:37 +07:00
Hoang Nguyen 6f39686e18
Update README 2022-02-16 01:33:57 +07:00
Hoang Nguyen ac8bd34905
Also use full-path commands in other files
Some regressions from the previous commit. I missed these files.

'echo' is a shell's built-in so leave it be.

Also:
- doas: only allow the user instead of wheel group (there is only me on
  my machine anyway)
2022-02-14 13:53:36 +07:00
Hoang Nguyen ff28a00140
Fix some regressions + tasks revision
DETAILS:
- consolefont: moved to essential role
- unbound: copy the config only after everything is set up correctly
  (or else the validation will complain trusted-key.key and the root
  hints are not in the chroot)
- essential: start dbus service before handling seat management (elogind
  and seatd services depend on dbus)
- use full-path for commands (avoid potential polluted PATH attack)
- apk: use '>-' for the package list. See NOTES

NOTES:
- '|' (literal) interprets new lines with a line break
- '>' (folded) produces a single line with a '\n' at the end
- '>-' (folded_strip) creates a single line without a line break in the
  end
- '>' (folded scalars) joins all the lines with a space (doesn't
  preserve numeric, boolean and other non-string types)

Check https://adminswerk.de/multi-line-string-yaml-ansible-II/ for some
problems on using multiple lines variables
2022-02-14 13:09:33 +07:00
Hoang Nguyen cbb85a7a2c
unbound: update config and tasks for v1.15.0
- use the shipped default config as the template to adjust some values
- add dns-root-hints package
- update tasks to also include the root hints
2022-02-14 02:46:12 +07:00
Hoang Nguyen a324da1788
fstab: remove noatime option
The default value is 'relatime'

flatpak errors out (permission denied mounting proc on
/newroot/proc)
2022-02-12 01:28:27 +07:00
Hoang Nguyen e059193bd7
Big chunk of changes
- essential:
  - make polkit optional
  - move /etc/hosts file to unbound role
- libvirt:
  - make libvirt daemons configurable
  - delete the firewall patch. Hardcode the rules by default (for now)
    so that the playbook is compatible with `ansible-core`
- user: add pam_limits file (moved from dotfiles repository)
- sysctl: role deleted. The task was moved to essential role
- fstab: new role for /run, /tmp, /proc mounts
- add seatd as a 'seat_manager' option
- cron: use find command to restraint deleted files in /var/tmp
2022-02-12 00:56:39 +07:00
Hoang Nguyen bfe1c15a89
unbound: make upstream dns servers configurable 2022-01-28 23:43:31 +07:00
Hoang Nguyen 512b0005c5
Update README 2022-01-26 22:14:22 +07:00
Hoang Nguyen 92e32d0fab
essential: add task to change repository 2022-01-20 23:43:37 +07:00
Hoang Nguyen 3cd277e97c
essential: add /etc/hosts
Also validate unbound config
2022-01-18 23:00:14 +07:00
Hoang Nguyen d5360b4c17
apparmor: remove custom busybox rule
Alpine already merged it:
9669b70049
2022-01-15 15:49:58 +07:00
Hoang Nguyen 92382adbcd
Getting started 2022-01-15 01:46:59 +07:00
Hoang Nguyen a184804a51 Initial commit 2021-10-31 16:14:55 +00:00