Compare commits
10 Commits
6b7a2ee80e
...
0f7bb03390
Author | SHA1 | Date |
---|---|---|
David Crompton | 0f7bb03390 | |
David Crompton | ab368ed303 | |
David Crompton | e9902fcb5f | |
David Crompton | 47fc65db82 | |
David Crompton | 4680de1f03 | |
David Crompton | aea175d01a | |
David Crompton | 90ab2fd716 | |
David Crompton | 9dd2a2f26e | |
David Crompton | f708baaf85 | |
David Crompton | f5169b2fa2 |
|
@ -16,8 +16,13 @@
|
|||
./packages.nix
|
||||
# Set of Users on This System
|
||||
./users.nix
|
||||
# Disable sleep (so SSH remains accessible)
|
||||
./nosleep.nix
|
||||
];
|
||||
|
||||
# Support NTFS(3g)
|
||||
boot.supportedFilesystems = ["ntfs"];
|
||||
|
||||
networking.firewall.enable = true;
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
{ ... }: {
|
||||
systemd.targets.sleep.enable = false;
|
||||
systemd.targets.suspend.enable = false;
|
||||
systemd.targets.hibernate.enable = false;
|
||||
systemd.targets.hybrid-sleep.enable = false;
|
||||
}
|
|
@ -13,7 +13,8 @@ index c62087c..30b5e51
|
|||
@@ -144,8 +144,10 @@ gui() {
|
||||
update gui || exit 1
|
||||
build gui || exit 1
|
||||
args="$(get_x11_args) $(get_mount_args) ${extra_args}"
|
||||
- args="$(get_x11_args) $(get_mount_args) ${extra_args}"
|
||||
+ args="$(get_x11_args) $(get_mount_args) ${extra_args} --userns keep-id"
|
||||
+ xhost +local:dlc
|
||||
$DOCKER run -it --rm ${args} $(get_local_container_name gui) \
|
||||
|| err "Failed to launch the DLC GUI. Used args: \"${args}\""
|
||||
|
|
|
@ -1,8 +1,57 @@
|
|||
{ config, lib, pkgs, nix-matlab, ... }: {
|
||||
environment.systemPackages = with nix-matlab.packages.x86_64-linux; [
|
||||
{ config, lib, pkgs, nix-matlab, ... }: let
|
||||
license-manager = pkgs.stdenv.mkDerivation rec {
|
||||
pname = "matlab-license-server";
|
||||
version = "R2023b";
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://ssd.mathworks.com/supportfiles/downloads/${version}/license_manager/${version}/daemons/glnxa64/mathworks_network_license_manager_glnxa64.zip";
|
||||
hash = "sha256-Btl3ETzTtAV+cjqwXf4AE4QJCtssN1s6dmmcpR1EQxY=";
|
||||
};
|
||||
nativeBuildInputs = [
|
||||
pkgs.autoPatchelfHook
|
||||
];
|
||||
unpackPhase = ''
|
||||
${pkgs.unzip}/bin/unzip $src
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
cp -r * $out/
|
||||
addAutoPatchelfSearchPath $out/*
|
||||
'';
|
||||
};
|
||||
matlab-server = pkgs.buildFHSUserEnv {
|
||||
name = "matlab-server";
|
||||
|
||||
targetPkgs = (ps: nix-matlab.targetPkgs ps ++ [
|
||||
license-manager
|
||||
]);
|
||||
|
||||
runScript = pkgs.writeScript "matlab-server" (nix-matlab.shellHooksCommon + ''
|
||||
exec $MATLAB_INSTALL_DIR/bin/matlab "$@"
|
||||
'');
|
||||
};
|
||||
matlab-server-shell = pkgs.buildFHSUserEnv {
|
||||
name = "matlab-server-shell";
|
||||
|
||||
targetPkgs = (ps: nix-matlab.targetPkgs ps ++ [
|
||||
license-manager
|
||||
]);
|
||||
|
||||
runScript = pkgs.writeScript "matlab-server-shell" (nix-matlab.shellHooksCommon + ''
|
||||
echo license-server is in:
|
||||
echo ${license-manager}
|
||||
echo Make sure it is installed (matlab-server user)
|
||||
exec bash
|
||||
'');
|
||||
};
|
||||
in {
|
||||
environment.systemPackages = (with nix-matlab.packages.x86_64-linux; [
|
||||
matlab
|
||||
matlab-shell
|
||||
matlab-server
|
||||
matlab-server-shell
|
||||
matlab-mlint
|
||||
matlab-mex
|
||||
];
|
||||
]) ++ (with pkgs; [
|
||||
octaveFull
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -8,5 +8,6 @@
|
|||
btop
|
||||
htop
|
||||
tree
|
||||
vim
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
{ ... }: {
|
||||
imports = [
|
||||
./servers/caddy.nix
|
||||
./servers/xpra.nix
|
||||
./servers/gitea.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
};
|
||||
# Need 80 & 443 Enabled so Caddy is externally accessible
|
||||
networking.firewall = let
|
||||
ports = [ 80 443 ];
|
||||
in {
|
||||
allowedTCPPorts = ports;
|
||||
allowedUDPPorts = ports;
|
||||
};
|
||||
services.caddy.virtualHosts = lib.mkAfter {
|
||||
"*.ws.kcnhub.com" = {
|
||||
extraConfig = ''
|
||||
error 404
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, config, ...}: let
|
||||
# Domain TBD
|
||||
domain = "git.kcnhub.syzygial.cc";
|
||||
domain = "git.ws.kcnhub.com";
|
||||
in {
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
|
@ -11,7 +11,7 @@ in {
|
|||
settings = {
|
||||
server = {
|
||||
HTTP_PORT = 5000;
|
||||
ROOT_URL = "https://git.${davesDomain}";
|
||||
ROOT_URL = "https://${domain}";
|
||||
};
|
||||
actions = {
|
||||
ENABLED = true;
|
||||
|
|
|
@ -6,5 +6,11 @@
|
|||
./users/alan.nix
|
||||
./users/spandan.nix
|
||||
./users/matlab-server.nix
|
||||
./users/frances.nix
|
||||
./users/srikar.nix
|
||||
|
||||
# Groups
|
||||
./users/groups/admin.nix
|
||||
./users/groups/nfrf.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{ pkgs, ... }: {
|
||||
users.users.alan = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
homeSize = "50g";
|
||||
homeProjectId = 103;
|
||||
packages = with pkgs; [
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{ pkgs, ... }: {
|
||||
users.users.carol = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
homeSize = "50g";
|
||||
homeProjectId = 102;
|
||||
packages = with pkgs; [
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{ pkgs, ... }: {
|
||||
users.users.darian = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
homeSize = "50g";
|
||||
homeProjectId = 101;
|
||||
packages = with pkgs; [
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{ pkgs, ... }: {
|
||||
users.users.david = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
homeSize = "50g";
|
||||
homeProjectId = 100;
|
||||
packages = with pkgs; [
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
{ pkgs, ... }: {
|
||||
users.users.frances = {
|
||||
isNormalUser = true;
|
||||
homeSize = "50g";
|
||||
homeProjectId = 106;
|
||||
packages = with pkgs; [
|
||||
|
||||
];
|
||||
initialHashedPassword = "$y$j9T$I9LtX8Vx/2RKuUT1HjPKN/$TmoQPB/J7y3owZf80oWZjLPv//CVeUd8gVttcFeINQA";
|
||||
};
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{ ... }: {
|
||||
users.groups."wheel" = {
|
||||
members = [
|
||||
"root"
|
||||
"david"
|
||||
];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{ ... }: {
|
||||
users.groups."nfrf" = {
|
||||
members = [
|
||||
"spandan"
|
||||
"frances"
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
{ pkgs, ... }: {
|
||||
users.users.matlab-server = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
homeSize = "15g";
|
||||
homeProjectId = 105;
|
||||
packages = with pkgs; [
|
||||
|
|
|
@ -1,15 +1,10 @@
|
|||
{ pkgs, ... }: {
|
||||
users.users.spandan = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"mousetbi"
|
||||
];
|
||||
homeSize = "50g";
|
||||
homeProjectId = 104;
|
||||
packages = with pkgs; [
|
||||
|
||||
];
|
||||
};
|
||||
users.groups."mousetbi" = { };
|
||||
}
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
{ pkgs, ... }: {
|
||||
users.users.srikar = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
homeSize = "50g";
|
||||
homeProjectId = 107;
|
||||
packages = with pkgs; [
|
||||
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue