Compare commits

..

No commits in common. "946d72b66b30d5617867d41428b5a3cd34581b4b" and "426a79f3a1e86e9610f34323ce797ba9819f4f10" have entirely different histories.

7 changed files with 59 additions and 112 deletions

View File

@ -6,7 +6,6 @@
system, system,
hostname, hostname,
inputs, inputs,
niri-package,
... ...
}: }:
{ {
@ -34,9 +33,6 @@
services.kmscon.enable = true; services.kmscon.enable = true;
# Add niri to display manager session packages
services.displayManager.sessionPackages = [ niri-package ];
# Gamescope configuration for Steam Deck-like experience # Gamescope configuration for Steam Deck-like experience
programs = { programs = {
gamescope = { gamescope = {
@ -49,6 +45,26 @@
}; };
}; };
services.greetd = {
enable = true;
settings = {
default_session = {
command = "${lib.getExe pkgs.tuigreet} --sessions /etc/xdg/wayland-sessions/ --time";
user = username;
};
terminal.vt = lib.mkForce 2;
};
};
environment.etc."xdg/wayland-sessions/niri-session.desktop".text = ''
[Desktop Entry]
Name=Niri Session
Comment=Niri Wayland compositor
Exec=niri-session
Type=Application
DesktopNames=niri
'';
system.activationScripts = { system.activationScripts = {
# FIX: https://github.com/NixOS/nix/issues/2982 # FIX: https://github.com/NixOS/nix/issues/2982
"profile-channel-dummy".text = '' "profile-channel-dummy".text = ''
@ -81,9 +97,6 @@
]; ];
}; };
# allow unfree packages for jovian-nixos
nixpkgs.config.allowUnfree = true;
# kernel options # kernel options
boot = { boot = {
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;

View File

@ -25,4 +25,26 @@
goverlay goverlay
yad yad
]; ];
# Create steam session script
environment.etc."steam-session-greetd".source = pkgs.writeShellScript "steam-session-greetd" ''
export STEAM_RUNTIME=1
export SDL_VIDEODRIVER=wayland
export QT_QPA_PLATFORM=wayland
export GDK_BACKEND=wayland
export XDG_CURRENT_DESKTOP=Steam
export XDG_SESSION_TYPE=wayland
exec ${pkgs.gamescope}/bin/gamescope --adaptive-sync --hdr-enabled --mangoapp --rt --steam -- ${pkgs.steam}/bin/steam -pipewire-dmabuf -tenfoot
'';
# Create system-wide session files
environment.etc."xdg/wayland-sessions/steam-session.desktop".text = ''
[Desktop Entry]
Name=Steam Session
Comment=Steam Deck-like gaming session with gamescope
Exec=/etc/steam-session-greetd
Type=Application
DesktopNames=steam
'';
} }

View File

@ -34,25 +34,4 @@
# disable framework kernel module # disable framework kernel module
# https://github.com/NixOS/nixos-hardware/issues/1330 # https://github.com/NixOS/nixos-hardware/issues/1330
hardware.framework.enableKmod = false; hardware.framework.enableKmod = false;
# Greetd display manager
services.greetd = {
enable = true;
settings = {
default_session = {
command = "${lib.getExe pkgs.tuigreet} --sessions /etc/xdg/wayland-sessions/ --time";
user = username;
};
terminal.vt = lib.mkForce 2;
};
};
environment.etc."xdg/wayland-sessions/niri-session.desktop".text = ''
[Desktop Entry]
Name=Niri Session
Comment=Niri Wayland compositor
Exec=niri-session
Type=Application
DesktopNames=niri
'';
} }

View File

