Formatting

This commit is contained in:
Giulio De Pasquale 2023-02-11 03:29:48 +01:00
parent a015dc2a89
commit 608fd46eb4
34 changed files with 227 additions and 201 deletions

View File

@ -6,8 +6,10 @@ let
];
hostname = "architect";
network = import ./network.nix;
in {
imports = [ # Include the results of the hardware scan.
in
{
imports = [
# Include the results of the hardware scan.
./backup.nix
./hardware.nix
./firewall.nix
@ -29,7 +31,7 @@ in {
./invidious.nix
./nitter.nix
./lidarr.nix
# ./navidrome.nix
# ./navidrome.nix
./jellyfin.nix
./prosody.nix
./deluge.nix
@ -43,7 +45,7 @@ in {
];
time.timeZone = "Europe/Rome";
# system.stateVersion = "21.11";
# system.stateVersion = "21.11";
users.users.giulio.openssh.authorizedKeys.keys = pubkeys;
boot = {
initrd = {

View File

@ -4,7 +4,8 @@ let
domain = "htdel.giugl.io";
network = import ./network.nix;
auth_block = (import ./openid.nix { inherit lib; }).openresty_oidc_block;
in {
in
{
services = {
deluge = {
enable = true;

View File

@ -49,7 +49,8 @@ let
wireguard_udp
];
in {
in
{
networking = {
# needed to use nftables
firewall.enable = false;

View File

@ -5,7 +5,8 @@ let
network = import ./network.nix;
host = "127.0.0.1";
port = 8123;
in {
in
{
services = {
mosquitto = {
enable = true;

View File

@ -3,7 +3,8 @@
let
network = import ./network.nix;
domain = "auth.giugl.io";
in {
in
{
services = {
keycloak = {
enable = true;

View File

@ -4,7 +4,8 @@ let
domain = "htlid.giugl.io";
network = import ./network.nix;
auth_block = (import ./openid.nix { inherit lib; }).openresty_oidc_block;
in {
in
{
services = {
lidarr = {
enable = true;

View File

@ -97,9 +97,9 @@ in
return 200 '${builtins.toJSON client}';
'';
# locations."/".extraConfig = ''
# return 404;
# '';
# locations."/".extraConfig = ''
# return 404;
# '';
# forward all Matrix API calls to the synapse Matrix homeserver
locations."/_matrix" = {

View File

@ -3,7 +3,8 @@
let
domain = "s3.giugl.io";
network = import ./network.nix;
in {
in
{
services = {
minio.enable = true;

View File

@ -77,7 +77,7 @@ in {
PrivateTmp = true;
PrivateUsers = true;
# ProtectClock = true;
# ProtectClock = true;
ProtectControlGroups = true;
ProtectHostname = true;
ProtectKernelLogs = true;

View File

@ -6,7 +6,8 @@ let
library_path = "/media/Music";
beets_config = "/media/beets.conf";
auth_block = (import ./openid.nix { inherit lib; }).openresty_oidc_block;
in {
in
{
services = {
navidrome = {
enable = true;

View File

@ -4,7 +4,8 @@ let
domain = "cloud.giugl.io";
network = import ./network.nix;
redis_port = 6379;
in {
in
{
services = {
mysql = {
enable = true;

View File

@ -3,7 +3,8 @@
let
domain = "tweet.giugl.io";
network = import ./network.nix;
in {
in
{
services = {
nitter = {
enable = true;

View File

@ -4,7 +4,8 @@ let
domain = "htnzb.giugl.io";
network = import ./network.nix;
auth_block = (import ./openid.nix { inherit lib; }).openresty_oidc_block;
in {
in
{
services = {
nzbget = {
enable = true;

View File

@ -2,7 +2,7 @@
{
openresty_oidc_block =
{ access_role ? "", whitelisted_ips ? [] }: ''
{ access_role ? "", whitelisted_ips ? [ ] }: ''
access_by_lua_block {
local opts = {
discovery = "https://auth.giugl.io/realms/master/.well-known/openid-configuration",

View File

@ -3,7 +3,8 @@
let
domain = "media.giugl.io";
network = import ./network.nix;
in {
in
{
services.plex = {
enable = true;
package = pkgs.unstable.plex;

View File

@ -5,7 +5,8 @@ let
conference_domain = "conference.${domain}";
upload_domain = "uploads.${domain}";
network = import ./network.nix;
in {
in
{
services = {
prosody = {
enable = true;

View File

@ -3,7 +3,8 @@
let
domain = "htpro.giugl.io";
network = import ./network.nix;
in {
in
{
services = {
prowlarr.enable = true;

View File

@ -4,7 +4,8 @@ let
domain = "htrad.giugl.io";
network = import ./network.nix;
auth_block = (import ./openid.nix { inherit lib; }).openresty_oidc_block;
in {
in
{
services = {
radarr = {
enable = true;

View File

@ -10,7 +10,7 @@ in
searx = {
enable = true;
package = pkgs.searxng;
# package = mach-nix.buildPythonPackage "https://github.com/searxng/searxng/commit/2cf1425e8bc5d3143b6e001e82a034a794e8a206https://github.com/searxng/searxng/commit/2cf1425e8bc5d3143b6e001e82a034a794e8a206";
# package = mach-nix.buildPythonPackage "https://github.com/searxng/searxng/commit/2cf1425e8bc5d3143b6e001e82a034a794e8a206https://github.com/searxng/searxng/commit/2cf1425e8bc5d3143b6e001e82a034a794e8a206";
environmentFile = /secrets/searx/env;
settings = {

View File

@ -4,7 +4,8 @@ let
domain = "htson.giugl.io";
network = import ./network.nix;
auth_block = (import ./openid.nix { inherit lib; }).openresty_oidc_block;
in {
in
{
services = {
sonarr = {
enable = true;

View File

@ -4,7 +4,8 @@ let
network = import ./network.nix;
ifname = "ts0";
in {
in
{
services = {
tailscale = {
enable = true;

View File

@ -3,7 +3,8 @@
let
domain = "httra.giugl.io";
network = import ./network.nix;
in {
in
{
services = {
transmission = {
enable = true;

View File

@ -9,7 +9,8 @@ let
export __VK_LAYER_NV_optimus=NVIDIA_only
exec -a "$0" "$@"
'';
in {
in
{
imports = [ ./hardware.nix ./wireguard.nix ./sound.nix ];
boot = {
@ -70,5 +71,5 @@ in {
programs.steam.enable = true;
environment.systemPackages = with pkgs; [ efibootmgr nvidia-offload ];
# system.stateVersion = "21.05"; # Did you read the comment?
# system.stateVersion = "21.05"; # Did you read the comment?
}

View File

@ -5,14 +5,17 @@
let
mkRole = role: import (../roles + "/${role}.nix");
users_mod = (map (u:
users_mod = (map
(u:
user.mkUser {
name = u.user;
roles = u.roles;
}) users);
})
users);
roles_mod = (map (r: mkRole r) roles);
add_imports = imports;
in nixpkgs.lib.nixosSystem {
in
nixpkgs.lib.nixosSystem {
inherit system;
modules = [

View File

@ -5,7 +5,8 @@
let
mkRole = role: import (../roles/home + "/${role}.nix");
roles_mod = (map (r: mkRole r) roles);
in {
in
{
users.groups.plugdev = { };
fileSystems."/home/${name}/Downloads" = {
@ -27,7 +28,8 @@
let
mkRole = role: import (../roles/home + "/${role}.nix");
roles_mod = (map (r: mkRole r) roles);
in home-manager.lib.homeManagerConfiguration {
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
{

View File

@ -9,7 +9,8 @@ let
name = "guake";
package = pkgs.guake;
});
in {
in
{
imports = [ ./gnome.nix ];
nixpkgs.config.allowUnfree = true;