mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-10 04:49:19 -08:00
services specialArg stage 1
This commit is contained in:
parent
aef9c37ee6
commit
3c9475cdcf
30 changed files with 14 additions and 103 deletions
|
|
@ -1 +0,0 @@
|
|||
{ ... }: { }
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
{ lib, config, ... }: with lib; {
|
||||
config = {
|
||||
deploy.targets.ostara = {
|
||||
nodeNames = singleton "ostara";
|
||||
tf = {
|
||||
resources.ostara = {
|
||||
provider = "null";
|
||||
type = "resource";
|
||||
connection = {
|
||||
port = 62954;
|
||||
host = "192.168.1.245";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
network.nodes.ostara = {
|
||||
imports = lib.hostImport "ostara";
|
||||
networking = {
|
||||
hostName = "ostara";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
{ lib, config, users, pkgs, profiles, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
imports = [ ./hw.nix profiles.laptop ];
|
||||
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.version = 2;
|
||||
boot.loader.grub.device = "/dev/sda";
|
||||
|
||||
networking.hostId = "9f89b327";
|
||||
networking.hostName = "ostara";
|
||||
|
||||
networking.useDHCP = false;
|
||||
networking.interfaces.enp1s0.useDHCP = true;
|
||||
networking.interfaces.wlp2s0.useDHCP = true;
|
||||
|
||||
kw.fw.public.interfaces = singleton "wlp2s0";
|
||||
|
||||
kw.fw.public.tcp.ports = [ 9981 9982 ];
|
||||
|
||||
hardware.firmware = [ pkgs.libreelec-dvb-firmware ];
|
||||
|
||||
services.tvheadend.enable = true;
|
||||
|
||||
systemd.services.tvheadend.enable = lib.mkForce false;
|
||||
|
||||
systemd.services.tvheadend-kat = {
|
||||
description = "Tvheadend TV streaming server";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
script = ''
|
||||
${pkgs.tvheadend}/bin/tvheadend \
|
||||
--http_root /tvheadend \
|
||||
--http_port 9981 \
|
||||
--htsp_port 9982 \
|
||||
-f \
|
||||
-C \
|
||||
-p ${config.users.users.tvheadend.home}/tvheadend.pid \
|
||||
-u tvheadend \
|
||||
-g video
|
||||
'';
|
||||
serviceConfig = {
|
||||
Type = "forking";
|
||||
PIDFile = "${config.users.users.tvheadend.home}/tvheadend.pid";
|
||||
Restart = "always";
|
||||
RestartSec = 5;
|
||||
User = "tvheadend";
|
||||
Group = "video";
|
||||
|
||||
ExecStop = "${pkgs.coreutils}/bin/rm ${config.users.users.tvheadend.home}/tvheadend.pid";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
system.stateVersion = "20.09";
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "uhci_hcd" "ehci_pci" "ahci" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/469a684b-eb8f-48a8-8f98-be58528312c4";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[{ device = "/dev/disk/by-uuid/2223e305-79c9-45b3-90d7-560dcc45775a"; }];
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue