feat(hyprland): use final package
This commit is contained in:
parent
8ea4c31a1c
commit
c557367aaf
6 changed files with 39 additions and 23 deletions
|
@ -1,16 +1,17 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
hyprland,
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
user = config.services.device-vars.username;
|
||||||
|
hyprland = config.home-manager.users.${user}.wayland.windowManager.hyprland.finalPackage;
|
||||||
|
in {
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
xserver = {
|
xserver = {
|
||||||
displayManager = {
|
displayManager = {
|
||||||
sessionPackages = [
|
sessionPackages = [hyprland];
|
||||||
hyprland.packages.x86_64-linux.default
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
libinput.enable = true;
|
libinput.enable = true;
|
||||||
|
@ -19,8 +20,8 @@
|
||||||
greetd = {
|
greetd = {
|
||||||
settings = {
|
settings = {
|
||||||
initial_session = {
|
initial_session = {
|
||||||
command = "${hyprland.packages.x86_64-linux.default}/bin/Hyprland";
|
command = "${hyprland}/bin/Hyprland";
|
||||||
user = "matt";
|
user = user;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
{config, ...}: {
|
{config, pkgs, ...}: {
|
||||||
# Enable OpenGL
|
# Enable OpenGL
|
||||||
hardware.opengl = {
|
hardware.opengl = {
|
||||||
enable = true;
|
enable = true;
|
||||||
driSupport = true;
|
driSupport = true;
|
||||||
driSupport32Bit = true;
|
driSupport32Bit = true;
|
||||||
|
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
vaapiVdpau
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Load nvidia driver for Xorg and Wayland
|
# Load nvidia driver for Xorg and Wayland
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
{
|
{
|
||||||
hyprland,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
user = config.services.device-vars.username;
|
||||||
|
hyprland = config.home-manager.users.${user}.wayland.windowManager.hyprland.finalPackage;
|
||||||
|
in {
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
xserver = {
|
xserver = {
|
||||||
displayManager = {
|
displayManager = {
|
||||||
sessionPackages = [
|
sessionPackages = [hyprland];
|
||||||
hyprland.packages.x86_64-linux.default
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
libinput.enable = true;
|
libinput.enable = true;
|
||||||
|
@ -20,7 +21,7 @@
|
||||||
greetd = {
|
greetd = {
|
||||||
settings = {
|
settings = {
|
||||||
initial_session = {
|
initial_session = {
|
||||||
command = "${hyprland.packages.x86_64-linux.default}/bin/Hyprland";
|
command = "${hyprland}/bin/Hyprland";
|
||||||
user = "matt";
|
user = "matt";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
12
flake.lock
12
flake.lock
|
@ -595,11 +595,11 @@
|
||||||
"nixpkgs": "nixpkgs_6"
|
"nixpkgs": "nixpkgs_6"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1700860372,
|
"lastModified": 1700896414,
|
||||||
"narHash": "sha256-jWNIMHxuvOC3if17goWqeqeBjAmTqUriqUtU9ZO1l7o=",
|
"narHash": "sha256-npOz1k4us5XBg7qPEQLVjSSSLrCZpB5RMDYJvYQDT1w=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs-wayland",
|
"repo": "nixpkgs-wayland",
|
||||||
"rev": "03721ba8f5cc8182508bc6f72b25daa34374294c",
|
"rev": "421ce6c43d560c3930a19968712c3dd343e90b05",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -706,11 +706,11 @@
|
||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1700880146,
|
"lastModified": 1700896827,
|
||||||
"narHash": "sha256-lgsD/vGn0f9XkamUlWAPagqsJwGxb31MqN9OyhPCaV8=",
|
"narHash": "sha256-34Ya3sbVR7lJoghlygj8fPImzIj4Y1nN/B+zm/gVjoE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "d754bccc0094ac3267aaa41f96b243ab9d0cf8e8",
|
"rev": "92780bd20e4fa0526f63e0136fb6f3bbeac6bf9a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -12,6 +12,15 @@
|
||||||
|
|
||||||
gset = pkgs.gsettings-desktop-schemas;
|
gset = pkgs.gsettings-desktop-schemas;
|
||||||
polkit = pkgs.plasma5Packages.polkit-kde-agent;
|
polkit = pkgs.plasma5Packages.polkit-kde-agent;
|
||||||
|
|
||||||
|
mainPkg =
|
||||||
|
if osConfig.hardware.nvidia.modesetting.enable
|
||||||
|
then {
|
||||||
|
hyprland = pkgs.hyprland;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
hyprland = hyprland.packages.x86_64-linux.default;
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./theme.nix
|
./theme.nix
|
||||||
|
@ -25,7 +34,7 @@ in {
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = hyprland.packages.x86_64-linux.default;
|
package = mainPkg.hyprland;
|
||||||
enableNvidiaPatches = osConfig.hardware.nvidia.modesetting.enable;
|
enableNvidiaPatches = osConfig.hardware.nvidia.modesetting.enable;
|
||||||
|
|
||||||
plugins =
|
plugins =
|
||||||
|
|
|
@ -2,9 +2,11 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
hyprland,
|
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
user = config.services.device-vars.username;
|
||||||
|
hyprBin = "${config.home-manager.users.${user}.wayland.windowManager.hyprland.finalPackage}/bin";
|
||||||
|
|
||||||
nvidia =
|
nvidia =
|
||||||
if config.hardware.nvidia.modesetting.enable
|
if config.hardware.nvidia.modesetting.enable
|
||||||
then {
|
then {
|
||||||
|
@ -20,7 +22,6 @@
|
||||||
env = "";
|
env = "";
|
||||||
};
|
};
|
||||||
regreetBin = "${lib.getExe config.programs.regreet.package}";
|
regreetBin = "${lib.getExe config.programs.regreet.package}";
|
||||||
hyprBin = "${hyprland.packages.x86_64-linux.default}/bin";
|
|
||||||
gset = pkgs.gsettings-desktop-schemas;
|
gset = pkgs.gsettings-desktop-schemas;
|
||||||
|
|
||||||
css = pkgs.writeText "style.css" ''${builtins.readFile ./style.css}'';
|
css = pkgs.writeText "style.css" ''${builtins.readFile ./style.css}'';
|
||||||
|
|
Loading…
Reference in a new issue