add sway on hopper

This commit is contained in:
xunuwu 2025-04-13 11:24:05 +02:00
parent 37cf0f03cb
commit 6b6746b82f
Signed by: xun
SSH key fingerprint: SHA256:Uot/1WoAjWAeqLOHA5vYy4phhVydsH7jCPmBjaPZfgI
2 changed files with 63 additions and 0 deletions

View file

@ -1,6 +1,7 @@
{
inputs,
systemProfiles,
lib,
...
}: {
imports = with systemProfiles; [
@ -9,6 +10,7 @@
./hardware.nix
./lab
./desktop.nix
secrets.default
secrets.hopper
@ -19,6 +21,10 @@
core.ssh
core.deploy
hardware.graphics
hardware.steam-hardware
hardware.bluetooth
nix.default # TODO slim this down
network.tailscale
@ -28,6 +34,17 @@
# services.syncthing # TODO make syncthing not rely on having "xun" user
];
nixpkgs.config = {
allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"nvidia-x11"
"nvidia-settings"
"stremio-shell"
"stremio-server"
];
};
networking.hostName = "hopper";
swapDevices = [];

View file

@ -0,0 +1,46 @@
{
pkgs,
lib,
config,
inputs,
...
}: {
users.users.desktop = {
isNormalUser = true;
useDefaultShell = true;
createHome = true;
extraGroups = [
"input"
"video"
"render"
"audio"
];
};
environment.systemPackages = with pkgs; [
firefox
stremio
];
environment.etc."sway/config.d/custom.conf".text = ''
output HDMI-A-1 {
scale 2.0
}
'';
services.greetd = {
enable = true;
settings = {
default_session = {
command = lib.getExe config.programs.sway.package;
user = "desktop";
};
};
};
programs.sway = {
enable = true;
wrapperFeatures.gtk = true;
extraOptions = ["--unsupported-gpu"];
};
}