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
|
let
|
||||||
cfg = config.grimmShared;
|
cfg = config.grimmShared;
|
||||||
inherit (lib) optionals optional optionalString concatLines getExe;
|
inherit (lib) optionals optional optionalString concatLines getExe;
|
||||||
inherit (config.boot.kernelPackages) x86_energy_perf_policy cpupower;
|
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 ([
|
powersave = with pkgs; writeShellScriptBin "powersave-mode" (concatLines ([
|
||||||
"${getExe cpupower} frequency-set -g powersave -u 2000000" # clock speed
|
"${getExe cpupower} frequency-set -g powersave -u 2000000" # clock speed
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, lib, config, ... }:
|
{ pkgs, lib, config, system, ... }:
|
||||||
let
|
let
|
||||||
nivSources = import ./nix/sources.nix;
|
nivSources = import ./nix/sources.nix;
|
||||||
asGithubRef = src: "github:${src.owner}/${src.repo}/${src.rev}";
|
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
|
(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 = {
|
system.nixos = {
|
||||||
distroId = "lixos";
|
distroId = "lixos";
|
||||||
|
@ -26,15 +26,14 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.sessionVariables = with config.system.nixos; {
|
environment.sessionVariables = with config.system.nixos; {
|
||||||
distro = "${distroName} ${version} (${codeName}) ${builtins.currentSystem}";
|
distro = "${distroName} ${version} (${codeName}) ${system}";
|
||||||
# NIXPKGS_ALLOW_UNFREE = "1";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.pkgs =
|
nixpkgs.pkgs =
|
||||||
let
|
let
|
||||||
src = nivSources.nixpkgs;
|
src = nivSources.nixpkgs;
|
||||||
config = { allowUnfree = true; };
|
config = { allowUnfree = true; };
|
||||||
unpatched = import src { inherit config; };
|
unpatched = import src { inherit config system; };
|
||||||
inherit (unpatched) applyPatches fetchpatch;
|
inherit (unpatched) applyPatches fetchpatch;
|
||||||
in
|
in
|
||||||
import
|
import
|
||||||
|
@ -48,6 +47,10 @@ in
|
||||||
final: prev: { agenix = final.callPackage "${nivSources.agenix}/pkgs/agenix.nix" { }; }
|
final: prev: { agenix = final.callPackage "${nivSources.agenix}/pkgs/agenix.nix" { }; }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
_module.args = {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
};
|
||||||
|
|
||||||
nix.settings.extra-substituters = [
|
nix.settings.extra-substituters = [
|
||||||
"https://cache.lix.systems"
|
"https://cache.lix.systems"
|
||||||
"https://nyx.chaotic.cx/"
|
"https://nyx.chaotic.cx/"
|
||||||
|
|
Loading…
Reference in a new issue