Create own flake for emacs

This commit is contained in:
Tobias Ostner 2025-04-21 17:53:35 +02:00
parent 75be932b45
commit 98c77fe32e
11 changed files with 174 additions and 129 deletions

View file

@ -4,10 +4,11 @@
, username
, email
, hostname
, extraHomeManagerModules ? [ ]
}:
let
system-config = import ../module/configuration.nix { inherit hostname; };
home-manager-config = import ../module/home-manager.nix { inherit email; };
systemConfig = import ../module/configuration.nix { inherit hostname; };
homeManagerConfig = import ../module/home-manager.nix { inherit email; };
in
inputs.darwin.lib.darwinSystem {
inherit system;
@ -17,13 +18,16 @@ inputs.darwin.lib.darwinSystem {
users.users.${username}.home = "/Users/${username}";
}
system-config
systemConfig
inputs.home-manager.darwinModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users."${username}" = home-manager-config;
home-manager.users."${username}" =
inputs.nixpkgs.lib.modules.mkMerge (
[ homeManagerConfig ] ++ extraHomeManagerModules
);
home-manager.backupFileExtension = "backup";
}
];