Commit Graph

20 Commits

Author SHA1 Message Date
Hoang Nguyen 62f28a2c92
cron: add scrub and trim jobs for btrfs/zfs
No longer depend on `rootfs` variable.
2023-06-20 00:00:00 +07:00
Hoang Nguyen 2d6a1bb57d
Update rootfs check
zfs isn't recognizable by ansible_mounts fact.
2023-06-18 00:00:00 +07:00
Hoang Nguyen 4007998edf
snapshot: add support for btrbk
Also simplify `use_polkit` check everwhere.
2023-06-16 00:00:00 +07:00
Hoang Nguyen 40ac02c67e
snapshot: add new role with 'snapper' option
btrbk will be next \^*^/

Also:
- detect the root filesystem in play with `ansible_mounts` instead
  of specifying it manually.
- dnscrypt: hardcode some privacy settings
2023-06-16 00:00:00 +07:00
Hoang Nguyen ec72f75587
Add 'ntpd' and 'auditd' roles
More changes:
- Remove 'grub' role. We shouldn't touch anything related to the
  bootloader here, as it's dangerous. I'll write docs for myself on
  this.
- Fix linting here and there, so ansible-lint won't complain
- Refactor group_vars/all.yml to be more readable
2023-04-06 00:00:00 +07:00
Hoang Nguyen fb9c5ebaed
Add PAM config for base-session
c199f2b52e.

Also:
- Use TOML as inventory format (to disgust YAML ^-^)
- Adjust TODO list:
  - drop go-audit (unmaintained upstream)
  - add turnstile (more interesting than pam-rundir)
- Drop waydroid role as upstream system config script is a mess
2023-04-01 00:00:00 +07:00
Hoang Nguyen 39f736f34c
Small changes here and there
- container: role removed
- ansible:
  - use FQDN module path community.general.packaging.os.apk
  - use "true, false" instead of "yes, no" (stop being annoying, yamllint)
2022-10-16 17:41:04 +07:00
Hoang Nguyen 8e61893c93
Some beginning works for component customization 2022-10-01 21:15:29 +07:00
Hoang Nguyen 90ba790ee7
Move hardcoded variable use_polkit to main playbook
group_vars/ should be used for changeable variables.

Also rename `kernel_parameters` variable to `additional_kernel_parameters`
(expect other bootloaders configuration to come :v)
2022-08-18 19:56:44 +07:00
Hoang Nguyen 8d151d727f
earlyoom: remove earlyoom.enabled config
I forgot that --skip-tags exists.
2022-07-24 22:55:12 +07:00
Hoang Nguyen b2f0cd6808
roles: add earlyoom role 2022-07-23 18:43:38 +07:00
Hoang Nguyen 0b9a54783e
Tons of cool things
- unbound: rename role to 'dns', add dnscrypt-proxy tasks
- devd: add sample udev rules
- apparmor: move kernel parameters to group_vars
2022-06-20 01:29:26 +07:00
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 40923b16ab
roles: add waydroid; nftables: refactor firewall rules 2022-05-10 23:18:19 +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 d1bc71e7f7
Add usbguard role + refactor apk packages 2022-02-27 23:06:06 +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 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 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 92382adbcd
Getting started 2022-01-15 01:46:59 +07:00