Files
nix-config/home/home.nix

87 lines
2.2 KiB
Nix

{
config,
pkgs,
lib,
...
}: let
in {
# home.packages = builtins.attrValues scriptDerivations;
home.username = "synchronous";
home.homeDirectory = "/home/synchronous";
imports = [
./programs/programs.nix
./services/services.nix
./wallpapers/default.nix
./fonts/default.nix # need to manage fonts in two places becuase life sucks nix sucks
];
# home.activation.copyScripts = lib.mkAfter ''
# mkdir -p ~/.scripts
# cp ${./nixos-rebuild.sh} ~/.scripts/
# chmod -R u+w ~/.scripts/
# '';
home.stateVersion = "24.11"; # Please read the comment before changing.
# age.secrets.zsh_remote.file = ../secrets/zsh_remote.age;
# age.secretsDir = "/home/synchronous/.agenix/agenix";
# age.secretsMountPoint = "/home/synchronous/.agenix/agenix.d";
# age.identityPaths = ["/home/synchronous/.ssh/id_ed25519"];
# home.packages = with pkgs; [xrandr procps polybar bspwm sxhkd polybar-pulseaudio-control bluez];
home.sessionVariables = {
EDITOR = "nvim";
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;
[
cachix
# any other packages go here
# xrandr
xorg.xrandr
bspwm
yt-dlp
beets
netcat
zathura
keepassxc
sshpass
mpv
jellyfin-ffmpeg
simple-mtpfs
signal-desktop
slack
]
++ (
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)
)
);
# home.file.".profile".text = ''
# if [ -f "$HOME/.scripts/res.sh" ]; then
# . "$HOME/.scripts/res.sh"
# fi
# '';
}