feat: add cachix configuration

This commit is contained in:
Jo 2024-12-23 18:30:07 +01:00
parent 14135dfb9e
commit ad97764694
4 changed files with 63 additions and 42 deletions

View file

@ -12,6 +12,7 @@ in {
config = mkIf cfg.enable {
environment.sessionVariables = {
MOZ_ENABLE_WAYLAND = "1"; # Firefox native Wayland support
NIXOS_OZONE_WL = "1"; # Native Wayland in Chromium and Electron based applications
};
# Enable modules
@ -20,6 +21,7 @@ in {
nix = {
enable = true; # Standard Nix configuration
use-lix = true;
use-nixld = true;
};
grub.enable = true; # Bootloader grub
networking.enable = true; # Networkmanager configuration
@ -32,6 +34,10 @@ in {
locale.enable = true; # Locale settings
};
tools = {
cachix.enable = true;
};
desktop.gnome.enable = true;
};
};

View file

@ -0,0 +1,17 @@
{
lib,
pkgs,
namespace,
config,
...
}: with lib; with lib.${namespace};
let
cfg = config.${namespace}.tools.cachix;
in {
options.${namespace}.tools.cachix = { enable = mkEnableOption "Enable the cachix binary cache service on your system."; };
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ cachix ];
};
}