forked from Shinonome/dots-hyprland
added flakes for nix
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
{
|
||||
imports = [
|
||||
./desktop.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit
|
||||
(lib)
|
||||
mkIf
|
||||
mkMerge
|
||||
mkDefault
|
||||
mkOption
|
||||
types
|
||||
;
|
||||
cfg = config.illogical-impulse.desktop;
|
||||
in {
|
||||
options = {
|
||||
illogical-impulse.desktop = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Enables Hyprland and quickshell.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
||||
portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
|
||||
};
|
||||
environment.systemPackages = [
|
||||
inputs.quickshell.packages.${pkgs.system}.default
|
||||
inputs.matugen.packages.${pkgs.system}.default
|
||||
];
|
||||
environment.etc."skel/.config/quickshell" = {
|
||||
source = "../../../.config/quickshell";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
imports = [
|
||||
./terminal.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit
|
||||
(lib)
|
||||
mkIf
|
||||
mkMerge
|
||||
mkDefault
|
||||
mkOption
|
||||
types
|
||||
;
|
||||
cfg = config.illogical-impulse.terminal;
|
||||
in {
|
||||
options = {
|
||||
illogical-impulse.terminal = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Whether to enable the terminal-related configuration for this user.
|
||||
'';
|
||||
};
|
||||
|
||||
# New option to choose the terminal emulator.
|
||||
terminalEmulator = mkOption {
|
||||
type = types.enum ["foot" "kitty"];
|
||||
default = "foot";
|
||||
description = ''
|
||||
The default terminal emulator to enable for this user.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
(mkIf (cfg.terminalEmulator == "foot") {
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
};
|
||||
})
|
||||
|
||||
(mkIf (cfg.terminalEmulator == "kitty") {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
};
|
||||
})
|
||||
]);
|
||||
}
|
||||
Reference in New Issue
Block a user