added flakes for nix

This commit is contained in:
lsoriano-mcm
2025-08-08 16:43:46 -05:00
parent ad7ee4ad27
commit 28be4d1bb4
7 changed files with 634 additions and 11 deletions
+5
View File
@@ -0,0 +1,5 @@
{
imports = [
./desktop.nix
];
}
+43
View File
@@ -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";
};
};
}
+5
View File
@@ -0,0 +1,5 @@
{
imports = [
./terminal.nix
];
}
+50
View File
@@ -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;
};
})
]);
}