diff options
Diffstat (limited to '')
29 files changed, 473 insertions, 490 deletions
diff --git a/programs/default.nix b/programs/default.nix index 022705b..96d96ce 100644 --- a/programs/default.nix +++ b/programs/default.nix @@ -1,23 +1,21 @@ -{ ... }: - -{ - imports = [ - ./firefox - ./git - ./gpg - ./hypr - ./kitty - ./mako - ./neovim - ./sops - ./ssh - ./starship - ./steam - ./talc - ./unofficial-homestuck-collection - ./waybar - ./wireguard - ./wofi - ./zsh - ]; +{...}: { + imports = [ + ./firefox + ./git + ./gpg + ./hypr + ./kitty + ./mako + ./neovim + ./sops + ./ssh + ./starship + ./steam + ./talc + ./unofficial-homestuck-collection + ./waybar + ./wireguard + ./wofi + ./zsh + ]; } diff --git a/programs/firefox/default.nix b/programs/firefox/default.nix index 662f42a..58aa83c 100644 --- a/programs/firefox/default.nix +++ b/programs/firefox/default.nix @@ -1,23 +1,21 @@ -{ config, lib, pkgs, ... }: - -let - +{ + config, + lib, + pkgs, + ... +}: let extraPrefs = import ./extraPrefs.nix; userChrome = import ./userChrome.nix; - my-firefox = (pkgs.firefox.override { + my-firefox = pkgs.firefox.override { extraPrefs = extraPrefs; - }); - -in - -{ + }; +in { default.browser = lib.mkDefault "firefox"; home-manager.users.${config.user} = { programs.firefox = { - enable = true; package = my-firefox; @@ -33,7 +31,6 @@ in userChrome = userChrome; }; - }; }; } diff --git a/programs/firefox/extraPrefs.nix b/programs/firefox/extraPrefs.nix index b9e9ed2..74db984 100644 --- a/programs/firefox/extraPrefs.nix +++ b/programs/firefox/extraPrefs.nix @@ -1,22 +1,21 @@ # extra preferences that cannot be # set normally but have to instead # set in mosilla.cfg +'' // -''// + // Automatically click cookiebanners although uBlock Origin might block them + lockPref("cookiebanners.bannerClicking.enabled", true); + lockPref("cookiebanners.service.mode", 2); + lockPref("cookiebanners.service.mode.privateBrowsing", 2); -// Automatically click cookiebanners although uBlock Origin might block them -lockPref("cookiebanners.bannerClicking.enabled", true); -lockPref("cookiebanners.service.mode", 2); -lockPref("cookiebanners.service.mode.privateBrowsing", 2); + // DNT although PrivacyBadger from policy handles this + lockPref("privacy.donottrackheader.enabled", true); + lockPref("privacy.donottrackheader.value", 1); -// DNT although PrivacyBadger from policy handles this -lockPref("privacy.donottrackheader.enabled", true); -lockPref("privacy.donottrackheader.value", 1); + // New sidebar + lockPref("sidebar.revamp", true); + lockPref("sidebar.verticalTabs", true); + lockPref("sidebar.visibility", "always-show"); + lockPref("sidebar.main.tools", "history,bookmarks"); -// New sidebar -lockPref("sidebar.revamp", true); -lockPref("sidebar.verticalTabs", true); -lockPref("sidebar.visibility", "always-show"); -lockPref("sidebar.main.tools", "history,bookmarks"); - -//'' + //'' diff --git a/programs/firefox/policy.nix b/programs/firefox/policy.nix index e0a2caa..e222553 100644 --- a/programs/firefox/policy.nix +++ b/programs/firefox/policy.nix @@ -1,5 +1,4 @@ { - # policies to be set in firefox # see: https://mozilla.github.io/policy-templates/ @@ -125,5 +124,4 @@ DontCheckDefaultBrowser = true; PromptForDownloadLocation = false; PrivateBrowsingModeAvailability = 0; - } diff --git a/programs/firefox/policyExtensions.nix b/programs/firefox/policyExtensions.nix index b2e5043..51d7e9d 100644 --- a/programs/firefox/policyExtensions.nix +++ b/programs/firefox/policyExtensions.nix @@ -1,5 +1,4 @@ { - # extensions to be auto downloaded into # firefox @@ -60,5 +59,4 @@ install_url = "https://f.freya.cat/xpi/bypass_paywalls_clean-4.1.4.0.xpi"; installation_mode = "force_installed"; }; - } diff --git a/programs/firefox/policyPrefs.nix b/programs/firefox/policyPrefs.nix index a8ac797..73d2781 100644 --- a/programs/firefox/policyPrefs.nix +++ b/programs/firefox/policyPrefs.nix @@ -9,9 +9,7 @@ let Value = true; Status = "locked"; }; -in -{ - +in { # about:config Preferences # ... set policies that cannot be set using policies.json directly @@ -127,5 +125,4 @@ in "media.hardwaremediakeys.enabled" = lock-true; "browser.crashReports.unsubmittedCheck.autoSubmit2" = lock-false; "browser.aboutConfig.showWarning" = lock-false; - } diff --git a/programs/firefox/userChrome.nix b/programs/firefox/userChrome.nix index 2deefb5..ab93747 100644 --- a/programs/firefox/userChrome.nix +++ b/programs/firefox/userChrome.nix @@ -1,23 +1,23 @@ '' -/* sidebar hack to flip contents the way i want them (arrows on the left) */ -#nav-bar-customization-target { - flex-direction: row-reverse; -} + /* sidebar hack to flip contents the way i want them (arrows on the left) */ + #nav-bar-customization-target { + flex-direction: row-reverse; + } -/* remove broken padding from sidebar hack */ -#unified-extensions-button { - padding-left: 0 !important; -} + /* remove broken padding from sidebar hack */ + #unified-extensions-button { + padding-left: 0 !important; + } -/* remove padding beside search bar */ -toolbarspring { - display: none !important; -} + /* remove padding beside search bar */ + toolbarspring { + display: none !important; + } -/* remove overflow menu and everything in it */ -#nav-bar-overflow-button, -#firefox-view-button, -#alltabs-button { - visibility: collapse; -} + /* remove overflow menu and everything in it */ + #nav-bar-overflow-button, + #firefox-view-button, + #alltabs-button { + visibility: collapse; + } '' diff --git a/programs/git/default.nix b/programs/git/default.nix index d919b90..5c6a73a 100644 --- a/programs/git/default.nix +++ b/programs/git/default.nix @@ -1,6 +1,4 @@ -{ config, ... }: - -{ +{config, ...}: { home-manager.users.${config.user} = { programs.git = { enable = true; diff --git a/programs/gpg/default.nix b/programs/gpg/default.nix index e45617d..1aa145a 100644 --- a/programs/gpg/default.nix +++ b/programs/gpg/default.nix @@ -1,19 +1,23 @@ -{ config, lib, pkgs, ... }: - -let - +{ + config, + lib, + pkgs, + ... +}: let keysDir = ../../files/keys; keys = lib.attrsets.mapAttrsToList (name: type: "${keysDir}/${name}") (builtins.readDir keysDir); gpgKeys = builtins.filter (path: lib.strings.hasSuffix "asc" path) keys; - -in -{ +in { home-manager.users.${config.user} = { - # install keys into gpg keyring programs.gpg = { enable = true; - publicKeys = map (path: { source = path; trust = 5; }) gpgKeys; + publicKeys = + map (path: { + source = path; + trust = 5; + }) + gpgKeys; }; # global gpg agent @@ -23,7 +27,6 @@ in enableSshSupport = true; pinentry.package = pkgs.pinentry-curses; }; - }; # yubikey support diff --git a/programs/hypr/default.nix b/programs/hypr/default.nix index 08b2d93..4a6bd01 100644 --- a/programs/hypr/default.nix +++ b/programs/hypr/default.nix @@ -1,10 +1,8 @@ -{ ... }: - -{ - imports = [ - ./hypridle.nix - ./hyprland.nix - ./hyprlock.nix - ./hyprpaper.nix - ]; +{...}: { + imports = [ + ./hypridle.nix + ./hyprland.nix + ./hyprlock.nix + ./hyprpaper.nix + ]; } diff --git a/programs/hypr/hypridle.nix b/programs/hypr/hypridle.nix index d100291..e481e74 100644 --- a/programs/hypr/hypridle.nix +++ b/programs/hypr/hypridle.nix @@ -1,9 +1,10 @@ -{ config, lib, ... }: - { + config, + lib, + ... +}: { home-manager.users.${config.user} = { services.hypridle = { - enable = true; settings = { @@ -34,8 +35,6 @@ } ]; }; - }; }; } - diff --git a/programs/hypr/hyprland.nix b/programs/hypr/hyprland.nix index 9631674..d70a587 100644 --- a/programs/hypr/hyprland.nix +++ b/programs/hypr/hyprland.nix @@ -1,7 +1,10 @@ -{ config, pkgs, lib, inputs, ... }: - -let - +{ + config, + pkgs, + lib, + inputs, + ... +}: let system = pkgs.stdenv.hostPlatform.system; hyprland = inputs.hyprland.packages.${system}; hyprland-plugins = inputs.hyprland-plugins.packages.${system}; @@ -13,14 +16,17 @@ let inactive = "rgb(${config.theme.colors.surface.bg})"; debug = false; - -in - -{ +in { environment = { variables = { - HYPRLAND_TRACE = if debug then "1" else "0"; - AQ_TRACE = if debug then "1" else "0"; + HYPRLAND_TRACE = + if debug + then "1" + else "0"; + AQ_TRACE = + if debug + then "1" + else "0"; XDG_CURRENT_DESKTOP = "Hyprland"; XDG_SESSION_TYPE = "wayland"; @@ -57,7 +63,6 @@ in home-manager.users.${config.user} = { wayland.windowManager.hyprland = { - enable = true; package = hyprland.hyprland; @@ -72,16 +77,17 @@ in # Config settings = { - # Debug debug.disable_logs = ! debug; debug.disable_time = ! debug; debug.enable_stdout_logs = debug; # Monitors - monitor = map (monitor: - "${monitor.name}, highres, auto, ${toString monitor.scale}" - ) config.monitors; + monitor = + map ( + monitor: "${monitor.name}, highres, auto, ${toString monitor.scale}" + ) + config.monitors; # Autostart exec-once = config.autoRun; @@ -325,8 +331,6 @@ in vrr = 1; }; }; # end settings - }; # end hyprland }; # end home-manager - } diff --git a/programs/hypr/hyprlock.nix b/programs/hypr/hyprlock.nix index 8c8f63d..a93bfa4 100644 --- a/programs/hypr/hyprlock.nix +++ b/programs/hypr/hyprlock.nix @@ -1,15 +1,15 @@ -{ config, lib, ... }: - { + config, + lib, + ... +}: { default.lockScreen = lib.mkDefault "hyprlock"; home-manager.users.${config.user} = { programs.hyprlock = { - enable = true; settings = { - background = { monitor = ""; path = config.theme.wallpaper; @@ -83,7 +83,6 @@ valign = "center"; }; }; - }; }; } diff --git a/programs/hypr/hyprpaper.nix b/programs/hypr/hyprpaper.nix index ddcb6cd..13641b7 100644 --- a/programs/hypr/hyprpaper.nix +++ b/programs/hypr/hyprpaper.nix @@ -1,9 +1,10 @@ -{ config, lib, ... }: - { + config, + lib, + ... +}: { home-manager.users.${config.user} = { services.hyprpaper = { - enable = true; settings = { @@ -11,8 +12,6 @@ wallpaper = ",${config.theme.wallpaper}"; splash = false; }; - }; }; } - diff --git a/programs/kitty/default.nix b/programs/kitty/default.nix index 994da43..eac223b 100644 --- a/programs/kitty/default.nix +++ b/programs/kitty/default.nix @@ -1,13 +1,14 @@ -{ config, lib, ... }: - { + config, + lib, + ... +}: { default.terminal = lib.mkDefault "kitty"; home-manager.users.${config.user} = { programs.kitty = { - enable = true; - environment = { }; + environment = {}; extraConfig = ""; settings = { diff --git a/programs/mako/default.nix b/programs/mako/default.nix index 2bd2a56..2e28e74 100644 --- a/programs/mako/default.nix +++ b/programs/mako/default.nix @@ -1,13 +1,13 @@ -{ config, lib, ... }: - { + config, + lib, + ... +}: { home-manager.users.${config.user} = { services.mako = { - enable = true; settings = { - font = "${config.theme.font.monospace} 11"; margin = toString config.theme.outerGap; @@ -24,9 +24,7 @@ default-timeout = 5000; layer = "overlay"; icons = true; - }; - }; }; } diff --git a/programs/neovim/default.nix b/programs/neovim/default.nix index a88b9d7..16307e7 100644 --- a/programs/neovim/default.nix +++ b/programs/neovim/default.nix @@ -1,11 +1,12 @@ -{ config, lib, pkgs, ... }: - -with lib; - { + config, + lib, + pkgs, + ... +}: +with lib; { options = { neovim = { - tabWidth = mkOption { type = types.int; description = "Width of tabes in the editor."; @@ -129,7 +130,6 @@ with lib; description = "List of lsp servers to load"; default = ["clangd" "zls" "rust_analyzer" "jdtls" "kotlin_language_server"]; }; - }; }; @@ -138,7 +138,6 @@ with lib; home-manager.users.${config.user} = { programs.neovim = { - enable = true; viAlias = true; vimAlias = true; @@ -324,49 +323,49 @@ with lib; exclude = {}, }, file_popup = { - open_win_config = { - col = 1, - row = 1, - relative = "cursor", - border = "shadow", - style = "minimal", - }, - }, - open_file = { + open_win_config = { + col = 1, + row = 1, + relative = "cursor", + border = "shadow", + style = "minimal", + }, + }, + open_file = { quit_on_open = true, - window_picker = { - enable = false, - picker = "default", - chars = "abcdefghijklmnopqrstuvwxyz1234567890", - exclude = { - filetype = { "notify", "lazy", "qf", "diff", "fugitive", "fugitiveblame" }, - buftype = { "nofile", "terminal", "help" }, - }, - } - }, - remove_file = { - close_window = true, - }, + window_picker = { + enable = false, + picker = "default", + chars = "abcdefghijklmnopqrstuvwxyz1234567890", + exclude = { + filetype = { "notify", "lazy", "qf", "diff", "fugitive", "fugitiveblame" }, + buftype = { "nofile", "terminal", "help" }, + }, + } + }, + remove_file = { + close_window = true, + }, }, filters = { dotfiles = false, }, tab = { - sync = { - open = false, - close = false, - ignore = {}, - }, - }, + sync = { + open = false, + close = false, + ignore = {}, + }, + }, git = { enable = false, }, - update_cwd = true, - respect_buf_cwd = true, - update_focused_file = { - enable = true, - update_cwd = true - }, + update_cwd = true, + respect_buf_cwd = true, + update_focused_file = { + enable = true, + update_cwd = true + }, }; bind("${config.neovim.keys.menus.browser}", vim.cmd.NvimTreeToggle) @@ -485,15 +484,17 @@ with lib; plugin = nvim-lspconfig; type = "lua"; config = let - lspConfigs = map (server: '' - lspconfig["${server}"].setup({ - capabilities = capabilities - }) - '') config.neovim.lsps; + lspConfigs = + map (server: '' + lspconfig["${server}"].setup({ + capabilities = capabilities + }) + '') + config.neovim.lsps; in '' - local lspconfig = require('lspconfig') - local capabilities = require'cmp_nvim_lsp'.default_capabilities() - ${lib.concatStrings lspConfigs} + local lspconfig = require('lspconfig') + local capabilities = require'cmp_nvim_lsp'.default_capabilities() + ${lib.concatStrings lspConfigs} ''; } # Notifications @@ -534,7 +535,6 @@ with lib; ''; } ]; - }; }; }; diff --git a/programs/sops/default.nix b/programs/sops/default.nix index 5df5f22..e5b3e6f 100644 --- a/programs/sops/default.nix +++ b/programs/sops/default.nix @@ -1,30 +1,30 @@ -{ config, pkgs, inputs, ... }: - -let - +{ + config, + pkgs, + inputs, + ... +}: let isEd25519 = k: k.type == "ed25519"; getKeyPath = k: k.path; keys = builtins.filter isEd25519 config.services.openssh.hostKeys; +in { + imports = [ + inputs.sops-nix.nixosModules.sops + ]; -in -{ - imports = [ - inputs.sops-nix.nixosModules.sops - ]; - - environment.systemPackages = with pkgs; [ - sops - ]; + environment.systemPackages = with pkgs; [ + sops + ]; - sops = { - defaultSopsFile = ../../secrets.yaml; + sops = { + defaultSopsFile = ../../secrets.yaml; - gnupg.home = config.homePath + "/.gnupg"; - gnupg.sshKeyPaths = []; + gnupg.home = config.homePath + "/.gnupg"; + gnupg.sshKeyPaths = []; - secrets = { - freyanetWg = {}; - tinternetWg = {}; - }; + secrets = { + freyanetWg = {}; + tinternetWg = {}; }; + }; } diff --git a/programs/ssh/default.nix b/programs/ssh/default.nix index e1691b3..4c9b418 100644 --- a/programs/ssh/default.nix +++ b/programs/ssh/default.nix @@ -1,6 +1,8 @@ -{ config, lib, ... }: - { + config, + lib, + ... +}: { home-manager.users.${config.user} = { programs.ssh = { enable = true; diff --git a/programs/starship/default.nix b/programs/starship/default.nix index 99858d4..74fd28a 100644 --- a/programs/starship/default.nix +++ b/programs/starship/default.nix @@ -1,9 +1,10 @@ -{ config, lib, ... }: - { + config, + lib, + ... +}: { home-manager.users.${config.user} = { programs.starship = { - enable = true; settings = { @@ -43,7 +44,6 @@ format = "at [$symbol$branch(:$remote_branch)]($style) "; }; }; - }; }; } diff --git a/programs/steam/default.nix b/programs/steam/default.nix index 35610ae..65deeaa 100644 --- a/programs/steam/default.nix +++ b/programs/steam/default.nix @@ -1,26 +1,25 @@ -{ lib, ... }: +{lib, ...}: { + nixpkgs.config.allowUnfreePredicate = pkg: + builtins.elem (lib.getName pkg) [ + "steam" + "steam-original" + "steam-runtime" + ]; -{ - nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ - "steam" - "steam-original" - "steam-runtime" - ]; + programs.gamescope = { + enable = true; + capSysNice = true; + }; - programs.gamescope = { - enable = true; - capSysNice = true; - }; + programs.steam = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + localNetworkGameTransfers.openFirewall = true; + gamescopeSession.enable = true; + }; - programs.steam = { - enable = true; - remotePlay.openFirewall = true; - dedicatedServer.openFirewall = true; - localNetworkGameTransfers.openFirewall = true; - gamescopeSession.enable = true; - }; - - # controllers - hardware.xone.enable = true; - hardware.steam-hardware.enable = true; + # controllers + hardware.xone.enable = true; + hardware.steam-hardware.enable = true; } diff --git a/programs/talc/default.nix b/programs/talc/default.nix index 9c59d3f..92ba578 100644 --- a/programs/talc/default.nix +++ b/programs/talc/default.nix @@ -1,12 +1,15 @@ -{ config, pkgs, inputs, ... }: - -let - system = pkgs.stdenv.hostPlatform.system; - talc = inputs.talc.packages.${system}; +{ + config, + pkgs, + inputs, + ... +}: let + system = pkgs.stdenv.hostPlatform.system; + talc = inputs.talc.packages.${system}; in { - home-manager.users.${config.user} = { - home.packages = [ - talc.talc - ]; - }; + home-manager.users.${config.user} = { + home.packages = [ + talc.talc + ]; + }; } diff --git a/programs/unofficial-homestuck-collection/default.nix b/programs/unofficial-homestuck-collection/default.nix index 19b792b..7b66917 100644 --- a/programs/unofficial-homestuck-collection/default.nix +++ b/programs/unofficial-homestuck-collection/default.nix @@ -1,12 +1,15 @@ -{ config, pkgs, inputs, ... }: - -let - system = pkgs.stdenv.hostPlatform.system; - unofficial-homestuck-collection = inputs.unofficial-homestuck-collection.packages.${system}; +{ + config, + pkgs, + inputs, + ... +}: let + system = pkgs.stdenv.hostPlatform.system; + unofficial-homestuck-collection = inputs.unofficial-homestuck-collection.packages.${system}; in { - home-manager.users.${config.user} = { - home.packages = [ - unofficial-homestuck-collection.unofficial-homestuck-collection - ]; - }; + home-manager.users.${config.user} = { + home.packages = [ + unofficial-homestuck-collection.unofficial-homestuck-collection + ]; + }; } diff --git a/programs/waybar/default.nix b/programs/waybar/default.nix index 6e835fb..fe68cd7 100644 --- a/programs/waybar/default.nix +++ b/programs/waybar/default.nix @@ -1,80 +1,82 @@ -{ config, lib, ... }: - { + config, + lib, + ... +}: { home-manager.users.${config.user} = { programs.waybar = { - enable = true; - settings = [{ - height = 24; - layer = "top"; - position = "top"; - spacing = 4; + settings = [ + { + height = 24; + layer = "top"; + position = "top"; + spacing = 4; - modules-left = [ - "hyprland/workspaces" - ]; - modules-center = [ - "clock" - ]; - modules-right = [ - "battery" - "wireplumber" - "network" - "tray" - ]; + modules-left = [ + "hyprland/workspaces" + ]; + modules-center = [ + "clock" + ]; + modules-right = [ + "battery" + "wireplumber" + "network" + "tray" + ]; - "hyprland/workspaces" = { - disable-scroll = true; - all-outputs = true; - format = "{name}"; - }; - - battery = { - interval = 1; - states = { - warning = 30; - critical = 15; + "hyprland/workspaces" = { + disable-scroll = true; + all-outputs = true; + format = "{name}"; }; - format = " {capacity}%"; - format-charging = " {capacity}%"; - format-plugged = " {capacity}%"; - format-full = " {capacity}%"; - format-warning = " {capacity}%"; - format-critical = " {capacity}%"; - }; - wireplumber = { - format = " {volume}%"; - format-bluetooth = " {volume}%"; - format-muted = " muted"; - scroll-step = 1; - on-click = "pavucontrol"; - ignored-sinks = ["Easy Effects Sink"]; - }; + battery = { + interval = 1; + states = { + warning = 30; + critical = 15; + }; + format = " {capacity}%"; + format-charging = " {capacity}%"; + format-plugged = " {capacity}%"; + format-full = " {capacity}%"; + format-warning = " {capacity}%"; + format-critical = " {capacity}%"; + }; - network = { - format = " disconnected"; - format-wifi = " {essid}"; - format-ethernet = " {ipaddr}/{cidr}"; - format-disconnected = " disconnected"; - max-length = 50; - on-click = "nm-connection-editor"; - }; + wireplumber = { + format = " {volume}%"; + format-bluetooth = " {volume}%"; + format-muted = " muted"; + scroll-step = 1; + on-click = "pavucontrol"; + ignored-sinks = ["Easy Effects Sink"]; + }; - clock = { - interval = 1; - format = "{:%Y-%m-%d %a %H:%M:%S}"; - }; + network = { + format = " disconnected"; + format-wifi = " {essid}"; + format-ethernet = " {ipaddr}/{cidr}"; + format-disconnected = " disconnected"; + max-length = 50; + on-click = "nm-connection-editor"; + }; - tray = { - spacing = config.theme.outerGap; - }; - }]; + clock = { + interval = 1; + format = "{:%Y-%m-%d %a %H:%M:%S}"; + }; + tray = { + spacing = config.theme.outerGap; + }; + } + ]; - style = import ./style.nix { theme = config.theme; }; + style = import ./style.nix {theme = config.theme;}; }; }; } diff --git a/programs/waybar/style.nix b/programs/waybar/style.nix index 0b84514..33db673 100644 --- a/programs/waybar/style.nix +++ b/programs/waybar/style.nix @@ -1,115 +1,108 @@ -{ theme }: +{theme}: let + fg = "#${theme.colors.fg}"; + bg = "#${theme.colors.bg}"; + surface-fg = "#${theme.colors.surface.fg}"; + surface-bg = "#${theme.colors.surface.bg}"; + primary = "#${theme.colors.primary}"; + success = "#${theme.colors.success}"; + warning = "#${theme.colors.warning}"; + error = "#${theme.colors.error}"; + fontSize = "${toString theme.font.size}px"; + outerGap = "${toString theme.outerGap}px"; + innerGap = "${toString theme.innerGap}px"; + outerRadius = "${toString theme.outerRadius}px"; + innerRadius = "${toString theme.innerRadius}px"; + borderWidth = "${toString theme.borderWidth}px"; +in '' + /** Base */ -let + * { + all: unset; + } - fg = "#${theme.colors.fg}"; - bg = "#${theme.colors.bg}"; - surface-fg = "#${theme.colors.surface.fg}"; - surface-bg = "#${theme.colors.surface.bg}"; - primary = "#${theme.colors.primary}"; - success = "#${theme.colors.success}"; - warning = "#${theme.colors.warning}"; - error = "#${theme.colors.error}"; - fontSize = "${toString theme.font.size}px"; - outerGap = "${toString theme.outerGap}px"; - innerGap = "${toString theme.innerGap}px"; - outerRadius = "${toString theme.outerRadius}px"; - innerRadius = "${toString theme.innerRadius}px"; - borderWidth = "${toString theme.borderWidth}px"; + window#waybar { + font-family: "${theme.font.regular}", "${theme.font.icon}", "${theme.font.monospace}"; + font-size: ${fontSize}; + color: ${fg}; + background-color: ${bg}; + } -in + /** Workspaces */ -'' -/** Base */ - -* { - all: unset; -} - -window#waybar { - font-family: "${theme.font.regular}", "${theme.font.icon}", "${theme.font.monospace}"; - font-size: ${fontSize}; - color: ${fg}; - background-color: ${bg}; -} + #workspaces { + margin-left: ${outerGap}; + } -/** Workspaces */ + #workspaces button { + border-radius: ${innerRadius}; + margin: 4px 2px; + padding: 0px 7px; + background: ${surface-bg}; + color: ${surface-fg}; + } -#workspaces { - margin-left: ${outerGap}; -} + #workspaces button.focused, + #workspaces button.active { + background: ${primary}; + color: ${bg}; + } -#workspaces button { - border-radius: ${innerRadius}; - margin: 4px 2px; - padding: 0px 7px; - background: ${surface-bg}; - color: ${surface-fg}; -} + #workspaces button.urgent { + background: ${error}; + } -#workspaces button.focused, -#workspaces button.active { - background: ${primary}; - color: ${bg}; -} + /** Tray */ -#workspaces button.urgent { - background: ${error}; -} + #tray { + border: none; + margin-right: ${outerGap}; + } -/** Tray */ + #tray > .passive { + -gtk-icon-effect: dim; + } -#tray { - border: none; - margin-right: ${outerGap}; -} + #tray > .needs-attention { + -gtk-icon-effect: highlight; + } -#tray > .passive { - -gtk-icon-effect: dim; -} + /** Right modules */ -#tray > .needs-attention { - -gtk-icon-effect: highlight; -} + #battery, + #wireplumber, + #network { + padding: 0 ${outerGap}; + } -/** Right modules */ + /** Battery */ -#battery, -#wireplumber, -#network { - padding: 0 ${outerGap}; -} + #battery.charging { + color: ${success}; + } -/** Battery */ + #battery.warning:not(.charging) { + color: ${warning}; + } -#battery.charging { - color: ${success}; -} + #battery.critical:not(.charging) { + color: ${error}; + } -#battery.warning:not(.charging) { - color: ${warning}; -} + /** Wireplumber */ -#battery.critical:not(.charging) { - color: ${error}; -} + #wireplumber.muted { + color: ${error}; + } -/** Wireplumber */ + /** Network */ -#wireplumber.muted { - color: ${error}; -} + #network.wifi, + #network.ethernet { + color: ${success}; + } -/** Network */ - -#network.wifi, -#network.ethernet { - color: ${success}; -} - -#network.disconnected { - color: ${error}; -} + #network.disconnected { + color: ${error}; + } '' - diff --git a/programs/wireguard/default.nix b/programs/wireguard/default.nix index ff9c954..13669b3 100644 --- a/programs/wireguard/default.nix +++ b/programs/wireguard/default.nix @@ -1,22 +1,26 @@ -{ config, pkgs, ... }: - { + config, + pkgs, + ... +}: { environment.systemPackages = with pkgs; [ wireguard-tools ]; networking.wg-quick.interfaces = { freyanet = { - address = [ "10.2.0.2/32" "fd:cafe:dead:bee::2/128" "fe80::2/128" ]; - dns = [ "10.3.0.138" ]; + address = ["10.2.0.2/32" "fd:cafe:dead:bee::2/128" "fe80::2/128"]; + dns = ["10.3.0.138"]; privateKeyFile = config.sops.secrets.freyanetWg.path; - peers = [{ - publicKey = "x0ykwakpYCvI/pG+nR83lNUyeOE9m54thnX3bvZ+FUk="; - allowedIPs = [ "10.0.0.0/14" "fd:cafe::/32" ]; - endpoint = "cid.freya.cat:3000"; - persistentKeepalive = 25; - }]; + peers = [ + { + publicKey = "x0ykwakpYCvI/pG+nR83lNUyeOE9m54thnX3bvZ+FUk="; + allowedIPs = ["10.0.0.0/14" "fd:cafe::/32"]; + endpoint = "cid.freya.cat:3000"; + persistentKeepalive = 25; + } + ]; }; #tinternet = { diff --git a/programs/wofi/default.nix b/programs/wofi/default.nix index cb08b43..d29c0fb 100644 --- a/programs/wofi/default.nix +++ b/programs/wofi/default.nix @@ -1,11 +1,12 @@ -{ config, lib, ... }: - { + config, + lib, + ... +}: { default.appLauncher = lib.mkDefault "wofi --show drun --prompt 'Seach Programs'"; home-manager.users.${config.user} = { programs.wofi = { - enable = true; settings = { @@ -17,8 +18,7 @@ hide_scroll = true; }; - style = import ./style.nix { theme = config.theme; }; - + style = import ./style.nix {theme = config.theme;}; }; }; } diff --git a/programs/wofi/style.nix b/programs/wofi/style.nix index 40fb861..27b7205 100644 --- a/programs/wofi/style.nix +++ b/programs/wofi/style.nix @@ -1,7 +1,4 @@ -{ theme }: - -let - +{theme}: let fg = "#${theme.colors.fg}"; bg = "#${theme.colors.bg}"; surface-fg = "#${theme.colors.surface.fg}"; @@ -13,69 +10,65 @@ let outerRadius = "${toString theme.outerRadius}px"; innerRadius = "${toString theme.innerRadius}px"; borderWidth = "${toString theme.borderWidth}px"; +in '' + * { + font-family: ${theme.font.monospace}; + font-size: ${fontSize}; + } -in - -'' -* { - font-family: ${theme.font.monospace}; - font-size: ${fontSize}; -} - -/* Window */ -window { - margin: 0px; - border: ${borderWidth} solid ${primary}; - border-radius: ${outerRadius}; - background-color: ${bg}; -} + /* Window */ + window { + margin: 0px; + border: ${borderWidth} solid ${primary}; + border-radius: ${outerRadius}; + background-color: ${bg}; + } -/* Outer Box */ -#outer-box { - padding: ${outerGap}; -} + /* Outer Box */ + #outer-box { + padding: ${outerGap}; + } -/* Scroll */ -#scroll { - margin: 0px; - padding: ${innerGap}; - border: none; -} + /* Scroll */ + #scroll { + margin: 0px; + padding: ${innerGap}; + border: none; + } -/* Input */ -#input { - margin: ${innerGap}; - padding: ${innerGap}; - border: none; - color: ${surface-fg}; - background-color: ${surface-bg}; - border-radius: ${outerRadius}; -} + /* Input */ + #input { + margin: ${innerGap}; + padding: ${innerGap}; + border: none; + color: ${surface-fg}; + background-color: ${surface-bg}; + border-radius: ${outerRadius}; + } -#input:focus, -#input:active { - border: ${borderWidth} solid ${primary}; - box-shadow: none; - outline: none; -} + #input:focus, + #input:active { + border: ${borderWidth} solid ${primary}; + box-shadow: none; + outline: none; + } -/* Text */ -#text { - margin: ${innerGap}; - padding: ${innerGap}; - border: none; - color: ${fg}; -} + /* Text */ + #text { + margin: ${innerGap}; + padding: ${innerGap}; + border: none; + color: ${fg}; + } -/* Selected Entry */ -#entry:selected { - background-color: ${primary}; - border-radius: ${outerRadius}; -} + /* Selected Entry */ + #entry:selected { + background-color: ${primary}; + border-radius: ${outerRadius}; + } -#entry:selected #text { - color: ${bg}; -} + #entry:selected #text { + color: ${bg}; + } '' - diff --git a/programs/zsh/default.nix b/programs/zsh/default.nix index e0dce57..ce1820e 100644 --- a/programs/zsh/default.nix +++ b/programs/zsh/default.nix @@ -1,6 +1,4 @@ -{ config, ... }: - -{ +{config, ...}: { programs.zsh = { enable = true; enableCompletion = true; |