Compare commits
2 commits
4a2eed4785
...
f98ed62e27
Author | SHA1 | Date | |
---|---|---|---|
f98ed62e27 | |||
2d950fe541 |
4 changed files with 195 additions and 38 deletions
46
devices/oksys/default.nix
Normal file
46
devices/oksys/default.nix
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
{...}: {
|
||||||
|
imports = [
|
||||||
|
#./hardware-configuration.nix
|
||||||
|
|
||||||
|
../../modules/tailscale.nix
|
||||||
|
|
||||||
|
./modules/headscale.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
services.device-vars = {
|
||||||
|
username = "matt";
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users.matt = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
"adm"
|
||||||
|
"mlocate"
|
||||||
|
"headscale"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
home-manager.users = {
|
||||||
|
matt = {
|
||||||
|
imports = [];
|
||||||
|
|
||||||
|
# No touchy
|
||||||
|
home.stateVersion = "24.05";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
hostName = "oksys";
|
||||||
|
networkmanager = {
|
||||||
|
enable = true;
|
||||||
|
wifi.backend = "wpa_supplicant";
|
||||||
|
};
|
||||||
|
firewall.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "America/Montreal";
|
||||||
|
|
||||||
|
# No touchy
|
||||||
|
system.stateVersion = "24.05";
|
||||||
|
}
|
51
devices/oksys/modules/headscale.nix
Normal file
51
devices/oksys/modules/headscale.nix
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
{
|
||||||
|
headscale,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
environment.systemPackages = [
|
||||||
|
headscale.packages.${pkgs.system}.headscale
|
||||||
|
];
|
||||||
|
|
||||||
|
services.headscale = {
|
||||||
|
enable = true;
|
||||||
|
package = headscale.packages.${pkgs.system}.headscale;
|
||||||
|
|
||||||
|
address = "127.0.0.1";
|
||||||
|
port = 8085;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
server_url = "https://headscale.nelim.org";
|
||||||
|
ip_prefixes = ["100.64.0.0/10"];
|
||||||
|
metrics_listen_addr = "127.0.0.1:9090";
|
||||||
|
grpc_listen_addr = "0.0.0.0:50443";
|
||||||
|
grpc_allow_insecure = false;
|
||||||
|
disable_check_updates = true;
|
||||||
|
|
||||||
|
db_type = "sqlite3";
|
||||||
|
db_path = "/var/lib/headscale/db.sqlite";
|
||||||
|
private_key_path = "/var/lib/headscale/private.key";
|
||||||
|
noise.private_key_path = "/var/lib/headscale/noise_private.key";
|
||||||
|
|
||||||
|
dns_config = {
|
||||||
|
magic_dns = false;
|
||||||
|
override_local_dns = true;
|
||||||
|
nameservers = ["100.64.0.1"];
|
||||||
|
};
|
||||||
|
|
||||||
|
derp = {
|
||||||
|
urls = [];
|
||||||
|
|
||||||
|
server = {
|
||||||
|
enabled = true;
|
||||||
|
stun_listen_addr = "0.0.0.0:3479";
|
||||||
|
private_key_path = "/var/lib/headscale/derp_server_private.key";
|
||||||
|
|
||||||
|
region_id = 995;
|
||||||
|
region_code = "mon";
|
||||||
|
region_name = "montreal";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
131
flake.lock
131
flake.lock
|
@ -192,14 +192,14 @@
|
||||||
},
|
},
|
||||||
"flake-utils_2": {
|
"flake-utils_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_3"
|
"systems": "systems_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1685518550,
|
"lastModified": 1694529238,
|
||||||
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
|
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
|
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -213,11 +213,11 @@
|
||||||
"systems": "systems_4"
|
"systems": "systems_4"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1694529238,
|
"lastModified": 1685518550,
|
||||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -244,6 +244,45 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-utils_5": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems_6"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1694529238,
|
||||||
|
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"headscale": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils_2",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1701106372,
|
||||||
|
"narHash": "sha256-G/vY0sIjs4JQoBSDDV+4OrNJlNtesxwSIFlBtPp5DJM=",
|
||||||
|
"owner": "juanfont",
|
||||||
|
"repo": "headscale",
|
||||||
|
"rev": "85e92db505b3217d45f248c339972cf7ad169d51",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "juanfont",
|
||||||
|
"repo": "headscale",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"hercules-ci-effects": {
|
"hercules-ci-effects": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts_2",
|
"flake-parts": "flake-parts_2",
|
||||||
|
@ -312,7 +351,7 @@
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"systems": "systems_2",
|
"systems": "systems_3",
|
||||||
"wlroots": "wlroots",
|
"wlroots": "wlroots",
|
||||||
"xdph": "xdph"
|
"xdph": "xdph"
|
||||||
},
|
},
|
||||||
|
@ -357,7 +396,7 @@
|
||||||
},
|
},
|
||||||
"lib-aggregate": {
|
"lib-aggregate": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_3",
|
"flake-utils": "flake-utils_4",
|
||||||
"nixpkgs-lib": "nixpkgs-lib_3"
|
"nixpkgs-lib": "nixpkgs-lib_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -400,7 +439,7 @@
|
||||||
},
|
},
|
||||||
"neovim-flake_2": {
|
"neovim-flake_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_2",
|
"flake-utils": "flake-utils_3",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"neovim-flake",
|
"neovim-flake",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
|
@ -544,11 +583,11 @@
|
||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1701200459,
|
"lastModified": 1701216885,
|
||||||
"narHash": "sha256-Kgz1V2REFAeiEmNVQ5m7XubQoxst2e+L4g11MM/2xK4=",
|
"narHash": "sha256-O3eB154BtGwYv2uQPCrekK0zEyx8KI6vvMLsQyzWct4=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nix-melt",
|
"repo": "nix-melt",
|
||||||
"rev": "5c626e9880b1a14ae07690aea33877c31c4e4d1f",
|
"rev": "4ca0f9248bed9f9f85a89adf684ae487e8494967",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -679,11 +718,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1700794826,
|
"lastModified": 1701068326,
|
||||||
"narHash": "sha256-RyJTnTNKhO0yqRpDISk03I/4A67/dp96YRxc86YOPgU=",
|
"narHash": "sha256-vmMceA+q6hG1yrjb+MP8T0YFDQIrW3bl45e7z24IEts=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5a09cb4b393d58f9ed0d9ca1555016a8543c2ac8",
|
"rev": "8cfef6986adfb599ba379ae53c9f5631ecd2fd9c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -743,11 +782,11 @@
|
||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1701203997,
|
"lastModified": 1701223432,
|
||||||
"narHash": "sha256-p7u4S+JyqeSY69RoMxYH4G2z8VWBTw2AHt0M/DMa8o8=",
|
"narHash": "sha256-mp7k/+KLC7VlxMLMgzoJoxZxO42txGJlL2gnx87xypw=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "c713d19b37b4ee88925a6fcf653a9f2af73e82e0",
|
"rev": "affe0f69f2dda1ffb7f00a5db5cfdf1173299b3d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -761,11 +800,11 @@
|
||||||
"nixpkgs": "nixpkgs_7"
|
"nixpkgs": "nixpkgs_7"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1701199500,
|
"lastModified": 1701222402,
|
||||||
"narHash": "sha256-hUaQG6hKL1L0AmOKhDfEn/ig//TfTpDqkqM1WQVGAIg=",
|
"narHash": "sha256-7yvQ5iNdn3rqShmMGf0PS53smaW8kM38TMkhFgEsnFA=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nurl",
|
"repo": "nurl",
|
||||||
"rev": "67a5e75e08d8abeadf86444722971915050946eb",
|
"rev": "66b80c8efaaa39c45ee67b9c3a3671498bf0f03d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -778,6 +817,7 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"ags": "ags",
|
"ags": "ags",
|
||||||
"coc-stylelintplus-flake": "coc-stylelintplus-flake",
|
"coc-stylelintplus-flake": "coc-stylelintplus-flake",
|
||||||
|
"headscale": "headscale",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"hyprgrass": "hyprgrass",
|
"hyprgrass": "hyprgrass",
|
||||||
"hyprland": "hyprland",
|
"hyprland": "hyprland",
|
||||||
|
@ -809,21 +849,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems_2": {
|
"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": {
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681028828,
|
"lastModified": 1681028828,
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
@ -838,6 +863,21 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"systems_3": {
|
||||||
|
"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_4": {
|
"systems_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681028828,
|
"lastModified": 1681028828,
|
||||||
|
@ -868,9 +908,24 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
},
|
||||||
"tree-sitter-hypr-flake": {
|
"tree-sitter-hypr-flake": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_4",
|
"flake-utils": "flake-utils_5",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
|
|
|
@ -12,6 +12,11 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
headscale = {
|
||||||
|
url = "github:juanfont/headscale";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
hyprland = {
|
hyprland = {
|
||||||
url = "github:hyprwm/Hyprland";
|
url = "github:hyprwm/Hyprland";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
Loading…
Reference in a new issue