templates/home-manager/flake.nix
Samuel Shuert 3f3ac4306b
Initial work on creating sensible templates
Available templates include the following:
- system: flake based system similar to the default when starting
  nix.
- darwin: flake based darwin system with ajusted nixpkgs and modules to better suit it.
- home-manager: flake and home manager for non darwin systems.

Co-Authored-by: isabelroses <isabel@isabelroses.com>
Co-Authored-by: Skyler Grey <minion@clicks.codes>
Co-Authored-by: Sigmanificient <edhyjox@gmail.com>
Co-Authored-by: AxelSilverdew <7677954+AxelSilverdew@users.noreply.github.com>
2024-05-01 16:55:17 -04:00

41 lines
1.2 KiB
Nix

{
description = "A simple home-manager flake using Aux";
inputs = {
nixpkgs.url = "github:auxolotl/nixkpkgs/nixpkgs-unstable";
home-manager = {
url = "github:nix-community/home-manager";
# The `follows` keyword in inputs is used for inheritance.
# we do this in order to prevent duplication of the nixpkgs input, and potential
# issues with diffrent versions of given packages.
# However, it should be noted that this can lead to having to rebuild packages from source.
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{ nixpkgs, home-manager, ... }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
username = builtins.abort "You need to fill in your username"; # Set this variable equal to your username
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 ];
extraSpecialArgs = {
inherit username pkgs; # We inherit pkgs
};
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix
};
};
}