@ -18,7 +18,6 @@
inputs.nixos-hardware.nixosModules.common-cpu-amd-zenpower inputs.nixos-hardware.nixosModules.common-cpu-amd-zenpower
inputs.impermanence.nixosModules.impermanence inputs.impermanence.nixosModules.impermanence
inputs.disko.nixosModules.disko inputs.disko.nixosModules.disko
inputs.jovian-nixos.nixosModules.default
]; ];
fileSystems."/media/games" = { fileSystems."/media/games" = {
@ -59,17 +58,4 @@
systemd.services.lactd.wantedBy = [ "multi-user.target" ]; systemd.services.lactd.wantedBy = [ "multi-user.target" ];
systemd.services.lactd.serviceConfig.ExecStartPre = "${lib.getExe pkgs.bash} -c \"sleep 3s\""; systemd.services.lactd.serviceConfig.ExecStartPre = "${lib.getExe pkgs.bash} -c \"sleep 3s\"";
jovian = {
devices.steamdeck.enable = false;
steam = {
enable = true;
autoStart = true;
desktopSession = "niri";
user = username;
};
};
# Disable gamescope from common.nix to avoid conflict with jovian-nixos
programs.gamescope.enable = lib.mkForce false;
} }

74
flake.lock generated
View File

@ -84,11 +84,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1763716549, "lastModified": 1763688394,
"narHash": "sha256-nZe4Vl3NOJn6HnWM3LUnnUgWNZiI3CteYusb7WEZ/p0=", "narHash": "sha256-NQlu1H2yFMPbXA1cVxpe1NoZEWjQEjA5cOVxcdDxobs=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "17a8fe835d67419003e7592b14f2208ac018fc36", "rev": "0e6a5613f3579105bfed585a8ef76f5113e052c9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -186,27 +186,6 @@
"type": "github" "type": "github"
} }
}, },
"jovian-nixos": {
"inputs": {
"nix-github-actions": "nix-github-actions",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1763714684,
"narHash": "sha256-ZNJPAaeSYQTDgvwwE8XHhCz4HiHqYoUyoXdoBE2nxug=",
"owner": "Jovian-Experiments",
"repo": "Jovian-NixOS",
"rev": "6178d787ee61b8586fdb0ccb8644fbfd5317d0f3",
"type": "github"
},
"original": {
"owner": "Jovian-Experiments",
"repo": "Jovian-NixOS",
"type": "github"
}
},
"lanzaboote": { "lanzaboote": {
"inputs": { "inputs": {
"crane": "crane", "crane": "crane",
@ -244,11 +223,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable" "xwayland-satellite-unstable": "xwayland-satellite-unstable"
}, },
"locked": { "locked": {
"lastModified": 1763729081, "lastModified": 1763662529,
"narHash": "sha256-7v6tHiCUgqXH4J4aFguWxrqR1pJgkN9/yvPo/5Q1ih4=", "narHash": "sha256-ecxJlSd4YH9gmzsrtfV7Q+7tQ64J2nLz8v7d2raXo/E=",
"owner": "sodiboo", "owner": "sodiboo",
"repo": "niri-flake", "repo": "niri-flake",
"rev": "a340576313f2410b9ab673dd006d9d0fbaf75c8e", "rev": "a062c6b4ad79eb62f5d0ecd52c3afe06df776690",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -277,11 +256,11 @@
"niri-unstable": { "niri-unstable": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1763724970, "lastModified": 1763574558,
"narHash": "sha256-C/L6eK+azCMnOAs4wtHRk+z9XDLKUlMI2Qf2BIwmayU=", "narHash": "sha256-PdXkgqtbVFdZNhmTrZLTDMGb4zzaSK2RnKUXM8bIDo4=",
"owner": "YaLTeR", "owner": "YaLTeR",
"repo": "niri", "repo": "niri",
"rev": "07b387df46f36b88548b7067560b25c38dc3a5b4", "rev": "6fcdb9242e65ed5825e7fda2a7935b412588b63a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -302,11 +281,11 @@
"systems": "systems_2" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1763714674, "lastModified": 1763628304,
"narHash": "sha256-sxQVz6ipBpb0AOFinRFb/XXMuEgcE8PfNsl9K70HUDE=", "narHash": "sha256-2fKeIoO2lfU4qVlnDWXoWUnZ+KVKJazfEPqRgw2sG1g=",
"owner": "marienz", "owner": "marienz",
"repo": "nix-doom-emacs-unstraightened", "repo": "nix-doom-emacs-unstraightened",
"rev": "9bdf69d16fc8b0e698b51ba6abe53ff27c141579", "rev": "b85e73e7886c7d200d517c91fe66d1dc49ac3053",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -330,28 +309,6 @@
"type": "github" "type": "github"
} }
}, },
"nix-github-actions": {
"inputs": {
"nixpkgs": [
"jovian-nixos",
"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"
}
},
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1762847253, "lastModified": 1762847253,
@ -414,7 +371,6 @@
"emacs-overlay": "emacs-overlay", "emacs-overlay": "emacs-overlay",
"home-manager": "home-manager", "home-manager": "home-manager",
"impermanence": "impermanence", "impermanence": "impermanence",
"jovian-nixos": "jovian-nixos",
"lanzaboote": "lanzaboote", "lanzaboote": "lanzaboote",
"niri": "niri", "niri": "niri",
"nix-doom-emacs-unstraightened": "nix-doom-emacs-unstraightened", "nix-doom-emacs-unstraightened": "nix-doom-emacs-unstraightened",
@ -534,11 +490,11 @@
"xwayland-satellite-unstable": { "xwayland-satellite-unstable": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1763704521, "lastModified": 1762747449,
"narHash": "sha256-ceYEV6PnvUN8Zixao4gpPuN+VT3B0SlAXKuPNHZhqUY=", "narHash": "sha256-Z1TKiux8K09a93w4PFDFsj8HFugXNy3iCC3Z8MpR5Rk=",
"owner": "Supreeeme", "owner": "Supreeeme",
"repo": "xwayland-satellite", "repo": "xwayland-satellite",
"rev": "f379ff5722a821212eb59ada9cf8e51cb3654aad", "rev": "6338574bc5c036487486acde264f38f39ea15fad",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -60,11 +60,6 @@
url = "github:serokell/deploy-rs"; url = "github:serokell/deploy-rs";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
jovian-nixos = {
url = "github:Jovian-Experiments/Jovian-NixOS";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = outputs =
@ -75,7 +70,6 @@
nixos-hardware, nixos-hardware,
home-manager, home-manager,
deploy-rs, deploy-rs,
jovian-nixos,
... ...
}@inputs: }@inputs:
let let
@ -85,7 +79,6 @@
"mreow" "mreow"
"yarn" "yarn"
]; ];
niri-package = inputs.niri.packages.${system}.niri-unstable;
in in
{ {
formatter.${system} = nixpkgs.legacyPackages.${system}.nixfmt-rfc-style; formatter.${system} = nixpkgs.legacyPackages.${system}.nixfmt-rfc-style;
@ -100,7 +93,6 @@
inputs inputs
username username
hostname hostname
niri-package
; ;
}; };
modules = [ modules = [
@ -111,7 +103,7 @@
# home-manager.useGlobalPkgs = true; # home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { home-manager.extraSpecialArgs = {
inherit inputs hostname username niri-package; inherit inputs hostname username;
homeDirectory = "/home/${username}"; homeDirectory = "/home/${username}";
stateVersion = config.system.stateVersion; stateVersion = config.system.stateVersion;
}; };

View File

@ -3,7 +3,6 @@
pkgs, pkgs,
lib, lib,
inputs, inputs,
niri-package,
... ...
}: }:
let let
@ -23,7 +22,7 @@ in
]; ];
programs.niri = { programs.niri = {
package = niri-package; package = pkgs.niri-unstable;
settings = { settings = {
prefer-no-csd = true; prefer-no-csd = true;