Files
nixos-server/home/home.nix
T
2026-04-11 01:25:42 -04:00

52 lines
1.2 KiB
Nix

{
config,
pkgs,
lib,
...
}: {
home.username = "synchronous";
home.homeDirectory = "/home/synchronous";
home.stateVersion = "25.11";
imports = [
./programs/programs.nix
];
home.sessionVariables = {
EDITOR = "nvim";
SHELL = "/etc/profiles/per-user/synchronous/bin/zsh"; # just zsh no longer works?
HOME = "/home/synchronous";
# XDG_CACHE_HOME = "$HOME/.cache";
DBUS_SESSION_BUS_ADDRESS = "unix:path=$XDG_RUNTIME_DIR/bus";
};
programs.home-manager.enable = true;
home.packages = with pkgs;
[
netcat
git
# neovim
firefox
]
++ (
with lib; let
# this function extracts the base file name from a path.
basename = path: lib.lists.last (lib.strings.splitString "/" (toString path));
files = lib.filesystem.listFilesRecursive ./scripts;
in
# for each script found, create a derivation installed in $PATH
lib.lists.forEach files (
file: let
scriptName = strings.removeSuffix ".sh" (basename file);
in
pkgs.writeScriptBin
# (basename file) # the new package's name
scriptName
(builtins.readFile file)
)
);
}