mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-10 16:09:22 +08:00
devices.hwang: init
This commit is contained in:
18
devices/hwang/default.nix
Normal file
18
devices/hwang/default.nix
Normal 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
|
||||
@@ -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; };
|
||||
|
||||
@@ -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 ]
|
||||
|
||||
Reference in New Issue
Block a user