42 current 2025-10-05 09:48:02 25.05.20251001.5b5be50 6.12.49 *

This commit is contained in:
2025-10-05 09:48:30 -05:00
parent b145d407cc
commit dc1b79e4dc
3 changed files with 55 additions and 48 deletions

View File

@@ -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";
};
}
];
};
};
};
}

View File

@@ -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";
};
};
}

View File

@@ -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;