pass around system argument again
This commit is contained in:
parent
88e485934f
commit
280cc4f686
2 changed files with 10 additions and 7 deletions
|
@ -1,9 +1,9 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
{ pkgs, config, lib, system, ... }:
|
||||
let
|
||||
cfg = config.grimmShared;
|
||||
inherit (lib) optionals optional optionalString concatLines getExe;
|
||||
inherit (config.boot.kernelPackages) x86_energy_perf_policy cpupower;
|
||||
enable_perf_policy = (lib.elem builtins.currentSystem x86_energy_perf_policy.meta.platforms);
|
||||
enable_perf_policy = (lib.elem system x86_energy_perf_policy.meta.platforms);
|
||||
|
||||
powersave = with pkgs; writeShellScriptBin "powersave-mode" (concatLines ([
|
||||
"${getExe cpupower} frequency-set -g powersave -u 2000000" # clock speed
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{ pkgs, lib, config, system, ... }:
|
||||
let
|
||||
nivSources = import ./nix/sources.nix;
|
||||
asGithubRef = src: "github:${src.owner}/${src.repo}/${src.rev}";
|
||||
|
@ -18,7 +18,7 @@ in
|
|||
(builtins.getFlake (asGithubRef nivSources.chaotic)).nixosModules.default # fixme: ideally we'd not rely on the flake syntax to load the module
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
nixpkgs.hostPlatform = system;
|
||||
|
||||
system.nixos = {
|
||||
distroId = "lixos";
|
||||
|
@ -26,15 +26,14 @@ in
|
|||
};
|
||||
|
||||
environment.sessionVariables = with config.system.nixos; {
|
||||
distro = "${distroName} ${version} (${codeName}) ${builtins.currentSystem}";
|
||||
# NIXPKGS_ALLOW_UNFREE = "1";
|
||||
distro = "${distroName} ${version} (${codeName}) ${system}";
|
||||
};
|
||||
|
||||
nixpkgs.pkgs =
|
||||
let
|
||||
src = nivSources.nixpkgs;
|
||||
config = { allowUnfree = true; };
|
||||
unpatched = import src { inherit config; };
|
||||
unpatched = import src { inherit config system; };
|
||||
inherit (unpatched) applyPatches fetchpatch;
|
||||
in
|
||||
import
|
||||
|
@ -48,6 +47,10 @@ in
|
|||
final: prev: { agenix = final.callPackage "${nivSources.agenix}/pkgs/agenix.nix" { }; }
|
||||
);
|
||||
|
||||
_module.args = {
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
|
||||
nix.settings.extra-substituters = [
|
||||
"https://cache.lix.systems"
|
||||
"https://nyx.chaotic.cx/"
|
||||
|
|
Loading…
Reference in a new issue