103 lines
3.6 KiB
Nix
103 lines
3.6 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}:
|
|
with lib; let
|
|
psCfg = config.pub-solar;
|
|
xdg = config.home-manager.users."${psCfg.user.name}".xdg;
|
|
in {
|
|
imports = [
|
|
./session-variables.nix
|
|
];
|
|
|
|
home-manager = pkgs.lib.setAttrByPath ["users" psCfg.user.name] {
|
|
# Let Home Manager install and manage itself.
|
|
programs.home-manager.enable = true;
|
|
|
|
# Home Manager needs a bit of information about you and the
|
|
# paths it should manage.
|
|
home.username = psCfg.user.name;
|
|
home.homeDirectory = "/home/${psCfg.user.name}";
|
|
home.stateVersion = "22.11";
|
|
|
|
home.packages = with pkgs; [];
|
|
|
|
fonts.fontconfig.enable = mkForce true;
|
|
|
|
programs.dircolors.enable = true;
|
|
|
|
programs.less = {
|
|
enable = true;
|
|
keys = ''
|
|
k forw-line
|
|
i back-line
|
|
K forw-scroll
|
|
I back-scroll
|
|
'';
|
|
};
|
|
|
|
home.file."xinitrc".source = ./.xinitrc;
|
|
|
|
xdg.enable = true;
|
|
xdg.mime.enable = true;
|
|
xdg.mimeApps = import ./mimeapps.nix;
|
|
|
|
xdg.configFile."git/config".text = import ./.config/git/config.nix {
|
|
inherit config;
|
|
inherit pkgs;
|
|
};
|
|
xdg.configFile."git/gitmessage".text = import ./.config/git/gitmessage.nix {
|
|
inherit config;
|
|
inherit pkgs;
|
|
};
|
|
xdg.configFile."git/global_gitignore".text = import ./.config/git/global_gitignore.nix {
|
|
inherit config;
|
|
inherit pkgs;
|
|
};
|
|
xdg.configFile."dircolors".source = ./.config/dircolors;
|
|
xdg.configFile."xmodmap".source = ./.config/xmodmap;
|
|
xdg.configFile."user-dirs.dirs".source = ./.config/user-dirs.dirs;
|
|
xdg.configFile."user-dirs.locale".source = ./.config/user-dirs.locale;
|
|
xdg.configFile."xsettingsd/xsettingsd.conf".source = ./.config/xsettingsd/xsettingsd.conf;
|
|
xdg.configFile."mako/config".source = ./.config/mako/config;
|
|
xdg.configFile."libinput-gestures.conf".source = ./.config/libinput-gestures.conf;
|
|
xdg.configFile."waybar/config".source = ./.config/waybar/config;
|
|
xdg.configFile."waybar/style.css".source = ./.config/waybar/style.css;
|
|
xdg.configFile."waybar/colorscheme.css".source = ./.config/waybar/colorscheme.css;
|
|
xdg.configFile."mutt/muttrc".source = ./.config/mutt/muttrc;
|
|
xdg.configFile."mutt/base16.muttrc".source = ./.config/mutt/base16.muttrc;
|
|
xdg.configFile."mutt/mailcap".source = ./.config/mutt/mailcap;
|
|
xdg.configFile."offlineimap/functions.py".source = ./.config/offlineimap/functions.py;
|
|
xdg.configFile."wallpaper.jpg".source = ./assets/wallpaper.jpg;
|
|
|
|
# Ensure nvim backup directory gets created
|
|
# Workaround for E510: Can't make backup file (add ! to override)
|
|
xdg.dataFile."nvim/backup/.keep".text = "";
|
|
xdg.dataFile."nvim/json-schemas/.keep".text = "";
|
|
# Generated with:
|
|
# docker run -it --name caddy-json-schema registry.greenbaum.cloud/gc/caddy-l4:2.5.2 caddy json-schema -output /srv/caddy_schema.json
|
|
xdg.dataFile."nvim/json-schemas/caddy_schema.json".source = .local/share/nvim/json-schemas/caddy_schema.json;
|
|
xdg.dataFile."nvim/templates/.keep".text = "";
|
|
xdg.dataFile."scripts/.keep".text = "";
|
|
xdg.dataFile."scripts/base16.sh".source = .local/share/scripts/base16.sh;
|
|
xdg.dataFile."shell.nix.tmpl" = {
|
|
text = ''
|
|
let
|
|
unstable = import (fetchTarball https://github.com/nixos/nixpkgs/archive/nixos-unstable.tar.gz) { };
|
|
in
|
|
{ nixpkgs ? import <nixpkgs> {} }:
|
|
with nixpkgs; mkShell {
|
|
buildInputs = [
|
|
];
|
|
}
|
|
'';
|
|
target = "nvim/templates/shell.nix.tmpl";
|
|
};
|
|
|
|
# Allow unfree packages only on a user basis, not on a system-wide basis
|
|
xdg.configFile."nixpkgs/config.nix".text = " { allowUnfree = true; } ";
|
|
};
|
|
}
|