Split up more nix functions
This commit is contained in:
parent
0b8d1f4eaf
commit
b7a5fc7197
6 changed files with 48 additions and 50 deletions
|
@ -1,10 +1,7 @@
|
|||
{ config, lib, pkgs, unstable, ... }:
|
||||
{
|
||||
options.nixpkgs.allowUnfreePackages = lib.mkOption {
|
||||
type = with lib.types; listOf str;
|
||||
};
|
||||
imports = [ ./unfree ];
|
||||
|
||||
config = {
|
||||
nix = {
|
||||
package = lib.mkForce pkgs.nix;
|
||||
settings.experimental-features = [
|
||||
|
@ -14,11 +11,8 @@
|
|||
registry.unstable.flake = unstable;
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.nixpkgs.allowUnfreePackages;
|
||||
|
||||
_module.args.pkgsUnstable = import unstable {
|
||||
inherit (pkgs.stdenv.hostPlatform) system;
|
||||
inherit (config.nixpkgs) config;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
8
modules/home/settings/nix/unfree/default.nix
Normal file
8
modules/home/settings/nix/unfree/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
options.nixpkgs.allowUnfreePackages = lib.mkOption {
|
||||
type = with lib.types; listOf str;
|
||||
};
|
||||
|
||||
config.nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.nixpkgs.allowUnfreePackages;
|
||||
}
|
|
@ -1,11 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
services.udev.packages = [
|
||||
(pkgs.writeTextFile {
|
||||
name = "10-oculus.rules";
|
||||
text = ''KERNEL=="hidraw*", ATTRS{idVendor}=="0e6f", ATTRS{idProduct}=="0184", MODE="0660", TAG+="uaccess"'';
|
||||
destination = "/etc/udev/rules.d/10-oculus.rules";
|
||||
})
|
||||
services.udev.packages = lib.mkIf config.system.desktop.enable [
|
||||
(pkgs.writeTextFile {
|
||||
name = "10-pdp.rules";
|
||||
text = ''SUBSYSTEM=="usb", ATTR{idVendor}=="2833", MODE="0666"'';
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or -B 00000066 -b 00000099";
|
||||
};
|
||||
};
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-gnome
|
||||
];
|
||||
extraPortals = with pkgs; [ xdg-desktop-portal-gnome ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
{ config, lib, pkgs, unstable, ... }:
|
||||
{
|
||||
imports = [ ./gc ];
|
||||
imports = [
|
||||
./gc
|
||||
./unfree
|
||||
];
|
||||
|
||||
options.nixpkgs.allowUnfreePackages = lib.mkOption {
|
||||
type = with lib.types; listOf str;
|
||||
};
|
||||
|
||||
config = {
|
||||
nix = {
|
||||
package = pkgs.lix;
|
||||
settings = {
|
||||
|
@ -19,11 +17,8 @@
|
|||
};
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.nixpkgs.allowUnfreePackages;
|
||||
|
||||
_module.args.pkgsUnstable = import unstable {
|
||||
inherit (pkgs.stdenv.hostPlatform) system;
|
||||
inherit (config.nixpkgs) config;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
8
modules/system/settings/nix/unfree/default.nix
Normal file
8
modules/system/settings/nix/unfree/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
options.nixpkgs.allowUnfreePackages = lib.mkOption {
|
||||
type = with lib.types; listOf str;
|
||||
};
|
||||
|
||||
config.nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.nixpkgs.allowUnfreePackages;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue