Compare commits
9 Commits
c95d66caab
...
c50e278db7
Author | SHA1 | Date | |
---|---|---|---|
|
c50e278db7 | ||
|
914a26a0ba | ||
|
cca80288ed | ||
|
b72d5c9d6b | ||
|
d19d2ce3a0 | ||
|
873d2bd1c8 | ||
|
abb672ea9e | ||
|
bd4c7e80d5 | ||
|
1206a18e22 |
37
flake.lock
generated
37
flake.lock
generated
@ -329,13 +329,13 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixos-unstable": {
|
"nixos-master": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733656628,
|
"lastModified": 1733828764,
|
||||||
"narHash": "sha256-dLQKmK5Sn3sWOKSg8EnDGdUUnv5M26YM1D8OIQuEvSo=",
|
"narHash": "sha256-M7UXv4hvFHzWv1N4MUaI4I87twq82khE9APjOj/RwAk=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e6eb5fff7256ffc39233dd5ffe2fea16d4e0b81f",
|
"rev": "0693a1e00163dc2ffeb28d7ba3054caa09df8d4c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -345,6 +345,22 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixos-unstable": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1733686850,
|
||||||
|
"narHash": "sha256-NQEO/nZWWGTGlkBWtCs/1iF1yl2lmQ1oY/8YZrumn3I=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "dd51f52372a20a93c219e8216fe528a648ffcbf4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1703013332,
|
"lastModified": 1703013332,
|
||||||
@ -363,11 +379,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733654877,
|
"lastModified": 1733826616,
|
||||||
"narHash": "sha256-CNZ8bOvXSR/v5Q83sv3IO+ZcKZpDZuOnPJz64QDNtIM=",
|
"narHash": "sha256-SZgf5RGx8VirkCQI0EPPIfFGPzXk9KdxB7xXSycWsYQ=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "1b6d067c32f00c0c4ee5083a3137e9feff7009ef",
|
"rev": "e6aebefe680345c6bab3cf37d1aeca0c1a8320f7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -449,11 +465,11 @@
|
|||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730379167,
|
"lastModified": 1733768882,
|
||||||
"narHash": "sha256-Nn6SuIg/cM0lh44wtK33jMDuHlR8P3sqyYesFi4mZ/k=",
|
"narHash": "sha256-9xp5ZH6+CGC3ZyxnbWTRbDVWWZtnGZT85RJRtyI6XfU=",
|
||||||
"owner": "icewind1991",
|
"owner": "icewind1991",
|
||||||
"repo": "nvidia-patch-nixos",
|
"repo": "nvidia-patch-nixos",
|
||||||
"rev": "f9a0039c9974b09673f98f16fc2da31d3d1ff384",
|
"rev": "d8ae03727117a15eca58ec21628dda8db3811163",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -467,6 +483,7 @@
|
|||||||
"agenix-flake": "agenix-flake",
|
"agenix-flake": "agenix-flake",
|
||||||
"home-manager": "home-manager_2",
|
"home-manager": "home-manager_2",
|
||||||
"local-unstable": "local-unstable",
|
"local-unstable": "local-unstable",
|
||||||
|
"nixos-master": "nixos-master",
|
||||||
"nixos-unstable": "nixos-unstable",
|
"nixos-unstable": "nixos-unstable",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nvidia-patch": "nvidia-patch",
|
"nvidia-patch": "nvidia-patch",
|
||||||
|
56
flake.nix
56
flake.nix
@ -1,7 +1,8 @@
|
|||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/release-24.11";
|
nixpkgs.url = "github:NixOS/nixpkgs/release-24.11";
|
||||||
nixos-unstable.url = "github:NixOS/nixpkgs/master";
|
nixos-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
|
nixos-master.url = "github:NixOS/nixpkgs/master";
|
||||||
local-unstable.url = "path:///home/giulio/dev/nixpkgs";
|
local-unstable.url = "path:///home/giulio/dev/nixpkgs";
|
||||||
teslamate-flake.url = "github:teslamate-org/teslamate/v1.32.0";
|
teslamate-flake.url = "github:teslamate-org/teslamate/v1.32.0";
|
||||||
agenix-flake.url = "github:ryantm/agenix";
|
agenix-flake.url = "github:ryantm/agenix";
|
||||||
@ -15,7 +16,17 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, nixos-unstable, local-unstable, home-manager, teslamate-flake, nvidia-patch, agenix-flake }:
|
outputs =
|
||||||
|
{ self
|
||||||
|
, nixpkgs
|
||||||
|
, nixos-unstable
|
||||||
|
, nixos-master
|
||||||
|
, local-unstable
|
||||||
|
, home-manager
|
||||||
|
, teslamate-flake
|
||||||
|
, nvidia-patch
|
||||||
|
, agenix-flake
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
sysLinuxX64 = "x86_64-linux";
|
sysLinuxX64 = "x86_64-linux";
|
||||||
sysDarwin = "aarch64-darwin";
|
sysDarwin = "aarch64-darwin";
|
||||||
@ -25,43 +36,38 @@
|
|||||||
let
|
let
|
||||||
config = {
|
config = {
|
||||||
inherit cudaSupport;
|
inherit cudaSupport;
|
||||||
|
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
extOverlays = [
|
extOverlays = [
|
||||||
(nvidia-patch.overlays.default)
|
(nvidia-patch.overlays.default)
|
||||||
];
|
];
|
||||||
in
|
|
||||||
import nixpkgs rec {
|
|
||||||
inherit system config;
|
|
||||||
|
|
||||||
unstablePkgs = import nixos-unstable {
|
importNixpkgs = { flake }:
|
||||||
inherit system config;
|
import flake {
|
||||||
|
inherit system config;
|
||||||
|
|
||||||
overlays = extOverlays;
|
overlays = extOverlays;
|
||||||
};
|
};
|
||||||
|
|
||||||
localPkgs = import local-unstable {
|
unstablePkgs = importNixpkgs { flake = nixos-unstable; };
|
||||||
inherit system config;
|
masterPkgs = importNixpkgs { flake = nixos-master; };
|
||||||
overlays = extOverlays;
|
localPkgs = importNixpkgs { flake = local-unstable; };
|
||||||
};
|
teslamatePkgs = importNixpkgs { flake = teslamate-flake; };
|
||||||
|
agenixPkgs = importNixpkgs { flake = agenix-flake; };
|
||||||
|
|
||||||
teslamatePkgs = import teslamate-flake {
|
additionalOverlays = [
|
||||||
inherit system config;
|
|
||||||
overlays = extOverlays;
|
|
||||||
};
|
|
||||||
|
|
||||||
agenixPkgs = import agenix-flake {
|
|
||||||
inherit system config;
|
|
||||||
overlays = extOverlays;
|
|
||||||
};
|
|
||||||
|
|
||||||
overlays = [
|
|
||||||
(final: prev: { inherit unstablePkgs; })
|
(final: prev: { inherit unstablePkgs; })
|
||||||
(final: prev: { inherit localPkgs; })
|
(final: prev: { inherit localPkgs; })
|
||||||
(final: prev: { inherit teslamatePkgs; })
|
(final: prev: { inherit teslamatePkgs; })
|
||||||
(final: prev: { inherit agenixPkgs; })
|
(final: prev: { inherit agenixPkgs; })
|
||||||
] ++ extOverlays;
|
(final: prev: { inherit masterPkgs; })
|
||||||
|
];
|
||||||
|
in
|
||||||
|
import nixpkgs {
|
||||||
|
inherit system config;
|
||||||
|
overlays = additionalOverlays ++ extOverlays;
|
||||||
};
|
};
|
||||||
|
|
||||||
wrapUtils = { pkgs }:
|
wrapUtils = { pkgs }:
|
||||||
|
@ -30,7 +30,7 @@ in
|
|||||||
./redlib.nix
|
./redlib.nix
|
||||||
# ./invidious.nix
|
# ./invidious.nix
|
||||||
./jellyfin.nix
|
./jellyfin.nix
|
||||||
./docker.nix
|
# ./docker.nix
|
||||||
./tailscale.nix
|
./tailscale.nix
|
||||||
./headscale.nix
|
./headscale.nix
|
||||||
./llm.nix
|
./llm.nix
|
||||||
|
@ -54,7 +54,6 @@ in
|
|||||||
|
|
||||||
chain POSTROUTING {
|
chain POSTROUTING {
|
||||||
type nat hook postrouting priority srcnat; policy accept;
|
type nat hook postrouting priority srcnat; policy accept;
|
||||||
oifname ${lan.interface} ip saddr ${docker.net} masquerade
|
|
||||||
oifname ${lan.interface} ip saddr ${tailscale.net} masquerade
|
oifname ${lan.interface} ip saddr ${tailscale.net} masquerade
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -67,7 +66,6 @@ in
|
|||||||
ip daddr 224.0.0.0/4 accept comment "allow multicast traffic"
|
ip daddr 224.0.0.0/4 accept comment "allow multicast traffic"
|
||||||
iifname ${lan.interface} ip saddr 127.0.0.0/8 drop comment "bind any ip to intf ${lan.interface}"
|
iifname ${lan.interface} ip saddr 127.0.0.0/8 drop comment "bind any ip to intf ${lan.interface}"
|
||||||
iifname ${lan.interface} accept comment "bind any ip to intf ${lan.interface}"
|
iifname ${lan.interface} accept comment "bind any ip to intf ${lan.interface}"
|
||||||
iifname ${docker.interface} ip saddr ${docker.net} accept comment "bind ip ${docker.net} to intf ${docker.interface}"
|
|
||||||
iifname ${tailscale.interface} ip saddr ${tailscale.net} accept
|
iifname ${tailscale.interface} ip saddr ${tailscale.net} accept
|
||||||
iifname ${tailscale.interface} ip saddr 100.100.100.100/32 accept
|
iifname ${tailscale.interface} ip saddr 100.100.100.100/32 accept
|
||||||
iifname "lo" accept comment "bind any ip to intf lo"
|
iifname "lo" accept comment "bind any ip to intf lo"
|
||||||
@ -123,7 +121,6 @@ in
|
|||||||
ip daddr 255.255.255.255 accept comment "allow broadcast traffic"
|
ip daddr 255.255.255.255 accept comment "allow broadcast traffic"
|
||||||
ip daddr 224.0.0.0/4 accept comment "allow multicast traffic"
|
ip daddr 224.0.0.0/4 accept comment "allow multicast traffic"
|
||||||
ip saddr ${lan.net} accept comment "lan > local"
|
ip saddr ${lan.net} accept comment "lan > local"
|
||||||
iifname ${docker.interface} accept
|
|
||||||
ip saddr ${tailscale.net} accept comment "tailscale > local"
|
ip saddr ${tailscale.net} accept comment "tailscale > local"
|
||||||
ip saddr {${lib.concatStringsSep "," gdevices}} accept comment "vpn > local"
|
ip saddr {${lib.concatStringsSep "," gdevices}} accept comment "vpn > local"
|
||||||
|
|
||||||
@ -136,7 +133,6 @@ in
|
|||||||
type filter hook forward priority filter; policy drop;
|
type filter hook forward priority filter; policy drop;
|
||||||
ct state established,related accept
|
ct state established,related accept
|
||||||
|
|
||||||
oifname ${lan.interface} ip saddr ${docker.net} accept
|
|
||||||
oifname ${lan.interface} ip saddr ${tailscale.net} accept
|
oifname ${lan.interface} ip saddr ${tailscale.net} accept
|
||||||
|
|
||||||
jump filter_drop
|
jump filter_drop
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
domain = "tesla.giugl.io";
|
domain = "tesla.giugl.io";
|
||||||
@ -51,6 +51,14 @@ in
|
|||||||
secretsFile = config.age.secrets.teslamate.path;
|
secretsFile = config.age.secrets.teslamate.path;
|
||||||
virtualHost = domain;
|
virtualHost = domain;
|
||||||
postgres.enable_server = true;
|
postgres.enable_server = true;
|
||||||
grafana = { enable = true; port = grafanaPort; listenAddress = "127.0.0.1"; urlPath = "/grafana"; };
|
grafana = {
|
||||||
|
enable = true;
|
||||||
|
port = grafanaPort;
|
||||||
|
listenAddress = "127.0.0.1";
|
||||||
|
urlPath = "/grafana";
|
||||||
|
};
|
||||||
|
mqtt = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -8,5 +8,5 @@ clients:
|
|||||||
max_output_tokens: 16000
|
max_output_tokens: 16000
|
||||||
|
|
||||||
- name: pino-coder
|
- name: pino-coder
|
||||||
max_input_tokens: 8192
|
max_input_tokens: 16000
|
||||||
max_output_tokens: 16000
|
max_output_tokens: 16000
|
||||||
|
Loading…
Reference in New Issue
Block a user