mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 00:29:43 -04:00
refactor: reorganize flake structure and consolidate user config
Directory structure: - Move from src/ to root level (system/, user/) - Remove unused machines (workstation, vm, laptop) User configuration: - Add user/home.nix for shared defaults (pass, essentials, default modules) - Centralize user options in user/default.nix - Move submodules to consistent paths (bash/bash, git/git, neovim/nvim, vim/vim) Module reorganization: - Flatten nested module structures (remove /modules/ subdirs) - Split CLI vs GUI tools (dev/ for CLI, gui/dev/ for GUI) - Move neovim/vim to top-level modules (not under utils/) - Remove security.enable - pass now in user/home.nix - Remove utils.enable - essentials now in user/home.nix - Add security/yubikey module with yubikey-manager, age-plugin-yubikey - Move pcb, design to gui/dev/ - Replace penpot docker wrapper with nixpkgs penpot-desktop - Remove i3 config - Remove deprecated wsl.nativeSystemd option GUI improvements: - Browser-focused mimeApps in gui/default.nix - Each WM handles its own auto-start via profileExtra Cleanup: - Update README with new structure - Update justfile paths and valid systems - Fix submodule paths in .gitmodules
This commit is contained in:
parent
ac95d1c23d
commit
14efa80cab
141 changed files with 505 additions and 1561 deletions
83
user/modules/gui/alacritty/config/alacritty.nix
Normal file
83
user/modules/gui/alacritty/config/alacritty.nix
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
{ config, ... }:
|
||||
|
||||
let
|
||||
hyprland = config.modules.user.gui.wm.hyprland;
|
||||
|
||||
in
|
||||
{
|
||||
scrolling = {
|
||||
history = 10000;
|
||||
multiplier = 3;
|
||||
};
|
||||
|
||||
window = {
|
||||
opacity = if hyprland.enable then 0.9 else 1;
|
||||
};
|
||||
|
||||
keyboard.bindings = [
|
||||
{
|
||||
key = "Enter";
|
||||
mods = "Alt | Shift";
|
||||
action = "SpawnNewInstance";
|
||||
}
|
||||
];
|
||||
|
||||
colors = {
|
||||
primary = {
|
||||
background = "#000000";
|
||||
foreground = "#cdd6f4";
|
||||
};
|
||||
|
||||
normal = {
|
||||
black = "#1e2127";
|
||||
red = "#e06c75";
|
||||
green = "#98c379";
|
||||
yellow = "#d19a66";
|
||||
blue = "#61afef";
|
||||
magenta = "#c678dd";
|
||||
cyan = "#56b6c2";
|
||||
white = "#abb2bf";
|
||||
};
|
||||
|
||||
bright = {
|
||||
black = "#5c6370";
|
||||
red = "#e06c75";
|
||||
green = "#98c379";
|
||||
yellow = "#d19a66";
|
||||
blue = "#61afef";
|
||||
magenta = "#c678dd";
|
||||
cyan = "#56b6c2";
|
||||
white = "#ffffff";
|
||||
};
|
||||
};
|
||||
|
||||
font = {
|
||||
size = 12;
|
||||
normal = {
|
||||
family = "Terminess Nerd Font Propo";
|
||||
style = "Regular";
|
||||
};
|
||||
|
||||
bold = {
|
||||
family = "Terminess Nerd Font Propo";
|
||||
style = "Bold";
|
||||
};
|
||||
|
||||
italic = {
|
||||
family = "Terminess Nerd Font Propo";
|
||||
style = "Italic";
|
||||
};
|
||||
|
||||
bold_italic = {
|
||||
family = "Terminess Nerd Font Propo";
|
||||
style = "Bold Italic";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
#cursor = {
|
||||
# shape = "Block";
|
||||
# blinking = "Always";
|
||||
# blink_interval = 750;
|
||||
#};
|
||||
}
|
||||
15
user/modules/gui/alacritty/default.nix
Normal file
15
user/modules/gui/alacritty/default.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.gui.alacritty;
|
||||
|
||||
in
|
||||
{ options.modules.user.gui.alacritty = { enable = mkEnableOption "Enable Alacritty terminal"; };
|
||||
config = mkIf cfg.enable {
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = import ./config/alacritty.nix { inherit config; };
|
||||
};
|
||||
};
|
||||
}
|
||||
53
user/modules/gui/browsers/chromium/default.nix
Normal file
53
user/modules/gui/browsers/chromium/default.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.gui.browser.chromium;
|
||||
|
||||
in
|
||||
{ options.modules.user.gui.browser.chromium = { enable = mkEnableOption "Enable Chromium browser"; };
|
||||
config = mkIf cfg.enable {
|
||||
programs = {
|
||||
chromium = rec {
|
||||
enable = true;
|
||||
package = pkgs.ungoogled-chromium;
|
||||
extensions =
|
||||
let
|
||||
vrs = package.version;
|
||||
in
|
||||
[
|
||||
rec {
|
||||
id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";
|
||||
crxPath = builtins.fetchurl {
|
||||
url = "https://clients2.google.com/service/update2/crx?response=redirect&prodversion=${vrs}&acceptformat=crx2,crx3&x=id%3D${id}%26uc";
|
||||
name = "ublock_${version}.crx";
|
||||
sha256 = "0ycnkna72n969crgxfy2lc1qbndjqrj46b9gr5l9b7pgfxi5q0ll";
|
||||
};
|
||||
version = "1.62.0";
|
||||
}
|
||||
rec {
|
||||
id = "dbepggeogbaibhgnhhndojpepiihcmeb";
|
||||
crxPath = builtins.fetchurl {
|
||||
url = "https://clients2.google.com/service/update2/crx?response=redirect&prodversion=${vrs}&acceptformat=crx2,crx3&x=id%3D${id}%26uc";
|
||||
name = "vimium_${version}.crx";
|
||||
sha256 = "0m8xski05w2r8igj675sxrlkzxlrl59j3a7m0r6c8pwcvka0r88d";
|
||||
};
|
||||
version = "2.1.2";
|
||||
}
|
||||
rec {
|
||||
id = "naepdomgkenhinolocfifgehidddafch";
|
||||
crxPath = builtins.fetchurl {
|
||||
url = "https://clients2.google.com/service/update2/crx?response=redirect&prodversion=${vrs}&acceptformat=crx2,crx3&x=id%3D${id}%26uc";
|
||||
name = "browserpass_${version}.crx";
|
||||
sha256 = "074sc9hxh7vh5j79yjhsrnhb5k4dv3bh5vip0jr30hkkni7nygbd";
|
||||
};
|
||||
version = "3.9.0";
|
||||
}
|
||||
];
|
||||
};
|
||||
browserpass = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
332
user/modules/gui/browsers/firefox/default.nix
Normal file
332
user/modules/gui/browsers/firefox/default.nix
Normal file
|
|
@ -0,0 +1,332 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.gui.browser.firefox;
|
||||
passffHost= {
|
||||
home.packages = with pkgs; [
|
||||
passff-host
|
||||
];
|
||||
home.file = {
|
||||
".mozilla/native-messaging-hosts/passff.json" = {
|
||||
text = ''
|
||||
{
|
||||
"name": "passff",
|
||||
"description": "Host for communicating with zx2c4 pass",
|
||||
"path": "${pkgs.passff-host}/share/passff-host/passff.py",
|
||||
"type": "stdio",
|
||||
"allowed_extensions": [ "passff@invicem.pro" ]
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
assertions =
|
||||
let
|
||||
pinentry = config.services.gpg-agent.pinentry.package;
|
||||
in
|
||||
[
|
||||
{
|
||||
assertion = pinentry != pkgs.pinentry-curses || pinentry != pkgs.pinentry-tty;
|
||||
message = "Firefox plugin passff requires graphical pinentry";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
options.modules.user.gui.browser.firefox = { enable = mkEnableOption "Enable Firefox browser"; };
|
||||
config = mkIf cfg.enable (passffHost // {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
profiles = {
|
||||
"${config.user.name}" = {
|
||||
isDefault = true;
|
||||
#bookmarks = config.user.bookmarks;
|
||||
|
||||
extensions = {
|
||||
packages = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
ublock-origin
|
||||
tridactyl
|
||||
#darkreader
|
||||
tampermonkey
|
||||
clearurls
|
||||
passff
|
||||
multi-account-containers
|
||||
];
|
||||
};
|
||||
|
||||
search = {
|
||||
force = true;
|
||||
default = "google";
|
||||
engines = {
|
||||
"Startpage" = {
|
||||
urls = [{
|
||||
template = "https://www.startpage.com/sp/search?q={searchTerms}";
|
||||
}];
|
||||
icon = "https://www.startpage.com/sp/cdn/favicons/favicon--default.ico";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
containersForce = true;
|
||||
containers = {
|
||||
Banking = {
|
||||
color = "green";
|
||||
icon = "dollar";
|
||||
id = 1;
|
||||
};
|
||||
Personal = {
|
||||
color = "orange";
|
||||
icon = "fingerprint";
|
||||
id = 2;
|
||||
};
|
||||
Work = {
|
||||
color = "yellow";
|
||||
icon = "briefcase";
|
||||
id = 3;
|
||||
};
|
||||
Personal_Work = {
|
||||
color = "turquoise";
|
||||
icon = "briefcase";
|
||||
id = 4;
|
||||
};
|
||||
Social = {
|
||||
color = "red";
|
||||
icon = "chill";
|
||||
id = 5;
|
||||
};
|
||||
Shopping = {
|
||||
color = "purple";
|
||||
icon = "cart";
|
||||
id = 6;
|
||||
};
|
||||
Google = {
|
||||
color = "pink";
|
||||
icon = "vacation";
|
||||
id = 7;
|
||||
};
|
||||
};
|
||||
|
||||
settings = {
|
||||
"layout.spellcheckDefault" = 0;
|
||||
"ui.key.menuAccessKeyFocuses" = false;
|
||||
"signon.rememberSignons" = false;
|
||||
"extensions.pocket.enabled" = false;
|
||||
"extensions.autoDisableScopes" = 0;
|
||||
|
||||
# May break extensions due to Nix
|
||||
"extensions.enabledScopes" = 5;
|
||||
|
||||
# May break stuff but increases privacy
|
||||
#"extensions.webextensions.restrictedDomains" = "";
|
||||
#"privacy.resistFingerprinting" = true;
|
||||
#"privacy.resistFingerprinting.letterboxing" = true;
|
||||
#"privacy.resistFingerprinting.block_mozAddonManager" = true;
|
||||
|
||||
"browser.startup.homepage_override.mstone" = "ignore";
|
||||
|
||||
"browser.aboutConfig.showWarning" = false;
|
||||
"browser.startup.page" = 0;
|
||||
"browser.formfill.enable" = false;
|
||||
"places.history.enabled" = false;
|
||||
|
||||
"browser.urlbar.suggest.history" = false;
|
||||
"browser.urlbar.suggest.topsites" = false;
|
||||
"browser.urlbar.sponsoredTopSites" = false;
|
||||
"browser.urlbar.autoFill" = false;
|
||||
"browser.urlbar.suggest.pocket" = false;
|
||||
"browser.urlbar.suggest.quicksuggest.nonsponsored" = false;
|
||||
"browser.urlbar.suggest.quicksuggest.sponsored" = false;
|
||||
"browser.toolbars.bookmarks.showOtherBookmarks" = false;
|
||||
"browser.aboutwelcome.showModal" = false;
|
||||
"browser.migrate.content-modal.about-welcome-behavior" = "";
|
||||
|
||||
"browser.newtabpage.enabled" = false;
|
||||
"browser.newtabpage.activity-stream.showSponsored" = false;
|
||||
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
|
||||
"browser.newtabpage.activity-stream.default.sites" = "";
|
||||
|
||||
"extensions.getAddons.showPane" = false;
|
||||
"extensions.htmlaboutaddons.recommendations.enabled" = false;
|
||||
"browser.discovery.enabled" = false;
|
||||
"browser.shopping.experience2023.enabled" = false;
|
||||
|
||||
"datareporting.policy.dataSubmissionEnabled" = false;
|
||||
"datareporting.healthreport.uploadEnabled" = false;
|
||||
|
||||
"toolkit.telemetry.unified" = false;
|
||||
"toolkit.telemetry.enabled" = false;
|
||||
"toolkit.telemetry.server" = "";
|
||||
"toolkit.telemetry.archive.enabled" = false;
|
||||
"toolkit.telemetry.newProfilePing.enabled" = false;
|
||||
"toolkit.telemetry.shutdownPingSender.enabled" = false;
|
||||
"toolkit.telemetry.updatePing.enabled" = false;
|
||||
"toolkit.telemetry.bhrPing.enabled" = false;
|
||||
"toolkit.telemetry.firstShutdownPing.enabled" = false;
|
||||
"toolkit.telemetry.coverage.opt-out" = false;
|
||||
"toolkit.coverage.endpoint.base" = "";
|
||||
|
||||
"browser.newtabpage.activity-stream.feeds.telemetry" = false;
|
||||
"browser.newtabpage.activity-stream.telemetry" = false;
|
||||
|
||||
"app.shield.optoutstudies.enabled" = false;
|
||||
"app.normandy.enabled" = false;
|
||||
"app.normandy.api_url" = "";
|
||||
|
||||
"breakpad.reportURL" = false;
|
||||
"browser.tabs.crashReporting.sendReport" = false;
|
||||
"browser.crashReports.unsubmittedCheck.autoSubmit2" = false;
|
||||
|
||||
"captivedetect.canonicalURL" = "";
|
||||
"network.captive-portal-service.enabled" = false;
|
||||
"network.connectivity-service.enabled" = false;
|
||||
|
||||
"browser.safebrowsing.downloads.remote.enabled" = false;
|
||||
|
||||
"network.prefetch-next" = false;
|
||||
"network.dns.disablePrefetch" = true;
|
||||
"network.predictor.enabled" = false;
|
||||
"network.predictor.enable-prefetch" = false;
|
||||
"network.http.speculative-parallel-limit" = 0;
|
||||
"network.http.speculativeConnect.enabled" = false;
|
||||
|
||||
"network.proxy.sock_remote_dns" = true;
|
||||
"network.file.disable_unc_paths" = true;
|
||||
"network.gio.supported-protocols" = "";
|
||||
|
||||
"browser.urlbar.speculativeConnect.enabled" = false;
|
||||
"browser.search.suggest.enabled" = false;
|
||||
"browser.urlbar.suggest.searches" = false;
|
||||
|
||||
"browser.urlbar.clipboard.featureGate" = false;
|
||||
"browser.urlbar.richSuggestions.featureGate" = false;
|
||||
"browser.urlbar.trending.featureGate" = false;
|
||||
"browser.urlbar.addons.featureGate" = false;
|
||||
"browser.urlbar.pocket.featureGate" = false;
|
||||
"browser.urlbar.weather.featureGate" = false;
|
||||
"browser.urlbar.yelp.featureGate" = false;
|
||||
"browser.urlbar.suggest.engines" = false;
|
||||
|
||||
"signon.autofillForms" = false;
|
||||
"signon.formlessCapture.enabled" = false;
|
||||
|
||||
"network.auth.subresource-http-auth-allow" = 1;
|
||||
|
||||
"browser.privatebrowsing.forceMediaMemoryCache" = true;
|
||||
"media.memory_cache_max_size" = 65536;
|
||||
"browser.sessionstore.privacy_level" = 2;
|
||||
"browser.shell.shortcutFavicons" = false;
|
||||
|
||||
"security.ssl.require_safe_negotiation" = true;
|
||||
"security.tls.enable_0rtt_data" = false;
|
||||
"security.OCSP.enabled" = true;
|
||||
"security.OCSP.require" = true;
|
||||
|
||||
"security.cert_pinning.enforcement_level" = 2;
|
||||
"security.remote_settings.crlite_filters.enabled" = true;
|
||||
"security.pki.crlite_mode" = 2;
|
||||
|
||||
"dom.security.https_only_mode" = true;
|
||||
"dom.security.https_only_mode_send_http_background_request" = false;
|
||||
|
||||
"security.ssl.treat_unsafe_negotiation_as_broken" = true;
|
||||
"browser.xul.error_pages.expert_bad_cert" = true;
|
||||
|
||||
"network.http.referer.XOriginTrimmingPolicy" = 2;
|
||||
|
||||
"privacy.userContext.enabled" = true;
|
||||
"privacy.userContext.ui.enabled" = true;
|
||||
|
||||
"media.peerconnection.ice.proxy_only_if_behind_proxy" = true;
|
||||
"media.peerconnection.ice.default_address_only" = true;
|
||||
|
||||
"dom.disable_window_move_resize" = true;
|
||||
|
||||
"browser.download.start_downloads_in_tmp_dir" = false;
|
||||
"browser.helperApps.deleteTempFileOnExit" = true;
|
||||
"browser.uitour.enabled" = false;
|
||||
|
||||
"devtools.debugger.remote-enabled" = false;
|
||||
"permissions.manager.defaultsUrl" = "";
|
||||
"webchannel.allowObject.urlWhitelist" = "";
|
||||
"network.IDN_show_punycode" = true;
|
||||
|
||||
"pdfjs.disabled" = false;
|
||||
"pdfjs.enableScripting" = false;
|
||||
|
||||
"browser.tabs.searchclipboardfor.middleclick" = false;
|
||||
"browser.contentanalysis.default_allow" = false;
|
||||
|
||||
"browser.download.useDownloadDir" = true;
|
||||
"browser.download.alwaysOpenPanel" = true;
|
||||
"browser.download.manager.addToRecentDocs" = false;
|
||||
"browser.download.always_ask_before_handling_new_types" = true;
|
||||
"extensions.postDownloadThirdPartyPrompt" = true;
|
||||
|
||||
"browser.contentblocking.category" = "strict";
|
||||
|
||||
"privacy.sanitize.sanitizeOnShutdown" = true;
|
||||
"privacy.clearOnShutdown.cache" = true;
|
||||
"privacy.clearOnShutdown_v2.cache" = true;
|
||||
"privacy.clearOnShutdown.downloads" = true;
|
||||
"privacy.clearOnShutdown.formdata" = true;
|
||||
"privacy.clearOnShutdown.history" = true;
|
||||
"privacy.clearOnShutdown_v2.historyFormDataAndDownloads" = true;
|
||||
|
||||
"privacy.clearOnShutdown.cookies" = false;
|
||||
"privacy.clearOnShutdown.offlineApss" = true;
|
||||
"privacy.clearOnShutdown.sessions" = true;
|
||||
"privacy.clearOnShutdown_v2.cookiesAndStorage" = false;
|
||||
|
||||
"privacy.clearSiteData.cache" = true;
|
||||
"privacy.clearSiteData.cookiesAndStorage" = false;
|
||||
"privacy.clearSiteData.historyFormDataAndDownloads" = true;
|
||||
|
||||
"privacy.cpd.cache" = true;
|
||||
"privacy.clearHistory.cache" = true;
|
||||
"privacy.cpd.formdata" = true;
|
||||
"privacy.cpd.history" = true;
|
||||
"privacy.clearHistory.historyFormDataAndDownloads" = true;
|
||||
"privacy.cpd.cookies" = false;
|
||||
"privacy.cpd.sessions" = true;
|
||||
"privacy.cpd.offlineApps" = false;
|
||||
"privacy.clearHistory.cookiesAndStorage" = false;
|
||||
|
||||
"privacy.sanitize.timeSpan" = 0;
|
||||
|
||||
"privacy.window.maxInnerWidth" = 1600;
|
||||
"privacy.window.maxInnerHeight" = 900;
|
||||
|
||||
"privacy.spoof_english" = 1;
|
||||
|
||||
"browser.display.use_system_colors" = false;
|
||||
"widget.non-native-theme.enabled" = true;
|
||||
|
||||
"browser.link.open_newwindow" = 3;
|
||||
"browser.link.open_newwindow.restriction" = 0;
|
||||
"browser.chrome.site_icons" = false;
|
||||
"browser.download.forbid_open_with" = true;
|
||||
|
||||
"extensions.blocklist.enabled" = true;
|
||||
"network.http.referer.spoofSource" = false;
|
||||
"security.dialog_enable_delay" = 1000;
|
||||
"privacy.firstparty.isolate" = false;
|
||||
"extensions.webcompat.enable_shims" = true;
|
||||
"security.tls.version.enable-deprecated" = false;
|
||||
"extensions.webcompat-reporter.enabled" = false;
|
||||
"extensions.quarantinedDomains.enabled" = true;
|
||||
|
||||
"media.videocontrols.picture-in-picture.enabled" = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
policies = {
|
||||
WebsiteFilter = {
|
||||
Block = [
|
||||
"*://*.pokemonshowdown.com/*"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
||||
36
user/modules/gui/corn/default.nix
Normal file
36
user/modules/gui/corn/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.gui.corn;
|
||||
|
||||
in
|
||||
{ options.modules.user.gui.corn = { enable = mkEnableOption "Enable Bitcoin client applications"; };
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
#trezor-suite
|
||||
#trezorctl
|
||||
#trezord
|
||||
|
||||
sparrow
|
||||
];
|
||||
|
||||
#systemd.user.services = {
|
||||
# trezord = {
|
||||
# Unit = {
|
||||
# Description = "Trezor Bridge";
|
||||
# After = [ "network.target" ];
|
||||
# Wants = [ "network.target" ];
|
||||
# PartOf = [ "graphical-session.target" ];
|
||||
# };
|
||||
# Service = {
|
||||
# ExecStart = "${pkgs.trezord}/bin/trezord-go";
|
||||
# Restart = "always";
|
||||
# };
|
||||
# Install = {
|
||||
# WantedBy = [ "default.target" ];
|
||||
# };
|
||||
# };
|
||||
#};
|
||||
};
|
||||
}
|
||||
30
user/modules/gui/default.nix
Normal file
30
user/modules/gui/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
programs = config.programs;
|
||||
|
||||
defaultBrowser =
|
||||
if programs.firefox.enable then "firefox.desktop"
|
||||
else if programs.brave.enable then "brave-browser.desktop"
|
||||
else if programs.chromium.enable then "chromium.desktop"
|
||||
else null;
|
||||
|
||||
types = [
|
||||
"text/html" "application/xhtml+xml"
|
||||
"x-scheme-handler/http" "x-scheme-handler/https"
|
||||
"application/pdf"
|
||||
"image/png" "image/jpeg" "image/jpg" "image/gif"
|
||||
"image/webp" "image/avif" "image/bmp" "image/tiff" "image/svg+xml"
|
||||
"video/mp4" "video/webm" "video/mkv" "video/avi"
|
||||
"video/x-matroska" "video/quicktime"
|
||||
];
|
||||
|
||||
in
|
||||
{
|
||||
xdg.mimeApps = lib.mkIf (defaultBrowser != null) {
|
||||
enable = true;
|
||||
defaultApplications = builtins.listToAttrs (
|
||||
map (t: { name = t; value = [ defaultBrowser ]; }) types
|
||||
);
|
||||
};
|
||||
}
|
||||
14
user/modules/gui/dev/design/default.nix
Normal file
14
user/modules/gui/dev/design/default.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.gui.dev.design;
|
||||
|
||||
in
|
||||
{ options.modules.user.gui.dev.design = { enable = mkEnableOption "Enable design tools"; };
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
penpot-desktop
|
||||
];
|
||||
};
|
||||
}
|
||||
16
user/modules/gui/dev/pcb/default.nix
Normal file
16
user/modules/gui/dev/pcb/default.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.gui.dev.pcb;
|
||||
|
||||
in
|
||||
{ options.modules.user.gui.dev.pcb = { enable = mkEnableOption "Enable PCB development suite"; };
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
arduino-ide
|
||||
kicad-small
|
||||
ngspice
|
||||
];
|
||||
};
|
||||
}
|
||||
82
user/modules/gui/fun/config/discord.config.json
Normal file
82
user/modules/gui/fun/config/discord.config.json
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
{
|
||||
"settings": {
|
||||
"general": {
|
||||
"menuBar": {
|
||||
"hide": false
|
||||
},
|
||||
"tray": {
|
||||
"disable": false
|
||||
},
|
||||
"taskbar": {
|
||||
"flash": true
|
||||
},
|
||||
"window": {
|
||||
"transparent": false,
|
||||
"hideOnClose": false
|
||||
}
|
||||
},
|
||||
"privacy": {
|
||||
"blockApi": {
|
||||
"science": true,
|
||||
"typingIndicator": false,
|
||||
"fingerprinting": true
|
||||
},
|
||||
"permissions": {
|
||||
"video": null,
|
||||
"audio": true,
|
||||
"fullscreen": true,
|
||||
"notifications": null,
|
||||
"display-capture": true,
|
||||
"background-sync": false
|
||||
}
|
||||
},
|
||||
"advanced": {
|
||||
"csp": {
|
||||
"enabled": true
|
||||
},
|
||||
"cspThirdParty": {
|
||||
"spotify": true,
|
||||
"gif": true,
|
||||
"hcaptcha": true,
|
||||
"youtube": true,
|
||||
"twitter": true,
|
||||
"twitch": true,
|
||||
"streamable": true,
|
||||
"vimeo": true,
|
||||
"soundcloud": true,
|
||||
"paypal": true,
|
||||
"audius": true,
|
||||
"algolia": true,
|
||||
"reddit": true,
|
||||
"googleStorageApi": true
|
||||
},
|
||||
"currentInstance": {
|
||||
"radio": 0
|
||||
},
|
||||
"devel": {
|
||||
"enabled": true
|
||||
},
|
||||
"redirection": {
|
||||
"warn": true
|
||||
},
|
||||
"optimize": {
|
||||
"gpu": true
|
||||
},
|
||||
"webApi": {
|
||||
"webGl": true
|
||||
},
|
||||
"unix": {
|
||||
"autoscroll": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"update": {
|
||||
"notification": {
|
||||
"version": "",
|
||||
"till": ""
|
||||
}
|
||||
},
|
||||
"screenShareStore": {
|
||||
"audio": false
|
||||
}
|
||||
}
|
||||
25
user/modules/gui/fun/default.nix
Normal file
25
user/modules/gui/fun/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.gui.fun;
|
||||
|
||||
in
|
||||
{ options.modules.user.gui.fun = { enable = mkEnableOption "Enable entertainment apps"; };
|
||||
config = mkIf cfg.enable {
|
||||
#programs.obs-studio = {
|
||||
# enable = true;
|
||||
# plugins = with pkgs.obs-studio-plugins; [
|
||||
# wlrobs
|
||||
# obs-pipewire-audio-capture
|
||||
# input-overlay
|
||||
# ];
|
||||
#};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
ytmdesktop
|
||||
discordo
|
||||
webcord
|
||||
];
|
||||
};
|
||||
}
|
||||
16
user/modules/gui/utils/default.nix
Normal file
16
user/modules/gui/utils/default.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.gui.utils;
|
||||
|
||||
in
|
||||
{ options.modules.user.gui.utils = { enable = mkEnableOption "Enable desktop utils"; };
|
||||
config = mkIf cfg.enable {
|
||||
programs.btop.enable = true;
|
||||
home.packages = with pkgs; [
|
||||
gimp
|
||||
libreoffice
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
configuration {
|
||||
font: "SF Pro Rounded 10";
|
||||
show-icons: true;
|
||||
kb-cancel: "Escape,Alt+F1";
|
||||
}
|
||||
|
||||
@theme "~/.config/rofi/material-ocean.rasi"
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
* {
|
||||
background: #0f111a;
|
||||
foreground: #f1f1f1;
|
||||
selected: #ff4151;
|
||||
}
|
||||
|
||||
window {
|
||||
transparency: "real";
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
}
|
||||
|
||||
prompt {
|
||||
enabled: true;
|
||||
padding: 4px 4px 6px 6px;
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
}
|
||||
|
||||
textbox-prompt-colon {
|
||||
expand: false;
|
||||
background-color: @background;
|
||||
padding: 4px 0px 0px 6px;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
children: [ textbox-prompt-colon, entry ];
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
expand: false;
|
||||
border: 0px 0px 0px 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @selected;
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding: 0px 0px 4px 0px;
|
||||
position: center;
|
||||
}
|
||||
|
||||
entry {
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
placeholder-color: @foreground;
|
||||
expand: true;
|
||||
horizontal-align: 0;
|
||||
blink: true;
|
||||
padding: 4px 0px 0px 4px;
|
||||
}
|
||||
|
||||
case-indicator {
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
spacing: 0;
|
||||
}
|
||||
|
||||
listview {
|
||||
background-color: @background;
|
||||
columns: 1;
|
||||
spacing: 5px;
|
||||
cycle: true;
|
||||
dynamic: true;
|
||||
layout: vertical;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @background;
|
||||
children: [ inputbar, listview ];
|
||||
spacing: 5px;
|
||||
padding: 5px 5px 5px 5px;
|
||||
}
|
||||
|
||||
element {
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
orientation: horizontal;
|
||||
border-radius: 4px;
|
||||
padding: 6px 6px 6px 6px;
|
||||
}
|
||||
|
||||
element-text, element-icon {
|
||||
background-color: inherit;
|
||||
text-color: inherit;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
size: 18px;
|
||||
border: 4px;
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: @selected;
|
||||
text-color: @background;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @selected;
|
||||
}
|
||||
183
user/modules/gui/wm/hyprland/config/rofi/default.nix
Normal file
183
user/modules/gui/wm/hyprland/config/rofi/default.nix
Normal file
|
|
@ -0,0 +1,183 @@
|
|||
{ pkgs, config, ... }:
|
||||
let
|
||||
inherit (config.lib.formats.rasi) mkLiteral;
|
||||
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
package = pkgs.rofi;
|
||||
location = "center";
|
||||
terminal = "\${pkgs.alacritty}/bin/alacritty";
|
||||
plugins = with pkgs; [
|
||||
rofi-emoji
|
||||
];
|
||||
|
||||
#theme = {
|
||||
# "*" = {
|
||||
# nord0 = mkLiteral "#2e3440";
|
||||
# nord1 = mkLiteral "#3b4252";
|
||||
# nord2 = mkLiteral "#434c5e";
|
||||
# nord3 = mkLiteral "#4c566a";
|
||||
# nord4 = mkLiteral "#d8dee9";
|
||||
# nord5 = mkLiteral "#e5e9f0";
|
||||
# nord6 = mkLiteral "#eceff4";
|
||||
# nord7 = mkLiteral "#8fbcbb";
|
||||
# nord8 = mkLiteral "#88c0d0";
|
||||
# nord9 = mkLiteral "#81a1c1";
|
||||
# nord10 = mkLiteral "#5e81ac";
|
||||
# nord11 = mkLiteral "#bf616a";
|
||||
# nord12 = mkLiteral "#d08770";
|
||||
# nord13 = mkLiteral "#ebcb8b";
|
||||
# nord14 = mkLiteral "#a3be8c";
|
||||
# nord15 = mkLiteral "#b48ead";
|
||||
# spacing = 2;
|
||||
# background-color = mkLiteral "var(nord1)";
|
||||
# background = mkLiteral "var(nord1)";
|
||||
# foreground = mkLiteral "var(nord4)";
|
||||
# normal-background = mkLiteral "var(background)";
|
||||
# normal-foreground = mkLiteral "var(foreground)";
|
||||
# alternate-normal-background = mkLiteral "var(background)";
|
||||
# alternate-normal-foreground = mkLiteral "var(foreground)";
|
||||
# selected-normal-background = mkLiteral "var(nord8)";
|
||||
# selected-normal-foreground = mkLiteral "var(background)";
|
||||
# active-background = mkLiteral "var(background)";
|
||||
# active-foreground = mkLiteral "var(nord10)";
|
||||
# alternate-active-background = mkLiteral "var(background)";
|
||||
# alternate-active-foreground = mkLiteral "var(nord10)";
|
||||
# selected-active-background = mkLiteral "var(nord10)";
|
||||
# selected-active-foreground = mkLiteral "var(background)";
|
||||
# urgent-background = mkLiteral "var(background)";
|
||||
# urgent-foreground = mkLiteral "var(nord11)";
|
||||
# alternate-urgent-background = mkLiteral "var(background)";
|
||||
# alternate-urgent-foreground = mkLiteral "var(nord11)";
|
||||
# selected-urgent-background = mkLiteral "var(nord11)";
|
||||
# selected-urgent-foreground = mkLiteral "var(background)";
|
||||
# };
|
||||
#
|
||||
# element = {
|
||||
# padding = mkLiteral "0px 0px 0px 7px";
|
||||
# spacing = mkLiteral "5px";
|
||||
# border = 0;
|
||||
# cursor = mkLiteral "pointer";
|
||||
# };
|
||||
|
||||
# "element normal.normal" = {
|
||||
# background-color = mkLiteral "var(normal-background)";
|
||||
# text-color = mkLiteral "var(normal-foreground)";
|
||||
# };
|
||||
|
||||
# "element normal.urgent" = {
|
||||
# background-color = mkLiteral "var(urgent-background)";
|
||||
# text-color = mkLiteral "var(urgent-foreground)";
|
||||
# };
|
||||
|
||||
# "element normal.active" = {
|
||||
# background-color = mkLiteral "var(active-background)";
|
||||
# text-color = mkLiteral "var(active-foreground)";
|
||||
# };
|
||||
|
||||
# "element selected.normal" = {
|
||||
# background-color = mkLiteral "var(selected-normal-background)";
|
||||
# text-color = mkLiteral "var(selected-normal-foreground)";
|
||||
# };
|
||||
|
||||
# "element selected.urgent" = {
|
||||
# background-color = mkLiteral "var(selected-urgent-background)";
|
||||
# text-color = mkLiteral "var(selected-urgent-foreground)";
|
||||
# };
|
||||
|
||||
# "element selected.active" = {
|
||||
# background-color = mkLiteral "var(selected-active-background)";
|
||||
# text-color = mkLiteral "var(selected-active-foreground)";
|
||||
# };
|
||||
|
||||
# "element alternate.normal" = {
|
||||
# background-color = mkLiteral "var(alternate-normal-background)";
|
||||
# text-color = mkLiteral "var(alternate-normal-foreground)";
|
||||
# };
|
||||
|
||||
# "element alternate.urgent" = {
|
||||
# background-color = mkLiteral "var(alternate-urgent-background)";
|
||||
# text-color = mkLiteral "var(alternate-urgent-foreground)";
|
||||
# };
|
||||
|
||||
# "element alternate.active" = {
|
||||
# background-color = mkLiteral "var(alternate-active-background)";
|
||||
# text-color = mkLiteral "var(alternate-active-foreground)";
|
||||
# };
|
||||
|
||||
# "element-text" = {
|
||||
# background-color = mkLiteral "rgba(0, 0, 0, 0%)";
|
||||
# text-color = mkLiteral "inherit";
|
||||
# highlight = mkLiteral "inherit";
|
||||
# cursor = mkLiteral "inherit";
|
||||
# };
|
||||
|
||||
# "element-icon" = {
|
||||
# background-color = mkLiteral "rgba(0, 0, 0, 0%)";
|
||||
# size = mkLiteral "1.0000em";
|
||||
# text-color = mkLiteral "inherit";
|
||||
# cursor = mkLiteral "inherit";
|
||||
# };
|
||||
|
||||
# window = {
|
||||
# padding = 0;
|
||||
# border = 0;
|
||||
# background-color = mkLiteral "var(background)";
|
||||
# };
|
||||
|
||||
# mainbox = {
|
||||
# padding = 0;
|
||||
# border = 0;
|
||||
# };
|
||||
|
||||
# message = {
|
||||
# margin = mkLiteral "0px 7px";
|
||||
# };
|
||||
|
||||
# textbox = {
|
||||
# text-color = mkLiteral "var(foreground)";
|
||||
# };
|
||||
|
||||
# listview = {
|
||||
# margin = mkLiteral "0px 0px 5px";
|
||||
# scrollbar = true;
|
||||
# spacing = mkLiteral "2px";
|
||||
# fixed-height = 0;
|
||||
# };
|
||||
|
||||
# scrollbar = {
|
||||
# padding = 0;
|
||||
# handle-width = mkLiteral "14px";
|
||||
# border = 0;
|
||||
# handle-color = mkLiteral "var(nord3)";
|
||||
# };
|
||||
|
||||
# button = {
|
||||
# spacing = 0;
|
||||
# text-color = mkLiteral "var(normal-foreground)";
|
||||
# cursor = mkLiteral "pointer";
|
||||
# };
|
||||
|
||||
# "button selected" = {
|
||||
# background-color = mkLiteral "var(selected-normal-background)";
|
||||
# text-color = mkLiteral "var(selected-normal-foreground)";
|
||||
# };
|
||||
|
||||
# inputbar = {
|
||||
# padding = mkLiteral "7px";
|
||||
# margin = mkLiteral "7px";
|
||||
# spacing = 0;
|
||||
# text-color = mkLiteral "var(normal-foreground)";
|
||||
# background-color = mkLiteral "var(nord3)";
|
||||
# children = [ "entry" ];
|
||||
# };
|
||||
|
||||
# entry = {
|
||||
# spacing = 0;
|
||||
# cursor = mkLiteral "text";
|
||||
# text-color = mkLiteral "var(normal-foreground)";
|
||||
# background-color = mkLiteral "var(nord3)";
|
||||
# };
|
||||
#};
|
||||
}
|
||||
126
user/modules/gui/wm/hyprland/config/waybar/config
Normal file
126
user/modules/gui/wm/hyprland/config/waybar/config
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
{
|
||||
"layer": "top",
|
||||
"position": "top",
|
||||
"output": "HDMI-A-1",
|
||||
"modules-left": [ "custom/logo", "clock", "custom/blockheight", "custom/price", "memory", "cpu" ],
|
||||
"modules-center": [ "hyprland/workspaces" ],
|
||||
"modules-right": [ "tray", "pulseaudio", "network" ],
|
||||
"reload_style_on_change":true,
|
||||
|
||||
"custom/logo": {
|
||||
"format": "",
|
||||
"tooltip": false,
|
||||
"on-click": "alacritty --class sys-specs -e bash -c 'fastfetch; read -n 1'"
|
||||
},
|
||||
|
||||
"hyprland/workspaces": {
|
||||
"format": "<span color='#ffffff'>{icon}</span>",
|
||||
"format-icons": {
|
||||
"1": "",
|
||||
"2": "",
|
||||
"3": "",
|
||||
"4": "",
|
||||
"5": "",
|
||||
"6": "",
|
||||
"active": "",
|
||||
"default": ""
|
||||
},
|
||||
"persistent-workspaces": {
|
||||
"*": [ 2, 3, 4, 5, 6 ]
|
||||
}
|
||||
},
|
||||
|
||||
"custom/weather": {
|
||||
"format": "<span color='#ffffff'>{}</span>",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/scripts/weather.sh",
|
||||
"interval": 10,
|
||||
},
|
||||
|
||||
"custom/blockheight": {
|
||||
"format": "<span color='#ef8e19'> </span><span color='#ffffff'>{} </span>",
|
||||
"interval": 30,
|
||||
"exec": "~/.config/waybar/scripts/getBlock",
|
||||
"on-click": "xdg-open https://www.mempool.space",
|
||||
},
|
||||
|
||||
"custom/price": {
|
||||
"format": "<span color='#00ff00'>$</span><span color='#ffffff'>{}</span>",
|
||||
"interval": 10,
|
||||
"exec": "~/.config/waybar/scripts/getPrice",
|
||||
"on-click": "xdg-open https://www.coinbase.com/price/bitcoin",
|
||||
},
|
||||
|
||||
"clock": {
|
||||
"format": "{:%I:%M:%S %p}",
|
||||
"interval":1,
|
||||
"tooltip-format": "\n<big>{:%d %A}</big>\n<tt><small>{calendar}</small></tt>",
|
||||
"calendar-weeks-pos": "right",
|
||||
"today-format": "<span color='#7645AD'><b><u>{}</u></b></span>",
|
||||
"format-calendar": "<span color='#aeaeae'><b>{}</b></span>",
|
||||
"format-calendar-weeks": "<span color='#aeaeae'><b>W{:%V}</b></span>",
|
||||
"format-calendar-weekdays": "<span color='#aeaeae'><b>{}</b></span>"
|
||||
},
|
||||
|
||||
"network": {
|
||||
"format-wifi": "<span color='#ffffff'> </span>",
|
||||
"format-ethernet":"<span color='#ffffff'></span>",
|
||||
"format-disconnected": "<span class='#e11e2d'></span>",
|
||||
"tooltip-format": "{ipaddr}",
|
||||
"tooltip-format-wifi": "{essid} ({signalStrength}%) | {ipaddr}",
|
||||
"tooltip-format-ethernet": "{ifname} | {ipaddr}",
|
||||
"tooltip-format-disconnected": "Offline",
|
||||
"on-click": "alacritty -e nmtui"
|
||||
},
|
||||
|
||||
"cpu": {
|
||||
"interval": 1,
|
||||
"format": "<span color='#ffd808'> </span><span color='#ffffff'> {usage}%</span>",
|
||||
"min-length": 6,
|
||||
"max-length": 6,
|
||||
"format-icons": ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"],
|
||||
},
|
||||
|
||||
"memory": {
|
||||
"format": "<span color='#cc63ff'></span><span color='#ffffff'>{percentage}%</span>"
|
||||
},
|
||||
|
||||
"temperature": {
|
||||
"format": "<span color='#99c3ff'> </span><span color='#ffffff'>:{temperatureC}°C</span>",
|
||||
"format-critical": "<span color='#fd4400'></span><span color='#ffffff'>:{temperatureC}°C</span>",
|
||||
"interval": 1,
|
||||
"critical-threshold": 80,
|
||||
"on-click": "alacritty -e btop",
|
||||
},
|
||||
|
||||
"pulseaudio": {
|
||||
"format": "<span color='#ffffff'>{icon}</span>",
|
||||
"format-bluetooth":"",
|
||||
"format-muted": "<span font='12'></span>",
|
||||
"format-icons": {
|
||||
"headphones": "",
|
||||
"bluetooth": "",
|
||||
"handsfree": "",
|
||||
"headset": "",
|
||||
"phone": "",
|
||||
"portable": "",
|
||||
"car": "",
|
||||
"default": ["","",""]
|
||||
},
|
||||
"justify": "center",
|
||||
"on-click": "alacritty -e pulsemixer",
|
||||
"tooltip-format": "{volume}%"
|
||||
},
|
||||
|
||||
"jack": {
|
||||
"format": "{} ",
|
||||
"format-xrun": "{xruns} xruns",
|
||||
"format-disconnected": "DSP off",
|
||||
"realtime": true
|
||||
},
|
||||
|
||||
"tray": {
|
||||
"icon-size": 14,
|
||||
"spacing": 10
|
||||
},
|
||||
}
|
||||
BIN
user/modules/gui/wm/hyprland/config/waybar/scripts/getBlock
Executable file
BIN
user/modules/gui/wm/hyprland/config/waybar/scripts/getBlock
Executable file
Binary file not shown.
12
user/modules/gui/wm/hyprland/config/waybar/scripts/getPrice
Executable file
12
user/modules/gui/wm/hyprland/config/waybar/scripts/getPrice
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
response=$(curl -s "https://api.coinbase.com/v2/prices/BTC-USD/spot")
|
||||
price=$(echo "$response" | jq -r .data.amount | awk -F. '{print $1}')
|
||||
|
||||
if [ -z "$price" ]; then
|
||||
echo -e "\033[31mErr\033[0m"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "$price"
|
||||
exit 0
|
||||
24
user/modules/gui/wm/hyprland/config/waybar/scripts/weather.sh
Executable file
24
user/modules/gui/wm/hyprland/config/waybar/scripts/weather.sh
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
BSSIDS="$(nmcli device wifi list |
|
||||
awk 'NR>1 {if ($1 != "*") {print $1}}' |
|
||||
tr -d ":" |
|
||||
tr "\n" ",")"
|
||||
|
||||
LOC=""
|
||||
REQUEST_GEO="$(wget -qO - http://openwifi.su/api/v1/bssids/"$BSSIDS")"
|
||||
if [[ "$(jq ".count_results" <<< "$REQUEST_GEO")" -gt 0 ]] ; then
|
||||
LAT="$(jq ".lat" <<< "$REQUEST_GEO")"
|
||||
LON="$(jq ".lon" <<< "$REQUEST_GEO")"
|
||||
LOC="$LAT,$LON"
|
||||
fi
|
||||
|
||||
text="$(curl -s "https://wttr.in/$LOC?format=1" | sed 's/ //g')"
|
||||
tooltip="$(curl -s "https://wttr.in/$LOC?0QT" |
|
||||
sed 's/\\/\\\\/g' |
|
||||
sed ':a;N;$!ba;s/\n/\\n/g' |
|
||||
sed 's/"/\\"/g')"
|
||||
|
||||
if ! grep -q "Unknown location" <<< "$text"; then
|
||||
echo "{\"text\": \"$text\", \"tooltip\": \"<tt>$tooltip</tt>\", \"class\": \"weather\"}"
|
||||
fi
|
||||
|
||||
73
user/modules/gui/wm/hyprland/config/waybar/style.css
Normal file
73
user/modules/gui/wm/hyprland/config/waybar/style.css
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
* {
|
||||
border: none;
|
||||
font-size: 14px;
|
||||
font-family: "Terminus Nerd Font Propo" ;
|
||||
min-height: 25px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: transparent;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
#custom-logo {
|
||||
padding: 0 10px;
|
||||
color: #5277c3;
|
||||
}
|
||||
|
||||
.modules-right {
|
||||
padding-left: 5px;
|
||||
border-radius: 15px 0 0 15px;
|
||||
margin-top: 2px;
|
||||
background: #000000;
|
||||
}
|
||||
|
||||
.modules-center {
|
||||
padding: 0 15px;
|
||||
margin-top: 2px;
|
||||
border-radius: 15px 15px 15px 15px;
|
||||
background: #000000;
|
||||
}
|
||||
|
||||
.modules-left {
|
||||
border-radius: 0 15px 15px 0;
|
||||
margin-top: 2px;
|
||||
background: #000000;
|
||||
}
|
||||
|
||||
#custom-clipboard,
|
||||
#pulseaudio,
|
||||
#network,
|
||||
#disk,
|
||||
#memory,
|
||||
#backlight,
|
||||
#cpu,
|
||||
#temperature,
|
||||
#custom-weather,
|
||||
#jack,
|
||||
#tray,
|
||||
#window,
|
||||
#workspaces,
|
||||
#clock {
|
||||
padding: 0 5px;
|
||||
}
|
||||
#pulseaudio {
|
||||
padding-top: 3px;
|
||||
}
|
||||
|
||||
#temperature.critical,
|
||||
#pulseaudio.muted {
|
||||
color: #FF0000;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
#clock{
|
||||
color: #5fd1fa;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
246
user/modules/gui/wm/hyprland/default.nix
Normal file
246
user/modules/gui/wm/hyprland/default.nix
Normal file
|
|
@ -0,0 +1,246 @@
|
|||
{ pkgs, lib, config, monitors ? [], ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.gui.wm.hyprland;
|
||||
|
||||
wallpaper = builtins.fetchurl {
|
||||
url = "https://images6.alphacoders.com/117/1174033.png";
|
||||
sha256 = "1ph5m9s57076jx6042iipqx2ifzadmd5z4lf5l49wgq4jb92mp16";
|
||||
};
|
||||
|
||||
toHyprlandMonitor = m:
|
||||
"${m.name}, ${toString m.width}x${toString m.height}@${toString m.refreshRate}, ${toString m.x}x${toString m.y}, ${toString m.scale}";
|
||||
|
||||
in
|
||||
{ options.modules.user.gui.wm.hyprland = { enable = mkEnableOption "Enable Hyprland WM"; };
|
||||
config = mkIf cfg.enable {
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
|
||||
settings = {
|
||||
"$mod" = "ALT";
|
||||
"$terminal" = "${pkgs.alacritty}/bin/alacritty";
|
||||
"$menu" = "rofi -show drun -show-icons -drun-icon-theme Qogir -font 'Noto Sans 14'";
|
||||
|
||||
monitor = if monitors != []
|
||||
then map toHyprlandMonitor monitors
|
||||
else [ ", preferred, auto, 1" ];
|
||||
|
||||
exec-once = [
|
||||
"waybar"
|
||||
"hyprctl setcursor Vanilla-DMZ 24"
|
||||
];
|
||||
|
||||
bind = [
|
||||
"$mod, Return, exec, $terminal"
|
||||
"$mod, q, killactive"
|
||||
|
||||
"$mod, J, movefocus, d"
|
||||
"$mod, K, movefocus, u"
|
||||
"$mod, H, movefocus, l"
|
||||
"$mod, L, movefocus, r"
|
||||
|
||||
"$mod&SHIFT, J, movewindow, d"
|
||||
"$mod&SHIFT, K, movewindow, u"
|
||||
"$mod&SHIFT, H, movewindow, l"
|
||||
"$mod&SHIFT, L, movewindow, r"
|
||||
|
||||
"$mod, F, fullscreen"
|
||||
|
||||
", Print, exec, grim ~/Pictures/screenshot-$(date +'%Y%m%d-%H%M%S').png"
|
||||
"$mod&SHIFT, Print, exec, grim -g \"$(slurp)\" ~/Pictures/screenshot-$(date +'%Y%m%d-%H%M%S').png"
|
||||
"$mod&SHIFT, F, exec, alacritty -e sh -c 'EDITOR=nvim ranger'"
|
||||
''SHIFT, Print, exec, grim -g "$(hyprctl activewindow -j | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"')" ~/Pictures/screenshot-$(date +'%Y%m%d-%H%M%S').png''
|
||||
|
||||
"$mod, D, exec, $menu"
|
||||
"$mod&SHIFT, D, exec, rofi -modi emoji -show emoji"
|
||||
] ++ ( builtins.concatLists (builtins.genList (
|
||||
x: let
|
||||
ws = let
|
||||
c = (x + 1) / 10;
|
||||
in
|
||||
builtins.toString (x + 1 - (c * 10));
|
||||
in
|
||||
[
|
||||
"$mod, ${ws}, workspace, ${toString (x + 1)}"
|
||||
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
|
||||
])
|
||||
10)
|
||||
);
|
||||
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
];
|
||||
|
||||
windowrulev2 = [
|
||||
"float, title:(Android Emulator)"
|
||||
"float, title: Extension: (PassFF)"
|
||||
"float, size 400 600, stayfocused, class:sys-specs"
|
||||
];
|
||||
|
||||
general = {
|
||||
layout = "master";
|
||||
border_size = 0;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
};
|
||||
|
||||
master = {
|
||||
drop_at_cursor = false;
|
||||
#new_is_master = false;
|
||||
};
|
||||
|
||||
input = {
|
||||
kb_layout = "us";
|
||||
follow_mouse = 1;
|
||||
accel_profile = "flat";
|
||||
sensitivity = 0.35;
|
||||
};
|
||||
|
||||
cursor = {
|
||||
inactive_timeout = 0;
|
||||
no_hardware_cursors = true;
|
||||
hide_on_touch = false;
|
||||
use_cpu_buffer = 0;
|
||||
enable_hyprcursor = false;
|
||||
};
|
||||
|
||||
env = [
|
||||
"HYPRCURSOR_THEME,Vanilla-DMZ"
|
||||
"HYPRCURSOR_SIZE,24"
|
||||
"GTK_THEME,Juno"
|
||||
|
||||
"LIBVA_DRIVER_NAME,nvidia"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"GBM_BACKEND,nvidia-drm"
|
||||
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
package = pkgs.rofi;
|
||||
location = "center";
|
||||
terminal = "alacritty";
|
||||
plugins = with pkgs; [
|
||||
rofi-emoji
|
||||
];
|
||||
};
|
||||
|
||||
home = {
|
||||
file = {
|
||||
".config/rofi" = {
|
||||
source = ./config/rofi/config;
|
||||
recursive = true;
|
||||
};
|
||||
".config/waybar" = {
|
||||
source = ./config/waybar;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
|
||||
packages = with pkgs; [
|
||||
pulsemixer
|
||||
xdg-utils
|
||||
wl-clipboard
|
||||
cliphist
|
||||
|
||||
dconf
|
||||
|
||||
grim
|
||||
jq
|
||||
slurp
|
||||
|
||||
ranger
|
||||
highlight
|
||||
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-color-emoji
|
||||
];
|
||||
|
||||
sessionVariables = {
|
||||
NIXOS_OZONE_WL = 1;
|
||||
};
|
||||
};
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
settings = {
|
||||
ipc = "on";
|
||||
splash = false;
|
||||
splash_offset = 2.0;
|
||||
|
||||
preload =
|
||||
[ "${wallpaper}" ];
|
||||
|
||||
wallpaper = [
|
||||
",${wallpaper}"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
name = "Juno";
|
||||
package = pkgs.juno-theme;
|
||||
};
|
||||
iconTheme = {
|
||||
name = "Qogir";
|
||||
package = pkgs.qogir-icon-theme;
|
||||
};
|
||||
cursorTheme = {
|
||||
package = pkgs.vanilla-dmz;
|
||||
name = "Vanilla-DMZ";
|
||||
};
|
||||
gtk3.extraConfig = {
|
||||
gtk-application-prefer-dark-theme = 1;
|
||||
};
|
||||
gtk4.extraConfig = {
|
||||
gtk-application-prefer-dark-theme = 1;
|
||||
};
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
style = {
|
||||
name = "juno";
|
||||
package = pkgs.juno-theme;
|
||||
};
|
||||
platformTheme.name = "gtk";
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-hyprland
|
||||
];
|
||||
config.common.default = "*";
|
||||
};
|
||||
|
||||
programs = {
|
||||
imv.enable = true;
|
||||
mpv.enable = true;
|
||||
zathura.enable = true;
|
||||
};
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
# Auto-start Hyprland on tty1
|
||||
programs.bash.profileExtra = ''
|
||||
if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
|
||||
exec Hyprland
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
7
user/modules/gui/wm/sway/config/rofi/config/config.rasi
Normal file
7
user/modules/gui/wm/sway/config/rofi/config/config.rasi
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
configuration {
|
||||
font: "SF Pro Rounded 10";
|
||||
show-icons: true;
|
||||
kb-cancel: "Escape,Alt+F1";
|
||||
}
|
||||
|
||||
@theme "~/.config/rofi/material-ocean.rasi"
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
* {
|
||||
background: #0f111a;
|
||||
foreground: #f1f1f1;
|
||||
selected: #ff4151;
|
||||
}
|
||||
|
||||
window {
|
||||
transparency: "real";
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
}
|
||||
|
||||
prompt {
|
||||
enabled: true;
|
||||
padding: 4px 4px 6px 6px;
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
}
|
||||
|
||||
textbox-prompt-colon {
|
||||
expand: false;
|
||||
background-color: @background;
|
||||
padding: 4px 0px 0px 6px;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
children: [ textbox-prompt-colon, entry ];
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
expand: false;
|
||||
border: 0px 0px 0px 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @selected;
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding: 0px 0px 4px 0px;
|
||||
position: center;
|
||||
}
|
||||
|
||||
entry {
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
placeholder-color: @foreground;
|
||||
expand: true;
|
||||
horizontal-align: 0;
|
||||
blink: true;
|
||||
padding: 4px 0px 0px 4px;
|
||||
}
|
||||
|
||||
case-indicator {
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
spacing: 0;
|
||||
}
|
||||
|
||||
listview {
|
||||
background-color: @background;
|
||||
columns: 1;
|
||||
spacing: 5px;
|
||||
cycle: true;
|
||||
dynamic: true;
|
||||
layout: vertical;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @background;
|
||||
children: [ inputbar, listview ];
|
||||
spacing: 5px;
|
||||
padding: 5px 5px 5px 5px;
|
||||
}
|
||||
|
||||
element {
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
orientation: horizontal;
|
||||
border-radius: 4px;
|
||||
padding: 6px 6px 6px 6px;
|
||||
}
|
||||
|
||||
element-text, element-icon {
|
||||
background-color: inherit;
|
||||
text-color: inherit;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
size: 18px;
|
||||
border: 4px;
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: @selected;
|
||||
text-color: @background;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @selected;
|
||||
}
|
||||
183
user/modules/gui/wm/sway/config/rofi/default.nix
Normal file
183
user/modules/gui/wm/sway/config/rofi/default.nix
Normal file
|
|
@ -0,0 +1,183 @@
|
|||
{ pkgs, config, ... }:
|
||||
let
|
||||
inherit (config.lib.formats.rasi) mkLiteral;
|
||||
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
package = pkgs.rofi;
|
||||
location = "center";
|
||||
terminal = "\${pkgs.alacritty}/bin/alacritty";
|
||||
plugins = with pkgs; [
|
||||
rofi-emoji
|
||||
];
|
||||
|
||||
#theme = {
|
||||
# "*" = {
|
||||
# nord0 = mkLiteral "#2e3440";
|
||||
# nord1 = mkLiteral "#3b4252";
|
||||
# nord2 = mkLiteral "#434c5e";
|
||||
# nord3 = mkLiteral "#4c566a";
|
||||
# nord4 = mkLiteral "#d8dee9";
|
||||
# nord5 = mkLiteral "#e5e9f0";
|
||||
# nord6 = mkLiteral "#eceff4";
|
||||
# nord7 = mkLiteral "#8fbcbb";
|
||||
# nord8 = mkLiteral "#88c0d0";
|
||||
# nord9 = mkLiteral "#81a1c1";
|
||||
# nord10 = mkLiteral "#5e81ac";
|
||||
# nord11 = mkLiteral "#bf616a";
|
||||
# nord12 = mkLiteral "#d08770";
|
||||
# nord13 = mkLiteral "#ebcb8b";
|
||||
# nord14 = mkLiteral "#a3be8c";
|
||||
# nord15 = mkLiteral "#b48ead";
|
||||
# spacing = 2;
|
||||
# background-color = mkLiteral "var(nord1)";
|
||||
# background = mkLiteral "var(nord1)";
|
||||
# foreground = mkLiteral "var(nord4)";
|
||||
# normal-background = mkLiteral "var(background)";
|
||||
# normal-foreground = mkLiteral "var(foreground)";
|
||||
# alternate-normal-background = mkLiteral "var(background)";
|
||||
# alternate-normal-foreground = mkLiteral "var(foreground)";
|
||||
# selected-normal-background = mkLiteral "var(nord8)";
|
||||
# selected-normal-foreground = mkLiteral "var(background)";
|
||||
# active-background = mkLiteral "var(background)";
|
||||
# active-foreground = mkLiteral "var(nord10)";
|
||||
# alternate-active-background = mkLiteral "var(background)";
|
||||
# alternate-active-foreground = mkLiteral "var(nord10)";
|
||||
# selected-active-background = mkLiteral "var(nord10)";
|
||||
# selected-active-foreground = mkLiteral "var(background)";
|
||||
# urgent-background = mkLiteral "var(background)";
|
||||
# urgent-foreground = mkLiteral "var(nord11)";
|
||||
# alternate-urgent-background = mkLiteral "var(background)";
|
||||
# alternate-urgent-foreground = mkLiteral "var(nord11)";
|
||||
# selected-urgent-background = mkLiteral "var(nord11)";
|
||||
# selected-urgent-foreground = mkLiteral "var(background)";
|
||||
# };
|
||||
#
|
||||
# element = {
|
||||
# padding = mkLiteral "0px 0px 0px 7px";
|
||||
# spacing = mkLiteral "5px";
|
||||
# border = 0;
|
||||
# cursor = mkLiteral "pointer";
|
||||
# };
|
||||
|
||||
# "element normal.normal" = {
|
||||
# background-color = mkLiteral "var(normal-background)";
|
||||
# text-color = mkLiteral "var(normal-foreground)";
|
||||
# };
|
||||
|
||||
# "element normal.urgent" = {
|
||||
# background-color = mkLiteral "var(urgent-background)";
|
||||
# text-color = mkLiteral "var(urgent-foreground)";
|
||||
# };
|
||||
|
||||
# "element normal.active" = {
|
||||
# background-color = mkLiteral "var(active-background)";
|
||||
# text-color = mkLiteral "var(active-foreground)";
|
||||
# };
|
||||
|
||||
# "element selected.normal" = {
|
||||
# background-color = mkLiteral "var(selected-normal-background)";
|
||||
# text-color = mkLiteral "var(selected-normal-foreground)";
|
||||
# };
|
||||
|
||||
# "element selected.urgent" = {
|
||||
# background-color = mkLiteral "var(selected-urgent-background)";
|
||||
# text-color = mkLiteral "var(selected-urgent-foreground)";
|
||||
# };
|
||||
|
||||
# "element selected.active" = {
|
||||
# background-color = mkLiteral "var(selected-active-background)";
|
||||
# text-color = mkLiteral "var(selected-active-foreground)";
|
||||
# };
|
||||
|
||||
# "element alternate.normal" = {
|
||||
# background-color = mkLiteral "var(alternate-normal-background)";
|
||||
# text-color = mkLiteral "var(alternate-normal-foreground)";
|
||||
# };
|
||||
|
||||
# "element alternate.urgent" = {
|
||||
# background-color = mkLiteral "var(alternate-urgent-background)";
|
||||
# text-color = mkLiteral "var(alternate-urgent-foreground)";
|
||||
# };
|
||||
|
||||
# "element alternate.active" = {
|
||||
# background-color = mkLiteral "var(alternate-active-background)";
|
||||
# text-color = mkLiteral "var(alternate-active-foreground)";
|
||||
# };
|
||||
|
||||
# "element-text" = {
|
||||
# background-color = mkLiteral "rgba(0, 0, 0, 0%)";
|
||||
# text-color = mkLiteral "inherit";
|
||||
# highlight = mkLiteral "inherit";
|
||||
# cursor = mkLiteral "inherit";
|
||||
# };
|
||||
|
||||
# "element-icon" = {
|
||||
# background-color = mkLiteral "rgba(0, 0, 0, 0%)";
|
||||
# size = mkLiteral "1.0000em";
|
||||
# text-color = mkLiteral "inherit";
|
||||
# cursor = mkLiteral "inherit";
|
||||
# };
|
||||
|
||||
# window = {
|
||||
# padding = 0;
|
||||
# border = 0;
|
||||
# background-color = mkLiteral "var(background)";
|
||||
# };
|
||||
|
||||
# mainbox = {
|
||||
# padding = 0;
|
||||
# border = 0;
|
||||
# };
|
||||
|
||||
# message = {
|
||||
# margin = mkLiteral "0px 7px";
|
||||
# };
|
||||
|
||||
# textbox = {
|
||||
# text-color = mkLiteral "var(foreground)";
|
||||
# };
|
||||
|
||||
# listview = {
|
||||
# margin = mkLiteral "0px 0px 5px";
|
||||
# scrollbar = true;
|
||||
# spacing = mkLiteral "2px";
|
||||
# fixed-height = 0;
|
||||
# };
|
||||
|
||||
# scrollbar = {
|
||||
# padding = 0;
|
||||
# handle-width = mkLiteral "14px";
|
||||
# border = 0;
|
||||
# handle-color = mkLiteral "var(nord3)";
|
||||
# };
|
||||
|
||||
# button = {
|
||||
# spacing = 0;
|
||||
# text-color = mkLiteral "var(normal-foreground)";
|
||||
# cursor = mkLiteral "pointer";
|
||||
# };
|
||||
|
||||
# "button selected" = {
|
||||
# background-color = mkLiteral "var(selected-normal-background)";
|
||||
# text-color = mkLiteral "var(selected-normal-foreground)";
|
||||
# };
|
||||
|
||||
# inputbar = {
|
||||
# padding = mkLiteral "7px";
|
||||
# margin = mkLiteral "7px";
|
||||
# spacing = 0;
|
||||
# text-color = mkLiteral "var(normal-foreground)";
|
||||
# background-color = mkLiteral "var(nord3)";
|
||||
# children = [ "entry" ];
|
||||
# };
|
||||
|
||||
# entry = {
|
||||
# spacing = 0;
|
||||
# cursor = mkLiteral "text";
|
||||
# text-color = mkLiteral "var(normal-foreground)";
|
||||
# background-color = mkLiteral "var(nord3)";
|
||||
# };
|
||||
#};
|
||||
}
|
||||
184
user/modules/gui/wm/sway/default.nix
Normal file
184
user/modules/gui/wm/sway/default.nix
Normal file
|
|
@ -0,0 +1,184 @@
|
|||
{ pkgs, lib, config, monitors ? [], ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.gui.wm.sway;
|
||||
modifier = config.wayland.windowManager.sway.config.modifier;
|
||||
|
||||
wallpaper = builtins.fetchurl {
|
||||
url = "https://images6.alphacoders.com/117/1174033.png";
|
||||
sha256 = "1ph5m9s57076jx6042iipqx2ifzadmd5z4lf5l49wgq4jb92mp16";
|
||||
};
|
||||
|
||||
barStatus = pkgs.writeShellScript "status.sh" ''
|
||||
#!/usr/bin/env bash
|
||||
while :; do
|
||||
echo "$(ip -4 addr show eno1 | awk '/inet / {print $2}' | cut -d'/' -f1) | $(free -h | awk '/^Mem/ {print $3}') | $(date +'%I:%M:%S %p') | $(date +'%m-%d-%Y')"; sleep 1;
|
||||
done
|
||||
'';
|
||||
|
||||
toSwayOutput = m: {
|
||||
"${m.name}" = {
|
||||
resolution = "${toString m.width}x${toString m.height}@${toString m.refreshRate}Hz";
|
||||
position = "${toString m.x} ${toString m.y}";
|
||||
scale = toString m.scale;
|
||||
bg = "${wallpaper} fill";
|
||||
};
|
||||
};
|
||||
|
||||
outputConfig = if monitors != []
|
||||
then lib.mkMerge (map toSwayOutput monitors)
|
||||
else {
|
||||
"*" = { bg = "${wallpaper} fill"; };
|
||||
};
|
||||
|
||||
in
|
||||
{ options.modules.user.gui.wm.sway = { enable = mkEnableOption "Enable Sway WM"; };
|
||||
config = mkIf cfg.enable {
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
xwayland = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
|
||||
extraSessionCommands = ''
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
export GTK_THEME=Adwaita-Dark
|
||||
'';
|
||||
|
||||
config = {
|
||||
defaultWorkspace = "workspace number 1";
|
||||
|
||||
fonts = {
|
||||
names = [ "Terminus" ];
|
||||
};
|
||||
|
||||
output = outputConfig;
|
||||
modifier = "Mod1";
|
||||
menu = "rofi -show drun -show-icons -drun-icon-theme Qogir -font 'Noto Sans 14'";
|
||||
terminal = "${pkgs.alacritty}/bin/alacritty";
|
||||
|
||||
input = {
|
||||
keyboard = {
|
||||
xkb_numlock = "enabled";
|
||||
xkb_layout = "us";
|
||||
};
|
||||
pointer = {
|
||||
accel_profile = "flat";
|
||||
pointer_accel = "0.65";
|
||||
};
|
||||
};
|
||||
|
||||
bars = [
|
||||
{
|
||||
position = "top";
|
||||
statusCommand = "${barStatus}";
|
||||
fonts = {
|
||||
names = [ "Terminus" ];
|
||||
size = 12.0;
|
||||
};
|
||||
colors = {
|
||||
background = "#0A0E14";
|
||||
statusline = "#FFFFFF";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
gaps = {
|
||||
smartGaps = false;
|
||||
inner = 10;
|
||||
};
|
||||
|
||||
floating = {
|
||||
titlebar = false;
|
||||
border = 0;
|
||||
criteria = [
|
||||
{
|
||||
title = "Android Emulator";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
window = {
|
||||
titlebar = false;
|
||||
border= 0;
|
||||
};
|
||||
|
||||
keybindings = lib.mkOptionDefault {
|
||||
"${modifier}+q" = "kill";
|
||||
"Print" = "exec grim ~/Pictures/screenshot-$(date +'%Y%m%d-%H%M%S').png";
|
||||
"${modifier}+Shift+Print" = "exec grim -g \"$(slurp)\" ~/Pictures/screenshot-$(date +'%Y%m%d-%H%M%S').png";
|
||||
"${modifier}+Print" = ''exec sh -c 'grim -g "$(swaymsg -t get_tree | jq -j '"'"'.. | select(.type?) | select(.focused).rect | "\(.x),\(.y) \(.width)x\(.height)"'"'"')" ~/Pictures/screenshot-$(date +'%Y%m%d-%H%M%S').png' '';
|
||||
"${modifier}+Shift+f" = "exec alacritty -e sh -c 'EDITOR=nvim ranger'";
|
||||
"${modifier}+Shift+d" = "exec rofi -modi emoji -show emoji";
|
||||
};
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
exec_always ${pkgs.autotiling}/bin/autotiling -sr "1.61"
|
||||
'';
|
||||
};
|
||||
|
||||
programs.rofi = import ./config/rofi { inherit pkgs config lib; };
|
||||
|
||||
home.file.".config/rofi" = {
|
||||
source = ./config/rofi/config;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
xdg = {
|
||||
portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-wlr
|
||||
];
|
||||
config.common.default = "*";
|
||||
};
|
||||
};
|
||||
|
||||
#gtk = {
|
||||
# enable = true;
|
||||
# theme.package = pkgs.juno-theme;
|
||||
# theme.name = "Juno-ocean";
|
||||
# iconTheme.package = pkgs.qogir-icon-theme;
|
||||
# iconTheme.name = "Qogir";
|
||||
#};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
style.package = pkgs.juno-theme;
|
||||
platformTheme.name = "gtk";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
pavucontrol
|
||||
xdg-utils
|
||||
wl-clipboard
|
||||
autotiling
|
||||
|
||||
grim
|
||||
jq
|
||||
slurp
|
||||
|
||||
ranger
|
||||
highlight
|
||||
|
||||
nerd-fonts.terminess-ttf
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-color-emoji
|
||||
];
|
||||
|
||||
programs = {
|
||||
imv.enable = true;
|
||||
};
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
# Auto-start sway on tty1
|
||||
programs.bash.profileExtra = ''
|
||||
if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
|
||||
exec sway
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue