[Nix] Attempts to allow unfree packages

This commit is contained in:
2025-02-11 21:31:24 -08:00
parent 7c77936ae9
commit 77a9c37df7
4 changed files with 25 additions and 7 deletions

View File

@@ -2,7 +2,9 @@
description = "System Configuration"; description = "System Configuration";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; nixpkgs = {
url = "github:nixos/nixpkgs?ref=nixos-unstable";
};
home-manager = { home-manager = {
url = "github:nix-community/home-manager/master"; url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@@ -25,7 +27,7 @@
}; };
}; };
outputs = { self, nixpkgs, ... }@inputs: { outputs = { self, nixpkgs, ... }@inputs:
nixosConfigurations = { nixosConfigurations = {
drew-desktop = (import ./system/hosts/drew-desktop) { drew-desktop = (import ./system/hosts/drew-desktop) {
inherit inputs; inherit inputs;

View File

@@ -7,4 +7,9 @@
# Enable flakes and nix-commnands. # Enable flakes and nix-commnands.
nix.settings.experimental-features = ["flakes" "nix-command"]; nix.settings.experimental-features = ["flakes" "nix-command"];
# Allow unfree code
nixpkgs.config = {
allowUnfree = true;
};
} }

View File

@@ -1,6 +1,13 @@
{ self, nixpkgs, inputs, ... }: { self, nixpkgs, inputs, ... }:
nixpkgs.lib.nixosSystem { let
system = "x86_64-linux"; system = "x86_64-linux";
# TODO: Fix this so it doesn't warn about wanting readOnlyPkgs
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
in nixpkgs.lib.nixosSystem {
inherit system;
modules = [ modules = [
./configuration.nix ./configuration.nix
./hardware-configuration.nix ./hardware-configuration.nix
@@ -13,8 +20,14 @@ nixpkgs.lib.nixosSystem {
]; ];
}; };
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.extraSpecialArgs = { inherit inputs; }; home-manager.extraSpecialArgs = {
inherit inputs;
inherit pkgs;
};
} }
]; ];
specialArgs = { inherit inputs; }; specialArgs = {
inherit inputs;
inherit pkgs;
};
} }

View File

@@ -10,8 +10,6 @@
home.username = "drew"; home.username = "drew";
home.homeDirectory = "/Users/drew"; home.homeDirectory = "/Users/drew";
nix.settings.experimental-features = ["flakes" "nix-command"];
home.packages = with pkgs; [ home.packages = with pkgs; [
nodejs_22 nodejs_22
]; ];