Drop storage-ng
This commit is contained in:
parent
e25168ef8a
commit
f502c38020
|
@ -610,14 +610,6 @@
|
|||
];
|
||||
};
|
||||
|
||||
storage-ng = nixosSystem' {
|
||||
modules = [
|
||||
./hosts/storage-ng
|
||||
secrets.nixosModules.admins
|
||||
{ sops.defaultSopsFile = "${secrets}/hosts/storage-ng/secrets.yaml"; }
|
||||
];
|
||||
};
|
||||
|
||||
blogs = nixosSystem' {
|
||||
modules = [
|
||||
self.nixosModules.plume
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
scp result/tarball/nixos-system-x86_64-linux.tar.xz root@storage-ng.hq.c3d2.de:/mnt/cephfs/template/cache/
|
|
@ -1,121 +0,0 @@
|
|||
{ hostRegistry, config, pkgs, lib, strings, ... }:
|
||||
|
||||
let
|
||||
eth0 = "ens18";
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./streamdump.nix
|
||||
];
|
||||
|
||||
c3d2 = {
|
||||
k-ot.enable = true;
|
||||
isInHq = true;
|
||||
mergeHostsFile = true;
|
||||
hq.interface = eth0;
|
||||
};
|
||||
|
||||
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
grub = {
|
||||
enable = true;
|
||||
version = 2;
|
||||
efiSupport = true;
|
||||
devices = [ "nodev" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.enableEmergencyMode = false;
|
||||
|
||||
networking = {
|
||||
hostName = "storage-ng";
|
||||
# usePredictableInterfacenames = false;
|
||||
interfaces."${eth0}" = {
|
||||
ipv4.addresses = [{
|
||||
address = config.c3d2.hosts.${config.networking.hostName}.ip4;
|
||||
prefixLength = 24;
|
||||
}];
|
||||
ipv6.addresses = [{
|
||||
address = config.c3d2.hosts.${config.networking.hostName}.ip6;
|
||||
prefixLength = 64;
|
||||
}];
|
||||
};
|
||||
defaultGateway = {
|
||||
address = "172.22.99.4";
|
||||
interface = eth0;
|
||||
};
|
||||
nameservers = [
|
||||
hostRegistry.hosts.dnscache.ip4
|
||||
hostRegistry.hosts.dnscache.ip6
|
||||
"9.9.9.9"
|
||||
];
|
||||
firewall.enable = false;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
screen
|
||||
zsh
|
||||
lftp
|
||||
lsof
|
||||
psmisc
|
||||
git-annex
|
||||
|
||||
mpv
|
||||
iotop
|
||||
];
|
||||
|
||||
programs = {
|
||||
bash.enableCompletion = true;
|
||||
mtr.enable = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
atftpd = {
|
||||
enable = true;
|
||||
root = "/mnt/cephfs/c3d2/tftp";
|
||||
};
|
||||
|
||||
openssh = {
|
||||
enable = true;
|
||||
allowSFTP = true;
|
||||
};
|
||||
|
||||
samba = {
|
||||
enable = true;
|
||||
enableNmbd = true;
|
||||
extraConfig = ''
|
||||
workgroup = HQ
|
||||
server string = storage
|
||||
netbios name = storage
|
||||
hosts allow = 172.20.0.0/14 127.0.0.0/8 ::1/128 fe80::/64 fd23:42:c3d2:500::/56 2a00:8180:2c00:200::/56
|
||||
hosts deny = 0.0.0.0/0
|
||||
security = user
|
||||
guest account = nobody
|
||||
map to guest = bad user
|
||||
smb encrypt = required
|
||||
ntlm auth = yes
|
||||
passdb backend = smbpasswd
|
||||
server smb encrypt = desired
|
||||
'';
|
||||
shares = {
|
||||
c3d2 = {
|
||||
path = "/mnt/cephfs/c3d2";
|
||||
browseable = "yes";
|
||||
writable = "yes";
|
||||
"valid users" = "k-ot";
|
||||
"guest ok" = "no";
|
||||
"create mode" = "0666";
|
||||
"directory mode" = "0777";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "19.03"; # Did you read the comment?
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
"${modulesPath}/installer/scan/not-detected.nix"
|
||||
"${modulesPath}/profiles/qemu-guest.nix"
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/vda1";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/vda3";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [{ device = "/dev/vda2"; }];
|
||||
|
||||
nix.maxJobs = lib.mkDefault 4;
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
let
|
||||
streams = {
|
||||
coloradio = "http://streaming.fueralle.org/coloradio_160.mp3";
|
||||
};
|
||||
in {
|
||||
systemd.services = builtins.foldl' (result: stream:
|
||||
let
|
||||
url = streams.${stream};
|
||||
in result // {
|
||||
"streamdump-${stream}" = {
|
||||
description = "Stream archive for ${stream}";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = with pkgs; [
|
||||
wget
|
||||
mp3splt
|
||||
];
|
||||
script = ''
|
||||
DIR=mnt/cephfs/c3d2/Radio/${stream}/$(date +%F)
|
||||
mkdir -p $DIR
|
||||
cd $DIR
|
||||
|
||||
NAME=${stream}-$(date +%T)
|
||||
set +e
|
||||
wget --quiet -O $NAME.mp3 "${url}"
|
||||
set -e
|
||||
mp3splt -s -p th=-44,min=2 -o "@f-@N" $NAME.mp3
|
||||
rm $NAME.mp3
|
||||
'';
|
||||
serviceConfig = {
|
||||
User = "k-ot";
|
||||
Group = config.users.users.k-ot.group;
|
||||
Restart = "always";
|
||||
RestartSec = "5sec";
|
||||
};
|
||||
};
|
||||
}
|
||||
) {} (builtins.attrNames streams);
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
<html>
|
||||
<head><title>storage.hq.c3d2.de</title></head>
|
||||
<body>
|
||||
<h1>storage-ng</h1>
|
||||
services available:
|
||||
<ul>
|
||||
<li><a href="/c3d2">c3d2 files http</a></li>
|
||||
<li>SAMBA/Windows Access: storage-ng.hq.c3d2.de</li>
|
||||
<li>tftp</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue