mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
Add zipline
This commit is contained in:
parent
db188aebd7
commit
e48d51cbc0
7 changed files with 86 additions and 54 deletions
|
|
@ -14,5 +14,6 @@
|
|||
./nginx.nix
|
||||
./frontends.nix
|
||||
./homebox.nix
|
||||
./share.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
30
modules/nixos/server/share.nix
Normal file
30
modules/nixos/server/share.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
cfg = config.mods.server.share;
|
||||
port = config.mods.server.nginx.ports.share;
|
||||
in with lib; {
|
||||
options.mods.server = {
|
||||
share = {
|
||||
enable = mkEnableOption {
|
||||
default = false;
|
||||
description = "enables zipline server";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
users.groups.zipline = { };
|
||||
users.users.zipline = {
|
||||
isSystemUser = true;
|
||||
group = "zipline";
|
||||
};
|
||||
services.zipline = {
|
||||
enable = true;
|
||||
settings = {
|
||||
CORE_HOST = "0.0.0.0";
|
||||
CORE_PORT = port;
|
||||
};
|
||||
environmentFiles = [ "/run/secrets/zipline-secret" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,11 +1,14 @@
|
|||
{ pkgs, lib, config, inputs, system, ... }:
|
||||
let cfg = config.mods;
|
||||
|
||||
in {
|
||||
in with lib; {
|
||||
imports = [ inputs.sops-nix.nixosModules.sops ];
|
||||
sops = {
|
||||
age.keyFile = "/home/muon/.config/sops/age/keys.txt";
|
||||
defaultSopsFile = ./secrets.yaml;
|
||||
secrets.muon-password = { };
|
||||
secrets.zipline-secret = mkIf cfg.server.share.enable {
|
||||
owner = "zipline";
|
||||
group = "zipline";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
muon-password: ENC[AES256_GCM,data:K2ifHvs8hQXK4//FXf3vfDliiklx0dTn8gpirTBT07Q1XIMJR1Vgn/f1uo62bu4a/bknAR5gEBfd/cSRUTdBBxd7Lec2k3fxQg==,iv:j1JTzyfjcKEqh+PK5tyCWBMV7MpwvIG9MJ9eiajksxM=,tag:ZcSEVBW1UOCvE40yIsaBFQ==,type:str]
|
||||
zipline-secret: ENC[AES256_GCM,data:cdqPWBUg6FZkBrUYNkm7imntc2hXUAxDjd1Ymr3j9y763cbXDYEu44wJF0W1Ng==,iv:sdjV4SkRCTO04AvXqtoPOPyASlitrS4nS+M0Z2lZURA=,tag:gNcOdJvg9PtrRlm84CdbsQ==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
|
|
@ -23,8 +24,8 @@ sops:
|
|||
NVBwYnhKTU5NbTAxenJocEF3MnF6VncKVBhPp/nWmdISiozrLM/x4aPv9b+PlqpC
|
||||
XedZ6QF4crOaY+IuURGkw1AnHddpysyC+TBmBWF3oAwE9l9MzExNDg==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-01-17T20:33:28Z"
|
||||
mac: ENC[AES256_GCM,data:f0BoA4bG64g1WPcLl9Qd2G3VbA5L5+VTK2/+nxcklQZrDzsr2gOQXK8WpiccuZ0CyU1UaLhSTAEfMb9N2sA3MISGikPyWYFQVA/TM+wfaDCnrnEgbuvtBuEMpNp54bwgF4ME2h9k3e3HcJlNze65z52je3tBCxe6siYEKVgB3yg=,iv:VC8BaJLS46yXCZL1gmSrElmqLM/L+sCqTuUkhhvYUBc=,tag:aK164Iq91mUOx8yVyUZN2Q==,type:str]
|
||||
lastmodified: "2025-01-17T21:33:05Z"
|
||||
mac: ENC[AES256_GCM,data:1rWVznPbKkLUES4PlHPsfrjGr6/q/RFm3+GUnn2hyixsfYRdTStoRjPglop/ma+6h9Yzwb0kkVYOFQDrGXmPFqtjbTjATqzRMo75bGNy+Ncs6f6zyEcZAnVk/MnPc7U0+PFRwkX6F4VnGQucZBDtE5/wpUYlhl2QB8x1Q3taCBk=,iv:2pRm+LGw+i5PR2I5xBqcmRctZUprWFCRZryuIyIH5rc=,tag:e9lnLyzp4wDHlbMsRNOAmw==,type:str]
|
||||
pgp: []
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.9.2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue