Suck ass mkIf

This commit is contained in:
Ryan Pandya 2025-01-31 23:58:11 -08:00
parent 7464d0d808
commit 884ef7dc32
4 changed files with 17 additions and 19 deletions

View File

@ -12,12 +12,6 @@ let
in
with lib;
{
imports = [
./waybar.nix
./swaync.nix
./rofi.nix
];
options = {
hyprland = {
enable = lib.mkEnableOption "Enable hyprland in NixOS";
@ -25,6 +19,12 @@ with lib;
};
config = lib.mkIf cfg.enable {
imports = [
./waybar.nix
./swaync.nix
./rofi.nix
];
home-manager.users.${username}.wayland.windowManager.hyprland = {
enable = true;
xwayland.enable = true;

View File

@ -1,6 +1,7 @@
{ pkgs, username, ... }:
{ config, pkgs, username, lib, ... }:
{
config = lib.mkIf config.hyprland.enable {
home-manager.users.${username} = {
home.packages = with pkgs; [
(writeShellScriptBin "rofi-launcher" ''
@ -223,4 +224,4 @@
};
};
};
}
};}

View File

@ -1,6 +1,7 @@
{ config, username, ... }:
{ config, pkgs, username, lib, ... }:
{
config = lib.mkIf config.hyprland.enable {
home-manager.users.${username}.home.file = {
".config/swaync/config.json".text = ''
{
@ -312,3 +313,4 @@
'';
};
}
;}

View File

@ -1,10 +1,4 @@
{
pkgs,
lib,
username,
config,
...
}:
{ config, pkgs, username, lib, ... }:
let
betterTransition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)";
@ -12,6 +6,7 @@ let
in
with lib;
{
config = lib.mkIf config.hyprland.enable {
# Configure & Theme Waybar
home-manager.users.${username} = {
@ -284,4 +279,4 @@ with lib;
];
};
};
}
};}