more stuff

This commit is contained in:
dusk 2020-12-23 19:54:51 +03:00
parent 28d1d1540b
commit ed926635df
Signed by: dusk
GPG Key ID: 1D8F8FAF2294D6EA
11 changed files with 576 additions and 331 deletions

85
flake.lock Normal file
View File

@ -0,0 +1,85 @@
{
"nodes": {
"home": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1608681543,
"narHash": "sha256-6YNP8GBG0nhqLMQVkCBxRirTYaaGhI8gKCwgcJ5+sLc=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "3627ec4de58d7fbda13c82dfec94eace10198f23",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"impermanence": {
"flake": false,
"locked": {
"lastModified": 1607963610,
"narHash": "sha256-GbThFdlYfh9ujQjXX6Ngn88s2ALd1aepKsbxj0lgm28=",
"owner": "nix-community",
"repo": "impermanence",
"rev": "2cda5cd30bc7c56240a1a91ec8d44c6d5222ee17",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "impermanence",
"type": "github"
}
},
"mynex": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1607689647,
"narHash": "sha256-pUpUCcp8usppbByFveRrV2NNS5sFrlvMndZt7xYOQL4=",
"owner": "yusdacra",
"repo": "nix-exprs",
"rev": "e9c16b956180d23c3cb8ec3e2843b2be662d43ef",
"type": "gitlab"
},
"original": {
"owner": "yusdacra",
"repo": "nix-exprs",
"type": "gitlab"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1608700021,
"narHash": "sha256-timIYNV0uwrbjg5L3zloUbPeFpBXnEtosbUaWdqR72U=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2ae527c50e049570dd25132f9325527aa2320e32",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable-small",
"type": "indirect"
}
},
"root": {
"inputs": {
"home": "home",
"impermanence": "impermanence",
"mynex": "mynex",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

View File

@ -15,7 +15,8 @@ let
nixosPersistence = "${impermanence}/nixos.nix"; nixosPersistence = "${impermanence}/nixos.nix";
}; };
modules = let modules =
let
inherit (home.nixosModules) home-manager; inherit (home.nixosModules) home-manager;
inherit (mynex.nixosModules) security networking; inherit (mynex.nixosModules) security networking;
@ -34,11 +35,13 @@ let
}; };
local = import "${toString ./.}/${hostName}.nix"; local = import "${toString ./.}/${hostName}.nix";
in [ core global local home-manager security networking ]; in
[ core global local home-manager security networking ];
}; };
hosts = recImport { hosts = recImport {
dir = ./.; dir = ./.;
_import = config; _import = config;
}; };
in hosts in
hosts

View File

