repl.nix
This commit is contained in:
parent
40321bea75
commit
b58b512538
7 changed files with 65 additions and 16 deletions
18
flake.lock
generated
18
flake.lock
generated
|
@ -340,11 +340,11 @@
|
|||
"utils": "utils_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1667574732,
|
||||
"narHash": "sha256-73TVk3uSQOja6Q/5OuNcpcqwo6+SMzJPRtYAjU0rBx4=",
|
||||
"lastModified": 1667691670,
|
||||
"narHash": "sha256-9MgKg5LbTRuZ6oonP49go4jcUzkTOhVD3ZnQsi9aWM0=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "b764068a506c6f70dba998efa0e7fcb99cb4deb2",
|
||||
"rev": "c5adf29545b553089ccf9c28b68973ce6f812c1c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -359,11 +359,11 @@
|
|||
"wlroots": "wlroots"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1667671515,
|
||||
"narHash": "sha256-jdhA2R+Ezam6R++BYId1jwdvgZn6VZDnG4oEK+R8KIQ=",
|
||||
"lastModified": 1667673266,
|
||||
"narHash": "sha256-grIxeuXZjil9dj97/RW1Jhf+8dsCKfzop4PR2CqOrgo=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "Hyprland",
|
||||
"rev": "bee06f35073da245b71221897becc74260a5b51f",
|
||||
"rev": "976b44443ae1603699a5fc4ef1eb3c6e0f5886c8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -623,11 +623,11 @@
|
|||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1667550944,
|
||||
"narHash": "sha256-8qNYarOJtasZ/+G5mlNC2mh8VG5NagM6tSpK2Rq5hDk=",
|
||||
"lastModified": 1667683652,
|
||||
"narHash": "sha256-We3GMb6c+TRBj2Dvh5Hv/TFEZKejlvLAFg9Z3Ge3/dA=",
|
||||
"owner": "NULLx76",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "afc2d0fe2359d4f4eff4d003f41130ad52ab427e",
|
||||
"rev": "d5c95ef578f32febb1f7da817df1496336e82faa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -71,12 +71,16 @@
|
|||
};
|
||||
|
||||
# Script to apply local colmena deployments
|
||||
apply-local = pkgs.writeScriptBin "apply-local" ''
|
||||
#!${pkgs.stdenv.shell}
|
||||
apply-local = pkgs.writeShellScriptBin "apply-local" ''
|
||||
"${
|
||||
colmena.packages.${system}.colmena
|
||||
}"/bin/colmena apply-local --sudo $@
|
||||
'';
|
||||
|
||||
fast-repl = pkgs.writeShellScriptBin "fast-repl" ''
|
||||
source /etc/set-environment
|
||||
nix repl --file "${./.}/repl.nix" $@
|
||||
'';
|
||||
in {
|
||||
# Make the nixosConfigurations for compat reasons
|
||||
nixosConfigurations =
|
||||
|
@ -131,6 +135,7 @@
|
|||
vault
|
||||
(vault-push-approle-envs self { })
|
||||
(vault-push-approles self { })
|
||||
fast-repl
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -30,8 +30,7 @@ let
|
|||
|
||||
exec Hyprland
|
||||
'';
|
||||
in
|
||||
{
|
||||
in {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
|
@ -86,9 +85,7 @@ in
|
|||
loader.efi.canTouchEfiVariables = true;
|
||||
loader.efi.efiSysMountPoint = "/boot/efi";
|
||||
|
||||
kernel.sysctl = {
|
||||
"fs.inotify.max_user_watches" = 524288;
|
||||
};
|
||||
kernel.sysctl = { "fs.inotify.max_user_watches" = 524288; };
|
||||
};
|
||||
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
|
|
|
@ -23,6 +23,7 @@ in {
|
|||
btop
|
||||
calibre
|
||||
cinny-desktop
|
||||
discord-canary
|
||||
element-desktop-wayland
|
||||
fluxcd
|
||||
fusee-launcher
|
||||
|
|
|
@ -23,6 +23,9 @@
|
|||
enable = true;
|
||||
recommendedEnvironment = true;
|
||||
extraConfig = ''
|
||||
exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||
exec-once=systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||
|
||||
monitor=eDP-1,1920x1080@60,0x0,1
|
||||
monitor=eDP-1,addreserved,0,0,48,0
|
||||
monitor=,preferred,auto,1
|
||||
|
|
33
notes/ideas.md
Normal file
33
notes/ideas.md
Normal file
|
@ -0,0 +1,33 @@
|
|||
# 1. Add port info to hosts
|
||||
Re-use `hosts` setup and add domain and port information to each host
|
||||
```nix
|
||||
{
|
||||
hostname = "overseerr";
|
||||
ip = "192.168.0.105";
|
||||
mac = "8E:21:7F:88:3A:83";
|
||||
# new stuff
|
||||
exposes = {
|
||||
requests = {
|
||||
port = 3000;
|
||||
domain = "requests.xirion.net";
|
||||
port = 3000;
|
||||
};
|
||||
...
|
||||
};
|
||||
}
|
||||
```
|
||||
which then can get translated to nginx config:
|
||||
```nix
|
||||
virtualHosts."requests.xirion.net" = proxy "http://192.168.0.105:80";
|
||||
```
|
||||
|
||||
Ideally hosts should also be able to access their own host information more easily so
|
||||
that in service config one could use `thisHost.exposes.requests.port` or similar
|
||||
|
||||
# 2. Authoritative nameserver
|
||||
Using the definitions from (1), we can then also build authoritative DNS records
|
||||
by folding over `hosts[i].exposes.requests.domain` and collating that with its realm (and therefore external IP)
|
||||
|
||||
This also means I should probably put the external IP in some kind of meta block per realm.
|
||||
|
||||
[dns.nix](https://github.com/kirelagin/dns.nix) seems to be a nice DSL for DNS stuff
|
10
repl.nix
Normal file
10
repl.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
let
|
||||
flake = builtins.getFlake (toString ./.);
|
||||
nixpkgs = import <nixpkgs> { };
|
||||
in
|
||||
{ inherit flake; }
|
||||
// flake
|
||||
// builtins
|
||||
// nixpkgs
|
||||
// nixpkgs.lib
|
||||
// flake.nixosConfigurations
|
Loading…
Add table
Reference in a new issue