mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-12 18:30:46 +02:00
flake: cleaned unfree packages
This commit is contained in:
@@ -30,34 +30,39 @@
|
|||||||
} @ inputs: let
|
} @ inputs: let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
|
||||||
pkgs = import nixpkgs {
|
unfreePkgs = [
|
||||||
inherit system;
|
|
||||||
|
|
||||||
config.allowUnfreePredicate = pkg:
|
|
||||||
builtins.elem (nixpkgs.lib.getName pkg) [
|
|
||||||
"hplip"
|
"hplip"
|
||||||
"vivify.vim"
|
"vivify.vim"
|
||||||
"cheatsheet.nvim"
|
"cheatsheet.nvim"
|
||||||
];
|
];
|
||||||
};
|
|
||||||
|
mkUnfreePredicate = pkg:
|
||||||
|
builtins.elem (nixpkgs.lib.getName pkg) unfreePkgs;
|
||||||
|
|
||||||
pkgs-unstable = import nixpkgs-unstable {
|
pkgs-unstable = import nixpkgs-unstable {
|
||||||
inherit system;
|
inherit system;
|
||||||
|
|
||||||
config.allowUnfreePredicate = pkg:
|
config.allowUnfreePredicate = mkUnfreePredicate;
|
||||||
builtins.elem (nixpkgs.lib.getName pkg) [
|
|
||||||
"hplip"
|
|
||||||
"vivify.vim"
|
|
||||||
"cheatsheet.nvim"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
in {
|
in {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
laptop = nixpkgs.lib.nixosSystem {
|
laptop = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {inherit inputs pkgs pkgs-unstable;};
|
specialArgs = {inherit inputs pkgs-unstable;};
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/laptop/configuration.nix
|
./hosts/laptop/configuration.nix
|
||||||
|
# solves evaluation warning
|
||||||
|
/*
|
||||||
|
You have set specialArgs.pkgs, which means that options like nixpkgs.config
|
||||||
|
and nixpkgs.overlays will be ignored. If you wish to reuse an already created
|
||||||
|
pkgs, which you know is configured correctly for this NixOS configuration,
|
||||||
|
please import the `nixosModules.readOnlyPkgs` module from the nixpkgs flake or
|
||||||
|
`(modulesPath + "/misc/nixpkgs/read-only.nix"), and set `{ nixpkgs.pkgs = <your pkgs>; }`.
|
||||||
|
This properly disables the ignored options to prevent future surprises.
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
nixpkgs.config.allowUnfreePredicate = mkUnfreePredicate;
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user