feat: install hyprland from liminalOS
This commit is contained in:
parent
02701608a5
commit
f1bf204d3c
24 changed files with 1486 additions and 538 deletions
|
@ -4,9 +4,6 @@
|
|||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
../graphics
|
||||
];
|
||||
# Enable the X11 windowing system.
|
||||
# You can disable this if you're only using the Wayland session.
|
||||
services.xserver.enable = false;
|
||||
|
|
64
modules/desktop-environment/default.nix
Normal file
64
modules/desktop-environment/default.nix
Normal file
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.liminalOS.desktop;
|
||||
in
|
||||
{
|
||||
options.liminalOS.desktop = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Whether to enable the liminalOS desktop environment.
|
||||
'';
|
||||
};
|
||||
hyprland.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = cfg.enable;
|
||||
description = ''
|
||||
Whether to enable Hyprland. Sets up a default configuration at the system and user level, and installs xdg-desktop-portal-gtk.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
options.liminalOS.formFactor = lib.mkOption {
|
||||
type = lib.types.nullOr (
|
||||
lib.types.enum [
|
||||
"laptop"
|
||||
"desktop"
|
||||
]
|
||||
);
|
||||
default = "desktop";
|
||||
description = ''
|
||||
Form factor of the machine. Adjusts some UI settings.
|
||||
'';
|
||||
};
|
||||
|
||||
options.liminalOS.powersave = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to set some options to reduce power consumption (mostly Hyprland).
|
||||
'';
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
xdg.portal = lib.mkIf cfg.hyprland.enable {
|
||||
enable = true;
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
};
|
||||
|
||||
programs.hyprland.enable = cfg.hyprland.enable;
|
||||
|
||||
services.xserver.enable = false;
|
||||
|
||||
services.xserver = {
|
||||
xkb.layout = "us";
|
||||
xkb.variant = "";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.hardware.nvidia;
|
||||
in
|
||||
{
|
||||
options.hardware.nvidia.usePatchedAquamarine = lib.mkEnableOption "q9i's patched aquamarine with working sleep on Nvidia";
|
||||
|
||||
config = lib.mkIf cfg.usePatchedAquamarine {
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
aquamarine = prev.aquamarine.overrideAttrs {
|
||||
src = inputs.aq;
|
||||
version = inputs.aq.rev;
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue