nixos-config/templates/themes/fair-and-square/{{ cookiecutter.slug }}/default.nix
Gabriel Arazas 8ed3f6b1c4 Update the theme template
This commit includes a bunch of minor updates of some Nix modules but
the focus here is the update of the theme template. The renaming of the
Cookiecutter template will now make backups and migration between
different filesystems very easy especially with NTFS-based filesystems
often found on external hard drives.
2020-10-21 00:10:59 +08:00

119 lines
3.1 KiB
Nix
Executable File

{ config, options, lib, pkgs, ... }:
with lib;
{
options.modules.themes."{{ cookiecutter.slug }}" = {
enable = mkOption {
type = types.bool;
default = false;
};
};
config = mkIf config.modules.themes."{{ cookiecutter.slug }}".enable {
services = {
# Enable picom compositor.
picom = {
enable = true;
fade = false;
shadow = false;
};
# Enable certain Xorg-related services.
xserver = {
displayManager = {
lightdm.enable = true;
defaultSession = "none+bspwm";
};
enable = true;
libinput.enable = true;
windowManager.bspwm.enable = true;
};
};
my.env.TERMINAL = "alacritty";
my.home = {
# Enable GTK configuration.
gtk.enable = true;
# Set the wallpaper.
home.file.".background-image".source = ./config/wallpaper;
# Enable QT configuration and set it to the same GTK config.
qt.enable = true;
qt.platformTheme = "gtk";
# Install all of the configurations in the XDG config home.
xdg.configFile = mkMerge [
(let recursiveXdgConfig = name: {
source = ./config + "/${name}";
recursive = true;
}; in {
"alacritty" = recursiveXdgConfig "alacritty";
"bspwm" = recursiveXdgConfig "bspwm";
"dunst" = recursiveXdgConfig "dunst";
"polybar" = recursiveXdgConfig "polybar";
"rofi" = recursiveXdgConfig "rofi";
"sxhkd" = {
source = <config/sxhkd>;
recursive = true;
};
})
# Applying the theme for GTK.
({
"gtk-3.0/settings.ini".text = ''
[Settings]
gtk-theme-name=Arc
gtk-icon-theme-name=Arc
gtk-fallback-icon-theme=gnome
gtk-application-prefer-dark-theme=true
gtk-cursor-theme-name=Adwaita
gtk-xft-hinting=1
gtk-xft-hintstyle=hintfull
gtk-xft-rgba=none
'';
"gtk-2.0/gtkrc".text = ''
gtk-theme-name="Arc"
gtk-icon-theme-name="Arc"
gtk-font-name="Sans 10"
gtk-cursor-theme-name="Adwaita"
'';
})
];
# Set the cursor theme.
xdg.dataFile = {
"icons/default/index.theme".text = ''
[icon theme]
Inherits=Adwaita
'';
};
};
my.packages = with pkgs; [
alacritty # Muh GPU-accelerated terminal emulator.
dunst # Add more annoying pop-ups on your screen!
feh # Meh, it's a image viewer that can set desktop background, what gives?
gnome3.adwaita-icon-theme
libnotify # Library for yer notifications.
(polybar.override {
pulseSupport = true;
nlSupport = true;
}) # Add some bars to your magnum opus.
rofi # A ricer's best friend (one of them at least).
# The Arc theme
arc-icon-theme
arc-theme
];
fonts.fonts = with pkgs; [
iosevka
font-awesome-ttf
];
};
}