mirror of
https://git.feal.no/felixalb/nixos-config.git
synced 2025-01-15 14:34:48 +01:00
Compare commits
1 Commits
1ade601ce9
...
af4c91cf2d
Author | SHA1 | Date | |
---|---|---|---|
af4c91cf2d |
24
flake.lock
generated
24
flake.lock
generated
@ -41,16 +41,16 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1716736833,
|
"lastModified": 1706981411,
|
||||||
"narHash": "sha256-rNObca6dm7Qs524O4st8VJH6pZ/Xe1gxl+Rx6mcWYo0=",
|
"narHash": "sha256-cLbLPTL1CDmETVh4p0nQtvoF+FSEjsnJTFpTxhXywhQ=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "a631666f5ec18271e86a5cde998cba68c33d9ac6",
|
"rev": "652fda4ca6dafeb090943422c34ae9145787af37",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"ref": "release-24.05",
|
"ref": "release-23.11",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@ -163,16 +163,16 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717144377,
|
"lastModified": 1710695816,
|
||||||
"narHash": "sha256-F/TKWETwB5RaR8owkPPi+SPJh83AQsm6KrQAlJ8v/uA=",
|
"narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "805a384895c696f802a9bf5bf4720f37385df547",
|
"rev": "614b4613980a522ba49f0d194531beddbb7220d3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-24.05",
|
"ref": "nixos-23.11",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@ -243,11 +243,11 @@
|
|||||||
},
|
},
|
||||||
"voyager-addons": {
|
"voyager-addons": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717176924,
|
"lastModified": 1707399193,
|
||||||
"narHash": "sha256-pYq/v0RNwHshSZf2OeH3P6Aa4/zHGDAJq7Z2Ah9i700=",
|
"narHash": "sha256-Q570CBu01ufGMitMQVAgsKoQ7zMEDwqDtqKJ1kyeUjQ=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "15f32cc6b828c56cb6a954de0096b81f291100d9",
|
"rev": "3d04b4ec9c40948693f4efe919413cce9265bae7",
|
||||||
"revCount": 8,
|
"revCount": 4,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "file:///home/felixalb/voyager-addons"
|
"url": "file:///home/felixalb/voyager-addons"
|
||||||
},
|
},
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
description = "Felixalb System flake";
|
description = "Felixalb System flake";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
|
||||||
unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
nix-darwin.url = "github:lnl7/nix-darwin/master";
|
nix-darwin.url = "github:lnl7/nix-darwin/master";
|
||||||
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
home-manager.url = "github:nix-community/home-manager/release-24.05";
|
home-manager.url = "github:nix-community/home-manager/release-23.11";
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
matrix-synapse-next.url = "github:dali99/nixos-matrix-modules";
|
matrix-synapse-next.url = "github:dali99/nixos-matrix-modules";
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
./services/postgres.nix
|
./services/postgres.nix
|
||||||
./services/snappymail.nix
|
./services/snappymail.nix
|
||||||
./services/timemachine.nix
|
./services/timemachine.nix
|
||||||
|
./services/transmission.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
|
@ -38,10 +38,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/tank/media/jellyfin/Music" = {
|
fileSystems."/tank/media/jellyfin/Music" = {
|
||||||
depends = [
|
|
||||||
"/tank/media/music"
|
|
||||||
"/tank/media/jellyfin"
|
|
||||||
];
|
|
||||||
options = [ "bind" ];
|
options = [ "bind" ];
|
||||||
device = "/tank/media/music";
|
device = "/tank/media/music";
|
||||||
};
|
};
|
||||||
|
@ -5,7 +5,7 @@ let
|
|||||||
in {
|
in {
|
||||||
services.nextcloud = {
|
services.nextcloud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.nextcloud29;
|
package = pkgs.nextcloud28;
|
||||||
inherit hostName;
|
inherit hostName;
|
||||||
home = "/var/lib/nextcloud";
|
home = "/var/lib/nextcloud";
|
||||||
https = true;
|
https = true;
|
||||||
@ -18,11 +18,8 @@ in {
|
|||||||
dbname = "nextcloud";
|
dbname = "nextcloud";
|
||||||
adminuser = "ncadmin";
|
adminuser = "ncadmin";
|
||||||
adminpassFile = config.sops.secrets."nextcloud/adminpass".path;
|
adminpassFile = config.sops.secrets."nextcloud/adminpass".path;
|
||||||
};
|
trustedProxies = [ "192.168.10.175" ]; # defiant
|
||||||
|
defaultPhoneRegion = "NO";
|
||||||
settings = {
|
|
||||||
trusted_proxies = [ "192.168.10.175" ]; # defiant
|
|
||||||
default_phone_region = "NO";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
phpOptions = {
|
phpOptions = {
|
||||||
|
76
hosts/voyager/services/transmission.nix
Normal file
76
hosts/voyager/services/transmission.nix
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
host = "127.0.1.2";
|
||||||
|
port = "5003";
|
||||||
|
uid = config.ids.uids.transmission;
|
||||||
|
gid = config.ids.gids.transmission;
|
||||||
|
in {
|
||||||
|
sops.secrets."transmission/vpncreds" = {
|
||||||
|
owner = "transmission";
|
||||||
|
group = "transmission";
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users.transmission = {
|
||||||
|
inherit uid;
|
||||||
|
group = "transmission";
|
||||||
|
isSystemUser = true;
|
||||||
|
useDefaultShell = true;
|
||||||
|
description = "Transmission torrent service";
|
||||||
|
};
|
||||||
|
|
||||||
|
users.groups.transmission = {
|
||||||
|
inherit gid;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Transmission+PIA: Torrent client, Integrated VPN, Web interface
|
||||||
|
virtualisation.oci-containers.containers.transmission = {
|
||||||
|
image = "haugene/transmission-openvpn";
|
||||||
|
ports = [ "${host}:${port}:9091" ];
|
||||||
|
volumes = [
|
||||||
|
"/var/lib/transmission/config:/config"
|
||||||
|
"/tank/media/transmission:/data"
|
||||||
|
];
|
||||||
|
environment = {
|
||||||
|
OPENVPN_PROVIDER = "PIA";
|
||||||
|
OPENVPN_CONFIG = "sweden,norway,de_frankfurt";
|
||||||
|
LOCAL_NETWORK = "192.168.10.0/24";
|
||||||
|
TRANSMISSION_WEB_UI = "flood-for-transmission";
|
||||||
|
PUID = toString uid;
|
||||||
|
PGID = toString gid;
|
||||||
|
};
|
||||||
|
environmentFiles = [
|
||||||
|
# OPENVPN_USERNAME and password is set here
|
||||||
|
# and optionally TRANSMISSION_RPC_USERNAME and password
|
||||||
|
config.sops.secrets."transmission/vpncreds".path
|
||||||
|
];
|
||||||
|
extraOptions = [
|
||||||
|
/* "--cap-add=net_admin,net_raw,mknod" */
|
||||||
|
"--cap-add=NET_ADMIN"
|
||||||
|
"--device=/dev/net/tun"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
services.nginx.virtualHosts."transmission.home.feal.no" = {
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://${host}:${port}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems = {
|
||||||
|
"/tank/media/transmission/jellyfin" = {
|
||||||
|
device = "/tank/media/jellyfin";
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
|
"/tank/media/transmission/music" = {
|
||||||
|
device = "/tank/media/music";
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
|
"/tank/media/transmission/inbox" = {
|
||||||
|
device = "/tank/inbox";
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
|
"/tank/media/transmission/other" = {
|
||||||
|
device = "/tank/media/other";
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user