Add customized xone
package
This commit is contained in:
parent
5406a24edc
commit
820ef6729d
29
flake.nix
29
flake.nix
|
@ -61,6 +61,17 @@
|
|||
machineDefinitions;
|
||||
|
||||
tryFiles = import ./lib/utils/try-files.nix { inherit lib; };
|
||||
|
||||
xonePatcher = { fetchFromGitHub, xone }:
|
||||
xone.overrideAttrs (
|
||||
final: prev: {
|
||||
src = fetchFromGitHub {
|
||||
owner = "manuth";
|
||||
repo = "xone";
|
||||
rev = "954fc823fbaa429ad6e1c1a06a4a006598ef35ae";
|
||||
sha256 = "lsfm7WDXTB6t05AI/pp17yZvkNvnM2WBMUHL1eVO6qw=";
|
||||
};
|
||||
});
|
||||
in
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system:
|
||||
|
@ -73,17 +84,6 @@
|
|||
sops-nix.overlays.default
|
||||
];
|
||||
};
|
||||
|
||||
xonePatcher =
|
||||
xone: (xone.overrideAttrs (
|
||||
final: prev: {
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "manuth";
|
||||
repo = "xone";
|
||||
rev = "954fc823fbaa429ad6e1c1a06a4a006598ef35ae";
|
||||
sha256 = "lsfm7WDXTB6t05AI/pp17yZvkNvnM2WBMUHL1eVO6qw=";
|
||||
};
|
||||
}));
|
||||
in {
|
||||
packages = {
|
||||
rcloneDocs =
|
||||
|
@ -103,7 +103,10 @@
|
|||
pkgs.runCommand "options-doc.md" {} ''
|
||||
cat ${optionsDoc.optionsCommonMark} >> $out
|
||||
'';
|
||||
xone = xonePatcher pkgs.linuxPackages_latest.xone;
|
||||
xone = xonePatcher {
|
||||
inherit (pkgs) fetchFromGitHub;
|
||||
inherit (pkgs.linuxPackages_latest) xone;
|
||||
};
|
||||
};
|
||||
|
||||
devShells.default = pkgs.mkShellNoCC (
|
||||
|
@ -139,6 +142,8 @@
|
|||
{ pkgs, ... }: {
|
||||
config = {
|
||||
_module.args = {
|
||||
inherit xonePatcher;
|
||||
|
||||
machine = machine // {
|
||||
name = hostname;
|
||||
config = (pkgs.callPackage config { });
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
./modules/my-users.nix
|
||||
./modules/sddm.nix
|
||||
./modules/unfree.nix
|
||||
./modules/xone.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
|
@ -102,6 +103,9 @@
|
|||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
|
||||
# Drivers
|
||||
hardware.xone.enable = (lib.mkIf machine.config.xone true);
|
||||
|
||||
# Enable KDE Plasma
|
||||
services.displayManager.sddm = {
|
||||
enable = true;
|
||||
|
|
22
lib/modules/xone.nix
Normal file
22
lib/modules/xone.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ lib, pkgs, xonePatcher, ... }: {
|
||||
config = {
|
||||
nixpkgs = {
|
||||
config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||
"xow_dongle-firmware"
|
||||
];
|
||||
|
||||
overlays = [
|
||||
(final: prev: {
|
||||
linuxPackages = prev.linuxPackages.extend (
|
||||
final: prev: {
|
||||
xone = xonePatcher {
|
||||
inherit (pkgs) fetchFromGitHub;
|
||||
inherit (prev) xone;
|
||||
};
|
||||
}
|
||||
);
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue