mirror of
https://github.com/nmasur/dotfiles
synced 2025-04-25 13:12:23 +00:00
Compare commits
No commits in common. "5561c85b43783f9aac4edbf33fab21ed88618a21" and "a1f651010bf6eb98801b35ad6b229234e85df6f2" have entirely different histories.
5561c85b43
...
a1f651010b
@ -22,10 +22,6 @@
|
|||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Seems like NetworkManager can help speed up Steam launch
|
|
||||||
# https://www.reddit.com/r/archlinux/comments/qguhco/steam_startup_time_arch_1451_seconds_fedora_34/hi8opet/
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,19 +1,109 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
options = {
|
let
|
||||||
gtk.theme = {
|
|
||||||
name = lib.mkOption {
|
# Based on: https://gitlab.com/rycee/nur-expressions/-/blob/7ae92e3497e1f1805fb849510120e2ee393018cd/pkgs/materia-theme/default.nix
|
||||||
type = lib.types.str;
|
gtkTheme = pkgs.stdenv.mkDerivation {
|
||||||
description = "Theme name for GTK applications";
|
pname = "materia-custom";
|
||||||
};
|
version = "0.1";
|
||||||
package = lib.mkOption {
|
src = pkgs.fetchFromGitHub {
|
||||||
type = lib.types.package;
|
owner = "nana-4";
|
||||||
description = "Theme package for GTK applications";
|
repo = "materia-theme";
|
||||||
default = pkgs.gnome-themes-extra;
|
rev = "6e5850388a25f424b8193fe4523504d1dc364175";
|
||||||
};
|
sha256 = "sha256-I6hpH0VTmftU4+/pRbztuTQcBKcOFBFbNZXJL/2bcgU=";
|
||||||
};
|
};
|
||||||
|
# patches = [ ../../../overlays/materia-theme.patch ];
|
||||||
|
nativeBuildInputs = with pkgs; [
|
||||||
|
bc
|
||||||
|
dart-sass
|
||||||
|
optipng
|
||||||
|
meson
|
||||||
|
ninja
|
||||||
|
sassc
|
||||||
|
|
||||||
|
(runCommandLocal "rendersvg" { } ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
ln -s ${resvg}/bin/resvg $out/bin/rendersvg
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
|
||||||
|
dontConfigure = true;
|
||||||
|
|
||||||
|
# # Fixes problem "Fontconfig error: Cannot load default config file"
|
||||||
|
# FONTCONFIG_FILE =
|
||||||
|
# pkgs.makeFontsConf { fontDirectories = [ pkgs.cantarell-fonts ]; };
|
||||||
|
|
||||||
|
# Derivation adds an extra # so we need to remove it from our colorscheme
|
||||||
|
theme = let stripHash = color: lib.strings.removePrefix "#" color;
|
||||||
|
in lib.generators.toKeyValue { } {
|
||||||
|
# Color selection copied from
|
||||||
|
# https://github.com/pinpox/nixos-home/blob/1cefe28c72930a0aed41c20d254ad4d193a3fa37/gtk.nix#L11
|
||||||
|
|
||||||
|
# Secondary accent
|
||||||
|
ACCENT_BG = stripHash config.theme.colors.base0B;
|
||||||
|
ACCENT_FG = stripHash config.theme.colors.base00;
|
||||||
|
|
||||||
|
# Main colors
|
||||||
|
BG = stripHash config.theme.colors.base00;
|
||||||
|
FG = stripHash config.theme.colors.base05;
|
||||||
|
|
||||||
|
# Buttons
|
||||||
|
BTN_BG = stripHash config.theme.colors.base02;
|
||||||
|
BTN_FG = stripHash config.theme.colors.base06;
|
||||||
|
|
||||||
|
# Header bar
|
||||||
|
HDR_BG = stripHash config.theme.colors.base01;
|
||||||
|
HDR_BTN_BG = stripHash config.theme.colors.base02;
|
||||||
|
HDR_BTN_FG = stripHash config.theme.colors.base05;
|
||||||
|
HDR_FG = stripHash config.theme.colors.base05;
|
||||||
|
|
||||||
|
# Not sure
|
||||||
|
MATERIA_SURFACE = stripHash config.theme.colors.base03;
|
||||||
|
MATERIA_VIEW = stripHash config.theme.colors.base08;
|
||||||
|
|
||||||
|
# Not sure
|
||||||
|
MENU_BG = stripHash config.theme.colors.base0A;
|
||||||
|
MENU_FG = stripHash config.theme.colors.base0E;
|
||||||
|
|
||||||
|
# Selection (primary accent)
|
||||||
|
SEL_BG = stripHash config.theme.colors.base04;
|
||||||
|
SEL_FG = stripHash config.theme.colors.base07;
|
||||||
|
|
||||||
|
TXT_BG = stripHash config.theme.colors.base02;
|
||||||
|
TXT_FG = stripHash config.theme.colors.base07;
|
||||||
|
|
||||||
|
WM_BORDER_FOCUS = stripHash config.theme.colors.base0D;
|
||||||
|
WM_BORDER_UNFOCUS = stripHash config.theme.colors.base0C;
|
||||||
|
|
||||||
|
MATERIA_COLOR_VARIANT = if config.theme.dark then "dark" else "light";
|
||||||
|
MATERIA_STYLE_COMPACT = "True";
|
||||||
|
UNITY_DEFAULT_LAUNCHER_STYLE = "False";
|
||||||
|
};
|
||||||
|
|
||||||
|
passAsFile = [ "theme" ];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
patchShebangs .
|
||||||
|
|
||||||
|
sed -e '/handle-horz-.*/d' -e '/handle-vert-.*/d' \
|
||||||
|
-i ./src/gtk-2.0/assets.txt
|
||||||
|
'';
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
export HOME="$NIX_BUILD_ROOT"
|
||||||
|
mkdir -p $out/share/themes/materia-custom
|
||||||
|
./change_color.sh \
|
||||||
|
-i False \
|
||||||
|
-t $out/share/themes \
|
||||||
|
-o "materia-custom" \
|
||||||
|
"$themePath" # References the file "theme" from passAsFile
|
||||||
|
'';
|
||||||
|
|
||||||
|
dontInstall = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
in {
|
||||||
|
|
||||||
config = lib.mkIf config.gui.enable {
|
config = lib.mkIf config.gui.enable {
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
@ -25,8 +115,8 @@
|
|||||||
in {
|
in {
|
||||||
enable = true;
|
enable = true;
|
||||||
theme = {
|
theme = {
|
||||||
name = config.gtk.theme.name;
|
name = "materia-custom";
|
||||||
package = config.gtk.theme.package;
|
package = gtkTheme;
|
||||||
};
|
};
|
||||||
gtk3.extraConfig = gtkExtraConfig;
|
gtk3.extraConfig = gtkExtraConfig;
|
||||||
gtk4.extraConfig = gtkExtraConfig;
|
gtk4.extraConfig = gtkExtraConfig;
|
||||||
@ -34,17 +124,15 @@
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Required for setting GTK theme (for preferred-color-scheme in browser)
|
|
||||||
services.dbus.packages = [ pkgs.dconf ];
|
|
||||||
programs.dconf.enable = true;
|
|
||||||
|
|
||||||
# Make the login screen dark
|
# Make the login screen dark
|
||||||
services.xserver.displayManager.lightdm.greeters.gtk.theme = {
|
services.xserver.displayManager.lightdm.greeters.gtk.theme = {
|
||||||
name = config.gtk.theme.name;
|
name = config.home-manager.users.${config.user}.gtk.theme.name;
|
||||||
package = config.gtk.theme.package;
|
package = gtkTheme;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.sessionVariables = { GTK_THEME = config.gtk.theme.name; };
|
environment.sessionVariables = {
|
||||||
|
GTK_THEME = config.home-manager.users.${config.user}.gtk.theme.name;
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,27 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
config = lib.mkIf config.gui.enable {
|
options = {
|
||||||
|
gtk.theme = {
|
||||||
|
name = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Theme name for GTK applications";
|
||||||
|
};
|
||||||
|
package = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Theme package name for GTK applications";
|
||||||
|
default = "gnome-themes-extra";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = let
|
||||||
|
|
||||||
|
gtkTheme = {
|
||||||
|
name = config.gtk.theme.name;
|
||||||
|
package = pkgs."${config.gtk.theme.package}";
|
||||||
|
};
|
||||||
|
|
||||||
|
in lib.mkIf config.gui.enable {
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
@ -31,6 +52,10 @@
|
|||||||
xclip # Clipboard
|
xclip # Clipboard
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Required for setting GTK theme (for preferred-color-scheme in browser)
|
||||||
|
services.dbus.packages = [ pkgs.dconf ];
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
|
|
||||||
programs.fish.shellAliases = {
|
programs.fish.shellAliases = {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
config = lib.mkIf config.physical {
|
config = lib.mkIf config.physical {
|
||||||
|
|
||||||
networking.useDHCP = !config.networking.networkmanager.enable;
|
networking.useDHCP = true;
|
||||||
|
|
||||||
networking.firewall.allowPing = lib.mkIf config.server true;
|
networking.firewall.allowPing = lib.mkIf config.server true;
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
config = lib.mkIf (config.physical && pkgs.stdenv.isLinux) {
|
config = lib.mkIf (config.physical && pkgs.stdenv.isLinux) {
|
||||||
|
|
||||||
# Enables wireless support via wpa_supplicant.
|
# Enables wireless support via wpa_supplicant.
|
||||||
networking.wireless.enable = !config.networking.networkmanager.enable;
|
networking.wireless.enable = true;
|
||||||
|
|
||||||
# Allows the user to control the WiFi settings.
|
# Allows the user to control the WiFi settings.
|
||||||
networking.wireless.userControlled.enable = true;
|
networking.wireless.userControlled.enable = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user