From b8ada4438f266ba72adf03950ad3a0382d514cd1 Mon Sep 17 00:00:00 2001 From: Nickiel12 Date: Sun, 3 Dec 2023 14:07:13 -0800 Subject: [PATCH] switched to headscale flake --- flake.lock | 12 ++++++------ flake.nix | 19 +++++++------------ hosts/Alaska/default.nix | 3 ++- hosts/Alaska/modules/headscale.nix | 3 ++- 4 files changed, 17 insertions(+), 20 deletions(-) diff --git a/flake.lock b/flake.lock index 394d3e6..e9b6606 100644 --- a/flake.lock +++ b/flake.lock @@ -162,17 +162,17 @@ ] }, "locked": { - "lastModified": 1701336075, - "narHash": "sha256-1AN5KGL42BwBNkJMjS2ZDcd/CT/AtH1BkT+azHMI5NY=", - "owner": "kradalby", + "lastModified": 1683878976, + "narHash": "sha256-nqmTqe3F3Oh8rnJH0clwACD/0RpqmfOMXNubr3C8rEc=", + "owner": "juanfont", "repo": "headscale", - "rev": "bbb4c357268998fd02780b7f8f2013f76e3ab80a", + "rev": "b01f1f1867136d9b2d7b1392776eb363b482c525", "type": "github" }, "original": { - "owner": "kradalby", + "owner": "juanfont", "repo": "headscale", - "rev": "bbb4c357268998fd02780b7f8f2013f76e3ab80a", + "rev": "b01f1f1867136d9b2d7b1392776eb363b482c525", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 3eff28e..e914ab0 100644 --- a/flake.nix +++ b/flake.nix @@ -5,11 +5,14 @@ utils.url = "github:numtide/flake-utils"; nixvim.url = "github:nix-community/nixvim"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - nixpkgs-stable.url = "github:NixOS/nixpkgs/release-23.05"; + nixpkgs-stable = { + url = "github:NixOS/nixpkgs/release-23.05"; + }; kmonad.url = "github:kmonad/kmonad?dir=nix"; headscale = { - url = "github:kradalby/headscale/bbb4c357268998fd02780b7f8f2013f76e3ab80a"; + # url = "github:kradalby/headscale/bbb4c357268998fd02780b7f8f2013f76e3ab80a"; + url = "github:juanfont/headscale/b01f1f1867136d9b2d7b1392776eb363b482c525"; # url = "github:juanfont/headscale"; # Real repo inputs."flake-utils".follows = "utils"; inputs.nixpkgs.follows = "nixpkgs"; @@ -40,14 +43,6 @@ user = "nixolas"; system = "x86_64-linux"; - pkgs = import nixpkgs { - inherit system; - overlays = [ - headscale.overlay - ]; - config.allowUnfree = true; - }; - pkgs-stable = import nixpkgs-stable { inherit system; config.allowUnfree = true; @@ -63,7 +58,7 @@ Alaska = lib.nixosSystem { inherit system; specialArgs = { - inherit user pkgs pkgs-stable; + inherit user headscale pkgs-stable; }; modules = [ @@ -95,7 +90,7 @@ NicksNixLaptop = lib.nixosSystem { inherit system; specialArgs = { - inherit user pkgs; + inherit user; }; modules = [ diff --git a/hosts/Alaska/default.nix b/hosts/Alaska/default.nix index cbe92c4..3b47d32 100644 --- a/hosts/Alaska/default.nix +++ b/hosts/Alaska/default.nix @@ -1,5 +1,5 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, headscale, ... }: { @@ -33,6 +33,7 @@ }; }; + # headscale dns is handled by dnsmasq networking.hosts = { "100.64.0.1" = ["files.nickiel.net" "git.nickiel.net" "nickiel.net" "jellyfin.nickiel.net" ]; }; diff --git a/hosts/Alaska/modules/headscale.nix b/hosts/Alaska/modules/headscale.nix index 35a93ab..73b6033 100644 --- a/hosts/Alaska/modules/headscale.nix +++ b/hosts/Alaska/modules/headscale.nix @@ -1,4 +1,4 @@ -{ config, ... }: +{ config, headscale, ... }: let tailscale_dns_entries = import ./dns.nix; @@ -13,6 +13,7 @@ in { # https://carjorvaz.com/posts/setting-up-headscale-on-nixos/ services.headscale = { + package = headscale.packages."x86_64-linux".headscale; enable = true; address = "0.0.0.0"; port = 8082;