os/profiles/base-user/home.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

104 lines
3.8 KiB
Nix
Raw Normal View History

2023-01-28 20:49:10 +00:00
{
config,
pkgs,
lib,
...
}:
with lib; let
2021-05-30 19:10:28 +00:00
psCfg = config.pub-solar;
xdg = config.home-manager.users."${psCfg.user.name}".xdg;
2023-01-28 20:49:10 +00:00
in {
2021-05-30 19:10:28 +00:00
imports = [
./session-variables.nix
];
2023-01-28 20:49:10 +00:00
home-manager = pkgs.lib.setAttrByPath ["users" psCfg.user.name] {
2021-05-30 19:10:28 +00:00
# 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}";
2023-01-28 20:49:10 +00:00
home.packages = with pkgs; [];
2021-05-30 19:10:28 +00:00
2021-10-25 23:19:47 +00:00
fonts.fontconfig.enable = mkForce true;
2021-05-30 19:10:28 +00:00
programs.dircolors.enable = true;
programs.less = {
enable = true;
keys = ''
k forw-line
i back-line
K forw-scroll
I back-scroll
'';
};
2021-05-30 19:10:28 +00:00
home.file."xinitrc".source = ./.xinitrc;
xdg.enable = true;
xdg.mime.enable = true;
xdg.mimeApps = import ./mimeapps.nix;
2023-01-28 20:49:10 +00:00
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;
};
2021-05-30 19:10:28 +00:00
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."vifm/vifmrc".source = ./.config/vifm/vifmrc;
xdg.configFile."vifm/colors/base16.vifm".source = ./.config/vifm/colors/base16.vifm;
xdg.configFile."libinput-gestures.conf".source = ./.config/libinput-gestures.conf;
xdg.configFile."swaync/config.json".source = ./.config/swaync/config.json;
xdg.configFile."swaync/style.css".source = ./.config/swaync/style.css;
2021-05-30 19:10:28 +00:00
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."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";
};
2021-05-30 19:10:28 +00:00
# Allow unfree packages only on a user basis, not on a system-wide basis
xdg.configFile."nixpkgs/config.nix".text = " { allowUnfree = true; } ";
};
}