Compare commits
5 Commits
matrix-rtc
...
30a54caa03
| Author | SHA1 | Date | |
|---|---|---|---|
| 30a54caa03 | |||
| 3ed6781ae1 | |||
| 3418e577c5 | |||
| 2741e25585 | |||
| e9aed100af |
43
AGENTS.md
43
AGENTS.md
@@ -4,28 +4,8 @@ This repository contains NixOS, nix-darwin, and Home Manager configurations in N
|
||||
|
||||
## Build, Test, and Deployment Commands
|
||||
|
||||
### Build and Apply Configurations
|
||||
|
||||
**Linux (NixOS):**
|
||||
```bash
|
||||
just build # Build configuration
|
||||
just install cores='32' # Apply with 32 cores
|
||||
sudo nixos-rebuild test --fast --flake . # Test without activation
|
||||
sudo nixos-rebuild switch --rollback --flake . # Rollback
|
||||
```
|
||||
|
||||
**macOS (nix-darwin):**
|
||||
```bash
|
||||
just build # Build configuration
|
||||
just install # Apply configuration
|
||||
```
|
||||
|
||||
**Home Manager:**
|
||||
```bash
|
||||
just home
|
||||
```
|
||||
|
||||
### Deploy to Remote Machines (deploy-rs)
|
||||
### Build and Apply Configurations & Deploy to Remote Machines
|
||||
Can use deploy for both local and remote hosts
|
||||
|
||||
```bash
|
||||
deploy -s .#ryu # Desktop (x86_64-linux)
|
||||
@@ -35,6 +15,23 @@ deploy -s .#kuro # MacBook M4 Pro (aarch64-darwin)
|
||||
deploy -s .#shiro # Mac Mini M4 (aarch64-darwin)
|
||||
```
|
||||
|
||||
**Linux (NixOS):**
|
||||
```bash
|
||||
deploy -s .#ryu
|
||||
deploy -s .#tako
|
||||
deploy -s .#tako --builders '' --cores 32 # with no other builders and 32 cores
|
||||
deploy -s .#ryu --max-jobs 4 --cores 32 # use 32 cores and 4 parallel derivations
|
||||
sudo nixos-rebuild test --fast --flake . # Test without activation
|
||||
sudo nixos-rebuild switch --rollback --flake . # Rollback
|
||||
```
|
||||
|
||||
**macOS (nix-darwin):**
|
||||
```bash
|
||||
deploy -s .#kuro
|
||||
deploy -s .#shiro
|
||||
sudo nix-darwin test --fast --flake .
|
||||
```
|
||||
|
||||
### Validation and Formatting
|
||||
|
||||
```bash
|
||||
@@ -164,7 +161,7 @@ just add program myprogram # Creates home/programs/myprogram.nix and adds impor
|
||||
|
||||
### Adding a new dns entry
|
||||
```bash
|
||||
cfcli add --type A foobar.bazbar.biz 192.168.0.1
|
||||
cfcli add --type A foobar.bazbar.biz 100.102.64.19
|
||||
```
|
||||
|
||||
### Creating a Module
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
inputs.zen-browser.homeModules.beta
|
||||
];
|
||||
programs.zen-browser = {
|
||||
enable = device.isLinux;
|
||||
enable = true;
|
||||
profiles.default = {
|
||||
containersForce = true;
|
||||
containers = {
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
# ./headscale.nix
|
||||
./immich.nix
|
||||
./kellnr.nix
|
||||
# ./llms.nix
|
||||
./llms.nix
|
||||
./matrix
|
||||
# ./monitoring.nix
|
||||
./monitoring.nix
|
||||
# ./paperless.nix
|
||||
./prowlarr.nix
|
||||
# ./searxng.nix
|
||||
|
||||
@@ -198,19 +198,19 @@
|
||||
reverse_proxy localhost:${builtins.toString config.services.homepage-dashboard.listenPort}
|
||||
'';
|
||||
};
|
||||
# authelia = {
|
||||
# instances.darksailor = {
|
||||
# settings = {
|
||||
# access_control = {
|
||||
# rules = [
|
||||
# {
|
||||
# domain = "dashboard.darksailor.dev";
|
||||
# policy = "one_factor";
|
||||
# }
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
authelia = {
|
||||
instances.darksailor = {
|
||||
settings = {
|
||||
access_control = {
|
||||
rules = [
|
||||
{
|
||||
domain = "dashboard.darksailor.dev";
|
||||
policy = "one_factor";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -8,19 +8,12 @@
|
||||
client_id = "tuwunel";
|
||||
rtc_domain = "matrix-rtc.${base_domain}";
|
||||
jwt_port = 8081;
|
||||
elementConfig = builtins.toJSON {
|
||||
default_server_config = {
|
||||
"m.homeserver" = {
|
||||
base_url = "https://matrix.${base_domain}";
|
||||
};
|
||||
};
|
||||
sso_redirect_options = {
|
||||
immediate = false;
|
||||
on_welcome_page = true;
|
||||
on_login_page = true;
|
||||
};
|
||||
cinnyConfig = builtins.toJSON {
|
||||
defaultHomeserver = 0;
|
||||
homeserverList = ["darksailor.dev" "matrix.org"];
|
||||
allowCustomHomeservers = false;
|
||||
};
|
||||
elementConfigFile = pkgs.writeText "element-config.json" elementConfig;
|
||||
cinnyConfigFile = pkgs.writeText "cinny-config.json" cinnyConfig;
|
||||
in {
|
||||
sops = {
|
||||
secrets."tuwunel/client_id" = {
|
||||
@@ -78,9 +71,10 @@ in {
|
||||
reverse_proxy /_matrix/* localhost:${toString port}
|
||||
handle_path /config.json {
|
||||
file_server
|
||||
root ${elementConfigFile}
|
||||
root ${cinnyConfigFile}
|
||||
}
|
||||
root * ${pkgs.element-web}
|
||||
root * ${pkgs.cinny}
|
||||
try_files {path} / index.html
|
||||
file_server
|
||||
'';
|
||||
"${base_domain}".extraConfig = ''
|
||||
|
||||
Reference in New Issue
Block a user