nixos/nvidia: add updater for the driver package

This commit is contained in:
Wroclaw 2025-04-07 21:56:41 +02:00
parent 735a41ca0f
commit 5bddee4588
2 changed files with 103 additions and 9 deletions

View file

@ -11,3 +11,26 @@ in {
"inputs/cosmic-modules" = inputsWithPackages.cosmic-modules;
"inputs/nixos-vscode-server" = inputsWithPackages.nixos-vscode-server;
})
# MARK: NixOS modules
// ( let
pkgs = self.modifiedNixpkgsPure {
localSystem = builtins.currentSystem;
config.allowUnfree = true;
};
lib = pkgs.lib;
mkUpdater = path: attrpath: extraModule: let
system = pkgs.nixos {
imports = [ path extraModule ];
config = {
_module.args = {
inherit self;
inherit (self) inputs;
};
system.stateVersion = lib.versions.pad 2 lib.trivial.verison;
};
};
in lib.getAttrFromPath ( [ "config" ] ++ attrpath ) system;
in {
"NixOS/nvidia" = mkUpdater ./nix-os/nvidia.nix [ "hardware" "nvidia" "package" ] {};
})