Compare commits

...

2 Commits

14 changed files with 269 additions and 64 deletions

View File

@@ -29,6 +29,7 @@ in
./system/hardware.nix
./system/fonts.nix
inputs.home-manager.nixosModules.home-manager
inputs.jovian.nixosModules.default
#inputs.niri.nixosModules.niri
];
@@ -61,6 +62,7 @@ in
"docker"
"libvirt"
"input"
"seat"
];
packages = with pkgs; [ ];
};
@@ -77,25 +79,31 @@ in
"docker"
"libvirt"
"input"
"seat"
];
packages = with pkgs; [ ];
};
users.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";
};
groups.libvirtd.members = [
"mrfluffy"
"work"
];
};
# 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";
};
};
##############################################################################
# Home-Manager
##############################################################################
@@ -104,6 +112,7 @@ in
users = {
mrfluffy = import ./home/mrfluffy.nix;
work = import ./home/work.nix;
game = import ./home/game.nix;
};
};
@@ -141,6 +150,21 @@ in
permittedInsecurePackages = [ ];
};
##############################################################################
# decky
##############################################################################
nixpkgs.overlays = [
inputs.jovian.overlays.default
];
jovian.decky-loader = {
enable = true;
user = "game"; # Run as your gaming user
stateDir = "/home/game/.local/share/decky"; # Store plugins/data in user's home (adjust if preferred)
# Optional: Add extra packages if needed for specific plugins
# extraPackages = with pkgs; [ some-package ];
# extraPythonPackages = ps: with ps; [ some-python-package ];
};
##############################################################################
# State version
##############################################################################
@@ -149,36 +173,64 @@ in
specialisation = {
"01-steam" = {
configuration = {
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
#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
# # 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
''
);
# # 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 its active
@@ -192,9 +244,10 @@ in
systemPackages = with pkgs; [
mangohud
gamemode
gamescope-wsi
];
variables = {
LIBSEAT_BACKEND = "logind";
#LIBSEAT_BACKEND = "logind";
};
};
@@ -213,14 +266,10 @@ in
gamescope
mangohud
gamemode
gamescope-wsi
];
gamescopeSession = {
enable = true;
args = [
"--prefer-output"
"HDMI-A-2"
"--hdr-enabled"
];
};
};
};
@@ -239,6 +288,17 @@ in
#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
##############################################################################
@@ -266,7 +326,7 @@ in
# Hyprland
programs.hyprland = {
enable = useHypr;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
};
# X11 base (kept enabled for keymap + DM if needed)

View File

@@ -8,11 +8,11 @@
...
}:
let
caelestia-cli = inputs.caelestia-cli.packages.${pkgs.system}.caelestia-cli;
hypr-package = inputs.hyprland.packages.${pkgs.system}.hyprland;
hypr-portal = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
hypr-split = inputs.hyprland-hyprsplit.packages.${pkgs.system}.split-monitor-workspaces;
#hyprscrolling = inputs.hyprland-plugins.packages.${pkgs.system}.hyprscrolling;
caelestia-cli = inputs.caelestia-cli.packages.${pkgs.stdenv.hostPlatform.system}.caelestia-cli;
hypr-package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
hypr-portal = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
hypr-split = inputs.hyprland-hyprsplit.packages.${pkgs.stdenv.hostPlatform.system}.split-monitor-workspaces;
#hyprscrolling = inputs.hyprland-plugins.packages.${pkgs.stdenv.hostPlatform.system}.hyprscrolling;
mod = "Alt";
terminal = "footclient";
fileManager = "dolphin";

View File

