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:
Jo 2024-09-10 10:46:16 +02:00
parent 3f767068d2
commit fde4abd59d
16 changed files with 173 additions and 115 deletions

View file

@ -2,32 +2,25 @@
lib,
pkgs,
inputs,
namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal".
home, # The home architecture for this host (eg. `x86_64-linux`).
target, # The Snowfall Lib target for this home (eg. `x86_64-home`).
format, # A normalized name for the home target (eg. `home`).
virtual, # A boolean to determine whether this home is a virtual target using nixos-generators.
host, # The host name for this home.
namespace,
config,
...
}: with lib; with lib.${namespace};
let
cfg = config.${namespace}.apps.zed-editor;
cfg = config.${namespace}.apps.zed-editor;
zed-fhs = pkgs.buildFHSUserEnv {
name = "zed";
targetPkgs = pkgs:
with pkgs; [
zed-editor
];
runScript = "zed";
};
zed-fhs = pkgs.buildFHSUserEnv {
name = "zed";
targetPkgs = pkgs:
with pkgs; [
zed-editor
];
runScript = "zed";
};
in {
options.${namespace}.apps.zed-editor = { enable = mkEnableOption "zed-editor"; };
options.${namespace}.apps.zed-editor = { enable = mkEnableOption "zed-editor"; };
config = mkIf cfg.enable {
home.packages = [zed-fhs];
};
config = mkIf cfg.enable {
home.packages = [zed-fhs];
};
}

View file

@ -2,14 +2,7 @@
lib,
pkgs,
inputs,
namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal".
system, # The home architecture for this host (eg. `x86_64-linux`).
target, # The Snowfall Lib target for this home (eg. `x86_64-home`).
format, # A normalized name for the home target (eg. `home`).
virtual, # A boolean to determine whether this home is a virtual target using nixos-generators.
host, # The host name for this home.
namespace,
config,
...
}: let
@ -45,4 +38,4 @@ in {
};
};
};
}
}

View file

@ -2,5 +2,5 @@
lib,
...
}: {
home.file.".config/fish/themes/Catppuccin\ Frappe.theme".source = lib.snowfall.fs.get-file "resources/apps/fish/Catppuccin\ Frappe.theme";
home.file.".config/fish/themes/Catppuccin\ Macchiato.theme".source = lib.snowfall.fs.get-file "resources/apps/fish/Catppuccin\ Macchiato.theme";
}

View file

@ -22,4 +22,4 @@
pointerCursor.accent = "blue";
pointerCursor.flavor = "macchiato";
};
}
}

View file

@ -31,29 +31,19 @@
};
theme = {
#name = "Colloid-Dark-Catppuccin";
#package = pkgs.colloid-gtk-theme.override {
#themeVariants = ["default"];
#colorVariants = ["dark"];
#sizeVariants = ["standard"];
#tweaks = ["catppuccin"];
#};
name = "Graphite-teal-Dark-nord";
package = pkgs.graphite-gtk-theme.override {
themeVariants = ["blue" "teal"];
colorVariants = ["dark"];
sizeVariants = ["standard"];
tweaks = ["nord"];
withGrub = true;
grubScreens = ["1080p"];
name = "Colloid-Dark-Catppuccin";
package = pkgs.colloid-gtk-theme.override {
themeVariants = ["default"];
colorVariants = ["dark"];
sizeVariants = ["standard"];
tweaks = ["catppuccin"];
};
};
};
dconf.settings = {
"org/gnome/shell/extensions/user-theme" = {
name = "Graphite-teal-Dark-nord";
name = "Colloid-Dark-Catppuccin";
};
"org/gnome/desktop/interface" = {

View file

@ -19,7 +19,10 @@ in {
# Enable modules
puzzlevision = {
common = {
nix.enable = true; # Standard Nix configuration
nix = {
enable = true; # Standard Nix configuration
use-lix = true;
};
grub.enable = true; # Bootloader grub
networking.enable = true; # Networkmanager configuration
kernel.enable = true; # Kernel modifications

View file

@ -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";
};
};
};

View file

@ -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;
};
}

View file

@ -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;
};
};
}

View file

@ -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
};
};
}

View file

@ -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;
};
}