75 lines
1.5 KiB
Nix
75 lines
1.5 KiB
Nix
{ pkgs, config, lib, helpers, ... }:
|
|
|
|
{
|
|
options.custom = {
|
|
username = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "dakedres";
|
|
};
|
|
|
|
nonFreePackages = lib.mkOption {
|
|
type = lib.types.listOf lib.types.str;
|
|
default = [];
|
|
};
|
|
|
|
wallpaper = lib.mkOption {
|
|
type = lib.types.path;
|
|
};
|
|
|
|
colors =
|
|
let
|
|
colorOption = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "#000000";
|
|
};
|
|
in
|
|
{
|
|
base00 = colorOption;
|
|
base01 = colorOption;
|
|
base02 = colorOption;
|
|
base03 = colorOption;
|
|
base04 = colorOption;
|
|
base05 = colorOption;
|
|
base06 = colorOption;
|
|
base07 = colorOption;
|
|
base08 = colorOption;
|
|
base09 = colorOption;
|
|
base0A = colorOption;
|
|
base0B = colorOption;
|
|
base0C = colorOption;
|
|
base0D = colorOption;
|
|
base0E = colorOption;
|
|
base0F = colorOption;
|
|
};
|
|
};
|
|
|
|
config =
|
|
let
|
|
username = config.custom.username;
|
|
nonFreePackages = config.custom.nonFreePackages;
|
|
in
|
|
{
|
|
home = {
|
|
username = username;
|
|
homeDirectory = "/home/${username}";
|
|
|
|
sessionVariables = {
|
|
XDG_CONFIG_HOME = config.xdg.configHome;
|
|
};
|
|
};
|
|
|
|
# Unfree packages
|
|
nixpkgs.config.allowUnfreePredicate = pkg:
|
|
builtins.elem (lib.getName pkg) nonFreePackages;
|
|
|
|
home.packages =
|
|
map (name: pkgs.${name}) nonFreePackages;
|
|
|
|
# Take over my xsession
|
|
xsession.enable = true;
|
|
|
|
# Let Home Manager install and manage itself.
|
|
programs.home-manager.enable = true;
|
|
};
|
|
}
|