diff --git a/flake.lock b/flake.lock index 2092271..e0ad339 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "fromYaml": "fromYaml" }, "locked": { - "lastModified": 1689633990, - "narHash": "sha256-iwvQg2Vx0IIDWZaKo8Xmzxlv1YPHg+Kp/QSv8dRv0RY=", + "lastModified": 1708890466, + "narHash": "sha256-LlrC09LoPi8OPYOGPXegD72v+//VapgAqhbOFS3i8sc=", "owner": "SenchoPens", "repo": "base16.nix", - "rev": "dddf2e1c04845d43c89a8e9e37d574519649a404", + "rev": "665b3c6748534eb766c777298721cece9453fdae", "type": "github" }, "original": { @@ -184,11 +184,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { @@ -221,11 +221,11 @@ ] }, "locked": { - "lastModified": 1703887061, - "narHash": "sha256-gGPa9qWNc6eCXT/+Z5/zMkyYOuRZqeFZBDbopNZQkuY=", + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", "owner": "hercules-ci", "repo": "gitignore.nix", - "rev": "43e1aa1308018f37118e34d3a9cb4f5e75dc11d5", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", "type": "github" }, "original": { @@ -234,6 +234,23 @@ "type": "github" } }, + "gnome-shell": { + "flake": false, + "locked": { + "lastModified": 1698794309, + "narHash": "sha256-/TIkZ8y5Wv3QHLFp79Poao9fINurKs5pa4z0CRe+F8s=", + "owner": "GNOME", + "repo": "gnome-shell", + "rev": "a7c169c6c29cf02a4c392fa0acbbc5f5072823e7", + "type": "github" + }, + "original": { + "owner": "GNOME", + "ref": "45.1", + "repo": "gnome-shell", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -241,11 +258,11 @@ ] }, "locked": { - "lastModified": 1705879479, - "narHash": "sha256-ZIohbyly1KOe+8I3gdyNKgVN/oifKdmeI0DzMfytbtg=", + "lastModified": 1712317700, + "narHash": "sha256-rnkQ6qMhlxfjpCECkTMlFXHU/88QvC5KpdJWq5H6F1E=", "owner": "nix-community", "repo": "home-manager", - "rev": "2d47379ad591bcb14ca95a90b6964b8305f6c913", + "rev": "782eed8bb64b27acaeb7c17be4a095c85e65717f", "type": "github" }, "original": { @@ -262,11 +279,11 @@ ] }, "locked": { - "lastModified": 1700847865, - "narHash": "sha256-uWaOIemGl9LF813MW0AEgCBpKwFo2t1Wv3BZc6e5Frw=", + "lastModified": 1706001011, + "narHash": "sha256-J7Bs9LHdZubgNHZ6+eE/7C18lZ1P6S5/zdJSdXFItI4=", "owner": "nix-community", "repo": "home-manager", - "rev": "8cedd63eede4c22deb192f1721dd67e7460e1ebe", + "rev": "3df2a80f3f85f91ea06e5e91071fa74ba92e5084", "type": "github" }, "original": { @@ -277,11 +294,11 @@ }, "master": { "locked": { - "lastModified": 1705982247, - "narHash": "sha256-X3Ck/W1A0wKZCB13ZUxezHEobNAwrpEcmXAU67kswoE=", + "lastModified": 1712328317, + "narHash": "sha256-dIWHkDqH8gXRaFH4GLizgX/fvJp/0YDopsvzitVjrmo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "694767ccd272f919c7b285080dd93cb420536b31", + "rev": "7a60a3707a164992937e0f5286e377ad15ca1294", "type": "github" }, "original": { @@ -292,11 +309,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1705856552, - "narHash": "sha256-JXfnuEf5Yd6bhMs/uvM67/joxYKoysyE3M2k6T3eWbg=", + "lastModified": 1712163089, + "narHash": "sha256-Um+8kTIrC19vD4/lUCN9/cU9kcOsD1O1m+axJqQPyMM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "612f97239e2cc474c13c9dafa0df378058c5ad8d", + "rev": "fd281bd6b7d3e32ddfa399853946f782553163b5", "type": "github" }, "original": { @@ -308,11 +325,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1704874635, - "narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=", + "lastModified": 1710695816, + "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3dc440faeee9e889fe2d1b4d25ad0f430d449356", + "rev": "614b4613980a522ba49f0d194531beddbb7220d3", "type": "github" }, "original": { @@ -324,27 +341,27 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1705033721, - "narHash": "sha256-K5eJHmL1/kev6WuqyqqbS1cdNnSidIZ3jeqJ7GbrYnQ=", + "lastModified": 1711819797, + "narHash": "sha256-tNeB6emxj74Y6ctwmsjtMlzUMn458sBmwnD35U5KIM4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a1982c92d8980a0114372973cbdfe0a307f1bdea", + "rev": "2b4e3ca0091049c6fbb4908c66b05b77eaef9f0c", "type": "github" }, "original": { "owner": "NixOS", - "ref": "release-23.05", + "ref": "release-23.11", "repo": "nixpkgs", "type": "github" } }, "nur": { "locked": { - "lastModified": 1705982724, - "narHash": "sha256-gIySjI6ENrIqHs7RZmVRTENa22Wws0XLbxycpUvdQXU=", + "lastModified": 1712320566, + "narHash": "sha256-F/NR0Xf/AU21Nbtrni+6i+7C4dBKg9MNg7qrOmPRy6M=", "owner": "nix-community", "repo": "NUR", - "rev": "d6c5b6079d730f1b4588ea22b0ed008c245cb818", + "rev": "9ac97db2225dd90fc37c91fb6c91f2a10d331783", "type": "github" }, "original": { @@ -364,11 +381,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1705757126, - "narHash": "sha256-Eksr+n4Q8EYZKAN0Scef5JK4H6FcHc+TKNHb95CWm+c=", + "lastModified": 1712055707, + "narHash": "sha256-4XLvuSIDZJGS17xEwSrNuJLL7UjDYKGJSbK1WWX2AK8=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "f56597d53fd174f796b5a7d3ee0b494f9e2285cc", + "rev": "e35aed5fda3cc79f88ed7f1795021e559582093a", "type": "github" }, "original": { @@ -397,11 +414,11 @@ "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1705805983, - "narHash": "sha256-HluB9w7l75I4kK25uO4y6baY4fcDm2Rho0WI1DN2Hmc=", + "lastModified": 1711855048, + "narHash": "sha256-HxegAPnQJSC4cbEbF4Iq3YTlFHZKLiNTk8147EbLdGg=", "owner": "Mic92", "repo": "sops-nix", - "rev": "ae171b54e76ced88d506245249609f8c87305752", + "rev": "99b1e37f9fc0960d064a7862eb7adfb92e64fa10", "type": "github" }, "original": { @@ -412,11 +429,11 @@ }, "stable": { "locked": { - "lastModified": 1705774713, - "narHash": "sha256-j6ADaDH9XiumUzkTPlFyCBcoWYhO83lfgiSqEJF2zcs=", + "lastModified": 1712168706, + "narHash": "sha256-XP24tOobf6GGElMd0ux90FEBalUtw6NkBSVh/RlA6ik=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1b64fc1287991a9cce717a01c1973ef86cb1af0b", + "rev": "1487bdea619e4a7a53a4590c475deabb5a9d1bfb", "type": "github" }, "original": { @@ -438,17 +455,18 @@ "base16-tmux": "base16-tmux", "base16-vim": "base16-vim", "flake-compat": "flake-compat_2", + "gnome-shell": "gnome-shell", "home-manager": "home-manager_2", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1705668784, - "narHash": "sha256-U/1Qol9H5nb8FtWSXSiHY8T4Y7TOIo7NHuqe4uuiBec=", + "lastModified": 1712154372, + "narHash": "sha256-2HFQm/gpmxtMokn6pInHlTlU7mBONLb3Y1aN8SlY0tc=", "owner": "danth", "repo": "stylix", - "rev": "a9e3ce064a778b386fb88fb152c02ae95aa2cbd2", + "rev": "f9b9bc7c8e69942cd2583a3309f86fc5260f1275", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 00b1a5d..0847506 100644 --- a/flake.nix +++ b/flake.nix @@ -67,6 +67,7 @@ specialArgs = { inherit inputs; hostname = "pcLexell"; + stateVersion = "23.11"; }; }; }; diff --git a/machines/pcLexell/awesome/awesome/rc.lua b/machines/pcLexell/awesome/awesome/rc.lua index 9e7ced8..1a4722c 100644 --- a/machines/pcLexell/awesome/awesome/rc.lua +++ b/machines/pcLexell/awesome/awesome/rc.lua @@ -65,7 +65,7 @@ end -- }}} -- {{{ Variable definitions --- Themes define colours, icons, font and wallpapers. +-- Themes define colours, icons, font, etc beautiful.init(gears.filesystem.get_themes_dir() .. "mytheme/theme.lua") -- This is used later as the default terminal and editor to run. @@ -176,7 +176,7 @@ local tasklist_buttons = gears.table.join( local function set_wallpaper(s) -- Wallpaper - -- beautiful.wallpaper = false + --beautiful.wallpaper = false if beautiful.wallpaper then local wallpaper = beautiful.wallpaper -- If wallpaper is a function, call it with the screen @@ -185,8 +185,9 @@ local function set_wallpaper(s) end gears.wallpaper.maximized(wallpaper, s, true) else - gears.wallpaper.set(beautiful.bg_normal) + gears.wallpaper.set(beautiful.bg_normal) end + --gears.wallpaper.set(beautiful.bg_normal) end -- Re-set wallpaper when a screen's geometry changes (e.g. different resolution) diff --git a/machines/pcLexell/configuration.nix b/machines/pcLexell/configuration.nix index c41c9a0..ada64c3 100644 --- a/machines/pcLexell/configuration.nix +++ b/machines/pcLexell/configuration.nix @@ -4,6 +4,7 @@ { config, pkgs, + stateVersion, ... }: { imports = [ @@ -99,5 +100,5 @@ # this value at the release version of the first install of this system. # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "23.11"; # Did you read the comment? + system.stateVersion = stateVersion; # Did you read the comment? } diff --git a/machines/pcLexell/default.nix b/machines/pcLexell/default.nix index 9f57e3b..b0b5ace 100644 --- a/machines/pcLexell/default.nix +++ b/machines/pcLexell/default.nix @@ -134,9 +134,9 @@ in { defaultNetwork.settings.dns_enabled = true; autoPrune.enable = true; #defaultNetwork.settings.dns_enabled = true; - enableNvidia = true; # Enable use of NVidia GPUs from within containers #extraOptions = "--iptables=false"; # Makes shure that Podman/Docker doesn't alter the firewall }; + containers.cdi.dynamic.nvidia.enable = true; }; nixpkgs.config.permittedInsecurePackages = [ @@ -150,7 +150,7 @@ in { environment.systemPackages = with pkgs; [ htop btop - nvtop + nvtopPackages.full glances age rage @@ -235,7 +235,25 @@ in { # Drawing krita + inkscape xournal + + skrooge + libreoffice-fresh + + iperf2 + inetutils + + uget + + # Ai + llama-cpp + ollama + # Term clients + oterm # Ollama terminal client + aichat # Terminal frontend for ollama, ChatGPT, etc + gpt4all + jan # Jan is an open source alternative to ChatGPT that runs 100% offline on your computer ]; console = { diff --git a/machines/pcLexell/gpg.nix b/machines/pcLexell/gpg.nix index ee37b96..d7820c4 100644 --- a/machines/pcLexell/gpg.nix +++ b/machines/pcLexell/gpg.nix @@ -32,7 +32,7 @@ in { programs.gnupg.agent = { enable = true; enableSSHSupport = true; - pinentryFlavor = "qt"; + pinentryPackage = pkgs.pinentry-qt; }; environment.shellAliases = { diff --git a/machines/pcLexell/i3.nix b/machines/pcLexell/i3.nix new file mode 100644 index 0000000..e3644bc --- /dev/null +++ b/machines/pcLexell/i3.nix @@ -0,0 +1,30 @@ +{ + config, + pkgs, + lib, + inputs, + ... +}: { + services.xserver = { + windowManager.i3 = { + enable = true; + }; + displayManager.defaultSession = "none+i3"; + }; + + home-manager.users.moth = {pkgs, ...}: { + xsession.windowManager.command = '' + # See init.fish oncecall function + export ONCECALL="/tmp/oncecall-moth" + picom -b + ${pkgs.i3}/bin/i3; + ''; + }; + + programs.light.enable = true; + + environment.systemPackages = with pkgs; [ + picom + brightnessctl + ]; +} diff --git a/machines/pcLexell/local_auth.nix b/machines/pcLexell/local_auth.nix index b0b55cb..1b8eaac 100644 --- a/machines/pcLexell/local_auth.nix +++ b/machines/pcLexell/local_auth.nix @@ -18,21 +18,21 @@ in { environment.systemPackages = with pkgs; [ pam_u2f ]; - environment.etc."chownd/pam_yubikey_${constants.MainUser}" = { - text = "root /home/${constants.MainUser}/.config/Yubico/u2f_keys"; - mode = "744"; - }; + #environment.etc."chownd/pam_yubikey_${constants.MainUser}" = { + # text = "root /home/${constants.MainUser}/.config/Yubico/u2f_keys"; + # mode = "744"; + #}; #home-manager.users."${constants.MainUser}" = { # home.file.".config/Yubico/u2f_keys".text = "moth:gXHGuXRnsYbUF1BfKb5xSC7r+i+uAmbBjfewm0vI/OFNk+TJrHCdbFvI3g2+hj4NLo75/6QUJJ2oasdxeU7uDQ==,79Hf8fzAhAl2ZyDlSJXc8rmfHBstAVxMK8g9KuXrsLa0eahM8n0g9pPGLYXWL3egZpfYhI6MKVnDZfTPfXLEJw==,es256,+presencemoth:MRbRS5FudZJMlORvvOAzxXDjcvaMPWirRifxDLwc5W5rscH+7buQOyvFq7zYx2BkIa5alzjX+bukxbaP28xEIQ==,tVu11SR+plTarazBCkSr/MwKQi+486+oC8warrXmqS6maHTt7wx9iVuG4VkDUGFChlvj6TcA0rTO6OMcsa0wzA==,es256,+presence"; #}; - sops.secrets."pcLexell-moth-u2f-keys.txt" = { - path = "/home/${constants.MainUser}/.config/Yubico/u2f_keys"; - owner = "root"; - group = "root"; - mode = "744"; - sopsFile = ../../secrets/pcLexell-moth-u2f-keys.txt; - format = "binary"; - }; + #sops.secrets."pcLexell-moth-u2f-keys.txt" = { + # path = "/home/${constants.MainUser}/.config/Yubico/u2f_keys"; + # owner = "root"; + # group = "root"; + # mode = "744"; + # sopsFile = ../../secrets/pcLexell-moth-u2f-keys.txt; + # format = "binary"; + #}; security.pam.services = { login.u2fAuth = true; sudo.u2fAuth = true; diff --git a/machines/pcLexell/network.nix b/machines/pcLexell/network.nix index 74c8ca0..a3219c3 100644 --- a/machines/pcLexell/network.nix +++ b/machines/pcLexell/network.nix @@ -42,17 +42,19 @@ in { 78.153.130.171 hearty-health 192.168.1.141 pipebomb.local ''; + # 192.168.1.141 pipebomb.local + # 100.66.72.81 pipebomb.local firewall = { enable = true; - allowedTCPPorts = lib.mkForce [5900]; + allowedTCPPorts = lib.mkForce [5900 5001]; allowedTCPPortRanges = lib.mkForce []; - allowedUDPPorts = lib.mkForce []; + allowedUDPPorts = lib.mkForce [5001]; allowedUDPPortRanges = lib.mkForce []; trustedInterfaces = lib.mkForce ["lo"]; #open all ports on localhost #extraCommands = "ip6tables -A INPUT -s fe80::/10 -j ACCEPT"; }; - nameservers = ["8.8.8.8"]; - #nameservers = ["127.0.0.1" "::1"]; + #nameservers = ["8.8.8.8"]; + nameservers = ["127.0.0.1" "::1"]; }; services.dnscrypt-proxy2 = { diff --git a/machines/pcLexell/sound.nix b/machines/pcLexell/sound.nix index 79a6f49..5e6fb1f 100644 --- a/machines/pcLexell/sound.nix +++ b/machines/pcLexell/sound.nix @@ -14,6 +14,7 @@ ... }: let mutespeaker = pkgs.writeShellScriptBin "mutespeaker" (builtins.readFile ./mutespeaker.sh); + constants = import ./constants.nix; in { imports = [ ./mpd.nix @@ -29,11 +30,18 @@ in { environment.systemPackages = with pkgs; [ mutespeaker + moc ]; hardware.bluetooth.enable = true; services.blueman.enable = true; + #home-manager.users."${constants.MainUser}" = { + # programs = { + # mocp.enable = true; + # }; + #}; + systemd.user.services = { mutespeaker = { enable = true; diff --git a/machines/pcLexell/terminalThemeBuilder.py b/machines/pcLexell/terminalThemeBuilder.py index 4c9cd5c..e9d3d4c 100644 --- a/machines/pcLexell/terminalThemeBuilder.py +++ b/machines/pcLexell/terminalThemeBuilder.py @@ -1,8 +1,14 @@ +from sys import argv import json -import sys import re -STEP = 0x05 + +# args: b16_theme_file colorstep + +def get_default(l, i, d): + if i < len(l): + return l[i] + return d def read(path): with open(path) as f: @@ -12,30 +18,17 @@ def write(path, text): with open(path, "w") as f: f.write(text) -def read_theme(file): +def parse_theme(txt): ret = {} - parsed = json.loads(read(file)) + parsed = json.loads(txt) + if "palette" in parsed: + parsed = parsed["palette"] for key in parsed: value = parsed[key] if key.startswith("base"): ret[key] = "#"+str(value) return ret -def extend_theme(theme): - ret = theme.copy() - for key in theme: - value = theme[key] - if key.startswith("base"): - code = value[1:] - red = code[0:2] - green = code[2:4] - blue = code[4:6] - ret[key+"-hex-r"] = red - ret[key+"-hex-g"] = green - ret[key+"-hex-b"] = blue - ret[key+"-hex"] = code - return ret - def mustache(template, subs): i = 0 mutches = [] @@ -54,6 +47,26 @@ def mustache(template, subs): template = template[:mtch[0]] + value + template[mtch[1]:] return template +# For each baseXX theme creates +# 1. baseXX-hex with same value +# 2. baseXX-hex-r with only red componenet +# 3. baseXX-hex-g with only green componenet +# 4. baseXX-hex-b with only blue componenet +def extend_theme(theme): + ret = theme.copy() + for key in theme: + value = theme[key] + if key.startswith("base"): + code = value[1:] + red = code[0:2] + green = code[2:4] + blue = code[4:6] + ret[key+"-hex-r"] = red + ret[key+"-hex-g"] = green + ret[key+"-hex-b"] = blue + ret[key+"-hex"] = code + return ret + def increase(color, step): red = (color & 0xff0000) >> 0x10 green = (color & 0x00ff00) >> 0x8 @@ -68,13 +81,13 @@ def increase(color, step): color = color | blue return color -def brighter(color, step = STEP): +def brighter(color, step): if isinstance(color, int): return increase(color, step) else: return "#"+hex(increase(int(color[1:].lower(), 16), step))[2:] -def brighter_compare(basics, step = STEP): +def brighter_compare(basics, step): nom = 0 def next(color): nonlocal nom @@ -86,65 +99,86 @@ def next(color): return ret return next - -theme = read_theme(sys.argv[1]) -theme = extend_theme(theme) -locals().update(theme) - -basic = [base00, base08, base0B, base0A, base0D, base0E, base0C, base05] -brights = [base03, base08, base0B, base0A, base0D, base0E, base0C, base07] -brights = list(map(brighter_compare(basic), brights)) - -theme = {**theme, **extend_theme({ - "base-bright0": brights[0], - "base-bright1": brights[1], - "base-bright2": brights[2], - "base-bright3": brights[3], - "base-bright4": brights[4], - "base-bright5": brights[5], - "base-bright6": brights[6], - "base-bright7": brights[7], -})} - -outTheme = {"colors": { - "ansi": basic, - "brights": brights, - "background": base00, - "cursor_bg": base05, - "cursor_fg": base00, - "compose_cursor": base06, - "foreground": base05, - "scrollbar_thumb": base01, - "selection_bg": base05, - "selection_fg": base00, - "split": base03, - "visual_bell": base09, - "tab_bar": { - "background": base01, - "inactive_tab_edge": base01, - "active_tab": { - "bg_color": base03, - "fg_color": base05, - }, - "inactive_tab": { - "bg_color": base00, - "fg_color": base05, - }, - "inactive_tab_hover": { - "bg_color": base05, - "fg_color": base00, - }, - "new_tab": { - "bg_color": base00, - "fg_color": base05, - }, - "new_tab_hover": { - "bg_color": base05, - "fg_color": base00, - }, - } -}} - -print(json.dumps(outTheme)) - -write(sys.argv[3], mustache(read(sys.argv[2]), theme)) +def main(): + b16_theme_file = argv[1] + colorstep = int(get_default(argv, 2, "0x05"), 16) + output_file = get_default(argv, 4, None) + mustache_template = get_default(argv, 3, None) + theme = parse_theme(read(b16_theme_file)) + theme = extend_theme(theme) + basic = [ + theme["base00"], + theme["base08"], + theme["base0B"], + theme["base0A"], + theme["base0D"], + theme["base0E"], + theme["base0C"], + theme["base05"] + ] + brights = [ + theme["base03"], + theme["base08"], + theme["base0B"], + theme["base0A"], + theme["base0D"], + theme["base0E"], + theme["base0C"], + theme["base07"] + ] + comp = brighter_compare(basic, colorstep) + brights = list(map(comp, brights)) + theme = {**theme, **extend_theme({ + "base-bright0": brights[0], + "base-bright1": brights[1], + "base-bright2": brights[2], + "base-bright3": brights[3], + "base-bright4": brights[4], + "base-bright5": brights[5], + "base-bright6": brights[6], + "base-bright7": brights[7], + })} + outTheme = {"colors": { + "ansi": basic, + "brights": brights, + "background": theme["base00"], + "cursor_bg": theme["base05"], + "cursor_fg": theme["base00"], + "compose_cursor": theme["base06"], + "foreground": theme["base05"], + "scrollbar_thumb": theme["base01"], + "selection_bg": theme["base05"], + "selection_fg": theme["base00"], + "split": theme["base03"], + "visual_bell": theme["base09"], + "tab_bar": { + "background": theme["base01"], + "inactive_tab_edge": theme["base01"], + "active_tab": { + "bg_color": theme["base03"], + "fg_color": theme["base05"], + }, + "inactive_tab": { + "bg_color": theme["base00"], + "fg_color": theme["base05"], + }, + "inactive_tab_hover": { + "bg_color": theme["base05"], + "fg_color": theme["base00"], + }, + "new_tab": { + "bg_color": theme["base00"], + "fg_color": theme["base05"], + }, + "new_tab_hover": { + "bg_color": theme["base05"], + "fg_color": theme["base00"], + }, + } + }} + print(json.dumps(outTheme)) + write(output_file, mustache(read(mustache_template), theme)) + + +if __name__ == "__main__": + main() diff --git a/machines/pcLexell/text.nix b/machines/pcLexell/text.nix index f11a306..c361285 100644 --- a/machines/pcLexell/text.nix +++ b/machines/pcLexell/text.nix @@ -22,6 +22,7 @@ in { #sublime4 ripgrep # Needs for nvim setup #helix + neovide ]; programs.neovim = { enable = true; diff --git a/machines/pcLexell/theme.nix b/machines/pcLexell/theme.nix index 52a1987..f7e005e 100644 --- a/machines/pcLexell/theme.nix +++ b/machines/pcLexell/theme.nix @@ -22,13 +22,14 @@ fishThemeTemplate = pkgs.writeText "fishThemeTemplate" (builtins.readFile ./fish.mustache); terminalTheme = pkgs.runCommand "terminalThemeBuilder" {} '' mkdir $out - ${pkgs.python312}/bin/python ${terminalThemeBuilderPy} ${jsonTheme} ${fishThemeTemplate} $out/theme.fish | ${pkgs.remarshal}/bin/remarshal --if json --of toml > $out/wezterm - ''; - wallpaper = pkgs.runCommand "image.png" {} '' - COLOR=$(${pkgs.yq}/bin/yq -r .base00 ${theme}) - COLOR="#"$COLOR - ${pkgs.imagemagick}/bin/magick convert -size 1x1 xc:$COLOR $out + ${pkgs.python312}/bin/python ${terminalThemeBuilderPy} ${jsonTheme} 0x05 ${fishThemeTemplate} $out/theme.fish | ${pkgs.remarshal}/bin/remarshal --if json --of toml > $out/wezterm ''; + #wallpaper = pkgs.runCommand "image.png" {} '' + # COLOR=$(${pkgs.yq}/bin/yq -r .base00 ${theme}) + # COLOR="#"$COLOR + # ${pkgs.imagemagick}/bin/magick convert -size 1x1 xc:$COLOR $out + #''; + wallpaper = config.lib.stylix.pixel "base0A"; nfonts = pkgs.nerdfonts.override {fonts = ["FiraCode" "FiraMono"];}; in { fonts = { @@ -46,7 +47,9 @@ in { }; }; stylix = { + # TODO: replace with https://github.com/danth/stylix/blob/master/stylix/pixel.nix image = wallpaper; + #image = config.lib.stylix.pixel "base0A"; base16Scheme = theme; polarity = "dark"; fonts = {}; diff --git a/machines/pcLexell/x.nix b/machines/pcLexell/x.nix index 854d7e9..84c287e 100644 --- a/machines/pcLexell/x.nix +++ b/machines/pcLexell/x.nix @@ -16,7 +16,7 @@ constants = import ./constants.nix; in { imports = [ - ./awesome + ./i3.nix ]; services = { @@ -25,8 +25,8 @@ in { autorun = false; exportConfiguration = true; libinput.enable = true; - layout = "us,ru"; - xkbOptions = "grp:shifts_toggle"; + xkb.layout = "us,ru"; + xkb.options = "grp:shifts_toggle"; dpi = 141; #https://dpi.lv/ displayManager = { lightdm.enable = lib.mkForce false;