mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-11 23:09:22 +08:00
Compare commits
2 Commits
0211a71cfa
...
rog-x
| Author | SHA1 | Date | |
|---|---|---|---|
| d33f1a8e22 | |||
| 8befb38d31 |
@@ -5,7 +5,7 @@
|
||||
let pkgs = import inputs.nixpkgs (localLib.buildNixpkgsConfig
|
||||
{
|
||||
inputs = { inherit (inputs.nixpkgs) lib; topInputs = inputs; };
|
||||
nixpkgs = { march = "haswell"; cuda = null; nixRoot = "/data/gpfs01/jykang/.nix"; nixos = false; };
|
||||
nixpkgs = { march = "haswell"; nixRoot = "/data/gpfs01/jykang/.nix"; nixos = false; };
|
||||
});
|
||||
in pkgs.symlinkJoin
|
||||
{
|
||||
|
||||
@@ -24,9 +24,8 @@ inputs:
|
||||
};
|
||||
luks.auto =
|
||||
{
|
||||
"/dev/disk/by-uuid/4c73288c-bcd8-4a7e-b683-693f9eed2d81" = { mapper = "root1"; ssd = true; };
|
||||
"/dev/disk/by-uuid/4be45329-a054-4c20-8965-8c5b7ee6b35d" =
|
||||
{ mapper = "swap"; ssd = true; before = [ "root1" ]; };
|
||||
"/dev/disk/by-uuid/pc-root1" = { mapper = "root1"; ssd = true; };
|
||||
"/dev/disk/by-uuid/pc-swap" = { mapper = "swap"; ssd = true; before = [ "root1" ]; };
|
||||
};
|
||||
swap = [ "/dev/mapper/swap" ];
|
||||
};
|
||||
@@ -35,7 +34,7 @@ inputs:
|
||||
{
|
||||
marches =
|
||||
[
|
||||
"znver2" "znver3" "znver4"
|
||||
"znver2" "znver3" "znver5"
|
||||
# FXSR PREFETCHW RDRND SAHF
|
||||
"silvermont"
|
||||
# SAHF FXSR XSAVE RDRND LZCNT HLE
|
||||
@@ -47,10 +46,10 @@ inputs:
|
||||
];
|
||||
remote.master.host.srv2-node0 = [ "skylake" ];
|
||||
};
|
||||
nixpkgs = { march = "znver4"; cuda.capabilities = [ "8.9" ]; };
|
||||
nixpkgs = { march = "znver5"; rocm = true; };
|
||||
sysctl.laptop-mode = 5;
|
||||
};
|
||||
hardware = { gpu = { type = "nvidia"; nvidia.dynamicBoost = true; }; legion = {}; };
|
||||
hardware.gpu.type = "amd";
|
||||
services =
|
||||
{
|
||||
samba =
|
||||
@@ -87,15 +86,10 @@ inputs:
|
||||
{
|
||||
name = "pc"; address = "127.0.0.1";
|
||||
cpu = { sockets = 2; cores = 8; threads = 2; };
|
||||
memoryGB = 80;
|
||||
gpus."4060" = 1;
|
||||
memoryGB = 32;
|
||||
};
|
||||
partitions.localhost = [ "pc" ];
|
||||
tui =
|
||||
{
|
||||
cpuQueues = [{ mpiThreads = 4; openmpThreads = 4; memoryGB = 56; }];
|
||||
gpuQueues = [{ name = "localhost"; gpuIds = [ "4060" ]; }];
|
||||
};
|
||||
tui.cpuQueues = [{ mpiThreads = 4; openmpThreads = 4; memoryGB = 32; }];
|
||||
};
|
||||
ollama = {};
|
||||
podman = {};
|
||||
@@ -104,26 +98,14 @@ inputs:
|
||||
kvm.aarch64 = true;
|
||||
nfs."/" = [ "192.168.84.0/24" ];
|
||||
};
|
||||
bugs = [ "xmunet" "backlight" "amdpstate" "iwlwifi" ];
|
||||
bugs = [ "xmunet" "amdpstate" "iwlwifi" ];
|
||||
packages = { mathematica = {}; vasp = {}; };
|
||||
};
|
||||
boot.loader.grub =
|
||||
{
|
||||
extraFiles =
|
||||
{
|
||||
"DisplayEngine.efi" = ./bios/DisplayEngine.efi;
|
||||
"SetupBrowser.efi" = ./bios/SetupBrowser.efi;
|
||||
"UiApp.efi" = ./bios/UiApp.efi;
|
||||
"EFI/Boot/Bootx64.efi" = ./bios/Bootx64.efi;
|
||||
"nixos.iso" = inputs.topInputs.self.src.iso.nixos;
|
||||
};
|
||||
extraFiles."nixos.iso" = inputs.topInputs.self.src.iso.nixos;
|
||||
extraEntries =
|
||||
''
|
||||
menuentry 'Advanced UEFI Firmware Settings' {
|
||||
insmod fat
|
||||
insmod chain
|
||||
chainloader @bootRoot@/EFI/Boot/Bootx64.efi
|
||||
}
|
||||
menuentry 'Live ISO' {
|
||||
set iso_path=@bootRoot@/nixos.iso
|
||||
export iso_path
|
||||
|
||||
@@ -3,7 +3,7 @@ let
|
||||
pkgs = import inputs.nixpkgs (localLib.buildNixpkgsConfig
|
||||
{
|
||||
inputs = { inherit (inputs.nixpkgs) lib; topInputs = inputs; };
|
||||
nixpkgs = { march = null; cuda = null; nixRoot = "/public/home/xmuhk/.nix"; nixos = false; };
|
||||
nixpkgs = { march = null; nixRoot = "/public/home/xmuhk/.nix"; nixos = false; };
|
||||
});
|
||||
lumericalLicenseManager =
|
||||
let
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# inputs = { lib, topInputs, ...}; nixpkgs = { march, cuda, nixRoot, nixos, arch };
|
||||
# inputs = { lib, topInputs, ...}; nixpkgs = { march, cuda, nixRoot, nixos, arch, rocm };
|
||||
{ inputs, nixpkgs }:
|
||||
let
|
||||
platformConfig =
|
||||
@@ -8,7 +8,7 @@ let
|
||||
${if nixpkgs.nixos then "hostPlatform" else "localSystem"} =
|
||||
{ system = "${nixpkgs.arch or "x86_64"}-linux"; gcc = { arch = nixpkgs.march; tune = nixpkgs.march; }; };
|
||||
};
|
||||
cudaConfig = inputs.lib.optionalAttrs (nixpkgs.cuda != null)
|
||||
cudaConfig = inputs.lib.optionalAttrs (nixpkgs.cuda or null != null)
|
||||
(
|
||||
{ cudaSupport = true; }
|
||||
// (inputs.lib.optionalAttrs (nixpkgs.cuda.capabilities != null)
|
||||
@@ -16,8 +16,9 @@ let
|
||||
// (inputs.lib.optionalAttrs (nixpkgs.cuda.forwardCompat != null)
|
||||
{ cudaForwardCompat = nixpkgs.cuda.forwardCompat; })
|
||||
);
|
||||
rocmConfig = inputs.lib.optionalAttrs (nixpkgs.rocm or false) { rocmSupport = true; };
|
||||
allowInsecurePredicate = p: inputs.lib.warn "Allowing insecure package ${p.name or "${p.pname}-${p.version}"}" true;
|
||||
config = cudaConfig
|
||||
config = cudaConfig // rocmConfig
|
||||
// {
|
||||
inherit allowInsecurePredicate;
|
||||
allowUnfree = true;
|
||||
@@ -30,7 +31,7 @@ let
|
||||
nvhpcArch = nixpkgs.march;
|
||||
# contentAddressedByDefault = true;
|
||||
})
|
||||
// (inputs.lib.optionalAttrs (nixpkgs.nixRoot != null)
|
||||
// (inputs.lib.optionalAttrs (nixpkgs.nixRoot or null != null)
|
||||
{ nix = { storeDir = "${nixpkgs.nixRoot}/store"; stateDir = "${nixpkgs.nixRoot}/state"; }; });
|
||||
in platformConfig //
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
pkgs = import inputs.nixpkgs (localLib.buildNixpkgsConfig
|
||||
{
|
||||
inputs = { inherit (inputs.nixpkgs) lib; topInputs = inputs; };
|
||||
nixpkgs = { march = null; cuda = null; nixRoot = null; nixos = false; };
|
||||
nixpkgs = { march = null; nixos = false; };
|
||||
});
|
||||
hpcstat =
|
||||
let
|
||||
|
||||
@@ -12,13 +12,14 @@ inputs:
|
||||
};});
|
||||
default = null;
|
||||
};
|
||||
rocm = mkOption { type = types.bool; default = false; };
|
||||
};
|
||||
config = let inherit (inputs.config.nixos.system) nixpkgs; in
|
||||
{
|
||||
nixpkgs = inputs.localLib.buildNixpkgsConfig
|
||||
{
|
||||
inherit inputs;
|
||||
nixpkgs = nixpkgs // { nixRoot = null; nixos = true; inherit (inputs.config.nixos.model) arch; };
|
||||
nixpkgs = nixpkgs // { nixos = true; inherit (inputs.config.nixos.model) arch; };
|
||||
};
|
||||
boot.kernelPatches = inputs.lib.mkIf (nixpkgs.march != null)
|
||||
[{
|
||||
|
||||
Reference in New Issue
Block a user