clean up the house a bit
This commit is contained in:
@@ -11,15 +11,6 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
|
||||||
oreo = pkgs.callPackage ./personalPKGS/oreo.nix { };
|
|
||||||
|
|
||||||
# Window manager toggles
|
|
||||||
wmAll = window_manager == "all";
|
|
||||||
useRiver = window_manager == "river" || wmAll;
|
|
||||||
useNiri = window_manager == "niri" || wmAll;
|
|
||||||
useHypr = window_manager == "hyprland" || wmAll;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
@@ -50,59 +41,62 @@ in
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
users = {
|
users = {
|
||||||
users.mrfluffy = {
|
users = {
|
||||||
isNormalUser = true;
|
mrfluffy = {
|
||||||
shell = pkgs.zsh;
|
isNormalUser = true;
|
||||||
createHome = true;
|
shell = pkgs.zsh;
|
||||||
extraGroups = [
|
createHome = true;
|
||||||
"wheel"
|
extraGroups = [
|
||||||
"networkmanager"
|
"wheel"
|
||||||
"video"
|
"networkmanager"
|
||||||
"render"
|
"video"
|
||||||
"docker"
|
"render"
|
||||||
"libvirt"
|
"docker"
|
||||||
"input"
|
"libvirt"
|
||||||
"seat"
|
"input"
|
||||||
];
|
"seat"
|
||||||
packages = with pkgs; [ ];
|
];
|
||||||
};
|
packages = with pkgs; [ ];
|
||||||
|
};
|
||||||
|
|
||||||
users.work = {
|
work = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
createHome = true;
|
createHome = true;
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"wheel"
|
"wheel"
|
||||||
"networkmanager"
|
"networkmanager"
|
||||||
"video"
|
"video"
|
||||||
"render"
|
"render"
|
||||||
"docker"
|
"docker"
|
||||||
"libvirt"
|
"libvirt"
|
||||||
"input"
|
"input"
|
||||||
"seat"
|
"seat"
|
||||||
];
|
];
|
||||||
packages = with pkgs; [ ];
|
packages = with pkgs; [ ];
|
||||||
|
};
|
||||||
|
game = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "Dedicated gaming user (auto-login in Steam specialisation)";
|
||||||
|
shell = pkgs.bash;
|
||||||
|
createHome = true;
|
||||||
|
password = ""; # no password
|
||||||
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
"video"
|
||||||
|
"render"
|
||||||
|
"input"
|
||||||
|
"seat"
|
||||||
|
"networkmanager"
|
||||||
|
];
|
||||||
|
home = "/home/game";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
users.game = {
|
groups.libvirtd.members = [
|
||||||
isNormalUser = true;
|
"mrfluffy"
|
||||||
description = "Dedicated gaming user (auto-login in Steam specialisation)";
|
"work"
|
||||||
shell = pkgs.bash;
|
|
||||||
createHome = true;
|
|
||||||
password = ""; # no password
|
|
||||||
extraGroups = [
|
|
||||||
"wheel"
|
|
||||||
"video"
|
|
||||||
"render"
|
|
||||||
"input"
|
|
||||||
"seat"
|
|
||||||
"networkmanager"
|
|
||||||
];
|
];
|
||||||
home = "/home/game";
|
|
||||||
};
|
|
||||||
groups.libvirtd.members = [
|
|
||||||
"mrfluffy"
|
|
||||||
"work"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# Home-Manager
|
# Home-Manager
|
||||||
@@ -173,106 +167,9 @@ in
|
|||||||
specialisation = {
|
specialisation = {
|
||||||
"01-steam" = {
|
"01-steam" = {
|
||||||
configuration = {
|
configuration = {
|
||||||
|
imports = [
|
||||||
boot = {
|
./system/specialisation/steam.nix
|
||||||
kernelParams = lib.mkForce [ "ipv6e=1" "quiet" "splash"];
|
];
|
||||||
plymouth = {
|
|
||||||
enable = true;
|
|
||||||
themePackages = [ pkgs.adi1090x-plymouth-themes ];
|
|
||||||
theme = "abstract_ring_alt";
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
# ── HDMI-CEC: Turn on TV when Steam specialisation starts ─────────────────────
|
|
||||||
services.udev.packages = [ pkgs.libcec ]; # ensures cec-utils is in PATH
|
|
||||||
services.blueman.enable = true;
|
|
||||||
services.seatd.enable = true;
|
|
||||||
|
|
||||||
# A user service that runs once the graphical session (Steam/GameScope) is ready
|
|
||||||
#systemd.user.services.cec-tv-on = {
|
|
||||||
# description = "Turn on TV via HDMI-CEC when entering Steam specialisation";
|
|
||||||
# wantedBy = [ "graphical-session.target" ];
|
|
||||||
# after = [ "graphical-session.target" ];
|
|
||||||
# serviceConfig = {
|
|
||||||
# Type = "oneshot";
|
|
||||||
# RemainAfterExit = true;
|
|
||||||
# ExecStart = toString (
|
|
||||||
# pkgs.writeShellScript "cec-tv-on.sh" ''
|
|
||||||
# # Wait a moment for the HDMI link to settle
|
|
||||||
# sleep 3
|
|
||||||
|
|
||||||
# # Turn on the TV and set it as active source (most TVs understand this)
|
|
||||||
# ${pkgs.libcec}/bin/cec-client -s -d 1 <<EOF
|
|
||||||
# on 0
|
|
||||||
# as
|
|
||||||
# EOF
|
|
||||||
|
|
||||||
# # Alternative one-liner if the above somehow fails:
|
|
||||||
# # echo 'on 0' | ${pkgs.libcec}/bin/cec-client -s -d 1
|
|
||||||
# # echo 'as' | ${pkgs.libcec}/bin/cec-client -s -d 1
|
|
||||||
# ''
|
|
||||||
# );
|
|
||||||
# };
|
|
||||||
#};
|
|
||||||
|
|
||||||
# THIS is the important part – direct boot into the Gamescope Steam session
|
|
||||||
services.greetd = {
|
|
||||||
enable = true;
|
|
||||||
restart = true;
|
|
||||||
settings = {
|
|
||||||
# Tell greetd to auto-start the official gamescope steam session immediately
|
|
||||||
default_session = {
|
|
||||||
command = "${pkgs.gamescope}/bin/gamescope --prefer-outpu HDMI-A-2 --hdr-enabled --steam --mangoapp -- steam -pipewire-dmabuf -gamepadui -steamos3 > /dev/null 2>&1";
|
|
||||||
user = "game";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Auto-login the game user (no password prompt ever)
|
|
||||||
services.getty.autologinUser = "game";
|
|
||||||
# Make sure the user service starts automatically
|
|
||||||
systemd.user.targets.graphical-session = {
|
|
||||||
# This target already exists, we just ensure it’s active
|
|
||||||
unitConfig = {
|
|
||||||
RefuseManualStart = false;
|
|
||||||
RefuseManualStop = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment = {
|
|
||||||
systemPackages = with pkgs; [
|
|
||||||
mangohud
|
|
||||||
gamemode
|
|
||||||
gamescope-wsi
|
|
||||||
];
|
|
||||||
variables = {
|
|
||||||
#LIBSEAT_BACKEND = "logind";
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
programs = {
|
|
||||||
gamescope = {
|
|
||||||
enable = true;
|
|
||||||
capSysNice = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
steam = {
|
|
||||||
enable = true;
|
|
||||||
remotePlay.openFirewall = true;
|
|
||||||
dedicatedServer.openFirewall = true;
|
|
||||||
extraCompatPackages = with pkgs; [
|
|
||||||
gamescope
|
|
||||||
mangohud
|
|
||||||
gamemode
|
|
||||||
gamescope-wsi
|
|
||||||
];
|
|
||||||
gamescopeSession = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -285,95 +182,9 @@ in
|
|||||||
imports = [
|
imports = [
|
||||||
./system/services.nix
|
./system/services.nix
|
||||||
./system/nixOSPkgs.nix
|
./system/nixOSPkgs.nix
|
||||||
|
./system/specialisation/main-system.nix
|
||||||
#inputs.niri.nixosModules.niri
|
#inputs.niri.nixosModules.niri
|
||||||
];
|
];
|
||||||
|
|
||||||
# greetd + tuigreet
|
|
||||||
services.greetd = {
|
|
||||||
enable = true;
|
|
||||||
restart = true;
|
|
||||||
useTextGreeter = true;
|
|
||||||
settings.default_session = {
|
|
||||||
command = "${lib.getExe pkgs.tuigreet} --window-padding 1 --time --time-format '%R - %F' --remember --remember-session --asterisks";
|
|
||||||
user = "greeter";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
# Desktop / WM
|
|
||||||
##############################################################################
|
|
||||||
programs.river-classic.enable = useRiver;
|
|
||||||
|
|
||||||
qt = {
|
|
||||||
enable = true;
|
|
||||||
# style = "gtk2";
|
|
||||||
platformTheme = "qt5ct";
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.menus.enable = true;
|
|
||||||
|
|
||||||
# Work around Dolphin menu oddities: force Plasma menu definition
|
|
||||||
environment.etc."/xdg/menus/applications.menu".text =
|
|
||||||
builtins.readFile "${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu";
|
|
||||||
|
|
||||||
# Niri (via overlay)
|
|
||||||
#nixpkgs.overlays = [ inputs.niri.overlays.niri ];
|
|
||||||
#programs.niri = {
|
|
||||||
# enable = useNiri;
|
|
||||||
# package = pkgs.niri-stable; # Only needed if not provided by the overlay
|
|
||||||
#};
|
|
||||||
|
|
||||||
# Hyprland
|
|
||||||
programs.hyprland = {
|
|
||||||
enable = useHypr;
|
|
||||||
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
|
||||||
};
|
|
||||||
|
|
||||||
# X11 base (kept enabled for keymap + DM if needed)
|
|
||||||
services.xserver = {
|
|
||||||
enable = true;
|
|
||||||
xkb = {
|
|
||||||
layout = "ie";
|
|
||||||
variant = "";
|
|
||||||
};
|
|
||||||
|
|
||||||
# displayManager.lightdm = {
|
|
||||||
# enable = true;
|
|
||||||
# greeters.gtk = {
|
|
||||||
# enable = true;
|
|
||||||
# theme.package = pkgs.amarena-theme;
|
|
||||||
# theme.name = "amarena";
|
|
||||||
# cursorTheme.package = oreo.override { colors = [ "oreo_spark_pink_cursors" ]; };
|
|
||||||
# cursorTheme.name = "oreo_spark_pink_cursors";
|
|
||||||
# extraConfig = "background=${./assets/Wallpapers/138.png}";
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
};
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
# Security / PolicyKit / PAM
|
|
||||||
##############################################################################
|
|
||||||
security = {
|
|
||||||
rtkit.enable = true;
|
|
||||||
polkit.enable = true;
|
|
||||||
pam.services = {
|
|
||||||
swaylock = { };
|
|
||||||
greetd.enableGnomeKeyring = true;
|
|
||||||
greetd.kwallet.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
# Virtualisation
|
|
||||||
##############################################################################
|
|
||||||
virtualisation = {
|
|
||||||
docker = {
|
|
||||||
enable = true;
|
|
||||||
storageDriver = lib.mkIf (systemName == "pc") "btrfs";
|
|
||||||
};
|
|
||||||
libvirtd.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
GNUPGHOME = "$XDG_DATA_HOME/gnupg";
|
GNUPGHOME = "$XDG_DATA_HOME/gnupg";
|
||||||
GOPATH = "$XDG_DATA_HOME/go";
|
GOPATH = "$XDG_DATA_HOME/go";
|
||||||
GRADLE_USER_HOME = "$XDG_DATA_HOME/gradle";
|
GRADLE_USER_HOME = "$XDG_DATA_HOME/gradle";
|
||||||
IPYTHONDIR = "$XDG_CONFIG_HOMEipython";
|
IPYTHONDIR = "$XDG_CONFIG_HOME/ipython";
|
||||||
JUPYTER_CONFIG_DIR = "$XDG_CONFIG_HOME/jupyter";
|
JUPYTER_CONFIG_DIR = "$XDG_CONFIG_HOME/jupyter";
|
||||||
LESSHISTFILE = "$XDG_CACHE_HOME/less/history";
|
LESSHISTFILE = "$XDG_CACHE_HOME/less/history";
|
||||||
NUGET_PACKAGES = "$XDG_CACHE_HOME/NuGetPackages";
|
NUGET_PACKAGES = "$XDG_CACHE_HOME/NuGetPackages";
|
||||||
@@ -44,9 +44,9 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
nix-switch = "nh os switch --specialisation 00-main-system";
|
ns = "nh os switch --specialisation 00-main-system";
|
||||||
nix-upgrade = "(cd ~/nixos-dots && nix flake update) && echo 'flake.lock updated'";
|
nu = "(cd ~/nixos-dots && nix flake update) && echo 'flake.lock updated'";
|
||||||
nix-edit = "sudo vim /etc/nixos/configuration.nix";
|
ne = "emacsclient -c ~/nixos-dots/configuration.nix";
|
||||||
|
|
||||||
ls = "exa -lag --icons";
|
ls = "exa -lag --icons";
|
||||||
upload = "~/.config/script/upload.sh";
|
upload = "~/.config/script/upload.sh";
|
||||||
|
|||||||
48
flake.lock
generated
48
flake.lock
generated
@@ -271,11 +271,11 @@
|
|||||||
"nixpkgs-lib": "nixpkgs-lib_2"
|
"nixpkgs-lib": "nixpkgs-lib_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1754091436,
|
"lastModified": 1763759067,
|
||||||
"narHash": "sha256-XKqDMN1/Qj1DKivQvscI4vmHfDfvYR2pfuFOJiCeewM=",
|
"narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "67df8c627c2c39c41dbec76a1f201929929ab0bd",
|
"rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -369,11 +369,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765337252,
|
"lastModified": 1765480374,
|
||||||
"narHash": "sha256-HuWQp8fM25fyWflbuunQkQI62Hg0ecJxWD52FAgmxqY=",
|
"narHash": "sha256-HlbvQAqLx7WqZFFQZ8nu5UUJAVlXiV/kqKbyueA8srw=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "13cc1efd78b943b98c08d74c9060a5b59bf86921",
|
"rev": "39cb677ed9e908e90478aa9fe5f3383dfc1a63f3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -459,11 +459,11 @@
|
|||||||
"xdph": "xdph"
|
"xdph": "xdph"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765456802,
|
"lastModified": 1765497587,
|
||||||
"narHash": "sha256-KAwcM3w98TxiGlBnWYxhTdHM1vZZhzeeXaEE647REZ0=",
|
"narHash": "sha256-5y9GUuRo3mjCk3gzR73kQy9trbS8vJ5fv7d7bGBSoyE=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "Hyprland",
|
"repo": "Hyprland",
|
||||||
"rev": "2ca7ad7efc1e20588af5c823ee46f23afad6cf91",
|
"rev": "8dfdcfb35385eabb821e668d327b30ea3e483ab8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -762,11 +762,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765365489,
|
"lastModified": 1765526639,
|
||||||
"narHash": "sha256-L0uvs+o8P5JzEcTPe2WPA48+0ZiO6+8nlfh7XSjQql4=",
|
"narHash": "sha256-4U8crbUT3PDQdqhaMLnVaxnciBlcnDAw8XAJaXiS0pA=",
|
||||||
"owner": "Jovian-Experiments",
|
"owner": "Jovian-Experiments",
|
||||||
"repo": "Jovian-NixOS",
|
"repo": "Jovian-NixOS",
|
||||||
"rev": "ddf5db234397043a8af5c38433b5ae933d660f27",
|
"rev": "457a55ed77a105088a47cb55b9eccf7768559451",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -903,11 +903,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765440299,
|
"lastModified": 1765526583,
|
||||||
"narHash": "sha256-pFbREAtYotjEo059YRGsjn9+nOLuwuOEJQ9cOV9Kc5g=",
|
"narHash": "sha256-bs2XpZoTssyKZ+nGRUNF1NeLO+a42bXYAEXpGD2GE0U=",
|
||||||
"owner": "kaylorben",
|
"owner": "kaylorben",
|
||||||
"repo": "nixcord",
|
"repo": "nixcord",
|
||||||
"rev": "a68a319cbca0915da385b36b11f5aa2df8cf6e7a",
|
"rev": "d76f222b1339572df43441f39b4565afa3637b54",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -949,11 +949,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-lib_2": {
|
"nixpkgs-lib_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1753579242,
|
"lastModified": 1761765539,
|
||||||
"narHash": "sha256-zvaMGVn14/Zz8hnp4VWT9xVnhc8vuL3TStRqwk22biA=",
|
"narHash": "sha256-b0yj6kfvO8ApcSE+QmA6mUfu8IYG6/uU28OFn4PaC8M=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs.lib",
|
"repo": "nixpkgs.lib",
|
||||||
"rev": "0f36c44e01a6129be94e3ade315a5883f0228a6e",
|
"rev": "719359f4562934ae99f5443f20aa06c2ffff91fc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -1197,11 +1197,11 @@
|
|||||||
"tinted-zed": "tinted-zed"
|
"tinted-zed": "tinted-zed"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765386911,
|
"lastModified": 1765474444,
|
||||||
"narHash": "sha256-YLjQpnTZCMjCho7ZDs5O1yFVw+fDlXq4lSJDuLWHHeA=",
|
"narHash": "sha256-sDG+c73xEnIw1pFNRWffKDnTWiTuyZiEP+Iub0D3mWA=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "stylix",
|
"repo": "stylix",
|
||||||
"rev": "cb6bbed75eaca21deb8950c2ec0036ae5cde18ca",
|
"rev": "dd14de4432a94e93e10d0159f1d411487e435e1e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -1406,11 +1406,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765430623,
|
"lastModified": 1765514052,
|
||||||
"narHash": "sha256-YfJwnCXF3V+WFedx4RtrIdZ8XxF6zB1Oh2ij/EHzoWk=",
|
"narHash": "sha256-YdwI+u4exAo0nRZsC9arapchD4Urt5Oeo+wZIrvlMa4=",
|
||||||
"owner": "0xc000022070",
|
"owner": "0xc000022070",
|
||||||
"repo": "zen-browser-flake",
|
"repo": "zen-browser-flake",
|
||||||
"rev": "f2881ba36cbfc86ef1fe741cec871fe523aea5bd",
|
"rev": "3f55518bd994195cfdd835e86c41e984ac1241e8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
108
system/specialisation/main-system.nix
Normal file
108
system/specialisation/main-system.nix
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
window_manager,
|
||||||
|
systemName,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
oreo = pkgs.callPackage ./personalPKGS/oreo.nix { };
|
||||||
|
|
||||||
|
# Window manager toggles
|
||||||
|
wmAll = window_manager == "all";
|
||||||
|
useRiver = window_manager == "river" || wmAll;
|
||||||
|
useNiri = window_manager == "niri" || wmAll;
|
||||||
|
useHypr = window_manager == "hyprland" || wmAll;
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
# greetd + tuigreet
|
||||||
|
services.greetd = {
|
||||||
|
enable = true;
|
||||||
|
restart = true;
|
||||||
|
useTextGreeter = true;
|
||||||
|
settings.default_session = {
|
||||||
|
command = "${lib.getExe pkgs.tuigreet} --window-padding 1 --time --time-format '%R - %F' --remember --remember-session --asterisks";
|
||||||
|
user = "greeter";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Desktop / WM
|
||||||
|
##############################################################################
|
||||||
|
programs.river-classic.enable = useRiver;
|
||||||
|
|
||||||
|
qt = {
|
||||||
|
enable = true;
|
||||||
|
# style = "gtk2";
|
||||||
|
platformTheme = "qt5ct";
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.menus.enable = true;
|
||||||
|
|
||||||
|
# Work around Dolphin menu oddities: force Plasma menu definition
|
||||||
|
environment.etc."/xdg/menus/applications.menu".text =
|
||||||
|
builtins.readFile "${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu";
|
||||||
|
|
||||||
|
# Niri (via overlay)
|
||||||
|
#nixpkgs.overlays = [ inputs.niri.overlays.niri ];
|
||||||
|
#programs.niri = {
|
||||||
|
# enable = useNiri;
|
||||||
|
# package = pkgs.niri-stable; # Only needed if not provided by the overlay
|
||||||
|
#};
|
||||||
|
|
||||||
|
# Hyprland
|
||||||
|
programs.hyprland = {
|
||||||
|
enable = useHypr;
|
||||||
|
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
||||||
|
};
|
||||||
|
|
||||||
|
# X11 base (kept enabled for keymap + DM if needed)
|
||||||
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
xkb = {
|
||||||
|
layout = "ie";
|
||||||
|
variant = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
# displayManager.lightdm = {
|
||||||
|
# enable = true;
|
||||||
|
# greeters.gtk = {
|
||||||
|
# enable = true;
|
||||||
|
# theme.package = pkgs.amarena-theme;
|
||||||
|
# theme.name = "amarena";
|
||||||
|
# cursorTheme.package = oreo.override { colors = [ "oreo_spark_pink_cursors" ]; };
|
||||||
|
# cursorTheme.name = "oreo_spark_pink_cursors";
|
||||||
|
# extraConfig = "background=${./assets/Wallpapers/138.png}";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Security / PolicyKit / PAM
|
||||||
|
##############################################################################
|
||||||
|
security = {
|
||||||
|
rtkit.enable = true;
|
||||||
|
polkit.enable = true;
|
||||||
|
pam.services = {
|
||||||
|
swaylock = { };
|
||||||
|
greetd.enableGnomeKeyring = true;
|
||||||
|
greetd.kwallet.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Virtualisation
|
||||||
|
##############################################################################
|
||||||
|
virtualisation = {
|
||||||
|
docker = {
|
||||||
|
enable = true;
|
||||||
|
storageDriver = lib.mkIf (systemName == "pc") "btrfs";
|
||||||
|
};
|
||||||
|
libvirtd.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
112
system/specialisation/steam.nix
Normal file
112
system/specialisation/steam.nix
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
boot = {
|
||||||
|
kernelParams = lib.mkForce [
|
||||||
|
"ipv6e=1"
|
||||||
|
"quiet"
|
||||||
|
"splash"
|
||||||
|
];
|
||||||
|
plymouth = {
|
||||||
|
enable = true;
|
||||||
|
themePackages = [ pkgs.adi1090x-plymouth-themes ];
|
||||||
|
theme = "abstract_ring_alt";
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
# ── HDMI-CEC: Turn on TV when Steam specialisation starts ─────────────────────
|
||||||
|
services.udev.packages = [ pkgs.libcec ]; # ensures cec-utils is in PATH
|
||||||
|
services.blueman.enable = true;
|
||||||
|
services.seatd.enable = true;
|
||||||
|
|
||||||
|
# A user service that runs once the graphical session (Steam/GameScope) is ready
|
||||||
|
#systemd.user.services.cec-tv-on = {
|
||||||
|
# description = "Turn on TV via HDMI-CEC when entering Steam specialisation";
|
||||||
|
# wantedBy = [ "graphical-session.target" ];
|
||||||
|
# after = [ "graphical-session.target" ];
|
||||||
|
# serviceConfig = {
|
||||||
|
# Type = "oneshot";
|
||||||
|
# RemainAfterExit = true;
|
||||||
|
# ExecStart = toString (
|
||||||
|
# pkgs.writeShellScript "cec-tv-on.sh" ''
|
||||||
|
# # Wait a moment for the HDMI link to settle
|
||||||
|
# sleep 3
|
||||||
|
|
||||||
|
# # Turn on the TV and set it as active source (most TVs understand this)
|
||||||
|
# ${pkgs.libcec}/bin/cec-client -s -d 1 <<EOF
|
||||||
|
# on 0
|
||||||
|
# as
|
||||||
|
# EOF
|
||||||
|
|
||||||
|
# # Alternative one-liner if the above somehow fails:
|
||||||
|
# # echo 'on 0' | ${pkgs.libcec}/bin/cec-client -s -d 1
|
||||||
|
# # echo 'as' | ${pkgs.libcec}/bin/cec-client -s -d 1
|
||||||
|
# ''
|
||||||
|
# );
|
||||||
|
# };
|
||||||
|
#};
|
||||||
|
|
||||||
|
# THIS is the important part – direct boot into the Gamescope Steam session
|
||||||
|
services.greetd = {
|
||||||
|
enable = true;
|
||||||
|
restart = true;
|
||||||
|
settings = {
|
||||||
|
# Tell greetd to auto-start the official gamescope steam session immediately
|
||||||
|
default_session = {
|
||||||
|
command = "${pkgs.gamescope}/bin/gamescope --prefer-outpu HDMI-A-2 --hdr-enabled --steam --mangoapp -- steam -pipewire-dmabuf -gamepadui -steamos3 > /dev/null 2>&1";
|
||||||
|
user = "game";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Auto-login the game user (no password prompt ever)
|
||||||
|
services.getty.autologinUser = "game";
|
||||||
|
# Make sure the user service starts automatically
|
||||||
|
systemd.user.targets.graphical-session = {
|
||||||
|
# This target already exists, we just ensure it’s active
|
||||||
|
unitConfig = {
|
||||||
|
RefuseManualStart = false;
|
||||||
|
RefuseManualStop = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
systemPackages = with pkgs; [
|
||||||
|
mangohud
|
||||||
|
gamemode
|
||||||
|
gamescope-wsi
|
||||||
|
];
|
||||||
|
variables = {
|
||||||
|
#LIBSEAT_BACKEND = "logind";
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
gamescope = {
|
||||||
|
enable = true;
|
||||||
|
capSysNice = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
steam = {
|
||||||
|
enable = true;
|
||||||
|
remotePlay.openFirewall = true;
|
||||||
|
dedicatedServer.openFirewall = true;
|
||||||
|
extraCompatPackages = with pkgs; [
|
||||||
|
gamescope
|
||||||
|
mangohud
|
||||||
|
gamemode
|
||||||
|
gamescope-wsi
|
||||||
|
];
|
||||||
|
gamescopeSession = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user