feat: home-manager config files implemented

build not tested
This commit is contained in:
Sangmin Kim 2026-03-04 21:53:28 +09:00 committed by Poby
parent 248170c877
commit 54297f94fd
No known key found for this signature in database
44 changed files with 852 additions and 60 deletions

View file

@ -2,34 +2,47 @@
description = "Nix for Poby's MacOS";
nixConfig = {
substituters = [ "https://cache.nixos.org" ];
substituters = ["https://cache.nixos.org"];
};
inputs = let
stableVersion = "25.11"; # FIXME to bump to latest stable version
stableVersion = "25.11"; # FIXME to bump to latest stable version
in {
# nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-unstable"; # comment out for unstable version
nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-${stableVersion}-darwin";
home-manager = {
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs-darwin";
};
darwin = {
url = "github:lnl7/nix-darwin/nix-darwin-${stableVersion}";
inputs.nixpkgs.follows = "nixpkgs-darwin";
};
# NVF for neovim
nvf = {
url = "github:notashelf/nvf";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs @ {
self,
nixpkgs,
darwin,
home-manager,
nvf,
...
}: let
username = "poby";
system = "aarch64-darwin";
hostname = "fenrir"; # TODO break down to multiple hosts
username = "poby";
useremail = "smg981024@gmail.com";
hostname = "fenrir"; # TODO break down to multiple hosts
specialArgs =
inputs
// {
inherit username hostname;
inherit username useremail hostname;
};
in {
darwinConfigurations."${hostname}" = darwin.lib.darwinSystem {
@ -39,6 +52,16 @@
./modules/system.nix
./modules/apps.nix
./modules/host-users.nix
nvf.darwinModules.default
home-manager.darwinModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = specialArgs;
home-manager.users.${username} = import ./home;
}
];
};
formatter.${system} = nixpkgs.legacyPackages.${system}.alejandra;