@ -30,11 +30,13 @@ let
sudo umount /mnt sudo umount /mnt
''; '';
in { in
{
imports = [ imports = [
../users/patriot ../users/patriot
../users/root ../users/root
../profiles/network ../profiles/network
# ../profiles/network/nginx.nix
../profiles/develop ../profiles/develop
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
nixosPersistence nixosPersistence
@ -148,7 +150,7 @@ in {
}; };
environment = { environment = {
systemPackages = [ btrfsDiff ]; systemPackages = [ btrfsDiff pkgs.docker-compose ];
pathsToLink = [ "/share/zsh" ]; pathsToLink = [ "/share/zsh" ];
persistence."/persist" = { persistence."/persist" = {
directories = [ "/etc/nixos" ]; directories = [ "/etc/nixos" ];
@ -161,6 +163,23 @@ in {
# enable = true; # enable = true;
# videoDrivers = [ "amdgpu" ]; # videoDrivers = [ "amdgpu" ];
# }; # };
virtualisation.docker.enable = true;
services.postgresql = {
enable = true;
enableTCPIP = true;
authentication = pkgs.lib.mkOverride 10 ''
local all all trust
host all all 0.0.0.0/0 md5
'';
settings = {
listen_addresses = "*";
};
initialScript = pkgs.writeText "backend-initScript" ''
CREATE ROLE harmony WITH LOGIN PASSWORD 'harmony' CREATEDB;
CREATE DATABASE harmony;
GRANT ALL PRIVILEGES ON DATABASE harmony TO harmony;
'';
};
system.stateVersion = "20.09"; system.stateVersion = "20.09";
} }

View File

@ -3,7 +3,8 @@ let
inherit (builtins) attrNames isAttrs isInt readDir toJSON; inherit (builtins) attrNames isAttrs isInt readDir toJSON;
inherit (lib) filterAttrs hasSuffix mapAttrs' nameValuePair removeSuffix; inherit (lib) filterAttrs hasSuffix mapAttrs' nameValuePair removeSuffix;
in rec { in
rec {
# mapFilterAttrs :: # mapFilterAttrs ::
# (name -> value -> bool ) # (name -> value -> bool )
# (name -> value -> { name = any; value = any; }) # (name -> value -> { name = any; value = any; })
@ -11,14 +12,16 @@ in rec {
mapFilterAttrs = seive: f: attrs: filterAttrs seive (mapAttrs' f attrs); mapFilterAttrs = seive: f: attrs: filterAttrs seive (mapAttrs' f attrs);
recImport = { dir, _import ? base: import "${dir}/${base}.nix" }: recImport = { dir, _import ? base: import "${dir}/${base}.nix" }:
mapFilterAttrs (_: v: v != null) (n: v: mapFilterAttrs (_: v: v != null)
(n: v:
if n != "default.nix" && hasSuffix ".nix" n && v == "regular" if n != "default.nix" && hasSuffix ".nix" n && v == "regular"
then then
let name = removeSuffix ".nix" n; in nameValuePair (name) (_import name) let name = removeSuffix ".nix" n; in nameValuePair (name) (_import name)
else else
nameValuePair ("") (null)) (readDir dir); nameValuePair ("") (null))
(readDir dir);
pkgBin = name: "${pkgs."${name}"}/bin/${name}"; pkgBin = name: "${pkgs."${name}"}/bin/${name}";
} }

View File

@ -1,3 +1,9 @@
final: prev: { final: prev: {
hikari = prev.hikari.overrideAttrs (old: rec { version = "2.2.2"; }); hikari = prev.hikari.overrideAttrs (old: rec {
src = prev.fetchzip {
url = "https://hub.darcs.net/raichoo/hikari/dist/hikari.zip";
sha256 = "sha256-wguyND2LDyWtIoFibuxfFf9fi2D/0v7/fnGXy3JGjgM=";
};
buildInputs = old.buildInputs ++ [ prev.pandoc ];
});
} }

View File

@ -3,7 +3,8 @@ let
inherit (util) pkgBin; inherit (util) pkgBin;
inherit (lib) fileContents mkIf; inherit (lib) fileContents mkIf;
in { in
{
imports = [ ../local/locale.nix ]; imports = [ ../local/locale.nix ];
boot = { boot = {
@ -13,10 +14,12 @@ in {
console.font = "7x14"; console.font = "7x14";
environment = let environment =
let
coreBin = v: "${pkgs.coreutils}/bin/${v}"; coreBin = v: "${pkgs.coreutils}/bin/${v}";
nixBin = "${config.nix.package}/bin/nix"; nixBin = "${config.nix.package}/bin/nix";
in { in
{
systemPackages = with pkgs; [ systemPackages = with pkgs; [
bat bat
exa exa
@ -28,10 +31,13 @@ in {
iputils iputils
lm_sensors lm_sensors
mkpasswd mkpasswd
ntfs3g
]; ];
shellAliases = let ifSudo = string: mkIf config.security.sudo.enable string; shellAliases =
in { let ifSudo = string: mkIf config.security.sudo.enable string;
in
{
g = pkgBin "git"; g = pkgBin "git";
grep = "${pkgs.ripgrep}/bin/rg"; grep = "${pkgs.ripgrep}/bin/rg";

View File

@ -1,6 +1,6 @@
{ pkgs, ... }: { { pkgs, ... }: {
imports = [ ./kakoune.nix ]; imports = [ ./kakoune.nix ];
environment.systemPackages = with pkgs; [ nixfmt ]; environment.systemPackages = with pkgs; [ nixpkgs-fmt ];
environment.shellAliases = { nixf-all = "nixfmt **/**.nix"; }; environment.shellAliases = { nixf-all = "nixpkgs-fmt **/**.nix"; };
} }

View File

@ -1,8 +1,10 @@
{ {
services.stubby = { services.stubby = {
roundRobinUpstreams = false; roundRobinUpstreams = false;
upstreamServers = let nextDnsId = "75e43d"; upstreamServers =
in '' let nextDnsId = "75e43d";
in
''
- address_data: 45.90.28.0 - address_data: 45.90.28.0
tls_auth_name: "${nextDnsId}.dns1.nextdns.io" tls_auth_name: "${nextDnsId}.dns1.nextdns.io"
- address_data: 2a07:a8c0::0 - address_data: 2a07:a8c0::0

View File

@ -0,0 +1,35 @@
{ ... }: {
# services.nginx = {
# enable = true;
# enableReload = true;
# statusPage = true;
# recommendedGzipSettings = true;
# recommendedOptimisation = true;
# recommendedProxySettings = true;
# recommendedTlsSettings = true;
# virtualHosts."yusdacras-host.ydns.eu" = {
# # addSSL = true;
# # enableACME = true;
# listen = [
# { addr = "0.0.0.0"; port = 8080; }
# { addr = "[::]"; port = 8080; }
# # { addr = "0.0.0.0"; port = 8081; ssl = true; }
# ];
# locations = {
# "/matrix" = { proxyPass = "http://localhost:8000"; };
# "/page" = {
# root = "/var/www/yusdacras-host";
# };
# };
# };
# };
# security.acme = {
# acceptTerms = true;
# certs = {
# "yusdacras-host.ydns.eu".email = "y.bera003.06@protonmail.com";
# };
# };
networking.firewall.allowedTCPPorts = [ 8000 8448 ];
}

View File

@ -16,8 +16,8 @@ let
kideSrc = pkgs.fetchgit { kideSrc = pkgs.fetchgit {
url = "https://gitlab.com/yusdacra/kide.git"; url = "https://gitlab.com/yusdacra/kide.git";
rev = "c4116d433add520d8e18382e0bfee9c49bf67fd0"; rev = "40cb21c7e553fcc0fed99ed93dabbc1ffca0dbd0";
sha256 = "sha256-RTYl0rFR7Tv5UisQXL4Wucrlw3NZeTKIqrXTdx095y0="; sha256 = "sha256-MLHyQWFs7/I12dzXGKJAIlyO3tw3y4otVeVjeXxrqY4=";
fetchSubmodules = true; fetchSubmodules = true;
}; };
kideFiles = kideFiles =
@ -46,6 +46,7 @@ let
}; };
normal = { normal = {
black = "ece3cc"; black = "ece3cc";
gray = "5b5b5b";
red = "d2212d"; red = "d2212d";
green = "489100"; green = "489100";
yellow = "ad8900"; yellow = "ad8900";
@ -56,6 +57,7 @@ let
}; };
bright = { bright = {
black = "d5cdb6"; black = "d5cdb6";
gray = "7b7b7b";
red = "cc1729"; red = "cc1729";
green = "428b00"; green = "428b00";
yellow = "a78300"; yellow = "a78300";
@ -66,19 +68,20 @@ let
}; };
}; };
colorSchemeDark = { colorSchemeDark = rec {
primary = { primary = {
normal = { normal = {
background = "181818"; background = "181818";
foreground = "b9b9b9"; foreground = "b9b9b9";
}; };
bright = { bright = {
background = "3b3b3b"; background = bright.black;
foreground = "dedede"; foreground = bright.white;
}; };
}; };
normal = { normal = {
black = "252525"; black = "252525";
gray = "5b5b5b";
red = "ed4a46"; red = "ed4a46";
green = "70b433"; green = "70b433";
yellow = "dbb32d"; yellow = "dbb32d";
@ -89,6 +92,7 @@ let
}; };
bright = { bright = {
black = "3b3b3b"; black = "3b3b3b";
gray = "7b7b7b";
red = "ff5e56"; red = "ff5e56";
green = "83c746"; green = "83c746";
yellow = "efc541"; yellow = "efc541";
@ -100,7 +104,8 @@ let
}; };
colorScheme = colorScheme =
if builtins.pathExists ./light then colorSchemeLight else colorSchemeDark; # if builtins.pathExists ./light then colorSchemeLight else colorSchemeDark;
colorSchemeDark;
bgColor = colorScheme.primary.normal.background; bgColor = colorScheme.primary.normal.background;
fgColor = colorScheme.primary.bright.foreground; fgColor = colorScheme.primary.bright.foreground;
@ -145,21 +150,45 @@ let
indicator = "#111111"; # don't care indicator = "#111111"; # don't care
}; };
fonts = [ fontComb ]; fonts = [ fontComb ];
in { in
{
home-manager.users.patriot = { config, pkgs, ... }: { home-manager.users.patriot = { config, pkgs, ... }: {
imports = [ ../profiles/hikari.nix ]; imports = [ ../profiles/hikari.nix ];
gtk = {
# enable = true;
font = {
package = pkgs.dejavu_fonts;
name = "DejaVu Sans 12";
};
iconTheme = {
package = pkgs.papirus-icon-theme;
name = "Papirus Dark";
};
theme = {
package = pkgs.numix-gtk-theme;
name = "Numix Dark";
};
};
qt = {
# enable = true;
platformTheme = "gtk";
};
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
home = { home = {
homeDirectory = nixosConfig.users.users.patriot.home; homeDirectory = nixosConfig.users.users.patriot.home;
packages = with pkgs; packages = with pkgs;
[ [
darcs # Font stuff
discord
fontPackage fontPackage
noto-fonts-cjk noto-fonts-cjk
noto-fonts-emoji-blob-bin
font-awesome font-awesome
nerdfonts (nerdfonts.override { fonts = [ "Iosevka" ]; })
# Programs
appimage-run
bitwarden bitwarden
pfetch pfetch
neofetch neofetch
@ -169,15 +198,17 @@ in {
youtube-dl youtube-dl
ffmpeg ffmpeg
mupdf mupdf
transmission-gtk
gitAndTools.gh
steam-run steam-run
lutris lutris
xdg_utils xdg_utils
# xdg-user-dirs # xdg-user-dirs
tagref
# gnome3.zenity # gnome3.zenity
# x11 docker stuff # x11 docker stuff
# x11docker # x11docker
# weston # weston
xwayland
# xpra # xpra
# xdotool # xdotool
# xorg.setxkbmap # xorg.setxkbmap
@ -202,9 +233,12 @@ in {
# use this if they aren't displayed properly: # use this if they aren't displayed properly:
export _JAVA_AWT_WM_NONREPARENTING=1 export _JAVA_AWT_WM_NONREPARENTING=1
''; '';
wrapperFeatures.gtk = true;
config = { config = {
inherit fonts; inherit fonts;
bars = [ ]; # no bars = [{
command = "${pkgBin "waybar"}";
}];
colors = { colors = {
background = "#${bgColor}"; background = "#${bgColor}";
focused = addIndSway focusedWorkspace; focused = addIndSway focusedWorkspace;
@ -216,7 +250,8 @@ in {
menu = "${pkgBin "rofi"} -show drun | ${pkgs.sway}/bin/swaymsg --"; menu = "${pkgBin "rofi"} -show drun | ${pkgs.sway}/bin/swaymsg --";
modifier = "Mod4"; modifier = "Mod4";
terminal = pkgBin "alacritty"; terminal = pkgBin "alacritty";
keybindings = let keybindings =
let
mod = config.wayland.windowManager.sway.config.modifier; mod = config.wayland.windowManager.sway.config.modifier;
cat = pkgs.coreutils + "/bin/cat"; cat = pkgs.coreutils + "/bin/cat";
grim = pkgBin "grim"; grim = pkgBin "grim";
@ -228,8 +263,11 @@ in {
wl-paste = pkgs.wl-clipboard + "/bin/wl-paste"; wl-paste = pkgs.wl-clipboard + "/bin/wl-paste";
shotFile = config.home.homeDirectory shotFile = config.home.homeDirectory
+ "/shots/shot_$(date '+%Y_%m_%d_%H_%M')"; + "/shots/shot_$(date '+%Y_%m_%d_%H_%M')";
in lib.mkOptionDefault { in
lib.mkOptionDefault {
"${mod}+q" = "kill"; "${mod}+q" = "kill";
"${mod}+Shift+e" = "exit";
"${mod}+Shift+r" = "reload";
# Screenshot and copy it to clipboard # Screenshot and copy it to clipboard
"Mod1+s" = '' "Mod1+s" = ''
exec export SFILE="${shotFile}.png" && ${grim} "$SFILE" && ${cat} "$SFILE" | ${wl-copy} -t image/png exec export SFILE="${shotFile}.png" && ${grim} "$SFILE" && ${cat} "$SFILE" | ${wl-copy} -t image/png
@ -293,14 +331,28 @@ in {
set -g status off set -g status off
''; '';
}; };
qutebrowser = { chromium = {
enable = true; enable = true;
# package = pkgs.ungoogled-chromium;
extensions = [
"gcbommkclmclpchllfjekcdonpmejbdp" # https everywhere
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # ublock
"nngceckbapebfimnlniiiahkandclblb" # bitwarden
"ldpochfccmkkmhdbclfhpagapcfdljkj" # decentraleyes
"annfbnbieaamhaimclajlajpijgkdblo" # dark theme
"eimadpbcbfnmbkopoojfekhnkhdbieeh" # dark reader
"hlepfoohegkhhmjieoechaddaejaokhf" # github refined
];
};
qutebrowser = {
# enable = true;
settings = { settings = {
content.javascript.enabled = false; content.javascript.enabled = false;
colors.webpage.darkmode.enabled = true; colors.webpage.darkmode.enabled = true;
tabs = { show = "multiple"; }; tabs = { show = "multiple"; };
}; };
extraConfig = let extraConfig =
let
domains = [ domains = [
"github.com" "github.com"
"gitlab.com" "gitlab.com"
@ -314,7 +366,8 @@ in {
enableJsForDomain = d: '' enableJsForDomain = d: ''
config.set('content.javascript.enabled', True, 'https://*.${d}') config.set('content.javascript.enabled', True, 'https://*.${d}')
''; '';
in lib.concatStrings (map enableJsForDomain domains); in
lib.concatStrings (map enableJsForDomain domains);
}; };
git = { git = {
enable = true; enable = true;
@ -354,14 +407,15 @@ in {
compression = true; compression = true;
hashKnownHosts = true; hashKnownHosts = true;
userKnownHostsFile = "~/.local/share/ssh/known-hosts"; userKnownHostsFile = "~/.local/share/ssh/known-hosts";
extraConfig = '' # Only needed for darcs
Host hub.darcs.net # extraConfig = ''
ControlMaster no # Host hub.darcs.net
ForwardAgent no # ControlMaster no
ForwardX11 no # ForwardAgent no
Ciphers +aes256-cbc # ForwardX11 no
MACs +hmac-sha1 # Ciphers +aes256-cbc
''; # MACs +hmac-sha1
# '';
}; };
zsh = { zsh = {
enable = true; enable = true;
@ -369,10 +423,11 @@ in {
enableVteIntegration = true; enableVteIntegration = true;
enableAutosuggestions = true; enableAutosuggestions = true;
enableCompletion = true; enableCompletion = true;
plugins = let plugins =
fast-syntax-highlighting = { let
fast-syntax-highlighting = rec {
name = "fast-syntax-highlighting"; name = "fast-syntax-highlighting";
src = "${pkgs.zsh-fast-syntax-highlighting}"; src = pkgs."zsh-${name}".out;
}; };
per-directory-history = { per-directory-history = {
name = "per-directory-history"; name = "per-directory-history";
@ -383,7 +438,8 @@ in {
hash = "sha256-VHRgrVCqzILqOes8VXGjSgLek38BFs9eijmp0JHtD5Q="; hash = "sha256-VHRgrVCqzILqOes8VXGjSgLek38BFs9eijmp0JHtD5Q=";
}; };
}; };
in [ fast-syntax-highlighting per-directory-history ]; in
[ fast-syntax-highlighting per-directory-history ];
# xdg compliant # xdg compliant
dotDir = ".config/zsh"; dotDir = ".config/zsh";
history.path = ".local/share/zsh/history"; history.path = ".local/share/zsh/history";
@ -396,9 +452,13 @@ in {
# use this if they aren't displayed properly: # use this if they aren't displayed properly:
export _JAVA_AWT_WM_NONREPARENTING=1 export _JAVA_AWT_WM_NONREPARENTING=1
''; '';
loginExtra = '' loginExtra =
let
deCmd = if config.wayland.windowManager.sway.enable then "sway" else (if config.wayland.windowManager.hikari.enable then "hikari" else throw "Need a window manager to start!");
in
''
if [ "$(${pkgs.coreutils}/bin/tty)" = "/dev/tty1" ]; then if [ "$(${pkgs.coreutils}/bin/tty)" = "/dev/tty1" ]; then
exec ${pkgBin "hikari"} exec ${pkgBin deCmd}
fi fi
''; '';
initExtra = '' initExtra = ''
@ -428,11 +488,13 @@ in {
enableNixDirenvIntegration = true; enableNixDirenvIntegration = true;
}; };
fzf.enable = true; fzf.enable = true;
rofi = let rofi =
let
bgc = "#${bgColor}"; bgc = "#${bgColor}";
fgc = "#${fgColor}"; fgc = "#${fgColor}";
acc = "#${acColor}"; acc = "#${acColor}";
in { in
{
enable = true; enable = true;
colors = { colors = {
window = { window = {
@ -456,13 +518,17 @@ in {
separator = "none"; separator = "none";
terminal = pkgBin "alacritty"; terminal = pkgBin "alacritty";
}; };
waybar = { waybar =
let
swayEnabled = config.wayland.windowManager.sway.enable;
in
{
enable = true; enable = true;
settings = [{ settings = [{
layer = "top"; layer = "top";
position = "top"; position = "top";
modules-left = [ ]; modules-left = if swayEnabled then [ "sway/workspaces" ] else [ ];
modules-center = [ ]; modules-center = if swayEnabled then [ "sway/window" ] else [ ];
modules-right = modules-right =
[ "pulseaudio" "cpu" "memory" "temperature" "clock" "tray" ]; [ "pulseaudio" "cpu" "memory" "temperature" "clock" "tray" ];
modules = { modules = {
@ -483,7 +549,27 @@ in {
}; };
}; };
}]; }];
style = '' style =
let
makeBorder = color: "border-bottom: 3px solid #${color};";
makeInfo = color: ''
color: #${color};
${makeBorder color}
'';
clockColor = colorScheme.bright.magenta;
cpuColor = colorScheme.bright.green;
memColor = colorScheme.bright.blue;
pulseColor = {
normal = colorScheme.bright.cyan;
muted = colorScheme.bright.gray;
};
tmpColor = {
normal = colorScheme.bright.yellow;
critical = colorScheme.bright.red;
};
in
''
* { * {
border: none; border: none;
border-radius: 0; border-radius: 0;
@ -494,9 +580,9 @@ in {
} }
window#waybar { window#waybar {
background-color: #222222; background-color: #${bgColor};
border-bottom: 0px solid rgba(100, 114, 125, 0.5); /* border-bottom: 0px solid rgba(100, 114, 125, 0.5); */
color: #ffffff; color: #${fgColor};
transition-property: background-color; transition-property: background-color;
transition-duration: .5s; transition-duration: .5s;
} }
@ -504,7 +590,7 @@ in {
#workspaces button { #workspaces button {
padding: 0 5px; padding: 0 5px;
background-color: transparent; background-color: transparent;
color: #ffffff; color: #${fgColor};
border-bottom: 3px solid transparent; border-bottom: 3px solid transparent;
} }
@ -516,12 +602,12 @@ in {
} }
#workspaces button.focused { #workspaces button.focused {
background-color: #64727D; border-bottom: 3px solid #${acColor};
border-bottom: 3px solid #ffffff;
} }
#workspaces button.urgent { #workspaces button.urgent {
background-color: #eb4d4b; background-color: #${acColor};
color: #${bgColor};
} }
#mode { #mode {
@ -544,64 +630,54 @@ in {
#mpd { #mpd {
padding: 0 10px; padding: 0 10px;
margin: 0 4px; margin: 0 4px;
color: #ffffff; background-color: transparent;
} ${makeInfo fgColor}
#clock {
background-color: #64727D;
color: #000000;
} }
label:focus { label:focus {
background-color: #000000; color: #000000;
}
#clock {
${makeInfo clockColor}
} }
#cpu { #cpu {
background-color: #2ecc71; ${makeInfo cpuColor}
color: #000000;
} }
#memory { #memory {
background-color: #9b59b6; ${makeInfo memColor}
color: #000000;
} }
#pulseaudio { #pulseaudio {
background-color: #f1c40f; ${makeInfo pulseColor.normal}
color: #000000;
} }
#pulseaudio.muted { #pulseaudio.muted {
background-color: #90b1b1; ${makeInfo pulseColor.muted}
color: #2a5c45;
} }
#temperature { #temperature {
background-color: #f0932b; ${makeInfo tmpColor.normal}
color: #000000;
} }
#temperature.critical { #temperature.critical {
background-color: #eb4d4b; ${makeInfo tmpColor.critical}
color: #000000;
}
#tray {
background-color: #2980b9;
} }
''; '';
}; };
}; };
services = { services = {
gpg-agent = { gpg-agent = rec {
enable = true; enable = true;
enableSshSupport = true; enableSshSupport = true;
sshKeys = [ "8369D9CA26C3EAAAB8302A88CEE6FD14B58AA965" ]; sshKeys = [ "8369D9CA26C3EAAAB8302A88CEE6FD14B58AA965" ];
defaultCacheTtl = 3600 * 6; defaultCacheTtl = 3600 * 6;
defaultCacheTtlSsh = 3600 * 6; defaultCacheTtlSsh = defaultCacheTtl;
maxCacheTtl = 3600 * 24; maxCacheTtl = 3600 * 24;
maxCacheTtlSsh = 3600 * 24; maxCacheTtlSsh = maxCacheTtl;
grabKeyboardAndMouse = false; grabKeyboardAndMouse = false;
pinentryFlavor = "gtk2"; pinentryFlavor = "gtk2";
}; };

View File

@ -1,9 +1,14 @@
{ lib, config, pkgs, ... }: { lib, config, pkgs, ... }:
with lib; with lib;
let cfg = config.wayland.windowManager.hikari; let cfg = config.wayland.windowManager.hikari;
in { in
{
options.wayland.windowManager.hikari = { options.wayland.windowManager.hikari = {
enable = mkEnableOption "hikari window manager"; enable = mkEnableOption "hikari window manager";
xwayland = mkOption {
type = types.bool;
default = true;
};
font = mkOption { font = mkOption {
type = types.str; type = types.str;
default = "Iosevka"; default = "Iosevka";
@ -11,7 +16,7 @@ in {
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = with pkgs; [ hikari ]; home.packages = with pkgs; [ hikari ] ++ (optional cfg.xwayland xwayland);
xdg = { xdg = {
enable = true; enable = true;
@ -50,6 +55,11 @@ in {
} }
} }
} }
pointers {
"*" {
accel-profile = "flat"
}
}
} }
layouts { layouts {