Merge branch 'master' of git.wizbos.club:notgne2/nixfiles

This commit is contained in:
notgne2 2021-07-30 00:02:24 -07:00
commit 15dda44f8d
No known key found for this signature in database
GPG Key ID: BB661E172B42A7F8
5 changed files with 46 additions and 94 deletions

View File

@ -8,6 +8,10 @@
url = "github:kdrag0n/base16-kitty";
flake = false;
};
rycee = {
url = "gitlab:rycee/nur-expressions";
flake = false;
};
};
outputs = { self, nixpkgs, ... }@inputs: {

View File

@ -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
{

View File

@ -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<int>\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<int>\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;

View File

@ -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
@ -172,19 +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";
};
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;
@ -203,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;

View File

@ -19,6 +19,7 @@ in
enable = true;
driSupport32Bit = true;
extraPackages = with pkgs; [
intel-media-driver
vaapiIntel
vaapiVdpau
libvdpau-va-gl