Files
nix-config/home/panotaka/common/core/default.nix

75 lines
1.4 KiB
Nix

#FIXME: Move attrs that will only work on linux to nixos.nix
{
config,
lib,
pkgs,
hostSpec,
...
}: let
platform =
if hostSpec.isDarwin
then "darwin"
else "nixos";
in {
imports = lib.flatten [
(map lib.custom.relativeToRoot [
"modules/common/host-spec.nix"
"modules/home"
])
./${platform}.nix
# FIXME(starter): add/edit as desired
./fonts.nix
./kitty.nix
./git.nix
./ssh.nix
./shell
];
inherit hostSpec;
services.ssh-agent.enable = true;
home = {
username = lib.mkDefault config.hostSpec.username;
homeDirectory = lib.mkDefault config.hostSpec.home;
stateVersion = lib.mkDefault "24.11";
sessionPath = [
"$HOME/.local/bin"
];
sessionVariables = {
FLAKE = "$HOME/src/nix/nix-config";
SHELL = "bash";
};
};
home.packages = with pkgs; [
# FIXME(starter): add/edit as desired
# Packages that don't have custom configs go here
curl
pciutils
pfetch # system info
pre-commit # git hooks
p7zip # compression & encryption
usbutils
unzip # zip extraction
unrar # rar extraction
];
nix = {
package = lib.mkDefault pkgs.nix;
settings = {
experimental-features = [
"nix-command"
"flakes"
];
warn-dirty = false;
};
};
programs.home-manager.enable = true;
# Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch";
}