chore: move user config to home-manager

This commit is contained in:
2025-11-16 16:57:16 +01:00
parent 5f336d9b53
commit ff7fc44a3b
3 changed files with 96 additions and 8 deletions

26
flake.lock generated
View File

@@ -1,16 +1,37 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1758463745,
"narHash": "sha256-uhzsV0Q0I9j2y/rfweWeGif5AWe0MGrgZ/3TjpDYdGA=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "3b955f5f0a942f9f60cdc9cacb7844335d0f21c3",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-25.05",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1763049705,
"narHash": "sha256-A5LS0AJZ1yDPTa2fHxufZN++n8MCmtgrJDtxFxrH4S8=",
"owner": "NixOS",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "3acb677ea67d4c6218f33de0db0955f116b7588c",
"type": "github"
},
"original": {
"owner": "NixOS",
"owner": "nixos",
"ref": "nixos-25.05",
"repo": "nixpkgs",
"type": "github"
@@ -18,6 +39,7 @@
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}
}

View File

@@ -2,14 +2,30 @@
description = "0x29a NixOS flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
nixpkgs = {
url = "github:nixos/nixpkgs/nixos-25.05";
};
home-manager = {
url = "github:nix-community/home-manager/release-25.05";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, ... }@inputs: {
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
modules = [
./configuration.nix
];
outputs = inputs@{ nixpkgs, home-manager, ... }: {
nixosConfigurations = {
nixos = nixpkgs.lib.nixosSystem {
modules = [
./configuration.nix
# make home-manager a module of nixos
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.aaron = import ./home.nix;
}
];
};
};
};
}

50
home.nix Normal file
View File

@@ -0,0 +1,50 @@
{ config, pkgs, ... }:
{
# user config
home.username = "aaron";
home.homeDirectory = "/home/aaron";
# Packages that should be installed to the user profile
home.packages = with pkgs; [
fastfetch
zip
xz
unzip
p7zip
jq
mtr
iperf3
dnsutils
ldns
socat
nmap
cowsay
file
which
tree
zstd
gnupg
btop
iotop
iftop
strace
ltrace
lsof
sysstat
lm_sensors
ethtool
pciutils
usbutils
];
# configure git
programs.git = {
enable = true;
userName = "aaron";
userEmail = "aaron@0x29a.ch";
};
# starting version
home.stateVersion = "25.05";
}