home-manager: home-manager as a flake
This commit is contained in:
parent
0546709abf
commit
c73d42f070
|
@ -1,13 +1,9 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./platform.nix ];
|
||||
|
||||
home.stateVersion = "24.05";
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
home = {
|
||||
username = "pratham";
|
||||
packages = with pkgs; [
|
||||
gawk
|
||||
gnugrep
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
me = "pratham";
|
||||
in
|
||||
|
||||
{
|
||||
home.homeDirectory = "/Users/pratham";
|
||||
home.username = "${me}";
|
||||
home.homeDirectory = "/Users/${me}";
|
||||
|
||||
targets.darwin = {
|
||||
currentHostDefaults = {
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
inputs = {
|
||||
# a better way of using the latest stable version of nixpkgs
|
||||
# without specifying specific release
|
||||
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/*.tar.gz";
|
||||
home-manager.url = "github:nix-community/home-manager/release-23.11";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, flake-utils, ... }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
in
|
||||
{
|
||||
packages.homeConfigurations = {
|
||||
"pratham" = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules = [
|
||||
./home.nix
|
||||
(if pkgs.stdenv.isLinux then ./linux.nix else ./darwin.nix)
|
||||
{
|
||||
home.stateVersion = "23.11";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
|
@ -1,6 +1,10 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
me = "pratham";
|
||||
in
|
||||
|
||||
{
|
||||
home.homeDirectory = "/home/pratham";
|
||||
home.username = "${me}";
|
||||
home.homeDirectory = "/home/${me}";
|
||||
targets.genericLinux.enable = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue