refactor(homeModules/desktop): move hyprland config to module
This commit is contained in:
parent
97e4bf372b
commit
a1001ddb4c
4 changed files with 27 additions and 2 deletions
|
@ -11,6 +11,7 @@
|
|||
cli.git.name = "Mohammad Rafiq";
|
||||
cli.git.email = "rafiq@rrv.sh";
|
||||
cli.git.defaultBranch = "prime";
|
||||
desktop.windowManager = "hyprland";
|
||||
|
||||
home.shellAliases.v = "nvim";
|
||||
home.shellAliases = {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{pkgs,...}:
|
||||
{
|
||||
imports = [
|
||||
./desktop/hyprland.nix
|
||||
./desktop/firefox.nix
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
|
|
17
modules/home/desktop/default.nix
Normal file
17
modules/home/desktop/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ config, lib, osConfig, ... }:
|
||||
{
|
||||
options.desktop = {
|
||||
windowManager = lib.pantheon.mkStrOption;
|
||||
};
|
||||
|
||||
|
||||
config = {
|
||||
assertions =
|
||||
[
|
||||
{
|
||||
assertion = (osConfig.desktop.windowManager == config.desktop.windowManager);
|
||||
message = "You have set your home window manager to one that is not installed on this system.";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,8 +1,14 @@
|
|||
{config, lib, osConfig, ...}:
|
||||
{ config, lib, osConfig, ... }:
|
||||
let
|
||||
mainMonitor = osConfig.desktop.mainMonitor;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
|
||||
];
|
||||
|
||||
config = lib.mkIf (config.desktop.windowManager == "hyprland") (lib.mkMerge [
|
||||
{
|
||||
xdg.configFile."uwsm/env".text = # sh
|
||||
''
|
||||
|
||||
|
@ -43,4 +49,6 @@ in
|
|||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
]);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue