change hyprland installation setup
This commit is contained in:
parent
6c932ec1e2
commit
efb2336713
@ -3,6 +3,11 @@
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
hyprland-plugins = {
|
||||
url = "github:hyprwm/hyprland-plugins";
|
||||
inputs.hyprland.follows = "hyprland";
|
||||
};
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
13
shared/hyprland.nix
Normal file
13
shared/hyprland.nix
Normal file
@ -0,0 +1,13 @@
|
||||
{ lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkOption types;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
shared.hyprland.enable = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
};
|
||||
};
|
||||
}
|
@ -1,10 +1,14 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{ inputs, config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkOption mkIf types;
|
||||
cfg = config.deWm;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
../shared/hyprland.nix
|
||||
];
|
||||
|
||||
options.deWm = {
|
||||
cinnamon.enable = mkOption {
|
||||
default = true; ## at least one of them has to be enabled
|
||||
@ -15,7 +19,7 @@ in
|
||||
type = types.bool;
|
||||
};
|
||||
hyprland.enable = mkOption {
|
||||
default = false;
|
||||
default = config.shared.hyprland.enable;
|
||||
type = types.bool;
|
||||
};
|
||||
};
|
||||
@ -28,9 +32,10 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
programs.hyprland = {
|
||||
enable = cfg.hyprland.enable;
|
||||
xwayland.enable = cfg.hyprland.enable;
|
||||
programs.hyprland = mkIf cfg.hyprland.enable {
|
||||
enable = true;
|
||||
package = inputs.hyprland.packages."${pkgs.system}".hyprland;
|
||||
xwayland.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
@ -38,7 +43,6 @@ in
|
||||
] ++ lib.optionals cfg.xfce.enable [
|
||||
xfce.gigolo xfce.xfce4-dict xfce.xfce4-panel xfce.xfce4-pulseaudio-plugin
|
||||
xfce.xfce4-whiskermenu-plugin xfce.mousepad xfce.xfwm4-themes xfce.xfce4-netload-plugin
|
||||
] ++ lib.optionals cfg.hyprland.enable [
|
||||
];
|
||||
|
||||
environment.xfce.excludePackages = with pkgs.xfce; mkIf cfg.xfce.enable [
|
||||
|
Loading…
x
Reference in New Issue
Block a user