builders: use pkgs overlay

This commit is contained in:
Zynh Ludwig 2024-08-10 11:02:58 -07:00
parent 2d2909e22e
commit 89e5cb8679
10 changed files with 32 additions and 15 deletions

View file

@ -79,5 +79,7 @@
system = "aarch64-darwin";
}
];
overlays.default = import ./pkgs;
};
}

View file

@ -1,4 +1,4 @@
{ lib, ... }:
{ lib, self, ... }:
let
getModules = path:
@ -16,6 +16,7 @@ in
imports = getModules ./.;
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [ self.overlays.default ];
snowhawk.user.enable = lib.mkDefault true;
snowhawk.tmux.enable = lib.mkDefault true;

View file

@ -100,9 +100,6 @@
# backupFileExtension = "backup";
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# programs.hyprland.enable = true;
# environment.sessionVariables.NIXOS_OZONE_WL = "1";

View file

@ -2,7 +2,7 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running `nixos-help`).
{ pkgs, inputs, lib, config, ... }:
{ pkgs, inputs, lib, config, self, ... }:
{
imports = [
@ -98,7 +98,7 @@
security.polkit.enable = true;
home-manager = {
extraSpecialArgs = { inherit inputs; };
extraSpecialArgs = { inherit inputs self; };
users = { "ravenshade" = import ./home.nix; };
# backupFileExtension = "backup";
};

View file

@ -102,9 +102,6 @@
# backupFileExtension = "backup";
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# programs.hyprland.enable = true;
# environment.sessionVariables.NIXOS_OZONE_WL = "1";

View file

@ -1,4 +1,4 @@
{ nixpkgs, ... }@inputs:
{ nixpkgs, self, ... }@inputs:
let
lib = nixpkgs.lib.extend (import ../lib);
@ -15,7 +15,7 @@ rec {
hostname
(nixosSystem {
inherit system;
specialArgs = { inherit inputs lib; };
specialArgs = { inherit inputs lib self; };
modules = [
../hosts/${hostname}/hardware-configuration.nix
../hosts/${hostname}/configuration.nix
@ -39,9 +39,9 @@ rec {
nameValuePair
"${user}${hostStr}"
(homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages."${system}";
pkgs = nixpkgs.legacyPackages.${system}.extend self.overlays.default;
extraSpecialArgs = {
inherit inputs;
inherit inputs self;
lib = lib.extend inputs.home-manager.lib;
};

View file

@ -14,4 +14,5 @@ in
snowhawk.audio.enable = lib.mkDefault true;
snowhawk.env.enable = lib.mkDefault true;
snowhawk.sops.enable = lib.mkDefault true;
snowhawk.nixpkgs.enable = lib.mkDefault true;
}

View file

@ -13,7 +13,5 @@ in
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
};
nixpkgs.config.allowUnfree = true;
};
}

17
modules/nixpkgs.nix Normal file
View file

@ -0,0 +1,17 @@
{ lib, config, self, ... }:
let
cfg = config.snowhawk.nixpkgs;
in
{
options.snowhawk.nixpkgs = {
enable = lib.mkEnableOption "nixpkgs settings";
};
config = lib.mkIf cfg.enable {
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [ self.overlays.default ];
};
}

4
pkgs/default.nix Normal file
View file

@ -0,0 +1,4 @@
final: prev:
{
wrapWine = prev.lib.callPackage ./wrapWine.nix { };
}