elephant immich

Changed files
+105 -36
home
hosts
elephant
owl
+47 -11
flake.lock
···
},
"gomod2nix": {
"inputs": {
-
"nixpkgs": "nixpkgs_4",
"utils": "utils_3"
},
"locked": {
···
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
···
]
},
"locked": {
-
"lastModified": 1717244110,
-
"narHash": "sha256-UWzZcIdJAkrtSbXYKA67KD+NR9NNs3k2BgqltEQq59c=",
-
"owner": "RyanGibb",
"repo": "home-manager",
-
"rev": "77d4ab660ff242bc7f0b187a5023bc7e13183b85",
"type": "github"
},
"original": {
-
"owner": "RyanGibb",
-
"ref": "fork-24.05",
"repo": "home-manager",
"type": "github"
}
···
"nix-rpi5": {
"inputs": {
"flake-compat": "flake-compat_5",
-
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1704485878,
···
},
"nixpkgs_4": {
"locked": {
"lastModified": 1658285632,
"narHash": "sha256-zRS5S/hoeDGUbO+L95wXG9vJNwsSYcl93XiD0HQBXLk=",
"owner": "NixOS",
···
"type": "github"
}
},
-
"nixpkgs_5": {
"locked": {
"lastModified": 1704322682,
"narHash": "sha256-0FK10TWEYkEP5sloguzmDfM+hXIyPzlmZCFx/5c+ilQ=",
···
"type": "github"
}
},
-
"nixpkgs_6": {
"locked": {
"lastModified": 1731797254,
"narHash": "sha256-df3dJApLPhd11AlueuoN0Q4fHo/hagP75LlM5K1sz9g=",
···
"eon": "eon",
"fn06-website": "fn06-website",
"home-manager": "home-manager_2",
"hyperbib-eeg": "hyperbib-eeg",
"i3-workspace-history": "i3-workspace-history",
"nix-on-droid": "nix-on-droid",
"nix-rpi5": "nix-rpi5",
"nixos-hardware": "nixos-hardware",
-
"nixpkgs": "nixpkgs_6",
"nixpkgs-neovim": "nixpkgs-neovim",
"nixpkgs-unstable": "nixpkgs-unstable"
}
···
},
"gomod2nix": {
"inputs": {
+
"nixpkgs": "nixpkgs_5",
"utils": "utils_3"
},
"locked": {
···
"type": "github"
}
},
+
"home-manager-unstable": {
+
"inputs": {
+
"nixpkgs": "nixpkgs_4"
+
},
+
"locked": {
+
"lastModified": 1732884235,
+
"narHash": "sha256-r8j6R3nrvwbT1aUp4EPQ1KC7gm0pu9VcV1aNaB+XG6Q=",
+
"owner": "nix-community",
+
"repo": "home-manager",
+
"rev": "819f682269f4e002884702b87e445c82840c68f2",
+
"type": "github"
+
},
+
"original": {
+
"owner": "nix-community",
+
"ref": "master",
+
"repo": "home-manager",
+
"type": "github"
+
}
+
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
···
]
},
"locked": {
+
"lastModified": 1726989464,
+
"narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=",
+
"owner": "nix-community",
"repo": "home-manager",
+
"rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176",
"type": "github"
},
"original": {
+
"owner": "nix-community",
+
"ref": "release-24.05",
"repo": "home-manager",
"type": "github"
}
···
"nix-rpi5": {
"inputs": {
"flake-compat": "flake-compat_5",
+
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1704485878,
···
},
"nixpkgs_4": {
"locked": {
+
"lastModified": 1732521221,
+
"narHash": "sha256-2ThgXBUXAE1oFsVATK1ZX9IjPcS4nKFOAjhPNKuiMn0=",
+
"owner": "NixOS",
+
"repo": "nixpkgs",
+
"rev": "4633a7c72337ea8fd23a4f2ba3972865e3ec685d",
+
"type": "github"
+
},
+
"original": {
+
"owner": "NixOS",
+
"ref": "nixos-unstable",
+
"repo": "nixpkgs",
+
"type": "github"
+
}
+
},
+
"nixpkgs_5": {
+
"locked": {
"lastModified": 1658285632,
"narHash": "sha256-zRS5S/hoeDGUbO+L95wXG9vJNwsSYcl93XiD0HQBXLk=",
"owner": "NixOS",
···
"type": "github"
}
},
+
"nixpkgs_6": {
"locked": {
"lastModified": 1704322682,
"narHash": "sha256-0FK10TWEYkEP5sloguzmDfM+hXIyPzlmZCFx/5c+ilQ=",
···
"type": "github"
}
},
+
"nixpkgs_7": {
"locked": {
"lastModified": 1731797254,
"narHash": "sha256-df3dJApLPhd11AlueuoN0Q4fHo/hagP75LlM5K1sz9g=",
···
"eon": "eon",
"fn06-website": "fn06-website",
"home-manager": "home-manager_2",
+
"home-manager-unstable": "home-manager-unstable",
"hyperbib-eeg": "hyperbib-eeg",
"i3-workspace-history": "i3-workspace-history",
"nix-on-droid": "nix-on-droid",
"nix-rpi5": "nix-rpi5",
"nixos-hardware": "nixos-hardware",
+
"nixpkgs": "nixpkgs_7",
"nixpkgs-neovim": "nixpkgs-neovim",
"nixpkgs-unstable": "nixpkgs-unstable"
}
+16 -7
flake.nix
···
nixpkgs-neovim.url =
"github:nixos/nixpkgs/a76212122970925d09aa2021a93e00d359e631dd";
nixos-hardware.url = "github:nixos/nixos-hardware";
-
#home-manager.url = "github:nix-community/home-manager/release-24.05";
-
home-manager.url = "github:RyanGibb/home-manager/fork-24.05";
agenix.url = "github:ryantm/agenix";
deploy-rs.url = "github:serokell/deploy-rs";
nix-on-droid.url = "github:nix-community/nix-on-droid/release-23.11";
···
};
outputs = { self, nixpkgs, nixpkgs-unstable, nixpkgs-neovim, home-manager
-
, agenix, deploy-rs, nix-on-droid, eilean, ... }@inputs:
let
getSystemOverlays = system: nixpkgsConfig:
[
···
};
version = "2.3.0";
});
})
];
in {
nixosConfigurations = let
mkMode = mode: host:
-
nixpkgs.lib.nixosSystem {
# use system from config.localSystem
# see https://github.com/NixOS/nixpkgs/blob/5297d584bcc5f95c8e87c631813b4e2ab7f19ecc/nixos/lib/eval-config.nix#L55
system = null;
···
({ config, ... }: {
networking.hostName = "${host}";
# pin nix command's nixpkgs flake to the system flake to avoid unnecessary downloads
-
nix.registry.nixpkgs.flake = nixpkgs;
system.stateVersion = "24.05";
# record git revision (can be queried with `nixos-version --json)
system.configurationRevision =
-
nixpkgs.lib.mkIf (self ? rev) self.rev;
nixpkgs = {
config.allowUnfree = true;
config.permittedInsecurePackages = [
···
};
security.acme-eon.acceptTerms = true;
})
-
home-manager.nixosModule
eilean.nixosModules.default
agenix.nixosModules.default
];
···
nixpkgs-neovim.url =
"github:nixos/nixpkgs/a76212122970925d09aa2021a93e00d359e631dd";
nixos-hardware.url = "github:nixos/nixos-hardware";
+
home-manager.url = "github:nix-community/home-manager/release-24.05";
+
home-manager-unstable.url = "github:nix-community/home-manager/master";
agenix.url = "github:ryantm/agenix";
deploy-rs.url = "github:serokell/deploy-rs";
nix-on-droid.url = "github:nix-community/nix-on-droid/release-23.11";
···
};
outputs = { self, nixpkgs, nixpkgs-unstable, nixpkgs-neovim, home-manager
+
, home-manager-unstable, agenix, deploy-rs, nix-on-droid, eilean, ...
+
}@inputs:
let
getSystemOverlays = system: nixpkgsConfig:
[
···
};
version = "2.3.0";
});
+
immich = final.overlay-unstable.immich;
})
];
in {
nixosConfigurations = let
mkMode = mode: host:
+
let
+
host-nixpkgs =
+
if host == "elephant" then nixpkgs-unstable else nixpkgs;
+
host-home-manager = if host == "elephant" then
+
home-manager-unstable
+
else
+
home-manager;
+
in host-nixpkgs.lib.nixosSystem {
# use system from config.localSystem
# see https://github.com/NixOS/nixpkgs/blob/5297d584bcc5f95c8e87c631813b4e2ab7f19ecc/nixos/lib/eval-config.nix#L55
system = null;
···
({ config, ... }: {
networking.hostName = "${host}";
# pin nix command's nixpkgs flake to the system flake to avoid unnecessary downloads
+
nix.registry.nixpkgs.flake = host-nixpkgs;
system.stateVersion = "24.05";
# record git revision (can be queried with `nixos-version --json)
system.configurationRevision =
+
host-nixpkgs.lib.mkIf (self ? rev) self.rev;
nixpkgs = {
config.allowUnfree = true;
config.permittedInsecurePackages = [
···
};
security.acme-eon.acceptTerms = true;
})
+
host-home-manager.nixosModule
eilean.nixosModules.default
agenix.nixosModules.default
];
-1
home/mail.nix
···
accounts.email = {
maildirBasePath = "mail";
-
order = [ "ryangibb321@gmail.com" "ryan.gibb@cl.cam.ac.uk" ];
accounts = {
"ryan@freumh.org" = rec {
primary = true;
···
accounts.email = {
maildirBasePath = "mail";
accounts = {
"ryan@freumh.org" = rec {
primary = true;
+37 -17
hosts/elephant/services.nix
···
-
{ config, pkgs, lib, ... }:
{
custom.nix-cache.enable = true;
···
"transmission.vpn.freumh.org"
"nextcloud.vpn.freumh.org"
"owntracks.vpn.freumh.org"
];
};
···
enableSSL = true;
listenAddresses = [ "100.64.0.9" ];
locations."/" = {
-
proxyPass = ''
-
http://localhost:9091
'';
};
};
···
enableSSL = true;
listenAddresses = [ "100.64.0.9" ];
};
};
};
···
services.jellyfin = {
enable = true;
-
openFirewall = true;
};
services.samba = {
enable = true;
openFirewall = true;
securityType = "user";
-
extraConfig = ''
-
workgroup = WORKGROUP
-
server string = ${config.networking.hostName}
-
netbios name = ${config.networking.hostName}
-
security = user
-
#use sendfile = yes
-
#max protocol = smb2
-
# note: localhost is the ipv6 localhost ::1
-
hosts allow = 192.168.1. 192.168.0. 127.0.0.1 localhost 100.64.0.0/10
-
hosts deny = 0.0.0.0/0
-
guest account = nobody
-
map to guest = bad user
-
'';
shares = {
tank = {
path = "/tank/";
···
enable = true;
host = "100.64.0.9";
domain = "owntracks.vpn.freumh.org";
};
}
···
+
{ nixpkgs-unstable, config, pkgs, lib, ... }:
{
custom.nix-cache.enable = true;
···
"transmission.vpn.freumh.org"
"nextcloud.vpn.freumh.org"
"owntracks.vpn.freumh.org"
+
"immich.vpn.freumh.org"
];
};
···
enableSSL = true;
listenAddresses = [ "100.64.0.9" ];
locations."/" = {
+
proxyPass = with config.services.transmission.settings; ''
+
http://localhost:${builtins.toString rpc-port}
'';
};
};
···
enableSSL = true;
listenAddresses = [ "100.64.0.9" ];
};
+
"immich.vpn.freumh.org" = {
+
enableSSL = true;
+
listenAddresses = [ "100.64.0.9" ];
+
locations."/" = {
+
proxyPass = with config.services.immich; ''
+
http://${host}:${builtins.toString port}
+
'';
+
};
+
};
};
};
···
services.jellyfin = {
enable = true;
+
#openFirewall = true;
};
services.samba = {
enable = true;
openFirewall = true;
securityType = "user";
+
settings = {
+
global = {
+
workgroup = "WORKGROUP";
+
"server string" = "${config.networking.hostName}";
+
"netbios name" = "${config.networking.hostName}";
+
"security" = "user";
+
#"use sendfile" = "yes";
+
#"max protocol" = "smb2";
+
# note: localhost is the ipv6 localhost ::1
+
"hosts allow" =
+
"192.168.1. 192.168.0. 127.0.0.1 localhost 100.64.0.0/10";
+
"hosts deny" = "0.0.0.0/0";
+
"guest account" = "nobody";
+
"map to guest" = "bad user";
+
};
+
};
shares = {
tank = {
path = "/tank/";
···
enable = true;
host = "100.64.0.9";
domain = "owntracks.vpn.freumh.org";
+
};
+
+
services.immich = {
+
enable = true;
+
openFirewall = true;
+
host = "100.64.0.9";
+
mediaLocation = "/tank/immich";
};
}
+5
hosts/owl/default.nix
···
type = "A";
value = "100.64.0.9";
}
];
in {
imports = [
···
type = "A";
value = "100.64.0.9";
}
+
{
+
name = "immich.vpn.${config.networking.domain}.";
+
type = "A";
+
value = "100.64.0.9";
+
}
];
in {
imports = [