Refactor codebase to use nix modules

This commit is contained in:
Julia Lange 2024-04-14 05:40:02 -07:00
parent a4735423b4
commit ffada2703c
114 changed files with 1018 additions and 744 deletions

View file

@ -0,0 +1,22 @@
{ config, pkgs, lib, ... }:
let rootPath = ./.; in
{
options.xonsh = {
enable = lib.mkEnableOption "Enables xonsh";
};
config = lib.mkIf config.xonsh.enable {
home.packages = with pkgs; [
xonsh
];
home.sessionVariables = {
PROMPT = "τ ";
RIGHT_PROMPT = "{YELLOW}{gitstatus: {} }{BLUE}{short_cwd}{DEFAULT}";
VI_MODE = 1;
};
xdg.configFile."xonshrc" = {
source = rootPath + "/rc.xsh";
target = "xonsh/rc.xsh";
};
};
}

View file

@ -0,0 +1,7 @@
#!/usr/bin/env xonsh
if $XONSH_INTERACTIVE:
if '__HM_SESS_VARS_SOURCED' in ${...}:
del $__HM_SESS_VARS_SOURCED
source-bash "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" --suppress-skip-message
cat "$HOME/.cache/wallust/sequences"