Compare commits

...

2 commits

6 changed files with 134 additions and 29 deletions

View file

@ -1,9 +1,32 @@
{ {
"nodes": { "nodes": {
"agenix": {
"inputs": {
"darwin": "darwin",
"home-manager": "home-manager",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems"
},
"locked": {
"lastModified": 1723293904,
"narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=",
"owner": "ryantm",
"repo": "agenix",
"rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41",
"type": "github"
},
"original": {
"owner": "ryantm",
"repo": "agenix",
"type": "github"
}
},
"ags": { "ags": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"systems": "systems" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1728326430, "lastModified": 1728326430,
@ -60,6 +83,28 @@
"type": "github" "type": "github"
} }
}, },
"darwin": {
"inputs": {
"nixpkgs": [
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1700795494,
"narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d",
"type": "github"
},
"original": {
"owner": "lnl7",
"ref": "master",
"repo": "nix-darwin",
"type": "github"
}
},
"deploy-rs": { "deploy-rs": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
@ -243,7 +288,7 @@
}, },
"flake-utils_2": { "flake-utils_2": {
"inputs": { "inputs": {
"systems": "systems_3" "systems": "systems_4"
}, },
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1710146030,
@ -261,7 +306,7 @@
}, },
"flake-utils_3": { "flake-utils_3": {
"inputs": { "inputs": {
"systems": "systems_4" "systems": "systems_5"
}, },
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1710146030,
@ -279,7 +324,7 @@
}, },
"flake-utils_4": { "flake-utils_4": {
"inputs": { "inputs": {
"systems": "systems_7" "systems": "systems_8"
}, },
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1710146030,
@ -352,6 +397,27 @@
} }
}, },
"home-manager": { "home-manager": {
"inputs": {
"nixpkgs": [
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1703113217,
"narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
@ -892,7 +958,7 @@
"plugin-vim-vsnip": "plugin-vim-vsnip", "plugin-vim-vsnip": "plugin-vim-vsnip",
"plugin-which-key": "plugin-which-key", "plugin-which-key": "plugin-which-key",
"rnix-lsp": "rnix-lsp", "rnix-lsp": "rnix-lsp",
"systems": "systems_5" "systems": "systems_6"
}, },
"locked": { "locked": {
"lastModified": 1728378979, "lastModified": 1728378979,
@ -2597,11 +2663,12 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"agenix": "agenix",
"ags": "ags", "ags": "ags",
"basix": "basix", "basix": "basix",
"deploy-rs": "deploy-rs", "deploy-rs": "deploy-rs",
"firefox-addons": "firefox-addons", "firefox-addons": "firefox-addons",
"home-manager": "home-manager", "home-manager": "home-manager_2",
"lanzaboote": "lanzaboote", "lanzaboote": "lanzaboote",
"niri": "niri", "niri": "niri",
"nix-index-db": "nix-index-db", "nix-index-db": "nix-index-db",
@ -2609,7 +2676,7 @@
"nixpkgs": "nixpkgs_5", "nixpkgs": "nixpkgs_5",
"nvf": "nvf", "nvf": "nvf",
"plasma-manager": "plasma-manager", "plasma-manager": "plasma-manager",
"systems": "systems_6", "systems": "systems_7",
"treefmt-nix": "treefmt-nix", "treefmt-nix": "treefmt-nix",
"wezterm": "wezterm" "wezterm": "wezterm"
} }
@ -2688,21 +2755,6 @@
} }
}, },
"systems": { "systems": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_2": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@ -2717,6 +2769,21 @@
"type": "github" "type": "github"
} }
}, },
"systems_2": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_3": { "systems_3": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
@ -2763,6 +2830,21 @@
} }
}, },
"systems_6": { "systems_6": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_7": {
"locked": { "locked": {
"lastModified": 1689347949, "lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
@ -2777,7 +2859,7 @@
"type": "github" "type": "github"
} }
}, },
"systems_7": { "systems_8": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@ -2812,7 +2894,7 @@
}, },
"utils": { "utils": {
"inputs": { "inputs": {
"systems": "systems_2" "systems": "systems_3"
}, },
"locked": { "locked": {
"lastModified": 1701680307, "lastModified": 1701680307,

View file

@ -5,8 +5,9 @@
self, self,
nixpkgs, nixpkgs,
systems, systems,
treefmt-nix, agenix,
deploy-rs, deploy-rs,
treefmt-nix,
... ...
} @ inputs: let } @ inputs: let
eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system}); eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system});
@ -18,6 +19,7 @@
pkgs.alejandra pkgs.alejandra
pkgs.git pkgs.git
deploy-rs.packages.${pkgs.system}.default deploy-rs.packages.${pkgs.system}.default
agenix.packages.${pkgs.system}.default
]; ];
}; };
}); });
@ -45,6 +47,10 @@
}; };
# other # other
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
ags.url = "github:Aylur/ags"; ags.url = "github:Aylur/ags";
basix.url = "github:notashelf/basix"; basix.url = "github:notashelf/basix";
deploy-rs.url = "github:serokell/deploy-rs"; deploy-rs.url = "github:serokell/deploy-rs";
@ -52,7 +58,7 @@
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
niri = {url = "github:sodiboo/niri-flake";}; niri.url = "github:sodiboo/niri-flake";
nvf.url = "github:notashelf/nvf"; nvf.url = "github:notashelf/nvf";
plasma-manager = { plasma-manager = {
url = "github:nix-community/plasma-manager"; url = "github:nix-community/plasma-manager";

View file

@ -1,10 +1,16 @@
{self, ...}: let {
self,
inputs,
...
}: let
mod = "${self}/system"; mod = "${self}/system";
in { in {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./networking.nix # generated at runtime by nixos-infect ./networking.nix # generated at runtime by nixos-infect
inputs.agenix.nixosModules.default
"${mod}/services/forgejo.nix" "${mod}/services/forgejo.nix"
"${mod}/services/searx.nix" "${mod}/services/searx.nix"
]; ];

BIN
secrets/searx-env-file.age Normal file

Binary file not shown.

5
secrets/secrets.nix Normal file
View file

@ -0,0 +1,5 @@
let
anastacia = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEplguGeXCbdz++Ry5pwJylmtAMnwtf1+9JoJnCGfw3A root@anastacia";
in {
"searx-env-file.age".publicKeys = [anastacia];
}

View file

@ -1,8 +1,14 @@
{pkgs, ...}: { {
config,
pkgs,
...
}: {
age.secrets.searx-env-file.file = ../../secrets/searx-env-file.age;
services = { services = {
searx = { searx = {
enable = true; enable = true;
package = pkgs.searxng; package = pkgs.searxng;
environmentFile = config.age.secrets.searx-env-file.path;
settings = { settings = {
search = { search = {
safe_search = 1; # 0 = None, 1 = Moderate, 2 = Strict safe_search = 1; # 0 = None, 1 = Moderate, 2 = Strict
@ -10,7 +16,7 @@
default_lang = "en"; default_lang = "en";
}; };
server = { server = {
secret_key = "TODO_USE_SOPS_INSTEAD"; secret_key = "@SEARX_SECRET_KEY@";
port = 8888; # Internal port port = 8888; # Internal port
bind_address = "localhost"; # Only listen locally bind_address = "localhost"; # Only listen locally
base_url = "https://search.nezia.dev/"; base_url = "https://search.nezia.dev/";