refactor(module): clean up some module inputs
feat(module): add use-lix option to nix module feat(module): update fish config for catppuccin
This commit is contained in:
parent
3f767068d2
commit
fde4abd59d
16 changed files with 173 additions and 115 deletions
|
@ -11,7 +11,7 @@ in {
|
|||
options.${namespace}.common.bluetooth = { enable = mkEnableOption "Enable bluetooth support on your current system"; };
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [ bluez ];
|
||||
environment.systemPackages = with pkgs; [ bluez blueman ];
|
||||
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
|
@ -24,6 +24,7 @@ in {
|
|||
FastConnectable = "true";
|
||||
Experimental = "true";
|
||||
KernelExperimental = "true";
|
||||
Disable= "Handsfree";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -7,16 +7,16 @@
|
|||
...
|
||||
}: with lib; with lib.${namespace};
|
||||
let
|
||||
cfg = config.${namespace}.system.fonts;
|
||||
cfg = config.${namespace}.common.fonts;
|
||||
in {
|
||||
options.${namespace}.system.fonts = {
|
||||
options.${namespace}.common.fonts = {
|
||||
enable = mkEnableOption "Enable system font management";
|
||||
fonts = mkOption {
|
||||
type = types.package;
|
||||
default = [ ];
|
||||
example = [ noto-fonts noto-fonts-emoji ];
|
||||
description = "Install additional font packages";
|
||||
}
|
||||
#fonts = mkOption {
|
||||
# type = types.package;
|
||||
# default = noto-fonts;
|
||||
# example = [ noto-fonts noto-fonts-emoji ];
|
||||
# description = "Install additional font packages";
|
||||
#};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -31,7 +31,7 @@ in {
|
|||
noto-fonts-cjk-sans
|
||||
noto-fonts-cjk-serif
|
||||
noto-fonts-emoji
|
||||
(nerdfonts.override { fonts = [ "Hack" ]; })
|
||||
] ++ cfg.fonts;
|
||||
nerdfonts
|
||||
]; # ++ cfg.fonts;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -49,9 +49,9 @@ in {
|
|||
};
|
||||
|
||||
# Set console keymap.
|
||||
console.keyMap = ${cfg.keymap};
|
||||
console.keyMap = cfg.keymap;
|
||||
services.xserver = {
|
||||
xkb.layout = ${cfg.keymap};
|
||||
xkb.layout = cfg.keymap;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,21 +2,17 @@
|
|||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
|
||||
namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal".
|
||||
system, # The system architecture for this host (eg. `x86_64-linux`).
|
||||
target, # The Snowfall Lib target for this system (eg. `x86_64-iso`).
|
||||
format, # A normalized name for the system target (eg. `iso`).
|
||||
virtual, # A boolean to determine whether this system is a virtual target using nixos-generators.
|
||||
systems, # An attribute map of your defined hosts.
|
||||
|
||||
namespace,
|
||||
config,
|
||||
...
|
||||
}: with lib; with lib.${namespace};
|
||||
let
|
||||
cfg = config.${namespace}.common.nix;
|
||||
in {
|
||||
options.${namespace}.common.nix = { enable = mkEnableOption "nix"; };
|
||||
options.${namespace}.common.nix = {
|
||||
enable = mkEnableOption "Overwrite the default Nix configuration.";
|
||||
use-lix = mkEnableOption "Enable Lix as an alternative to CppNix.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
nix = {
|
||||
|
@ -35,6 +31,8 @@ in {
|
|||
dates = "daily";
|
||||
options = "--delete-older-than 3d";
|
||||
};
|
||||
|
||||
package = mkIf cfg.use-lix pkgs.lix; # Enable LIX
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -18,17 +18,11 @@ let
|
|||
in {
|
||||
options.${namespace}.common.shell = {
|
||||
enable = mkEnableOption "Modify the standard shell options";
|
||||
package = mkOption {
|
||||
type = types.str;
|
||||
default = "fish";
|
||||
example = "fish";
|
||||
description = "Select an appropriate shell environment (bash, fish, zsh...)";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.shells = with pkgs; [ ${cfg.package} ];
|
||||
users.defaultUserShell = pkgs.${cfg.package};
|
||||
programs.${cfg.package}.enable = true;
|
||||
environment.shells = with pkgs; [ fish ];
|
||||
users.defaultUserShell = pkgs.fish;
|
||||
programs.fish.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue