From feb79391be52950cf525f0df075f21dba3f72430 Mon Sep 17 00:00:00 2001 From: notgne2 Date: Sat, 10 Jul 2021 12:20:18 -0700 Subject: [PATCH 1/5] Remove useless `gfx` stuff --- modules/ezpc.nix | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/modules/ezpc.nix b/modules/ezpc.nix index 3d2f9f2..bb75ceb 100644 --- a/modules/ezpc.nix +++ b/modules/ezpc.nix @@ -59,14 +59,10 @@ let # Set some X11 props services.xserver = { - enable = lib.mkDefault (cfg.gfx == "nvidia"); + enable = lib.mkDefault false; layout = lib.mkDefault "us"; libinput.enable = true; - - # automatic gfx drivers - videoDrivers = mkIf (cfg.gfx != null) [ cfg.gfx ]; }; - boot.initrd.kernelModules = mkIf (cfg.gfx != null && cfg.gfx == "amdgpu") [ cfg.gfx ]; security.pam.services = { swaylock.text = '' auth include login @@ -178,13 +174,6 @@ in description = "If this PC has a touchscreen"; }; - gfx = mkOption { - type = types.nullOr types.str; - default = null; - description = "Type of your PC's graphics card"; - example = "intel"; - }; - print = mkOption { type = types.bool; default = false; From 8875d45978144d8e615e3a09378c9026859d6712 Mon Sep 17 00:00:00 2001 From: notgne2 Date: Sat, 10 Jul 2021 12:32:08 -0700 Subject: [PATCH 2/5] Remove deprecated options from ezpc --- modules/ezpc.nix | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/modules/ezpc.nix b/modules/ezpc.nix index bb75ceb..3b16f6f 100644 --- a/modules/ezpc.nix +++ b/modules/ezpc.nix @@ -168,12 +168,6 @@ in description = "If you use the flatpak Steam instead of NixOS"; }; - touchscreen = mkOption { - type = types.bool; - default = false; - description = "If this PC has a touchscreen"; - }; - print = mkOption { type = types.bool; default = false; @@ -192,12 +186,6 @@ in description = "If this PC has bluetooth support"; }; - tiling = mkOption { - type = types.bool; - default = true; - description = "If you are based and redpilled, and want a tiling WM (deprecated, default)"; - }; - newWine = mkOption { type = types.bool; default = false; From 4d174b7260b08783b65bfd16404f517edfef64b8 Mon Sep 17 00:00:00 2001 From: notgne2 Date: Sat, 10 Jul 2021 12:48:58 -0700 Subject: [PATCH 3/5] add intel-media-driver --- modules/workstation.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/workstation.nix b/modules/workstation.nix index 552604d..fc97123 100644 --- a/modules/workstation.nix +++ b/modules/workstation.nix @@ -19,6 +19,7 @@ in enable = true; driSupport32Bit = true; extraPackages = with pkgs; [ + intel-media-driver vaapiIntel vaapiVdpau libvdpau-va-gl From 5ea55f5c8195c358d72cd0bf6d56c41105482f3a Mon Sep 17 00:00:00 2001 From: notgne2 Date: Sat, 10 Jul 2021 12:56:58 -0700 Subject: [PATCH 4/5] Only enable flameshot with x mode in ezpcusr --- home-manager/modules/ezpcusr.nix | 68 ++++++++++++++++---------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/home-manager/modules/ezpcusr.nix b/home-manager/modules/ezpcusr.nix index 2834d85..86a55ba 100644 --- a/home-manager/modules/ezpcusr.nix +++ b/home-manager/modules/ezpcusr.nix @@ -376,39 +376,6 @@ let }; mainConfig = { - systemd.user.services.flameshot = { - Unit = { - Description = "Flameshot screenshot tool"; - After = [ - "graphical-session-pre.target" - "polybar.service" - "stalonetray.service" - "taffybar.service" - ]; - PartOf = [ "graphical-session.target" ]; - }; - - Install = { WantedBy = [ "graphical-session.target" ]; }; - - Service = { - Environment = "PATH=${config.home.profileDirectory}/bin"; - ExecStart = "${flameshot}/bin/flameshot"; - Restart = "on-abort"; - }; - }; - - xdg.configFile."flameshot/flameshot.ini".text = '' - [General] - buttons=@Variant(\0\0\0\x7f\0\0\0\vQList\0\0\0\0\n\0\0\0\0\0\0\0\x2\0\0\0\x3\0\0\0\x5\0\0\0\x6\0\0\0\x12\0\0\0\xf\0\0\0\x13\0\0\0\b\0\0\0\n) - contrastOpacity=142 - contrastUiColor=#0ee900 - disabledTrayIcon=false - drawColor=#ff0000 - drawThickness=9 - savePath=/dev/null - uiColor=#6a00a3 - ''; - services.keynav.enable = true; services.clipmenu.enable = true; @@ -804,6 +771,18 @@ let mainWallpaperDisplay = if mainWallpaperDisplayMaybe != null then mainWallpaperDisplayMaybe else "fill"; in { + xdg.configFile."flameshot/flameshot.ini".text = '' + [General] + buttons=@Variant(\0\0\0\x7f\0\0\0\vQList\0\0\0\0\n\0\0\0\0\0\0\0\x2\0\0\0\x3\0\0\0\x5\0\0\0\x6\0\0\0\x12\0\0\0\xf\0\0\0\x13\0\0\0\b\0\0\0\n) + contrastOpacity=142 + contrastUiColor=#0ee900 + disabledTrayIcon=false + drawColor=#ff0000 + drawThickness=9 + savePath=/dev/null + uiColor=#6a00a3 + ''; + systemd.user.services = if mainWallpaperImg != null then { background = { @@ -821,7 +800,28 @@ let Install = { WantedBy = [ "graphical-session.target" ]; }; }; - } else { }; + } else { } // { + flameshot = { + Unit = { + Description = "Flameshot screenshot tool"; + After = [ + "graphical-session-pre.target" + "polybar.service" + "stalonetray.service" + "taffybar.service" + ]; + PartOf = [ "graphical-session.target" ]; + }; + + Install = { WantedBy = [ "graphical-session.target" ]; }; + + Service = { + Environment = "PATH=${config.home.profileDirectory}/bin"; + ExecStart = "${flameshot}/bin/flameshot"; + Restart = "on-abort"; + }; + }; + }; services.picom = { enable = true; From f9af88d745e482d4a19314c3c6d96cdbabb39177 Mon Sep 17 00:00:00 2001 From: notgne2 Date: Sat, 10 Jul 2021 14:27:00 -0700 Subject: [PATCH 5/5] use rycee's gtk theme generation --- flake.nix | 4 ++++ home-manager/modules/colors.nix | 42 +++++---------------------------- 2 files changed, 10 insertions(+), 36 deletions(-) diff --git a/flake.nix b/flake.nix index 5e4cd4d..06b58ca 100644 --- a/flake.nix +++ b/flake.nix @@ -8,6 +8,10 @@ url = "github:kdrag0n/base16-kitty"; flake = false; }; + rycee = { + url = "gitlab:rycee/nur-expressions"; + flake = false; + }; }; outputs = { self, nixpkgs, ... }@inputs: { diff --git a/home-manager/modules/colors.nix b/home-manager/modules/colors.nix index d67b5ac..d6542ca 100644 --- a/home-manager/modules/colors.nix +++ b/home-manager/modules/colors.nix @@ -306,42 +306,12 @@ in enable = true; theme = let - materia_colors = pkgs.writeText "gtk-generated-colors" '' - BG=${cfg.favColors.base16.base00} - FG=${cfg.favColors.base16.base07} - BTN_BG=${cfg.favColors.base16.base00} - BTN_FG=${cfg.favColors.base16.base07} - MENU_BG=${cfg.favColors.base16.base00} - MENU_FG=${cfg.favColors.base16.base07} - ACCENT_BG=${cfg.favColors.base16.base02} - SEL_BG=${cfg.favColors.base16.base0D} - SEL_FG=${cfg.favColors.base16.base00} - TXT_BG=${cfg.favColors.base16.base00} - TXT_FG=${cfg.favColors.base16.base07} - HDR_BTN_BG=${cfg.favColors.base16.base00} - HDR_BTN_FG=${cfg.favColors.base16.base07} - WM_BORDER_FOCUS=${cfg.favColors.base16.base02} - WM_BORDER_UNFOCUS=${cfg.favColors.base16.base01} - MATERIA_STYLE_COMPACT=True - MATERIA_COLOR_VARIANT=dark - UNITY_DEFAULT_LAUNCHER_STYLE=False - NAME=generated - ''; - - generated-gtk-theme = pkgs.stdenv.mkDerivation { - name = "generated-gtk-theme"; - src = pkgs.materia-theme.src; - buildInputs = with pkgs; [ sassc bc which inkscape optipng ]; - installPhase = '' - HOME=/build - chmod 777 -R . - patchShebangs . - mkdir -p $out/share/themes - substituteInPlace change_color.sh --replace "\$HOME/.themes" "$out/share/themes" - echo "Changing colours:" - ./change_color.sh -o Generated ${materia_colors} - chmod 555 -R . - ''; + generated-gtk-theme = pkgs.callPackage "${inputs.rycee}/pkgs/materia-theme" { + configBase16 = { + name = "Generated"; + kind = "dark"; + colors = builtins.mapAttrs (k: v: { hex.rgb = v; }) cfg.favColors.base16; + }; }; in {