initial commit

This commit is contained in:
John Lancaster
2025-06-30 14:30:49 -05:00
commit 83e2f6c0f8
2 changed files with 127 additions and 0 deletions

51
flake.nix Normal file
View File

@@ -0,0 +1,51 @@
{
description = "Home Manager configuration of john";
inputs = {
# Specify the source of Home Manager and Nixpkgs.
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{ nixpkgs, home-manager, ... }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
lib = pkgs.lib;
# Define a module that contains the user option
userModule = { config, ... }: {
options.user = lib.mkOption {
type = lib.types.str;
description = "The username for the Home Manager configuration.";
default = "john";
};
};
# Evaluate the module to get the config
moduleEval = lib.evalModules {
modules = [ userModule ];
};
username = moduleEval.config.user;
in
{
homeConfigurations.${username} = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [
./home.nix
userModule # Include the user module in Home Manager modules too
];
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix
};
};
}