add basic home-manager configuration

This commit is contained in:
akulij 2025-02-15 16:50:07 +00:00
parent 8b9f9eb4ae
commit 36d841eeeb
3 changed files with 55 additions and 1 deletions

21
flake.lock generated
View File

@ -20,6 +20,26 @@
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1739571712,
"narHash": "sha256-0UdSDV/TBY+GuxXLbrLq3l2Fq02ciyKCIMy4qmnfJXQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "6d3163aea47fdb1fe19744e91306a2ea4f602292",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1739019272,
@ -39,6 +59,7 @@
"root": {
"inputs": {
"disko": "disko",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}
}

View File

@ -6,15 +6,31 @@
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, disko, ... }:
outputs = { nixpkgs, disko, home-manager, ... }:
{
nixosConfigurations.pc = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
disko.nixosModules.disko
./hosts/pc/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
# TODO replace akulij with your own username
home-manager.users.akulij = import ./users/akulij/home.nix;
# Optionally, use home-manager.extraSpecialArgs to pass arguments to home.nix
}
];
};
};

17
users/akulij/home.nix Normal file
View File

@ -0,0 +1,17 @@
{ config, pkgs, ... }:
{
home.username = "akulij";
home.homeDirectory = "/home/akulij";
programs.git = {
enable = true;
userName = "akulij";
userEmail = "aakulij@gmail.com";
};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
home.stateVersion = "24.11"; # Please read the comment before changing.
}