diff --git a/flake.nix b/flake.nix index f4968b44..e5d6a890 100644 --- a/flake.nix +++ b/flake.nix @@ -7,6 +7,7 @@ # NixOS packages stable-nixpkgs.url = "nixpkgs/nixos-23.05"; unstable-nixpkgs.url = "nixpkgs/nixos-unstable"; + master-nixpkgs.url = "nixpkgs/master"; # Manage dotfiles in a home directory home-manager.url = "github:nix-community/home-manager/release-23.05"; @@ -27,7 +28,7 @@ sops-nix.url = "github:Mic92/sops-nix"; }; - outputs = { stable-nixpkgs, unstable-nixpkgs, home-manager, lanzaboote, nur, sops-nix, /*nixos-hardware,*/ ... }@inputs: + outputs = { stable-nixpkgs, unstable-nixpkgs, master-nixpkgs, home-manager, lanzaboote, nur, sops-nix, /*nixos-hardware,*/ ... }@inputs: let # Variables - Remember to set these hostname = "nixos-laptop"; @@ -43,6 +44,11 @@ config = { allowUnfree = true; }; }; + master = import master-nixpkgs { + inherit system; + config = { allowUnfree = true; }; + } + lib = stable-nixpkgs.lib; in { # NixOS Configuration files: @@ -52,6 +58,7 @@ inherit system; specialArgs = { inherit unstable; + inherit master; inherit hostname; }; modules = [ diff --git a/hosts/nixos-laptop/configuration.nix b/hosts/nixos-laptop/configuration.nix index 400772af..031aaba6 100644 --- a/hosts/nixos-laptop/configuration.nix +++ b/hosts/nixos-laptop/configuration.nix @@ -1,4 +1,4 @@ -{ lib, config, pkgs, ... }: { +{ lib, config, pkgs, master, ... }: { # Set your time zone. time.timeZone = "Asia/Tokyo"; @@ -32,7 +32,7 @@ opengl.driSupport = true; # opengl.extraPackages = with pkgs; [ nvidia-vaapi-driver ]; - nvidia = { + nvidia = with master.pkgs { open = false; package = config.boot.kernelPackages.nvidiaPackages.stable; # powerManagement.finegrained = true;