tailscale: use unstable

This commit is contained in:
Motiejus Jakštys 2023-11-15 09:20:23 +02:00
parent 2ba1aa4435
commit 480ae45609
3 changed files with 41 additions and 6 deletions

View File

@ -176,6 +176,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-unstable": {
"locked": {
"lastModified": 1699781429,
"narHash": "sha256-UYefjidASiLORAjIvVsUHG6WBtRhM67kTjEY4XfZOFs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e44462d6021bfe23dfb24b775cc7c390844f773d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1699994922, "lastModified": 1699994922,
@ -234,6 +250,7 @@
"nix-index-database": "nix-index-database", "nix-index-database": "nix-index-database",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable",
"nur": "nur", "nur": "nur",
"pre-commit-hooks": "pre-commit-hooks", "pre-commit-hooks": "pre-commit-hooks",
"zigpkgs": "zigpkgs" "zigpkgs": "zigpkgs"

View File

@ -2,6 +2,8 @@
description = "motiejus/config"; description = "motiejus/config";
inputs = { inputs = {
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
flake-compat.url = "github:nix-community/flake-compat"; flake-compat.url = "github:nix-community/flake-compat";
@ -48,6 +50,7 @@
outputs = { outputs = {
self, self,
nixpkgs, nixpkgs,
nixpkgs-unstable,
agenix, agenix,
deploy-rs, deploy-rs,
flake-utils, flake-utils,
@ -76,6 +79,15 @@
}; };
deployPkgsIA64 = mkDeployPkgs "x86_64-linux"; deployPkgsIA64 = mkDeployPkgs "x86_64-linux";
deployPkgsArm64 = mkDeployPkgs "aarch64-linux"; deployPkgsArm64 = mkDeployPkgs "aarch64-linux";
mkOverlays = system: [
nur.overlay
zigpkgs.overlays.default
(_final: _prev: {
pkgs-unstable = import nixpkgs-unstable {
inherit system;
};
})
];
in in
{ {
#nixosConfigurations.vm = nixpkgs.lib.nixosSystem { #nixosConfigurations.vm = nixpkgs.lib.nixosSystem {
@ -88,9 +100,10 @@
# specialArgs = {inherit myData;} // inputs; # specialArgs = {inherit myData;} // inputs;
#}; #};
nixosConfigurations.vno1-oh2 = nixpkgs.lib.nixosSystem { nixosConfigurations.vno1-oh2 = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
{nixpkgs.overlays = mkOverlays system;}
./hosts/vno1-oh2/configuration.nix ./hosts/vno1-oh2/configuration.nix
./modules ./modules
@ -119,11 +132,10 @@
specialArgs = {inherit myData;} // inputs; specialArgs = {inherit myData;} // inputs;
}; };
nixosConfigurations.fwminex = nixpkgs.lib.nixosSystem { nixosConfigurations.fwminex = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
# TODO make this generic {nixpkgs.overlays = mkOverlays system;}
{nixpkgs.overlays = [nur.overlay zigpkgs.overlays.default];}
./hosts/fwminex/configuration.nix ./hosts/fwminex/configuration.nix
./modules ./modules
@ -145,8 +157,10 @@
specialArgs = {inherit myData;} // inputs; specialArgs = {inherit myData;} // inputs;
}; };
nixosConfigurations.vno3-rp3b = nixpkgs.lib.nixosSystem { nixosConfigurations.vno3-rp3b = nixpkgs.lib.nixosSystem rec {
system = "aarch64-linux";
modules = [ modules = [
{nixpkgs.overlays = mkOverlays system;}
./hosts/vno3-rp3b/configuration.nix ./hosts/vno3-rp3b/configuration.nix
./modules ./modules
@ -166,8 +180,10 @@
specialArgs = {inherit myData;} // inputs; specialArgs = {inherit myData;} // inputs;
}; };
nixosConfigurations.fra1-a = nixpkgs.lib.nixosSystem { nixosConfigurations.fra1-a = nixpkgs.lib.nixosSystem rec {
system = "aarch64-linux";
modules = [ modules = [
{nixpkgs.overlays = mkOverlays system;}
./hosts/fra1-a/configuration.nix ./hosts/fra1-a/configuration.nix
./modules ./modules

View File

@ -2,6 +2,7 @@
config, config,
lib, lib,
myData, myData,
pkgs,
... ...
}: let }: let
cfg = config.mj.services.tailscale; cfg = config.mj.services.tailscale;
@ -19,6 +20,7 @@ in {
config = mkIf cfg.enable (mkMerge [ config = mkIf cfg.enable (mkMerge [
{ {
services.tailscale.enable = true; services.tailscale.enable = true;
services.tailscale.package = pkgs.pkgs-unstable.tailscale;
networking.firewall.checkReversePath = "loose"; networking.firewall.checkReversePath = "loose";
networking.firewall.allowedUDPPorts = [myData.ports.tailscale]; networking.firewall.allowedUDPPorts = [myData.ports.tailscale];
} }