@@ -42,7 +42,7 @@
biggerStreamPreview = {
enable = true;
};
clearURLs = {
clearUrLs = {
enable = true;
};
copyFileContents = {

View File

@@ -26,7 +26,7 @@
extraPortals = with pkgs; [
xdg-desktop-portal-wlr
xdg-desktop-portal-gtk
inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland
kdePackages.xdg-desktop-portal-kde
];
};

44
flake.lock generated
View File

@@ -754,6 +754,27 @@
"type": "github"
}
},
"jovian": {
"inputs": {
"nix-github-actions": "nix-github-actions",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1765365489,
"narHash": "sha256-L0uvs+o8P5JzEcTPe2WPA48+0ZiO6+8nlfh7XSjQql4=",
"owner": "Jovian-Experiments",
"repo": "Jovian-NixOS",
"rev": "ddf5db234397043a8af5c38433b5ae933d660f27",
"type": "github"
},
"original": {
"owner": "Jovian-Experiments",
"repo": "Jovian-NixOS",
"type": "github"
}
},
"nix-alien": {
"inputs": {
"flake-compat": "flake-compat_2",
@@ -810,6 +831,28 @@
"type": "github"
}
},
"nix-github-actions": {
"inputs": {
"nixpkgs": [
"jovian",
"nixpkgs"
]
},
"locked": {
"lastModified": 1729697500,
"narHash": "sha256-VFTWrbzDlZyFHHb1AlKRiD/qqCJIripXKiCSFS8fAOY=",
"owner": "zhaofengli",
"repo": "nix-github-actions",
"rev": "e418aeb728b6aa5ca8c5c71974e7159c2df1d8cf",
"type": "github"
},
"original": {
"owner": "zhaofengli",
"ref": "matrix-name",
"repo": "nix-github-actions",
"type": "github"
}
},
"nix-index-database": {
"inputs": {
"nixpkgs": [
@@ -1122,6 +1165,7 @@
"hyprland": "hyprland",
"hyprland-hyprsplit": "hyprland-hyprsplit",
"hyprland-plugins": "hyprland-plugins",
"jovian": "jovian",
"nix-alien": "nix-alien",
"nix-colors": "nix-colors",
"nix-index-database": "nix-index-database_2",

View File

@@ -55,6 +55,11 @@ inputs = {
url = "github:vicinaehq/vicinae";
#inputs.nixpkgs.follows = "nixpkgs";
};
# ... your existing inputs ...
jovian = {
url = "github:Jovian-Experiments/Jovian-NixOS";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{

View File

@@ -76,7 +76,7 @@
fsType = "btrfs";
})
];
fileSystems."/home/mrfluffy/Games" = lib.mkMerge [
fileSystems."/home/game/Games" = lib.mkMerge [
(lib.mkIf (systemName == "pc") {
device = "/dev/disk/by-uuid/54188f21-d525-4681-a9d4-b798363eef17";
fsType = "ext4";

101
home/game.nix Executable file
View File

@@ -0,0 +1,101 @@
{
config,
pkgs,
inputs,
lib,
window_manager,
...
}:
let
in
{
imports = [
# Core theming & integrations
inputs.nix-colors.homeManagerModules.default
inputs.stylix.homeModules.stylix
inputs.nixcord.homeModules.nixcord
# inputs.niri.homeModules.niri
# Local modules
./sessionVars.nix
./stylix.nix
./homePkgs.nix
./services.nix
# Dots
../dots/foot.nix
../dots/zsh.nix
../dots/xdg.nix
../dots/hyprland.nix
../dots/caelestia.nix
];
# You can find color schemes at: https://github.com/tinted-theming/schemes
colorScheme = inputs.nix-colors.colorSchemes.hardcore;
stylix.base16Scheme.base00 = "141414";
# Home Manager needs a bit of information about you and the paths it should manage.
home.username = "game";
home.homeDirectory = "/home/game";
# This determines compatibility with a specific Home Manager release.
home.stateVersion = "23.11"; # Please read the comment before changing.
# Example GTK block (disabled)
# gtk = {
# enable = true;
# iconTheme = {
# name = "Dracula";
# # package = pkgs.dracula-icon-theme;
# };
# };
home.packages = with pkgs; [
############################
# Wayland / Desktop tools
############################
lswt
swaybg
wlr-randr
############################
# Experimental (inputs)
############################
# inputs.ladybird.packages."${pkgs.stdenv.hostPlatform.system}".ladybird
# ##########################
# Examples (disabled)
# ##########################
# pkgs.hello
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
];
# Dotfiles & static files managed by Home Manager
home.file = {
".config/nixpkgs/config.nix".text = ''
{ allowUnfree = true; }
'';
".config/doom".source = ../dots/doom;
# ".config/quickshell".source = ../dots/shell;
# ".config/kitty".source = ../../universal/dots/kitty;
# ".config/nvim".source = ../../universal/dots/nvim;
"Pictures/Wallpapers".source = ../assets/Wallpapers;
# ".screenrc".source = dotfiles/screenrc;
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
# If you don't manage your shell with Home Manager, remember to source:
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
# /etc/profiles/per-user/mrfluffy/etc/profile.d/hm-session-vars.sh
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}

View File

@@ -86,7 +86,7 @@ in
# };
#};
#extensions = [
# (inputs.vicinae.mkVicinaeExtension.${pkgs.system} {
# (inputs.vicinae.mkVicinaeExtension.${pkgs.stdenv.hostPlatform.system} {
# inherit pkgs;
# name = "extension-name";
# src = pkgs.fetchFromGitHub {
@@ -211,8 +211,8 @@ in
zed-editor
# Language tooling from inputs
#inputs.qs-qml.packages.${pkgs.system}.qml-ts-mode
#inputs.qs-qml.packages.${pkgs.system}.tree-sitter-qmljs
#inputs.qs-qml.packages.${pkgs.stdenv.hostPlatform.system}.qml-ts-mode
#inputs.qs-qml.packages.${pkgs.stdenv.hostPlatform.system}.tree-sitter-qmljs
############################
# Game Dev / Engines
@@ -273,13 +273,13 @@ in
############################
# Experimental (inputs)
############################
#inputs.ladybird.packages."${pkgs.system}".ladybird
#inputs.hyprlauncher.packages.${pkgs.system}.default
#inputs.ladybird.packages."${pkgs.stdenv.hostPlatform.system}".ladybird
#inputs.hyprlauncher.packages.${pkgs.stdenv.hostPlatform.system}.default
############################
# Blockchain (inputs)
############################
#inputs.caelestia-cli.packages.${pkgs.system}.caelestia-cli
#inputs.caelestia.packages.${pkgs.system}.caelestia-shell
#inputs.caelestia-cli.packages.${pkgs.stdenv.hostPlatform.system}.caelestia-cli
#inputs.caelestia.packages.${pkgs.stdenv.hostPlatform.system}.caelestia-shell
];
}

View File

@@ -67,7 +67,7 @@ in
############################
# Experimental (inputs)
############################
# inputs.ladybird.packages."${pkgs.system}".ladybird
# inputs.ladybird.packages."${pkgs.stdenv.hostPlatform.system}".ladybird
# ##########################
# Examples (disabled)

View File

@@ -7,7 +7,7 @@
...
}:
let
#quickshellPackage = inputs.caelestia.packages.${pkgs.system}.caelestia-shell;
#quickshellPackage = inputs.caelestia.packages.${pkgs.stdenv.hostPlatform.system}.caelestia-shell;
in
{
#systemd.user.services.quickshell = lib.mkIf (window_manager == "hyprland") {

View File

@@ -76,7 +76,7 @@ in
# swaynotificationcenter
# inputs.ladybird.packages."${pkgs.system}".ladybird
# inputs.ladybird.packages."${pkgs.stdenv.hostPlatform.system}".ladybird
# pkgs.hello
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })

View File

@@ -55,10 +55,5 @@ extraInstallCommands = ''
options v4l2loopback devices=2 video_nr=1,0 card_label="OBS Cam","phone cam" exclusive_caps=1,1
'';
plymouth = {
enable = false;
themePackages = [ pkgs.plymouth-matrix-theme ];
theme = "matrix";
};
};
}

View File

@@ -173,7 +173,7 @@ in
# --- Nix tooling ---
nil
nixfmt-rfc-style
inputs.nix-alien.packages.${pkgs.system}.nix-alien
inputs.nix-alien.packages.${pkgs.stdenv.hostPlatform.system}.nix-alien
# --- Wayland / Desktop ---
foot