mirror of
https://github.com/librephoenix/nixos-config
synced 2025-01-19 07:05:51 +05:30
Abstracted background image into one config option
This commit is contained in:
parent
cbe068f1dd
commit
76923c8f1f
12
flake.nix
12
flake.nix
|
@ -25,6 +25,8 @@
|
||||||
email = "librephoenix@protonmail.com";
|
email = "librephoenix@protonmail.com";
|
||||||
dotfilesDir = "~/dotfiles";
|
dotfilesDir = "~/dotfiles";
|
||||||
theme = "dracula";
|
theme = "dracula";
|
||||||
|
backgroundUrl = "https://w.wallhaven.cc/full/6d/wallhaven-6d5k6x.jpg";
|
||||||
|
backgroundSha256 = "+xl4H3UiVmMRNvMhIlaLdVTYYqnSyCTSX2UOTGsDQ8c=";
|
||||||
|
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
|
@ -51,6 +53,8 @@
|
||||||
myNixConfigurationFilePath = dotfilesDir+"/system/configuration.nix";
|
myNixConfigurationFilePath = dotfilesDir+"/system/configuration.nix";
|
||||||
myHomeManagerFilePath = dotfilesDir+"/user/home.nix";
|
myHomeManagerFilePath = dotfilesDir+"/user/home.nix";
|
||||||
myTheme = theme;
|
myTheme = theme;
|
||||||
|
myBackgroundUrl = backgroundUrl;
|
||||||
|
myBackgroundSha256 = backgroundSha256;
|
||||||
inherit (inputs) eaf;
|
inherit (inputs) eaf;
|
||||||
inherit (inputs) eaf-browser;
|
inherit (inputs) eaf-browser;
|
||||||
};
|
};
|
||||||
|
@ -63,9 +67,11 @@
|
||||||
./system/configuration.nix
|
./system/configuration.nix
|
||||||
# stylix.nixosModules.stylix # complains that home-manager is not defined
|
# stylix.nixosModules.stylix # complains that home-manager is not defined
|
||||||
];
|
];
|
||||||
# specialArgs = {
|
specialArgs = {
|
||||||
# myTheme = theme;
|
myTheme = theme;
|
||||||
# };
|
myBackgroundUrl = backgroundUrl;
|
||||||
|
myBackgroundSha256 = backgroundSha256;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
|
||||||
{ config, pkgs, myTheme, ... }:
|
{ config, pkgs, myTheme, myBackgroundUrl, myBackgroundSha256, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
|
@ -96,9 +96,10 @@
|
||||||
defaultSession = "none+xmonad";
|
defaultSession = "none+xmonad";
|
||||||
lightdm.greeters.slick.enable = true;
|
lightdm.greeters.slick.enable = true;
|
||||||
lightdm.background = pkgs.fetchurl {
|
lightdm.background = pkgs.fetchurl {
|
||||||
url = "https://w.wallhaven.cc/full/6d/wallhaven-6d5k6x.jpg";
|
url = myBackgroundUrl;
|
||||||
sha256 = "+xl4H3UiVmMRNvMhIlaLdVTYYqnSyCTSX2UOTGsDQ8c=";
|
sha256 = myBackgroundSha256;
|
||||||
};
|
};
|
||||||
|
lightdm.greeters.slick.theme.name = "Adwaita-dark";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
{ config, pkgs, myTheme, ... }:
|
{ config, pkgs, myTheme, myBackgroundUrl, myBackgroundSha256, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
myFont = "Inconsolata";
|
myFont = "Inconsolata";
|
||||||
myFontPkg = pkgs.inconsolata;
|
myFontPkg = pkgs.inconsolata;
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
stylix.autoEnable = false;
|
stylix.autoEnable = false;
|
||||||
stylix.polarity = "dark";
|
stylix.polarity = "dark";
|
||||||
stylix.image = pkgs.fetchurl {
|
stylix.image = pkgs.fetchurl {
|
||||||
url = "https://w.wallhaven.cc/full/6d/wallhaven-6d5k6x.jpg";
|
url = myBackgroundUrl;
|
||||||
sha256 = "+xl4H3UiVmMRNvMhIlaLdVTYYqnSyCTSX2UOTGsDQ8c=";
|
sha256 = myBackgroundSha256;
|
||||||
};
|
};
|
||||||
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/"+myTheme+".yaml";
|
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/"+myTheme+".yaml";
|
||||||
|
|
||||||
|
@ -46,4 +45,13 @@ in
|
||||||
programs.rofi.enable = true;
|
programs.rofi.enable = true;
|
||||||
stylix.targets.feh.enable = true;
|
stylix.targets.feh.enable = true;
|
||||||
programs.feh.enable = true;
|
programs.feh.enable = true;
|
||||||
|
home.file.".fehbg-stylix".text = ''
|
||||||
|
#!/bin/sh
|
||||||
|
feh --no-fehbg --bg-fill ''+
|
||||||
|
pkgs.fetchurl {
|
||||||
|
url = myBackgroundUrl;
|
||||||
|
sha256 = myBackgroundSha256;
|
||||||
|
}+'';
|
||||||
|
'';
|
||||||
|
home.file.".fehbg-stylix".executable = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ emacs --daemon &
|
||||||
picom --animations --animation-window-mass 1 --animation-for-open-window zoom --animation-stiffness 200 --experimental-backends && # requires picom-pijulius
|
picom --animations --animation-window-mass 1 --animation-for-open-window zoom --animation-stiffness 200 --experimental-backends && # requires picom-pijulius
|
||||||
xset r rate 350 50 &
|
xset r rate 350 50 &
|
||||||
setxkbmap -option caps:escape &
|
setxkbmap -option caps:escape &
|
||||||
~/.fehbg &
|
~/.fehbg-stylix &
|
||||||
twmnd &
|
twmnd &
|
||||||
alttab -w 1 -t 240x160 -i 64x64 -sc 1 -bg $colorBg -fg $colorFg -frame $colorSecondary -inact $colorFg &
|
alttab -w 1 -t 240x160 -i 64x64 -sc 1 -bg $colorBg -fg $colorFg -frame $colorSecondary -inact $colorFg &
|
||||||
autokey-gtk &
|
autokey-gtk &
|
||||||
|
|
|
@ -653,7 +653,7 @@ emacs --daemon &
|
||||||
picom --animations --animation-window-mass 1 --animation-for-open-window zoom --animation-stiffness 200 --experimental-backends && # requires picom-pijulius
|
picom --animations --animation-window-mass 1 --animation-for-open-window zoom --animation-stiffness 200 --experimental-backends && # requires picom-pijulius
|
||||||
xset r rate 350 50 &
|
xset r rate 350 50 &
|
||||||
setxkbmap -option caps:escape &
|
setxkbmap -option caps:escape &
|
||||||
~/.fehbg &
|
~/.fehbg-stylix &
|
||||||
twmnd &
|
twmnd &
|
||||||
alttab -w 1 -t 240x160 -i 64x64 -sc 1 -bg $colorBg -fg $colorFg -frame $colorSecondary -inact $colorFg &
|
alttab -w 1 -t 240x160 -i 64x64 -sc 1 -bg $colorBg -fg $colorFg -frame $colorSecondary -inact $colorFg &
|
||||||
autokey-gtk &
|
autokey-gtk &
|
||||||
|
|
Loading…
Reference in a new issue