refactor colors and options

preparing for light mode, even though specializations aren't working
This commit is contained in:
Noah Masur
2022-11-02 21:29:14 -04:00
parent b2850e8b79
commit 41d289c5db
19 changed files with 513 additions and 492 deletions

View File

@ -3,9 +3,9 @@
imports =
[ ../modules/shell ../modules/neovim ../modules/repositories/dotfiles.nix ];
options = with lib; {
user = mkOption {
type = types.str;
options = rec {
user = lib.mkOption {
type = lib.types.str;
description = "Primary user of the system";
};
fullName = lib.mkOption {
@ -27,17 +27,30 @@
default = "/etc/ssh/ssh_host_ed25519_key";
};
gui = {
enable = mkEnableOption {
description = "Enable graphics";
enable = lib.mkEnableOption {
description = "Enable graphics.";
default = false;
};
};
colorscheme = mkOption {
type = types.attrs;
description = "Base16 color scheme";
theme = {
colors = lib.mkOption {
type = lib.types.attrs;
description = "Base16 color scheme.";
default = (import ../modules/colorscheme/gruvbox).dark;
};
dark = lib.mkOption {
type = lib.types.bool;
description = "Enable dark mode.";
default = true;
};
};
homePath = mkOption {
type = types.path;
# colorscheme = lib.mkOption {
# type = types.attrs;
# description = "Base16 color scheme";
# };
homePath = lib.mkOption {
type = lib.types.path;
description = "Path of user's home directory.";
default = builtins.toPath (if pkgs.stdenv.isDarwin then
"/Users/${config.user}"
@ -45,17 +58,17 @@
"/home/${config.user}");
};
dotfilesPath = mkOption {
type = types.path;
dotfilesPath = lib.mkOption {
type = lib.types.path;
description = "Path of dotfiles repository.";
default = config.homePath + "/dev/personal/dotfiles";
};
dotfilesRepo = mkOption {
type = types.str;
dotfilesRepo = lib.mkOption {
type = lib.types.str;
description = "Link to dotfiles repository.";
};
unfreePackages = mkOption {
type = types.listOf types.str;
unfreePackages = lib.mkOption {
type = lib.types.listOf lib.types.str;
description = "List of unfree packages to allow.";
default = [ ];
};

View File

@ -15,15 +15,13 @@ nixpkgs.lib.nixosSystem {
# Set registry to flake packages, used for nix X commands
nix.registry.nixpkgs.flake = nixpkgs;
identityFile = "/home/${globals.user}/.ssh/id_ed25519";
gaming.steam = true;
gaming.legendary = true;
gui = {
enable = true;
compositor.enable = true;
wallpaper = "${wallpapers}/gruvbox/road.jpg";
gtk.theme = { name = "Adwaita-dark"; };
gui.enable = true;
theme = {
colors = (import ../../modules/colorscheme/gruvbox).dark;
dark = true;
};
colorscheme = (import ../../modules/colorscheme/gruvbox);
wallpaper = "${wallpapers}/gruvbox/road.jpg";
gtk.theme.name = nixpkgs.lib.mkDefault "Adwaita-dark";
passwordHash =
"$6$PZYiMGmJIIHAepTM$Wx5EqTQ5GApzXx58nvi8azh16pdxrN6Qrv1wunDlzveOgawitWzcIxuj76X9V868fsPi/NOIEO8yVXqwzS9UF.";
}
@ -33,14 +31,17 @@ nixpkgs.lib.nixosSystem {
../../modules/hardware
../../modules/nixos
../../modules/graphical
../../modules/gaming
../../modules/applications
../../modules/gaming/steam.nix
../../modules/gaming/legendary.nix
../../modules/applications/media.nix
../../modules/applications/firefox.nix
../../modules/applications/kitty.nix
../../modules/applications/discord.nix
../../modules/applications/nautilus.nix
../../modules/mail/default.nix
../../modules/repositories/notes.nix
../../modules/services/keybase.nix
../../modules/services/gnupg.nix
../../modules/services/mullvad.nix
../../modules/programming/nix.nix
../../modules/programming/haskell.nix
];
}