Commit graph

68 commits

Author SHA1 Message Date
db562158f7
feat(packages): Add personal repository
Add my own package repository and let users define additional custom
repositories to install. Enable installation of packages from my
repository.
2025-03-16 17:44:20 +01:00
5cd967b6e5
packages: Add python3-adblock for qutebrowser 2025-03-16 17:44:19 +01:00
5dd160727a
fix(roles): Default to root as user name
Always default to 'root' as a user_name if no variable has been set.
This can easily happen as not every role sets the variable and instead
we only set it once in the user role. 

Another way to possibly go about it in the future would be to inject the
'user_name' into each role that needs it as one of that role's default
variables. If it is specified by the user somewhere it _should_
override those defaults, though I have to read up on the exact variable
precedence.
2025-03-16 17:44:19 +01:00
a0ea10542d
ref(base): Change initramfs created filename
Since void defaults to building an 'initramfs-<kernelversion>.img' file
when running the update hook, I think it is just correct if we follow
their example.

This will make it harder to distinguish between kernels if you have many
others in the boot dir (e.g. Arch, or LTS) but that seems only an edge
case.
2025-03-16 17:44:18 +01:00
421df69cc9
feat(acpi): Add custom LID event handling
We disable the default ACPI handler script logic for LID events.
We _only_ disable that in the script - the default handler script will
still fire for LID events, just not do anything in its routine. That is
so that in the future it is easy to rectify with any upstream changes.
If, over time we add more custom event and action chain to our ACPI
settings, we can think about spinning out all event types into our own
rules and completely disabling the deafult handler script.

Our custom LID action only fires for LID open close events, and only
logs that the lid has been opened for open events. For close events, it
adds one extra step before suspending: Checking if any DP screens are
connected - and inhibiting suspend then. That way we still automatically
suspend when closing the screen lid if we are in portable mode (no
external screens connected) but do nothing if they are.
2025-03-13 11:24:17 +01:00
d168115f81
ref(acpi): Spin out acpi role 2025-03-13 11:24:16 +01:00
dc78da4d03
feat(pipewire): Add alsa integration
Any programs running through alsa only (such as spotify_player on
voidlinux) should now also work correctly through the pipewire stack.
2025-03-13 11:24:16 +01:00
317b931de0
feat(basic): Add socklog service
Allows the primary user to read syslogs (and daemon logs which get
transferred to syslogs).
2025-03-13 11:24:15 +01:00
af374b825b
docs: Update readme and add headless packages 2025-03-13 11:24:15 +01:00
afac310f21
ref(roles): All roles use desired package state
By setting the `desired_package_state` variable we can change if ansible
should only ensure that the packages exist on the system (`present`) or
that they are also updated to their latest version (`latest`).
2025-03-13 11:24:14 +01:00
5817a81f40
fix(playbooks): Remove duplicated play keys 2025-03-13 11:24:14 +01:00
030b8ec291
ref(inventory): Split up inventory into group vars
One inventory targets a local machine (`inv-local.yaml`, chosen by default)
while the other targets a chrooted installation accessible from another
system, usually in the `/mnt/void` directory (`inv-chroot.yaml`, has to
be called like `ansible-playbook -i inv-chroot.yaml`).
2025-03-13 11:24:13 +01:00
19162e2af3
feat(backup): Add restic backup
Restic backup creates a snapper snapshot of the root system which it
then chroots into and starts a restic backup to a (wasabi) S3 bucket to.

