rico1: add deployments

This commit is contained in:
Adithya 2024-07-03 17:03:34 +05:30
parent 1f5c569532
commit b167f09b8f
Signed by: adtya
GPG key ID: B8857BFBA2C47B9C
9 changed files with 232 additions and 46 deletions

View file

@ -1,5 +1,25 @@
{
"nodes": {
"adtyaxyz": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1719852331,
"narHash": "sha256-KLvim6+CdC2+/Fu0Z5k8Tc/5ugrq0vS9pgFOfidprtM=",
"owner": "adtya",
"repo": "adtya.xyz",
"rev": "1c775c03ad19f6e67591065ab5ff889c158da274",
"type": "github"
},
"original": {
"owner": "adtya",
"ref": "main",
"repo": "adtya.xyz",
"type": "github"
}
},
"crane": {
"inputs": {
"nixpkgs": [
@ -24,7 +44,7 @@
"deploy-rs": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": "nixpkgs",
"nixpkgs": "nixpkgs_2",
"utils": "utils"
},
"locked": {
@ -171,7 +191,7 @@
},
"flake-utils": {
"inputs": {
"systems": "systems_2"
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
@ -183,7 +203,6 @@
},
"original": {
"owner": "numtide",
"ref": "main",
"repo": "flake-utils",
"type": "github"
}
@ -202,6 +221,7 @@
},
"original": {
"owner": "numtide",
"ref": "main",
"repo": "flake-utils",
"type": "github"
}
@ -224,6 +244,24 @@
"type": "github"
}
},
"flake-utils_4": {
"inputs": {
"systems": "systems_5"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flakey-profile": {
"locked": {
"lastModified": 1712898590,
@ -374,8 +412,8 @@
"crane": "crane",
"flake-compat": "flake-compat_2",
"flake-parts": "flake-parts",
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2",
"flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs_3",
"pre-commit-hooks-nix": "pre-commit-hooks-nix",
"rust-overlay": "rust-overlay"
},
@ -410,7 +448,7 @@
},
"lix-module": {
"inputs": {
"flake-utils": "flake-utils_3",
"flake-utils": "flake-utils_4",
"flakey-profile": "flakey-profile",
"lix": "lix",
"nixpkgs": [
@ -439,7 +477,7 @@
"git-hooks": "git-hooks",
"hercules-ci-effects": "hercules-ci-effects",
"neovim-src": "neovim-src",
"nixpkgs": "nixpkgs_3"
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1719858211,
@ -474,11 +512,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1702272962,
"narHash": "sha256-D+zHwkwPc6oYQ4G3A1HuadopqRwUY/JkMwHz1YF7j4Q=",
"lastModified": 1719468428,
"narHash": "sha256-vN5xJAZ4UGREEglh3lfbbkIj+MPEYMuqewMn4atZFaQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e97b3e4186bcadf0ef1b6be22b8558eab1cdeb5d",
"rev": "1e3deb3d8a86a870d925760db1a5adecc64d329d",
"type": "github"
},
"original": {
@ -521,6 +559,22 @@
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1702272962,
"narHash": "sha256-D+zHwkwPc6oYQ4G3A1HuadopqRwUY/JkMwHz1YF7j4Q=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e97b3e4186bcadf0ef1b6be22b8558eab1cdeb5d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1718541509,
"narHash": "sha256-TmC5TxW5WPAfmovDzi1hLe1i4qqND79s9SH9UOKcSvo=",
@ -536,7 +590,7 @@
"type": "github"
}
},
"nixpkgs_3": {
"nixpkgs_4": {
"locked": {
"lastModified": 1719468428,
"narHash": "sha256-vN5xJAZ4UGREEglh3lfbbkIj+MPEYMuqewMn4atZFaQ=",
@ -552,7 +606,7 @@
"type": "github"
}
},
"nixpkgs_4": {
"nixpkgs_5": {
"locked": {
"lastModified": 1719690277,
"narHash": "sha256-0xSej1g7eP2kaUF+JQp8jdyNmpmCJKRpO12mKl/36Kc=",
@ -568,7 +622,7 @@
"type": "github"
}
},
"nixpkgs_5": {
"nixpkgs_6": {
"locked": {
"lastModified": 1719468428,
"narHash": "sha256-vN5xJAZ4UGREEglh3lfbbkIj+MPEYMuqewMn4atZFaQ=",
@ -584,7 +638,7 @@
"type": "github"
}
},
"nixpkgs_6": {
"nixpkgs_7": {
"locked": {
"lastModified": 1716220750,
"narHash": "sha256-Lhhrd1ZBNXCbUupWGq6gRPIy1qMKEdcAXcjnwgVqe/U=",
@ -629,14 +683,15 @@
},
"root": {
"inputs": {
"adtyaxyz": "adtyaxyz",
"deploy-rs": "deploy-rs",
"flake-utils": "flake-utils",
"flake-utils": "flake-utils_2",
"home-manager": "home-manager",
"impermanence": "impermanence",
"lanzaboote": "lanzaboote",
"lix-module": "lix-module",
"neovim-nightly": "neovim-nightly",
"nixpkgs": "nixpkgs_4",
"nixpkgs": "nixpkgs_5",
"sops-nix": "sops-nix",
"varnam-nix": "varnam-nix"
}
@ -668,7 +723,7 @@
},
"sops-nix": {
"inputs": {
"nixpkgs": "nixpkgs_5",
"nixpkgs": "nixpkgs_6",
"nixpkgs-stable": "nixpkgs-stable_2"
},
"locked": {
@ -746,9 +801,24 @@
"type": "github"
}
},
"systems_5": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": {
"inputs": {
"systems": "systems"
"systems": "systems_2"
},
"locked": {
"lastModified": 1701680307,
@ -766,7 +836,7 @@
},
"varnam-nix": {
"inputs": {
"nixpkgs": "nixpkgs_6"
"nixpkgs": "nixpkgs_7"
},
"locked": {
"lastModified": 1716722955,

View file

@ -29,6 +29,7 @@
flake-utils.url = "github:numtide/flake-utils?ref=main";
neovim-nightly.url = "github:nix-community/neovim-nightly-overlay?ref=master";
varnam-nix.url = "github:adtya/varnam-nix?ref=main";
adtyaxyz.url = "github:adtya/adtya.xyz?ref=main";
};
outputs =
@ -43,6 +44,7 @@
, flake-utils
, neovim-nightly
, varnam-nix
, adtyaxyz
,
} @ inputs:
let

View file

@ -0,0 +1,31 @@
{ inputs, pkgs, ... }: {
services = {
caddy.virtualHosts."adtya.xyz" = {
serverAliases = [ "www.adtya.xyz" ];
extraConfig = ''
handle {
root * ${inputs.adtyaxyz.packages.${pkgs.system}.default}/share/web
encode gzip
try_files {path} /index.html
file_server
}
'';
};
frp.settings.proxies = [
{
name = "http.adtya.xyz";
type = "http";
customDomains = [ "adtya.xyz" "www.adtya.xyz" ];
localPort = 80;
transport.useCompression = true;
}
{
name = "https.adtya.xyz";
type = "https";
customDomains = [ "adtya.xyz" "www.adtya.xyz" ];
localPort = 443;
transport.useCompression = true;
}
];
};
}

View file

@ -0,0 +1,3 @@
_: {
imports = [ ./adtya.xyz.nix ./proofs.nix ];
}

View file

@ -0,0 +1,28 @@
_: {
services = {
caddy.virtualHosts = {
"proofs.adtya.xyz" = {
extraConfig = ''
redir https://keyoxide.org/hkp/51E4F5AB1B82BE45B4229CC243A5E25AA5A27849
'';
};
};
frp.settings.proxies = [
{
name = "http.proofs.adtya.xyz";
type = "http";
customDomains = [ "proofs.adtya.xyz" ];
localPort = 80;
transport.useCompression = true;
}
{
name = "https.proofs.adtya.xyz";
type = "https";
customDomains = [ "proofs.adtya.xyz" ];
localPort = 443;
transport.useCompression = true;
}
];
};
}

View file

@ -0,0 +1,8 @@
_: {
services.caddy = {
enable = true;
acmeCA = "https://acme-v02.api.letsencrypt.org/directory";
email = "admin@acomputer.lol";
};
}

View file

@ -2,6 +2,11 @@ _: {
imports = [
./btrfs.nix
./ssh.nix
./caddy.nix
./frp.nix
./apps
];
}

View file

@ -0,0 +1,25 @@
{ config, lib, ... }: {
sops.secrets = {
"frp/token_file" = {
mode = "400";
owner = config.users.users.root.name;
group = config.users.users.root.group;
};
};
systemd.services.frp.serviceConfig.EnvironmentFile = config.sops.secrets."frp/token_file".path;
systemd.services.frp.serviceConfig.Restart = lib.mkForce "always";
services.frp = {
enable = true;
role = "client";
settings = {
serverAddr = "10.10.10.1";
serverPort = 7002;
transport.protocol = "quic";
auth.method = "token";
auth.token = "{{ .Envs.FRP_AUTH_TOKEN }}";
};
};
}

View file

@ -14,6 +14,11 @@ wireguard:
rico2:
pk: ENC[AES256_GCM,data:XyiOlPelFLAhW7Dbko+zGnrxvDAcwxLhBPXye+tBEZ4rs/gcoczjqPhfUJo=,iv:DoMIXLUClnosQPg4VhXBdWV41MJ2sN3C3xgZ9jw2qkY=,tag:m0ZfLdWX8u1h1RgIMfVE9w==,type:str]
psk: ENC[AES256_GCM,data:vKHqJDkpyj05UnnSU0PTG3byrXs9gwJISRmwgG93jaOUCUKfsJuSDeQCfQw=,iv:/v7sEH03zsVfDxY6oCvnRfNQfNvqXi5Bt5ONM7zFxoI=,tag:WzDTlFU7frYwAGHkUHlxEQ==,type:str]
wynne:
pk: ENC[AES256_GCM,data:50L8Rru7pVWa+19qltLynzYwh37HK3IbnjfBtf6REb7KpSTWvmK48JVchxw=,iv:PQylNCEGiyBIk/NxFSAFqrzCu5st9dkshQ6jyRt7yKs=,tag:ddhaCFCBQVxrPaqaHIvg2Q==,type:str]
psk: ENC[AES256_GCM,data:cbO8D/kwhdsiYAqXAbdud0Bhm/tpmwcpdCmKcsvsnUFjy2fO9dYrd0/KbSA=,iv:oByAtlZTY7+taMoniU/dIecZG8XoHWwKVBHGri4xUv0=,tag:8vJm4n/8/jxHtS+E+iVvLw==,type:str]
frp:
token_file: ENC[AES256_GCM,data:y8QgggTJaQ2STMGNGT0RagUhBgA6H20plzEwd9jNhdXl1098URUV0288YoTnQcc=,iv:/BYWC2WYvXrlvNc97RJTfhf1IratSRU0vHcaxLXJ+V4=,tag:PlStSrzm09fW442uBHAiUg==,type:str]
sops:
kms: []
gcp_kms: []
@ -23,50 +28,59 @@ sops:
- recipient: age1w5rvr4nl8xvjjxpct4e2a2eajvm79v4r9nyxrcn40fm8d7h9l9cqkk0jtt
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBwVUp3TjUrdlpsemtwR2U0
Nm9XWGg5YjZKL0NUREg2b2dTaGpyNzh0cFdFCkRIT0l3bHpEbFlJNGFTSmE3YWtp
QUZlZVFpOHQ5OHNTVVVXTGxIRUFWMTQKLS0tIEtBWmF2aTV4dUhoSC9zMVNxY2tG
K3NITlJScjdhKzlWUDFrZWl2cVBPaFUKKL25E0qbifEAxtqob2gPxgzZg5GZvs5c
Mg2NEbfMKEbXcucV5o4pIEAJfTJ8mh4FDr0foHgDq0wtpf7Cmy4GGQ==
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBMSW1zTkFrQVhOdVZkcFBI
OXJCODR6Tm16ZWpqSFYrWGFpZkZudWl4OGp3ClVlb1Iydi82VzEzMUZQSjhrYkh4
aXdHZUVJK3lKbWk1SVRYWEpJUnNOODAKLS0tIHduMStCYVJ0MXZETGtFTEJXZHFm
elpscXhWcTh4OUs4anIxcFNENWNVMUEK6Pq9ayvzMq8kld55Glqu4qTDgEn/lhEk
3OV2VXMw4ipR8J0gYw+z3PvepxJIDbblNG2VGXLQg9AGOiHSKDAPIQ==
-----END AGE ENCRYPTED FILE-----
- recipient: age1mhks8qmhjrtc2u5ufvp3pv2hn7tkadvmscnp7wd0ywmnse0szctqsnpy0a
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBqMnZTV0YyOUZYa1F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ugak8z6cs6qs7yuc3wntugmsumxmv0
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBFYmdnM2J2eDVkaGJlRnkw
VjlTaHNuOEVmRFpNV2hIbVBoZWFWZ3Era1VnCklOZFRVVGpTUjNuUGVoL3hoZFV6
bFRXS29xNXJSakJ1cVo3ZERvZ0dqR0EKLS0tIHhjS0xOWFpEMTRHSGQ1cGYyYlZX
eWFtWnBOeDd0ZzBkZXU5azR4aGNEVmMKCgMM4bWM/QLrFivkYlPbeQwX1+2mdF8a
JeMYwo6CJSCGQsDmlomYmhE5ezxI+FNoFjTH0+gMcMvgDmNyHJE0Qg==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-07-03T11:30:10Z"
mac: ENC[AES256_GCM,data:9EpPVfpoJGt+3xejSjKxpuKDuiaWMVjK8tpDZPEXXmCfkVb9vuV/YRknu1BrPSTFCLb08JtBIF0Ip9WKcUk/u7gR+NKkdQW3QgilkNdxwUDnp4399GpJ6JfbdFIscDAuf743QDx/iSxuZjNVwjBXGPN/xWlnZ10/hxuWdqcc1eY=,iv:i7YBsoRMLRR3kJgYcbgo0T0GLGPXsA3vVPVEBWZHb3s=,tag:e1bdGlASOSbSm14f6NmfHw==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1