devices.hwang: init

This commit is contained in:
2026-01-09 15:16:48 +08:00
parent 5f36b073a7
commit 40aa569024
3 changed files with 21 additions and 1 deletions

18
devices/hwang/default.nix Normal file
View File

@@ -0,0 +1,18 @@
# sudo nix build --store 'local?store=/data/gpfs01/hwang/.nix/store&state=/data/gpfs01/hwang/.nix/state&log=/data/gpfs01/hwang/.nix/log' .#hwang
# sudo nix-store --store 'local?store=/data/gpfs01/hwang/.nix/store&state=/data/gpfs01/hwang/.nix/state&log=/data/gpfs01/hwang/.nix/log' -qR ./result | grep -Fxv -f <(ssh hwang find .nix/store -maxdepth 1 -exec realpath '{}' '\;') | sudo xargs nix-store --store 'local?store=/data/gpfs01/hwang/.nix/store&state=/data/gpfs01/hwang/.nix/state&log=/data/gpfs01/hwang/.nix/log' --export | pv > hwang.nar
# cat hwang.nar | nix-store --import
{ inputs, localLib }:
let
pkgs = import inputs.nixpkgs (localLib.buildNixpkgsConfig
{
inputs = { inherit (inputs.nixpkgs) lib; topInputs = inputs; };
nixpkgs = { march = "haswell"; nixRoot = "/data/gpfs01/hwang/.nix"; nixos = false; };
});
hwang = pkgs.symlinkJoin
{
name = "hwang";
paths = with pkgs; [ pv localPackages.vasp.intel glibc ];
postBuild = "echo ${inputs.self.rev or "dirty"} > $out/.version";
passthru = { inherit pkgs; archive = pkgs.closureInfo { rootPaths = [ hwang.drvPath ]; }; };
};
in hwang

View File

@@ -18,9 +18,10 @@ inputs:
"/dev/mapper/tf1" =
{
"/" = "/nix/tf";
"/nix/remote/jykang" = "/data/gpfs01/jykang/.nix";
"/nix/remote/xmuhk" = "/public/home/xmuhk/.nix";
"/nix/remote/jykang" = "/data/gpfs01/jykang/.nix";
"/nix/remote/wlin" = "/data/gpfs01/wlin/.nix";
"/nix/remote/hwang" = "/data/gpfs01/hwang/.nix";
};
};
nfs."nas.ts.chn.moe:/" = { mountPoint = "/nix/remote/nas"; mountBeforeSwitch = false; };

View File

@@ -29,6 +29,7 @@
jykang = import ../devices/jykang { inherit inputs localLib; };
wlin = import ../devices/wlin { inherit inputs localLib; };
xmuhk = import ../devices/xmuhk { inherit inputs localLib; };
hwang = import ../devices/hwang { inherit inputs localLib; };
src =
let getDrv = x:
if pkgs.lib.isDerivation x then [ x ]