Intended to roughly follow this
<https://codeberg.org/silmaril/my-restic-solution> solution to achieve
restic backup of the _newest_ snapshot of my live root system.
2025-03-13 11:24:13 +01:00
2400bbf1af
feat(backup): Default to root user using snapper
If no primary user is defined in the playbooks, we give only the root
user access to the snapper command by default.
2025-03-13 11:24:12 +01:00
b3b280fbe4
ref(playbook): Change to role-based structure 2025-03-13 11:24:08 +01:00
95fd68bed8
docs(repo): Add custom repository to roadmap 2025-02-27 11:18:02 +01:00
ba3a8b3073
feat(wayland): Add qt5 and qt6 wayland libraries 2025-02-27 11:18:01 +01:00
d4d0a68e63
feat(base): Set up iwd wireless service 2025-02-27 11:18:00 +01:00
7fe5d085fd
feat(wayland): Add display manager greetd and greeter tuigreet
Sets up a login screen using tuigreet. From there the user is thrown
into a shell. Other units/services (usually, the user service `river`)
take care to start an actual wayland session for the user.
2025-02-27 11:18:00 +01:00
4a5faec829
fix(power): Fix name of power group sudo file 2025-02-27 11:17:59 +01:00
555a255e8a docs(repo): Add roadmap 2025-02-27 10:44:14 +01:00
0d648a5e55
feat(snooze): Enable snooze repetition services
Runs all cron scripts every hour/day/week/month.
2025-02-27 09:33:27 +01:00
8301bfb522
feat(snapper): Add manual snap script
Can be run before dangerous commands to create a quick backup of the
system before running it.
2025-02-26 22:33:08 +01:00
e112bb3078
feat(base): Add snapper setup stack
Creates separate snapper services for root and home directories. Does
_not_ yet set up any btrfs mounts or ensure that they are mounted at the
locations.
2025-02-26 22:33:07 +01:00
1691e0402c
ref(base): Rename hostname template to carry j2 extension 2025-02-26 22:33:07 +01:00
f19ac8bce8
feat(power): Allow user to manage system power states
User is put into the 'power' group, and everyone in the group can
interact with system power events (hibernate, suspend, reboot, shutdown,
halt, etc).
2025-02-26 22:33:06 +01:00
2a25c840b8
ref(user): Add sudo permissions with dropin file
Instead of changing a line in the sudoers file we just copy a new
drop-in file into the sudoers.d/ dir. Easier, less error-prone and
allows everyone to see 'who' the sudo enabled users are (since it is
world readable).
2025-02-26 22:33:06 +01:00
d6636d5b09
fix(groups): Always ensure groups exist before assigning users 2025-02-26 22:33:05 +01:00
e0d88a9ee1
feat(system): Move user services to XDG_STATE_HOME directory
User services under control of runit under turnstiled now default to the
`~/.local/state/service/` directory (and `~/.local/state/service-env/`
for the env vars). This mimics the system-wide runit setup, with service
templates kept in `/etc/sv` (in my case `~/.config/sv` for user
services) and active ones in `/var/service`
2025-02-26 22:33:05 +01:00
adfa7f1167
fix(repo): loading templates and files from book directory
For now, putting the associated files simply within the books/ directory
as well is the simplest solution. It also removes some clutter from the
root directory. If we refactor later, this will be changed overall
anyway.
2025-02-26 22:33:01 +01:00
6fe7956f43 feat(packages): Add gnupg and smartcard play 2025-02-26 18:55:55 +01:00
8b778c1b33 feat(packages): Add bluetooth stack 2025-02-26 18:55:55 +01:00
3de5e42b28 feat(audio): Add pipewire stack 2025-02-26 18:55:55 +01:00
3bcf928bc5 feat(inventory): Add local inventory
Can be used to have the ansible playbook run on the currently running
(host) machine, using a local connection instead of a chroot.

TODO: This _will_ change your host machine so be careful running this.
Additionally, we need to find a way to deduplicate the inventory
variables since we have them doubled for chroot/local now.
2025-02-26 18:55:55 +01:00
cf9e8165df
ref(inventory): Create target type indirection
Allows setting the current target to any of the groups sorted by target
type (i.e. 'what' type of machine it is). For example, we currently
target our system to a 'workstation' type machine. But we could switch
it to a headless machine which would not install any of the DE/GUI
grouped packages.
2025-02-23 11:39:26 +01:00
38a4425d94
fix(inventory): Correctly assign groups to keep vars
If assigning a list of 'host's to a group those become actual hosts and
have their own host variables. What we want to use groups with
child/parent relationships to group things is to not directly use hosts.
2025-02-23 11:39:25 +01:00
aae6b2d7ff
ref(inventory): Split packages into groups 2025-02-23 11:39:25 +01:00
8e79c5f804
ref(playbook): Move all plays into separate directory 2025-02-23 11:39:24 +01:00
996560410e
ref(inventory): Make chroot target one child of target systems
This should allow just having a general 'target' system for ansible
which will take all the modifications - but not care whether we connect
to it locally (i.e. running from void) or through chroot.

We can set the connection method for the specific system(s) in whatever
we group as part of the target group then. For local installation we
simply add locally connected hosts and for chroot set up chrooted hosts.
2025-02-23 11:39:24 +01:00
9138d7b66b
ref(chroot): Move exe selection to host variable 2025-02-23 11:39:23 +01:00
b07d7be58d
feat(packages): Set desired package state in group var 2025-02-23 11:39:23 +01:00
55d752ee19
feat(packages): Create unified installation task 2025-02-23 11:39:22 +01:00
7fa1fd38a1
feat(packages): Move font packages to group var 2025-02-23 11:39:22 +01:00
e226be23e9
chore(packages): Formatting 2025-02-23 11:39:21 +01:00
db76d2ae58
feat(packages): Add de interface installation stack
contains input interfaces, display, fonts, etc - all running in
graphical (wayland) environment
2025-02-23 11:39:21 +01:00
b3c5347143
feat(inventory): Change to yaml definition 2025-02-23 11:39:20 +01:00
79a30d2adb
fix(wayland): Do not call non-existent handler 2025-02-23 11:39:19 +01:00
9775627854
ref(packages): Rename from custom to packages 2025-02-23 11:39:19 +01:00
e70b6428fd
ref(inventory): Rename guest group to void 2025-02-23 11:39:18 +01:00
05fd2e1324
feat(custom): Add riverwm and fonts 2025-02-23 10:12:35 +01:00