feat(hosts): add PineTab2 config

This commit is contained in:
2026-03-26 22:30:44 +01:00
parent 673b32c33b
commit 808e2ce408
24 changed files with 359 additions and 141 deletions

View File

@@ -0,0 +1,75 @@
{
config,
inputs,
...
}: {
imports = [
inputs.sops-nix.nixosModules.sops
../../system/desktop
../../system/dev
../../system/hardware
../../system/i18n
../../system/misc.nix
../../system/network
../../system/packages
../../system/security
../../system/services
../../system/users
];
system.stateVersion = "25.11";
# documentation.nixos.enable = false;
# nix.settings.trusted-users = ["root" "@wheel"];
mySystem = {
desktop = {
hyprland.enable = true;
niri.enable = true;
waydroid.enable = true;
xserver = {
enable = true;
de = "gnome";
};
};
dev.docker = {
enable = true;
podman.enable = true;
autoprune.enable = true;
};
hardware = {
bluetooth.enable = true;
input.opentablet.enable = true;
sound.enable = true;
};
i18n.input.enable = true;
misc.keymap = "fr-bepo";
networking = {
hostname = "pinetab2";
id = "99a11b15";
wifi.disablePowersave = true;
};
packages = {
appimage.enable = true;
flatpak.enable = true;
nix = {
gc.automatic = true;
nix-ld.enable = true;
};
};
services.ssh.enable = true;
users = {
root.disablePassword = true;
phundrak = {
enable = true;
trusted = true;
};
};
};
sops.secrets.extraHosts = {
inherit (config.users.users.root) group;
owner = config.users.users.phundrak.name;
mode = "0440";
};
}

37
hosts/pinetab2/gnome.nix Normal file
View File

@@ -0,0 +1,37 @@
{
pkgs,
config,
...
}: {
# https://github.com/systemd/systemd/pull/35304#issuecomment-3855146191
# gnome autorotate expects 'normal' is the _display panel_ normal, but
# mutter autoconfiguration rotates by 90deg.
# compensating with gdctl for now, though it would be better to 'properly'
# fix this.
services.udev = {
extraHwdb = ''
sensor:modalias:*sc7a20:*
ACCEL_MOUNT_MATRIX=1, 0, 0; 0, 0, 1; 0, 1, 0
'';
extraRules = ''
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="1018", ATTRS{idProduct}=="1006", ENV{SYSTEMD_WANTS}+="landscape.service", TAG+="systemd"
'';
};
systemd.services.landscape = {
script = ''
${pkgs.mutter}/bin/gdctl set --logical-monitor --primary --monitor=DSI-1 --transform normal
'';
serviceConfig.User = "phundrak";
serviceConfig.Type = "oneshot";
environment = {
"DBUS_SESSION_BUS_ADDRESS" = "unix:path=/run/user/${toString config.users.users."phundrak".uid}/bus";
};
};
environment.systemPackages = with pkgs; [
gnomeExtensions.arc-menu
gnomeExtensions.dash-to-dock
gnomeExtensions.dash-to-panel
gnomeExtensions.gjs-osk
gnomeExtensions.one-window-wonderland
];
}