mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 06:09:22 +08:00
全局启用native,但排除个别包极其依赖
This commit is contained in:
26
flake.nix
26
flake.nix
@@ -120,32 +120,6 @@
|
||||
./modules/virtualisation/waydroid.nix
|
||||
./modules/home/root.nix
|
||||
./modules/home/chn.nix
|
||||
|
||||
({ pkgs, ...}@inputs:
|
||||
{
|
||||
config.environment.systemPackages =
|
||||
[
|
||||
( inputs.inputs.nixpkgs.lib.nixosSystem
|
||||
{
|
||||
system = "x86_64-linux";
|
||||
modules = [({ pkgs, ... }@inputs:
|
||||
{
|
||||
config.nixpkgs =
|
||||
{
|
||||
hostPlatform =
|
||||
{ system = "x86_64-linux"; gcc = { arch = "alderlake"; tune = "alderlake"; }; };
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
config.nixpkgs.overlays = [( final: prev: rec
|
||||
{
|
||||
optimizeWithFlags = pkg: flags: pkg.overrideAttrs (old:
|
||||
{ NIX_CFLAGS_COMPILE = [ (old.NIX_CFLAGS_COMPILE or "") ] ++ flags; });
|
||||
hello = optimizeWithFlags prev.hello [ "-frecord-gcc-switches" ];
|
||||
} )];
|
||||
})];
|
||||
} ).pkgs.hello
|
||||
];
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
config =
|
||||
{
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
nixpkgs.hostPlatform = inputs.lib.mkDefault "x86_64-linux";
|
||||
nix =
|
||||
{
|
||||
settings =
|
||||
|
||||
@@ -1,21 +1,10 @@
|
||||
inputs:
|
||||
{ pkgs, ... }@inputs:
|
||||
{
|
||||
config =
|
||||
{
|
||||
boot =
|
||||
{
|
||||
kernelPackages = ( inputs.inputs.nixpkgs.lib.nixosSystem
|
||||
{
|
||||
system = "x86_64-linux";
|
||||
modules =
|
||||
[{
|
||||
nixpkgs =
|
||||
{
|
||||
hostPlatform = { system = "x86_64-linux"; gcc = { arch = "alderlake"; tune = "alderlake"; }; };
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
}];
|
||||
} ).pkgs.linuxPackages_xanmod_latest;
|
||||
kernelPackages = inputs.pkgs.linuxPackages_xanmod_latest;
|
||||
initrd.availableKernelModules =
|
||||
[
|
||||
"ahci" "i915" "intel_cstate" "nvidia" "nvidia_drm" "nvidia_modeset" "nvidia_uvm" "nvme" "sr_mod"
|
||||
|
||||
@@ -1 +1,11 @@
|
||||
{ config.nix.settings.system-features = [ "gccarch-alderlake" ]; }
|
||||
{
|
||||
config =
|
||||
{
|
||||
nix.settings.system-features = [ "gccarch-alderlake" ];
|
||||
nixpkgs =
|
||||
{
|
||||
hostPlatform = { system = "x86_64-linux"; gcc = { arch = "alderlake"; tune = "alderlake"; }; };
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,10 +3,39 @@
|
||||
config =
|
||||
{
|
||||
environment.systemPackages = [ inputs.config.nur.repos.ataraxiasjel.proton-ge ];
|
||||
programs =
|
||||
programs = let generic-pkgs = (inputs.inputs.nixpkgs.lib.nixosSystem
|
||||
{
|
||||
anime-game-launcher.enable = true;
|
||||
honkers-railway-launcher.enable = true;
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inputs = inputs.inputs; };
|
||||
modules =
|
||||
[
|
||||
inputs.inputs.aagl.nixosModules.default
|
||||
({ pkgs, ...}@inputs:
|
||||
{
|
||||
config.nixpkgs =
|
||||
{
|
||||
config.allowUnfree = true;
|
||||
overlays =
|
||||
[( final: prev:
|
||||
{
|
||||
anime-game-launcher = inputs.inputs.aagl.packages.x86_64-linux.anime-game-launcher;
|
||||
honkers-railway-launcher = inputs.inputs.aagl.packages.x86_64-linux.honkers-railway-launcher;
|
||||
} )];
|
||||
};
|
||||
})
|
||||
];
|
||||
}).pkgs;
|
||||
in {
|
||||
anime-game-launcher =
|
||||
{
|
||||
enable = true;
|
||||
package = generic-pkgs.anime-game-launcher;
|
||||
};
|
||||
honkers-railway-launcher =
|
||||
{
|
||||
enable = true;
|
||||
package = generic-pkgs.honkers-railway-launcher;
|
||||
};
|
||||
steam.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user