mirror of
https://github.com/harryssecret/homelab-nix.git
synced 2025-08-09 07:00:21 +02:00
(refactor): preparing new hosts
This commit is contained in:
parent
35684609f3
commit
f20bcf41e9
15 changed files with 177 additions and 398 deletions
70
hosts/sisyphe/server-configuration.nix
Normal file
70
hosts/sisyphe/server-configuration.nix
Normal file
|
@ -0,0 +1,70 @@
|
|||
# TODO: move file to configuration.nix
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
ip = "192.168.1.177";
|
||||
gateway = "192.168.1.1";
|
||||
username = "homelab";
|
||||
in
|
||||
{
|
||||
# setting up networking!!
|
||||
networking = {
|
||||
interfaces = {
|
||||
ens18.ipv4.addresses = [
|
||||
{
|
||||
address = ip;
|
||||
prefixLength = 24;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
defaultGateway = gateway;
|
||||
nameservers = [
|
||||
"1.1.1.1"
|
||||
"1.0.0.1"
|
||||
"2606:4700:4700::1111"
|
||||
"2606:4700:4700::1001"
|
||||
];
|
||||
|
||||
nftables.enable = true;
|
||||
# firewall rules
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [
|
||||
22 # ssh
|
||||
8008 # matrix-synapse
|
||||
8448 # matrix-synapse
|
||||
3030
|
||||
3333
|
||||
2344
|
||||
4000
|
||||
5050 # calibre-web
|
||||
9091 # transmission
|
||||
];
|
||||
allowedUDPPorts = [ ];
|
||||
};
|
||||
};
|
||||
|
||||
users.groups.multimedia = {
|
||||
members = [
|
||||
"slskd"
|
||||
"radarr"
|
||||
"readarr"
|
||||
"sonarr"
|
||||
"transmission"
|
||||
"jellyfin"
|
||||
"bazarr"
|
||||
"calibre-web"
|
||||
username
|
||||
];
|
||||
};
|
||||
|
||||
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||
sops.age.keyFile = "/var/lib/sops-nix/key.txt";
|
||||
sops.age.generateKey = true;
|
||||
sops.defaultSopsFile = ../../secrets/secrets.yaml;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue