From dc1b79e4dc238e62039f7264663533bc454540b8 Mon Sep 17 00:00:00 2001 From: blake Date: Sun, 5 Oct 2025 09:48:30 -0500 Subject: [PATCH] 42 current 2025-10-05 09:48:02 25.05.20251001.5b5be50 6.12.49 * --- flake.nix | 85 +++++++++++++++++++----------------- modules/system/tailscale.nix | 4 +- users/blake/blake.nix | 14 +++--- 3 files changed, 55 insertions(+), 48 deletions(-) diff --git a/flake.nix b/flake.nix index 2fd9124..1f70789 100644 --- a/flake.nix +++ b/flake.nix @@ -1,49 +1,54 @@ # flake for blakes nixos config # define new devices in outputs -# generation: 41 current 2025-10-04 18:43:12 25.05.20251001.5b5be50 6.12.49 * +# generation: 42 current 2025-10-05 09:48:02 25.05.20251001.5b5be50 6.12.49 * { - description = "blakes nix config"; - inputs = { - nixpkgs.url = "nixpkgs/nixos-25.05"; - home-manager = { - url = "github:nix-community/home-manager/release-25.05"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + description = "blakes nix config"; + inputs = { + nixpkgs.url = "nixpkgs/nixos-25.05"; + home-manager = { + url = "github:nix-community/home-manager/release-25.05"; + inputs.nixpkgs.follows = "nixpkgs"; }; - - outputs = { self, nixpkgs, home-manager, ... }: { - nixosConfigurations.snowbelle = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - ./hosts/snowbelle/configuration.nix - home-manager.nixosModules.home-manager - { - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - users.blake = import ./users/blake/home.nix; - backupFileExtension = "backup"; - }; - } - ]; + }; + + outputs = { self, nixpkgs, home-manager, ... }@inputs: + let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + in + { + nixosConfigurations = { + snowbelle = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs; }; + modules = [ + ./hosts/snowbelle/configuration.nix + home-manager.nixosModules.home-manager + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users.blake = import ./users/blake/home.nix; + backupFileExtension = "hmbak"; + }; + } + ]; }; - nixosConfigurations.vaniville = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - ./hosts/vaniville/configuration.nix - home-manager.nixosModules.home-manager - { - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - users.blake = import ./users/blake/home.nix; - backupFileExtension = "backup"; - }; - } - ]; + vaniville = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs; }; + modules = [ + ./hosts/vaniville/configuration.nix + home-manager.nixosModules.home-manager + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users.blake = import ./users/blake/home.nix; + backupFileExtension = "hmbak"; + }; + } + ]; }; - + }; }; - } diff --git a/modules/system/tailscale.nix b/modules/system/tailscale.nix index 00d9187..43b4350 100644 --- a/modules/system/tailscale.nix +++ b/modules/system/tailscale.nix @@ -8,8 +8,8 @@ config = lib.mkIf config.modules.system.tailscale.enable { services.tailscale = { enable = true; - }; useRoutingFeatures = "both"; - #authKeyFile = "/home/blake/.nix/.keyring/tailscale/tailscale_authfile"; + authKeyFile = "/home/blake/.nix/.keyring/tailscale/tailscale_authfile"; }; + }; } diff --git a/users/blake/blake.nix b/users/blake/blake.nix index 1ebd671..97a1911 100644 --- a/users/blake/blake.nix +++ b/users/blake/blake.nix @@ -1,10 +1,12 @@ { config, lib, pkgs, ... }: +let + cfg = config.users.blake; +in { - - options = { - users.blake.enable = lib.mkEnableOption "enable blake user"; - users.blake.username = lib.mkOption { + options.users.blake = { + enable = lib.mkEnableOption "enable blake user"; + username = lib.mkOption { default = "blake"; description = '' username @@ -13,9 +15,9 @@ }; - config = lib.mkIf config.users.blake.enable { + config = lib.mkIf cfg.enable { # create blake user - users.users.${config.users.blake.username} = { + users.users.${cfg.username} = { isNormalUser = true; extraGroups = [ "wheel" "networkmanager" "docker" ]; # Enable ‘sudo’ for the user. uid = 1000;