From 65627a3ab511aa2f5d1cae5d55458b3c602775ab Mon Sep 17 00:00:00 2001
From: Thiago Sposito
Date: Sun, 5 Oct 2025 22:01:07 -0300
Subject: [PATCH] refactor: reorganize Nix configuration and reintroduce
Waydroid service
- Update Nix configuration files to improve structure and readability
- Reintroduce Waydroid service configuration in common/default.nix
- Adjust formatting for consistency across home-manager and host configurations
---
home-manager/nixstation.nix | 7 ++++---
hosts/Nixstation/default.nix | 19 ++++---------------
hosts/common/default.nix | 12 ++++++++++++
3 files changed, 20 insertions(+), 18 deletions(-)
diff --git a/home-manager/nixstation.nix b/home-manager/nixstation.nix
index 199be62..e05f888 100644
--- a/home-manager/nixstation.nix
+++ b/home-manager/nixstation.nix
@@ -1,6 +1,7 @@
-{ pkgs
-, lib
-, ...
+{
+ pkgs,
+ lib,
+ ...
}:
{
imports = [
diff --git a/hosts/Nixstation/default.nix b/hosts/Nixstation/default.nix
index 5f0131e..e55ae18 100644
--- a/hosts/Nixstation/default.nix
+++ b/hosts/Nixstation/default.nix
@@ -1,5 +1,6 @@
-{ pkgs
-, ...
+{
+ pkgs,
+ ...
}:
{
imports = [
@@ -41,7 +42,7 @@
LC_TIME = "pt_BR.UTF-8";
};
- networking = {
+ networking = {
hostName = "Nixstation";
firewall = {
allowedTCPPorts = [
@@ -142,18 +143,6 @@
};
};
- waydroid-config = {
- description = "Configure Waydroid Properties";
- wantedBy = [ "multi-user.target" ];
- after = [ "waydroid-container.service" ];
- serviceConfig = {
- Type = "oneshot";
- ExecStart = pkgs.writeShellScript "waydroid-config" ''
- echo "ro.hardware.gralloc=default" >> /var/lib/waydroid/waydroid_base.prop
- echo "ro.hardware.egl=swiftshader" >> /var/lib/waydroid/waydroid_base.prop
- '';
- };
- };
};
system.stateVersion = "25.11"; # keep it!
time.timeZone = "America/Sao_Paulo";
diff --git a/hosts/common/default.nix b/hosts/common/default.nix
index bb59b85..b1631e5 100644
--- a/hosts/common/default.nix
+++ b/hosts/common/default.nix
@@ -82,6 +82,18 @@
pkgs.libwacom
pkgs.nitrokey-udev-rules
];
+ waydroid-config = {
+ description = "Configure Waydroid Properties";
+ wantedBy = [ "multi-user.target" ];
+ after = [ "waydroid-container.service" ];
+ serviceConfig = {
+ Type = "oneshot";
+ ExecStart = pkgs.writeShellScript "waydroid-config" ''
+ echo "ro.hardware.gralloc=default" >> /var/lib/waydroid/waydroid_base.prop
+ echo "ro.hardware.egl=swiftshader" >> /var/lib/waydroid/waydroid_base.prop
+ '';
+ };
+ };
};
users.groups.scard = { };