forked from rarias/jungle
Compare commits
18 Commits
3a44f7e731
...
weasel-hyd
| Author | SHA1 | Date | |
|---|---|---|---|
|
0b047b7272
|
|||
|
354c11c329
|
|||
|
6a01158c43
|
|||
|
d7f92a9126
|
|||
|
ed6cb7e6ea
|
|||
|
ed8eafba79
|
|||
|
937f08d11c
|
|||
|
71b8198e4a
|
|||
|
1a5ba3b930
|
|||
|
a057c2e5f5
|
|||
|
7e4fb6bccf
|
|||
|
b5b90826a7
|
|||
|
b5140eda17
|
|||
|
6a89c4de90
|
|||
|
8369b1207e
|
|||
|
f2bf4970c9
|
|||
| 4b4fe9bb3d | |||
|
510d9046ce
|
@@ -18,5 +18,6 @@
|
|||||||
./base/users.nix
|
./base/users.nix
|
||||||
./base/watchdog.nix
|
./base/watchdog.nix
|
||||||
./base/zsh.nix
|
./base/zsh.nix
|
||||||
|
./base/fish.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
vim wget git htop tmux pciutils tcpdump ripgrep nix-index nixos-option
|
vim wget git htop tmux pciutils tcpdump ripgrep nix-index nixos-option
|
||||||
nix-diff ipmitool freeipmi ethtool lm_sensors cmake gnumake file tree
|
nix-diff ipmitool freeipmi ethtool lm_sensors cmake gnumake file tree
|
||||||
ncdu config.boot.kernelPackages.perf ldns pv
|
ncdu config.boot.kernelPackages.perf ldns pv
|
||||||
|
nix-output-monitor
|
||||||
|
nixfmt-rfc-style
|
||||||
# From bsckgs overlay
|
# From bsckgs overlay
|
||||||
osumb
|
osumb
|
||||||
];
|
];
|
||||||
|
|||||||
4
m/common/base/fish.nix
Normal file
4
m/common/base/fish.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs.fish.enable = true;
|
||||||
|
}
|
||||||
@@ -87,6 +87,12 @@
|
|||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIIFiqXqt88VuUfyANkZyLJNiuroIITaGlOOTMhVDKjf abonerib@bsc"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIIFiqXqt88VuUfyANkZyLJNiuroIITaGlOOTMhVDKjf abonerib@bsc"
|
||||||
];
|
];
|
||||||
|
shell = pkgs.fish;
|
||||||
|
packages = with pkgs; [
|
||||||
|
starship
|
||||||
|
jujutsu
|
||||||
|
neovim
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
vlopez = {
|
vlopez = {
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
{ lib, ... }:
|
{ lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../common/ssf.nix
|
../common/ssf.nix
|
||||||
../module/hut-substituter.nix
|
../module/hut-substituter.nix
|
||||||
|
./virtualization.nix
|
||||||
|
./hydra.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Select this using the ID to avoid mismatches
|
# Select this using the ID to avoid mismatches
|
||||||
@@ -30,4 +32,23 @@
|
|||||||
prefixLength = 24;
|
prefixLength = 24;
|
||||||
} ];
|
} ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.nix-serve = {
|
||||||
|
enable = true;
|
||||||
|
bindAddress = "0.0.0.0";
|
||||||
|
port = 5000;
|
||||||
|
package = pkgs.haskell.lib.overrideSrc (pkgs.haskell.packages.ghc96.nix-serve-ng.override { nix = pkgs.nixVersions.nix_2_28; }) {
|
||||||
|
src = pkgs.fetchgit {
|
||||||
|
url = "https://jungle.bsc.es/git/abonerib/nix-serve-ng.git";
|
||||||
|
rev = "9c056641300a826db66b66d7e584b2541d38927a";
|
||||||
|
hash = "sha256-y69ZchFiZOU71eyeljcQgLxkLk5JUzZfanq8Yzw4MkI=";
|
||||||
|
};
|
||||||
|
version = "unstable";
|
||||||
|
};
|
||||||
|
|
||||||
|
secretKeyFile = "/var/cache-priv-key.pem";
|
||||||
|
# Public key:
|
||||||
|
# 10.0.40.6:8jBhIdXEBap+Qo+vc1/fnV9vj43A2oDk839EEheRr/U=
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
52
m/weasel/hydra.nix
Normal file
52
m/weasel/hydra.nix
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
{
|
||||||
|
services.hydra = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
# Wrap hydra so it puts quiet flag every time... This is dumb and annoying,
|
||||||
|
# but i can't override the systemd ExecStart without running into infinite
|
||||||
|
# recursion.
|
||||||
|
package = pkgs.symlinkJoin {
|
||||||
|
name = "hydra-quiet";
|
||||||
|
paths = [ pkgs.hydra ];
|
||||||
|
postBuild = ''
|
||||||
|
for prog in hydra-queue-runner hydra-evaluator ; do
|
||||||
|
prev=$(realpath $out/bin/$prog)
|
||||||
|
rm $out/bin/$prog
|
||||||
|
cat >$out/bin/$prog <<EOF
|
||||||
|
#!/bin/sh
|
||||||
|
args=()
|
||||||
|
for arg in "\$@"; do
|
||||||
|
if [ "\$arg" != "-v" ]; then
|
||||||
|
args+=("\$arg")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
exec $prev --quiet "\''${args[@]}"
|
||||||
|
EOF
|
||||||
|
|
||||||
|
chmod +x $out/bin/$prog
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
hydraURL = "http://localhost:3001"; # externally visible URL
|
||||||
|
notificationSender = "hydra@jungle.bsc.es"; # e-mail of Hydra service
|
||||||
|
port = 3001;
|
||||||
|
# a standalone Hydra will require you to unset the buildMachinesFiles list to avoid using a nonexistant /etc/nix/machines
|
||||||
|
buildMachinesFiles = [ ];
|
||||||
|
# you will probably also want, otherwise *everything* will be built from scratch
|
||||||
|
useSubstitutes = true;
|
||||||
|
listenHost = "0.0.0.0"; # Force IPv4
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.hydra-send-stats.enable = lib.mkForce false;
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ config.services.hydra.port ];
|
||||||
|
|
||||||
|
nix.settings.extra-allowed-uris = [
|
||||||
|
"git+ssh://git@bscpm04.bsc.es"
|
||||||
|
"git+ssh://git@gitlab-internal.bsc.es"
|
||||||
|
"https://github.com"
|
||||||
|
"git+ssh://github.com"
|
||||||
|
];
|
||||||
|
}
|
||||||
40
m/weasel/virtualization.nix
Normal file
40
m/weasel/virtualization.nix
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
# Enable common container config files in /etc/containers
|
||||||
|
virtualisation.containers.enable = true;
|
||||||
|
virtualisation = {
|
||||||
|
podman = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
# Required for containers under podman-compose to be able to talk to each other.
|
||||||
|
defaultNetwork.settings.dns_enabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# We cannot use /home since nfs does not support fileattrs needed by podman
|
||||||
|
systemd.tmpfiles.settings = {
|
||||||
|
"podman-users" = lib.mapAttrs' (
|
||||||
|
name: value:
|
||||||
|
lib.nameValuePair ("/var/lib/podman-users/" + name) {
|
||||||
|
d = {
|
||||||
|
group = value.group;
|
||||||
|
mode = value.homeMode;
|
||||||
|
user = name;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
) (lib.filterAttrs (_: x: x.isNormalUser) config.users.users);
|
||||||
|
};
|
||||||
|
|
||||||
|
# Useful other development tools
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
dive # look into docker image layers
|
||||||
|
podman-tui # status of containers in the terminal
|
||||||
|
podman-compose # start group of containers for dev
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -20,7 +20,6 @@
|
|||||||
#, python3Packages
|
#, python3Packages
|
||||||
, installShellFiles
|
, installShellFiles
|
||||||
, symlinkJoin
|
, symlinkJoin
|
||||||
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@@ -88,7 +87,7 @@ stdenv.mkDerivation rec {
|
|||||||
--enable-sampling
|
--enable-sampling
|
||||||
--with-unwind=${libunwind.dev}
|
--with-unwind=${libunwind.dev}
|
||||||
--with-xml-prefix=${libxml2.dev}
|
--with-xml-prefix=${libxml2.dev}
|
||||||
${lib.optionalString enablePapi "--with-papi=${papi}"}
|
--with-papi=${papi}
|
||||||
${if (mpi != null) then ''--with-mpi=${mpi}''
|
${if (mpi != null) then ''--with-mpi=${mpi}''
|
||||||
else ''--without-mpi''}
|
else ''--without-mpi''}
|
||||||
--without-dyninst)
|
--without-dyninst)
|
||||||
|
|||||||
@@ -35,8 +35,6 @@ stdenv.mkDerivation rec {
|
|||||||
CFLAGS=-Wno-implicit-int
|
CFLAGS=-Wno-implicit-int
|
||||||
CPPFLAGS=-I${libtirpc.dev}/include/tirpc
|
CPPFLAGS=-I${libtirpc.dev}/include/tirpc
|
||||||
LDFLAGS=-ltirpc
|
LDFLAGS=-ltirpc
|
||||||
CC=$CC
|
|
||||||
AR=$AR
|
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|||||||
@@ -6,12 +6,6 @@
|
|||||||
, pmix
|
, pmix
|
||||||
, gfortran
|
, gfortran
|
||||||
, symlinkJoin
|
, symlinkJoin
|
||||||
# Disabled when cross-compiling
|
|
||||||
# To fix cross compilation, we should fill the values in:
|
|
||||||
# https://github.com/pmodels/mpich/blob/main/maint/fcrosscompile/cross_values.txt.in
|
|
||||||
# For each arch
|
|
||||||
, enableFortran ? stdenv.hostPlatform == stdenv.buildPlatform
|
|
||||||
, perl
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@@ -21,13 +15,10 @@ let
|
|||||||
paths = [ pmix.dev pmix.out ];
|
paths = [ pmix.dev pmix.out ];
|
||||||
};
|
};
|
||||||
in mpich.overrideAttrs (old: {
|
in mpich.overrideAttrs (old: {
|
||||||
buildInputs = old.buildInputs ++ [
|
buildInput = old.buildInputs ++ [
|
||||||
libfabric
|
libfabric
|
||||||
pmixAll
|
pmixAll
|
||||||
];
|
];
|
||||||
nativeBuildInputs = old.nativeBuildInputs ++ [
|
|
||||||
perl
|
|
||||||
];
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--enable-shared"
|
"--enable-shared"
|
||||||
"--enable-sharedlib"
|
"--enable-sharedlib"
|
||||||
@@ -40,17 +31,6 @@ in mpich.overrideAttrs (old: {
|
|||||||
] ++ lib.optionals (lib.versionAtLeast gfortran.version "10") [
|
] ++ lib.optionals (lib.versionAtLeast gfortran.version "10") [
|
||||||
"FFLAGS=-fallow-argument-mismatch" # https://github.com/pmodels/mpich/issues/4300
|
"FFLAGS=-fallow-argument-mismatch" # https://github.com/pmodels/mpich/issues/4300
|
||||||
"FCFLAGS=-fallow-argument-mismatch"
|
"FCFLAGS=-fallow-argument-mismatch"
|
||||||
] ++ lib.optionals (!enableFortran) [
|
|
||||||
"--disable-fortran"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
preFixup = ''
|
|
||||||
# Ensure the default compilers are the ones mpich was built with
|
|
||||||
sed -i 's:CC="gcc":CC=${stdenv.cc}/bin/gcc:' $out/bin/mpicc
|
|
||||||
sed -i 's:CXX="g++":CXX=${stdenv.cc}/bin/g++:' $out/bin/mpicxx
|
|
||||||
'' + lib.optionalString enableFortran ''
|
|
||||||
sed -i 's:FC="gfortran":FC=${gfortran}/bin/gfortran:' $out/bin/mpifort
|
|
||||||
'';
|
|
||||||
|
|
||||||
hardeningDisable = [ "all" ];
|
hardeningDisable = [ "all" ];
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
, jemallocNanos6 ? null
|
, jemallocNanos6 ? null
|
||||||
, cachelineBytes ? 64
|
, cachelineBytes ? 64
|
||||||
, enableGlibcxxDebug ? false
|
, enableGlibcxxDebug ? false
|
||||||
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
|
|
||||||
, useGit ? false
|
, useGit ? false
|
||||||
, gitUrl ? "ssh://git@bscpm04.bsc.es/nanos6/nanos6"
|
, gitUrl ? "ssh://git@bscpm04.bsc.es/nanos6/nanos6"
|
||||||
, gitBranch ? "master"
|
, gitBranch ? "master"
|
||||||
@@ -48,8 +47,6 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
source = if (useGit) then git else release;
|
source = if (useGit) then git else release;
|
||||||
|
|
||||||
isCross = stdenv.hostPlatform != stdenv.buildPlatform;
|
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation (source // {
|
stdenv.mkDerivation (source // {
|
||||||
pname = "nanos6";
|
pname = "nanos6";
|
||||||
@@ -74,13 +71,9 @@ in
|
|||||||
"--disable-all-instrumentations"
|
"--disable-all-instrumentations"
|
||||||
"--enable-ovni-instrumentation"
|
"--enable-ovni-instrumentation"
|
||||||
"--with-ovni=${ovni}"
|
"--with-ovni=${ovni}"
|
||||||
"--with-boost=${boost.dev}"
|
|
||||||
] ++
|
] ++
|
||||||
(optional enableJemalloc "--with-jemalloc=${jemallocNanos6}") ++
|
(optional enableJemalloc "--with-jemalloc=${jemallocNanos6}") ++
|
||||||
(optional enableGlibcxxDebug "CXXFLAGS=-D_GLIBCXX_DEBUG") ++
|
(optional enableGlibcxxDebug "CXXFLAGS=-D_GLIBCXX_DEBUG");
|
||||||
# Most nanos6 api symbols are resolved at runtime, so prefer
|
|
||||||
# ifunc by default
|
|
||||||
(optional isCross "--with-symbol-resolution=ifunc");
|
|
||||||
|
|
||||||
postConfigure = lib.optionalString (!enableDebug) ''
|
postConfigure = lib.optionalString (!enableDebug) ''
|
||||||
# Disable debug
|
# Disable debug
|
||||||
@@ -104,14 +97,16 @@ in
|
|||||||
# TODO: papi_version is needed for configure:
|
# TODO: papi_version is needed for configure:
|
||||||
# ./configure: line 27378: papi_version: command not found
|
# ./configure: line 27378: papi_version: command not found
|
||||||
# This probably breaks cross-compilation
|
# This probably breaks cross-compilation
|
||||||
] ++ lib.optionals enablePapi [ papi ];
|
papi
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
boost
|
boost
|
||||||
numactl
|
numactl
|
||||||
hwloc
|
hwloc
|
||||||
|
papi
|
||||||
ovni
|
ovni
|
||||||
] ++ lib.optionals enablePapi [ papi ];
|
];
|
||||||
|
|
||||||
# Create a script that sets NANOS6_HOME
|
# Create a script that sets NANOS6_HOME
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
, numactl
|
, numactl
|
||||||
, hwloc
|
, hwloc
|
||||||
, papi
|
, papi
|
||||||
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
|
, enablePapi ? true
|
||||||
, cacheline ? 64 # bits
|
, cacheline ? 64 # bits
|
||||||
, ovni ? null
|
, ovni ? null
|
||||||
, useGit ? false
|
, useGit ? false
|
||||||
|
|||||||
Reference in New Issue
Block a user