switch to headscale experimental flake

This commit is contained in:
Nickiel12 2023-12-02 18:17:10 -08:00
parent 2a92cc7270
commit c14db34fb6
3 changed files with 94 additions and 24 deletions

View file

@ -152,6 +152,30 @@
"type": "github" "type": "github"
} }
}, },
"headscale": {
"inputs": {
"flake-utils": [
"utils"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1701336075,
"narHash": "sha256-1AN5KGL42BwBNkJMjS2ZDcd/CT/AtH1BkT+azHMI5NY=",
"owner": "kradalby",
"repo": "headscale",
"rev": "bbb4c357268998fd02780b7f8f2013f76e3ab80a",
"type": "github"
},
"original": {
"owner": "kradalby",
"repo": "headscale",
"rev": "bbb4c357268998fd02780b7f8f2013f76e3ab80a",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -431,12 +455,14 @@
"root": { "root": {
"inputs": { "inputs": {
"ewwtilities": "ewwtilities", "ewwtilities": "ewwtilities",
"headscale": "headscale",
"home-manager": "home-manager", "home-manager": "home-manager",
"kmonad": "kmonad", "kmonad": "kmonad",
"nicks_nextcloud_integrations": "nicks_nextcloud_integrations", "nicks_nextcloud_integrations": "nicks_nextcloud_integrations",
"nixpkgs": "nixpkgs_6", "nixpkgs": "nixpkgs_6",
"nixpkgs-stable": "nixpkgs-stable", "nixpkgs-stable": "nixpkgs-stable",
"nixvim": "nixvim" "nixvim": "nixvim",
"utils": "utils_2"
} }
}, },
"rust-overlay": { "rust-overlay": {
@ -537,6 +563,21 @@
"type": "github" "type": "github"
} }
}, },
"systems_5": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": { "utils": {
"locked": { "locked": {
"lastModified": 1678901627, "lastModified": 1678901627,
@ -551,6 +592,24 @@
"repo": "flake-utils", "repo": "flake-utils",
"type": "github" "type": "github"
} }
},
"utils_2": {
"inputs": {
"systems": "systems_5"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -2,11 +2,19 @@
description = "Nick's NixOS Configuration"; description = "Nick's NixOS Configuration";
inputs = { inputs = {
utils.url = "github:numtide/flake-utils";
nixvim.url = "github:nix-community/nixvim"; nixvim.url = "github:nix-community/nixvim";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; 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"; kmonad.url = "github:kmonad/kmonad?dir=nix";
headscale = {
url = "github:kradalby/headscale/bbb4c357268998fd02780b7f8f2013f76e3ab80a";
# url = "github:juanfont/headscale"; # Real repo
inputs."flake-utils".follows = "utils";
inputs.nixpkgs.follows = "nixpkgs";
};
nicks_nextcloud_integrations.url = "git+https://git.nickiel.net/Nickiel/nicks_nextcloud_integrations.git"; nicks_nextcloud_integrations.url = "git+https://git.nickiel.net/Nickiel/nicks_nextcloud_integrations.git";
ewwtilities.url = "git+https://git.nickiel.net/Nickiel/Ewwtilities.git"; ewwtilities.url = "git+https://git.nickiel.net/Nickiel/Ewwtilities.git";
@ -18,12 +26,29 @@
}; };
outputs = inputs@{ self, nixpkgs, nixpkgs-stable, home-manager, ewwtilities, kmonad, ... }: outputs = inputs@{
self,
nixpkgs,
nixpkgs-stable,
headscale,
home-manager,
ewwtilities,
kmonad,
...
}:
let let
user = "nixolas"; user = "nixolas";
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system;
overlays = [
headscale.overlay
];
config.allowUnfree = true;
};
pkgs-stable = import nixpkgs-stable {
inherit system; inherit system;
config.allowUnfree = true; config.allowUnfree = true;
}; };
@ -31,16 +56,14 @@
lib = nixpkgs.lib; lib = nixpkgs.lib;
in { in {
nixosConfigurations = { nixosConfigurations = {
inherit (nixpkgs) lib; inherit lib;
inherit inputs home-manager user kmonad;
# Home server # Home server
Alaska = lib.nixosSystem { Alaska = lib.nixosSystem {
inherit system; inherit system;
specialArgs = { specialArgs = {
inherit user; inherit user pkgs pkgs-stable;
pkgs-stable = inputs.nixpkgs-stable;
}; };
modules = [ modules = [
@ -55,11 +78,7 @@
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
extraSpecialArgs = { extraSpecialArgs = {
inherit user ewwtilities; inherit user ewwtilities pkgs-stable;
pkgs-stable = import inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
};
}; };
users.${user} = { users.${user} = {
imports = [ imports = [
@ -76,7 +95,7 @@
NicksNixLaptop = lib.nixosSystem { NicksNixLaptop = lib.nixosSystem {
inherit system; inherit system;
specialArgs = { specialArgs = {
inherit user; inherit user pkgs;
}; };
modules = [ modules = [
@ -92,11 +111,7 @@
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
extraSpecialArgs = { extraSpecialArgs = {
inherit user ewwtilities; inherit user ewwtilities pkgs-stable;
pkgs-stable = import inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
};
}; };
users.${user} = { users.${user} = {
imports = [ imports = [
@ -128,11 +143,7 @@
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
extraSpecialArgs = { extraSpecialArgs = {
inherit user ewwtilities; inherit user ewwtilities pkgs-stable;
pkgs-stable = import inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
};
}; };
users.${user} = { users.${user} = {
imports = [ imports = [

View file

@ -3,10 +3,10 @@
let let
moz_overlay = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz); moz_overlay = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz);
nixpkgs = import <nixpkgs> { rustpkgs = import pkgs {
overlays = [ moz_overlay ]; overlays = [ moz_overlay ];
}; };
ruststable = (nixpkgs.latest.rustChannels.stable.rust.override { ruststable = (rustpkgs.latest.rustChannels.stable.rust.override {
extensions = [ "rust-src" "rust-analysis" ];} extensions = [ "rust-src" "rust-analysis" ];}
); );