summaryrefslogtreecommitdiff
path: root/nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix')
-rw-r--r--nix/amdgpu.nix51
-rw-r--r--nix/audio.nix115
-rw-r--r--nix/bluetooth.nix16
-rw-r--r--nix/email.nix158
-rw-r--r--nix/gaming.nix165
-rw-r--r--nix/intel.nix15
-rw-r--r--nix/mesa_git.nix16
-rw-r--r--nix/programs/firefox.nix145
-rw-r--r--nix/programs/foot.nix50
-rw-r--r--nix/programs/kdeconnect.nix12
-rw-r--r--nix/programs/kitty.nix79
-rw-r--r--nix/programs/nvim.nix178
-rw-r--r--nix/programs/obs.nix11
-rw-r--r--nix/programs/sunshine.nix29
-rw-r--r--nix/programs/sway.nix321
-rw-r--r--nix/programs/waydroid.nix3
-rw-r--r--nix/programs/zsh.nix76
-rw-r--r--nix/scripts.nix46
-rw-r--r--nix/system.nix136
-rw-r--r--nix/user.nix156
-rw-r--r--nix/utils.nix12
21 files changed, 1790 insertions, 0 deletions
diff --git a/nix/amdgpu.nix b/nix/amdgpu.nix
new file mode 100644
index 0000000..32b317b
--- /dev/null
+++ b/nix/amdgpu.nix
@@ -0,0 +1,51 @@
+{ pkgs, ... }: {
+ boot.kernelParams = [ "amdgpu.ppfeaturemask=0xffffffff" ];
+ environment.sessionVariables = {
+ VDPAU_DRIVER = "radeonsi";
+ LIBVA_DRIVER_NAME = "radeonsi";
+ AMD_VULKAN_ICD = "RADV";
+ VK_ICD_FILENAMES="${pkgs.pkgsi686Linux.mesa.drivers}/share/vulkan/icd.d/radeon_icd.i686.json:${pkgs.mesa.drivers}/share/vulkan/icd.d/radeon_icd.x86_64.json";
+ __EGL_VENDOR_LIBRARY_FILENAMES="${pkgs.pkgsi686Linux.mesa.drivers}/share/glvnd/egl_vendor.d/50_mesa.json:${pkgs.mesa.drivers}/share/glvnd/egl_vendor.d/50_mesa.json";
+ };
+ environment.systemPackages = with pkgs; [
+ radeontop
+ (pkgs.writeShellScriptBin "proton-env-amdvlk" ''
+ export AMD_VULKAN_ICD="AMDVLK"
+ export VK_ICD_FILENAMES="${pkgs.amdvlk}/share/vulkan/icd.d/amd_icd64.json"
+ proton-env "$@"
+ '')
+ ];
+ security.wrappers = {
+ radeontop = {
+ owner = "root";
+ group = "root";
+ source = "${pkgs.radeontop}/bin/radeontop";
+ capabilities = "cap_perfmon+ep";
+ };
+ };
+# https://github.com/sibradzic/amdgpu-clocks
+# TODO: Fetch and patch scripts from the git repo.
+# environment.etc = { # XFX RX 6600
+# "default/amdgpu-custom-states.card0".text = ''
+# OD_VDDGFX_OFFSET:
+# -55mV
+# FORCE_POWER_CAP: 120000000
+# FORCE_PERF_LEVEL: auto
+# FORCE_POWER_PROFILE: 1
+# '';
+# };
+# environment.systemPackages = [ amdgpu-clocks pkgs.radeontop ];
+# systemd.services.amdgpu-clocks = {
+# description = "Set custom amdgpu clocks & voltages";
+# after = [ "multi-user.target" "rc-local.service" "systemd-user-sessions.service" ];
+# wants = [ "modprobe@amdgpu.service" ];
+# wantedBy = [ "multi-user.target" ];
+# serviceConfig = {
+# Type = "oneshot";
+# ExecStart = "${amdgpu-clocks}/bin/amdgpu-clocks";
+# ExecStop = "${amdgpu-clocks}/bin/amdgpu-clocks restore";
+# ExecReload = "${amdgpu-clocks}/bin/amdgpu-clocks";
+# RemainAfterExit = true;
+# };
+# };
+}
diff --git a/nix/audio.nix b/nix/audio.nix
new file mode 100644
index 0000000..8eaebe3
--- /dev/null
+++ b/nix/audio.nix
@@ -0,0 +1,115 @@
+{ pkgs, ... }: {
+# hardware.pulseaudio = {
+# enable = true;
+# support32Bit = true;
+# };
+# nixpkgs.config.pulseaudio = true;
+ services.pipewire = {
+ enable = true;
+ alsa.enable = true;
+ alsa.support32Bit = true;
+ pulse.enable = true;
+ extraConfig = {
+ # cat /proc/asound/card1/stream0
+ pipewire = {
+ "92-user" = {
+ "context.properties" = {
+ "default.clock.rate" = 48000;
+ "default.clock.allowed-rates" = [ 44100 48000 88200 96000 176400 192000 352800 384000 ];
+ "default.clock.quantum" = 512;
+ "default.clock.min-quantum" = 32;
+ "default.clock.max-quantum" = 4096;
+ "default.clock.quantum-limit" = 4096;
+ "default.video.width" = 640;
+ "default.video.height" = 480;
+ "default.video.rate.num" = 25;
+ "default.video.rate.denom" = 1;
+ "vm.overrides" = { };
+ };
+ "context.modules" = [{
+ "name" = "libpipewire-module-filter-chain";
+ "args" = {
+ "node.description" = "Focal Elegia EQ (Convolver)";
+ "media.name" = "Focal Elegia EQ (Convolver)";
+ "filter.graph" = {
+ "nodes" = [{
+ "type" = "builtin";
+ "name" = "Convolver EQ";
+ "label" = "convolver";
+ "config" = {
+ "filename" = [
+ "/etc/convolver/Focal_Elegia_minimum_phase_44100Hz.wav"
+ "/etc/convolver/Focal_Elegia_minimum_phase_48000Hz.wav"
+ ];
+ "resample_quality" = 10;
+ };
+ }];
+ };
+ "capture.props" = {
+ "node.name" = "eq_input.elegia_convolver_eq";
+ "media.class" = "Audio/Sink";
+ "audio.channels" = 2;
+ "audio.position" = [ "FL" "FR" ];
+ };
+ "playback.props" = {
+ "node.name" = "eq_output.elegia_convolver_eq";
+ "node.passive" = true;
+ "audio.channels" = 2;
+ "audio.position" = [ "FL" "FR" ];
+ };
+ };
+ }];
+ "stream.properties" = {
+ "resample.quality" = 8;
+ "channelmix.normalize" = false;
+ };
+ };
+ };
+ client = {
+ "92-client-user" = {
+ "stream.properties" = {
+ "resample.quality" = 8;
+ "channelmix.normalize" = false;
+ };
+ };
+ };
+ pipewire-pulse = {
+ "92-pulse-user" = {
+ "pulse.properties" = {
+ "pulse.default.format" = "S32";
+ "pulse.default.position" = [ "FL" "FR" ];
+ "vm.overrides" = { };
+ };
+ "stream.properties" = {
+ "resample.quality" = 8;
+ "channelmix.normalize" = false;
+ };
+ };
+ };
+ };
+ wireplumber = {
+ enable = true;
+ extraConfig = {
+ "alsa-conf" = {
+ "monitor.alsa.properties" = {
+ "alsa.use-acp" = true;
+ };
+ "wireplumber.profiles" = {
+ "main" = {
+ "monitor.alsa.reserve-device" = "disabled";
+ };
+ };
+ };
+ };
+ };
+ };
+ environment.systemPackages = with pkgs; [
+ pavucontrol
+ pipewire.jack
+ ];
+ security.rtkit.enable = true;
+ environment.etc = {
+ "convolver/Focal_Elegia_minimum_phase_44100Hz.wav".source = ../files/convolver/Focal_Elegia_minimum_phase_44100Hz.wav;
+ "convolver/Focal_Elegia_minimum_phase_48000Hz.wav".source = ../files/convolver/Focal_Elegia_minimum_phase_48000Hz.wav;
+ };
+}
diff --git a/nix/bluetooth.nix b/nix/bluetooth.nix
new file mode 100644
index 0000000..18b9a42
--- /dev/null
+++ b/nix/bluetooth.nix
@@ -0,0 +1,16 @@
+{ ... }: {
+ hardware.bluetooth = {
+ enable = true;
+ powerOnBoot = true;
+ settings = {
+ General = {
+ ControllerMode = "dual";
+ };
+ LE = {
+ MinConnectionInterval = 7;
+ MaxConnectionInterval = 9;
+ ConnectionLatency = 0;
+ };
+ };
+ };
+}
diff --git a/nix/email.nix b/nix/email.nix
new file mode 100644
index 0000000..1785e4f
--- /dev/null
+++ b/nix/email.nix
@@ -0,0 +1,158 @@
+{ config, pkgs, ... }: {
+ environment.systemPackages = with pkgs; [ lynx urlscan ];
+ home-manager.users.andrew = let
+ homeDir = "${config.users.users.andrew.home}";
+ in {
+ accounts.email.maildirBasePath = "mail";
+ accounts.email.accounts."andrew" = {
+ address = "andrew@akon.city";
+ realName = "Andrew Opalach";
+ userName = "andrew@akon.city";
+ maildir.path = "";
+ primary = true;
+ passwordCommand = "${pkgs.pass}/bin/pass andrew@akon.city";
+ folders.inbox = "INBOX";
+ imap = {
+ host = "mail.akon.city";
+ port = 993;
+ tls.enable = true;
+ };
+ smtp = {
+ host = "mail.akon.city";
+ port = 465;
+ tls.enable = true;
+ };
+ mbsync = {
+ enable = true;
+ create = "maildir";
+ };
+ msmtp.enable = true;
+ imapnotify = {
+ enable = true;
+ boxes = [ "INBOX" ];
+ onNotify = "${pkgs.notmuch}/bin/notmuch new";
+ onNotifyPost = "${pkgs.libnotify}/bin/notify-send '📥 New Mail!'";
+ };
+ notmuch = {
+ enable = true;
+ neomutt = {
+ enable = true;
+ virtualMailboxes = [
+ { name = "INBOX"; query = "folder:INBOX"; }
+ { name = "Sent"; query = "folder:Sent"; }
+ { name = "Archive"; query = "folder:Archive"; }
+ { name = "Drafts"; query = "folder:Drafts"; }
+ { name = "Trash"; query = "folder:Trash"; }
+ { name = "Junk"; query = "folder:Junk"; }
+ ];
+ };
+ };
+ neomutt.enable = true;
+ };
+ programs.mbsync.enable = true;
+ services.mbsync.enable = true;
+ programs.msmtp.enable = true;
+ services.imapnotify.enable = true;
+ programs.notmuch = {
+ enable = true;
+ hooks = {
+ preNew = "${pkgs.notmuch}/bin/notmuch search --output=files --format=text0 tag:deleted | xargs -0 rm -f;${pkgs.isync}/bin/mbsync --all -ndfNX";
+ };
+ };
+ programs.neomutt = {
+ enable = true;
+ vimKeys = false;
+ sidebar = {
+ enable = true;
+ width = 18;
+ shortPath = true;
+ };
+ sort = "reverse-date";
+ binds = [
+ { key = "i"; action = "noop"; map = [ "index" "pager" ]; }
+ { key = "g"; action = "noop"; map = [ "index" "pager" ]; }
+ { key = "gg"; action = "first-entry"; map = [ "index" ]; }
+ { key = "j"; action = "next-entry"; map = [ "index" ]; }
+ { key = "k"; action = "previous-entry"; map = [ "index" ]; }
+ { key = "G"; action = "last-entry"; map = [ "index" ]; }
+ { key = "<Return>"; action = "view-mailcap"; map = [ "attach" ]; }
+ { key = "l"; action = "view-mailcap"; map = [ "attach" ]; }
+ { key = "<space>"; action = "noop"; map = [ "editor" ]; }
+ { key = "j"; action = "next-line"; map = [ "pager" ]; }
+ { key = "k"; action = "previous-line"; map = [ "pager" ]; }
+ { key = "gg"; action = "top"; map = [ "pager" ]; }
+ { key = "G"; action = "bottom"; map = [ "pager" ]; }
+ { key = "l"; action = "view-attachments"; map = [ "pager" ]; }
+ { key = "h"; action = "noop"; map = [ "index" ]; }
+ { key = "h"; action = "exit"; map = [ "pager" "attach" ]; }
+ { key = "\\Ck"; action = "sidebar-prev"; map = [ "index" "pager" ]; }
+ { key = "\\Cj"; action = "sidebar-next"; map = [ "index" "pager" ]; }
+ { key = "\\Co"; action = "sidebar-open"; map = [ "index" "pager" ]; }
+ { key = "<Tab>"; action = "complete-query"; map = [ "editor" ]; }
+ { key = "l"; action = "select-entry"; map = [ "browser" ]; }
+ { key = "gg"; action = "top-page"; map = [ "browser" ]; }
+ { key = "G"; action = "bottom-page"; map = [ "browser" ]; }
+ { key = "H"; action = "view-raw-message"; map = [ "index" "pager" ]; }
+ ];
+ macros = let
+ delete-macro = "<modify-labels>+deleted<enter>";
+ undelete-macro = "<modify-labels>-deleted<enter>";
+ in [
+ { key = "\\Cb"; action = "<pipe-message>${pkgs.urlscan}/bin/urlscan -cW<enter>"; map = [ "index" "pager" ]; }
+ { key = "\\Cb"; action = "<pipe-entry>${pkgs.urlscan}/bin/urlscan -cW<enter>"; map = [ "attach" "compose" ]; }
+ { key = "h"; action = "<change-dir><kill-line>..<enter>"; map = [ "browser" ]; }
+ { key = "o"; action = "<shell-escape>${pkgs.notmuch}/bin/notmuch new<enter><sync-mailbox>"; map = [ "index" ]; }
+ { key = "\\Cd"; action = delete-macro; map = [ "index" ]; }
+ { key = "\\Cu"; action = undelete-macro; map = [ "index" ]; }
+ ];
+ extraConfig = ''
+ unmailboxes ${homeDir}/mail/INBOX
+ set mail_check_stats = yes
+ set delete = ask-yes
+
+ # https://github.com/LukeSmithxyz/mutt-wizard/blob/10a16e0ee6442425e7ca1634b1d3356e6d4d04f6/share/mutt-wizard.muttrc#L14
+ set rfc2047_parameters = yes
+ set sleep_time = 0
+ set markers = no
+ set wait_key = no
+ set reverse_name
+ set fast_reply
+ set fcc_attach
+ set mime_forward = no
+ set forward_attachments = yes
+ set forward_format = "Fwd: %s"
+ set forward_quote
+
+ set index_format="%2C (%Z) %[%D %I:%M %p] %-15.15F %s (%c, %g)"
+
+ auto_view text/html
+ auto_view application/pgp-encrypted
+ alternative_order text/plain text/enriched text/html
+
+ color normal cyan black
+ color attachment brightyellow black
+ color hdrdefault cyan black
+ color indicator black cyan
+ color markers brightred black
+ color quoted green black
+ color signature cyan black
+ color status black red
+ color tilde blue black
+ color tree red black
+
+ color index red black ~D
+ color index magenta black ~T
+
+ color header brightgreen black ^From:
+ color header brightcyan black ^To:
+ color header brightcyan black ^Reply-To:
+ color header brightcyan black ^Cc:
+ color header brightblue black ^Subject:
+
+ color body brightred black [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+
+ color body brightblue black (https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+
+ '';
+ };
+ home.file.".mailcap".source = ../files/mailcap;
+ };
+}
diff --git a/nix/gaming.nix b/nix/gaming.nix
new file mode 100644
index 0000000..2ceebd4
--- /dev/null
+++ b/nix/gaming.nix
@@ -0,0 +1,165 @@
+{ config, pkgs, ... }:
+let
+ s = config.local;
+in {
+ users.users.andrew = {
+ extraGroups = [ "gamemode" ];
+ };
+ environment.systemPackages = with pkgs; [
+ mangohud
+ umu
+ protontricks
+ lutris
+ #legendary-gl
+ prismlauncher
+ jdk23
+ retroarch
+ #dolphin-emu
+ #pcsx2
+ (ppsspp.override { enableQt = true; })
+ #cemu
+ rpcs3
+ ryujinx
+ osu-lazer-bin
+ parsec-bin
+ #r2modman
+ (pkgs.writeShellScriptBin "run-steam-gamescope" ''
+ export TTY=/dev/tty4
+ export XDG_VTNR=4
+ cd $HOME
+ exec ${pkgs.kbd}/bin/openvt --switch --login --console 4 -f -- steam-gamescope
+ '')
+ (pkgs.writeShellScriptBin "proton-env" ''
+ export STEAM_COMPAT_LAUNCHER_SERVICE=proton
+ export DXVK_HUD=compiler
+ export DXVK_LOG_LEVEL=none
+ export VKD3D_CONFIG=dxr,small_vram_rebar
+ #export VKD3D_CONFIG=dxr,disable_uav_compression
+ export VKD3D_DEBUG=none
+ export VKD3D_SHADER_DEBUG=none
+ #export VKD3D_FEATURE_LEVEL=12_2
+ #export VKD3D_SHADER_MODEL=6_7
+ #export WINEDLLOVERRIDES="dinput8,loader=n,b"
+ #export STEAM_COMPAT_MOUNTS=/mnt/ssd/SteamLibrary:/mnt/hdd/Tools
+ export mesa_glthread=true
+ xrandr --output ${s.monitors.monitor1} --primary
+ exec env --unset=SDL_VIDEODRIVER MANGOHUD=1 gamemoderun "$@"
+ '')
+ ];
+ hardware.xone.enable = true;
+ hardware.opentabletdriver.enable = true;
+# services.udev.packages = [ pkgs.dolphinEmu ];
+# boot.extraModulePackages = [
+# config.boot.kernelPackages.gcadapter-oc-kmod
+# ];
+# boot.kernelModules = [ "gcadapter_oc" ];
+ programs.gamemode = {
+ enable = true;
+ settings = {
+ general.inhibit_screensaver = 0;
+ general.renice = 10;
+ gpu = {
+ apply_gpu_optimisations = "accept-responsibility";
+ gpu_device = 0;
+ amd_performance_level = "high";
+ };
+ };
+ };
+ programs.steam = {
+ enable = true;
+ package = pkgs.steam.override {
+ extraPkgs = pkgs: with pkgs; [
+ xorg.libXcursor
+ xorg.libXi
+ xorg.libXinerama
+ xorg.libXScrnSaver
+ libpng
+ libpulseaudio
+ libvorbis
+ stdenv.cc.cc.lib
+ libkrb5
+ keyutils
+ ];
+ };
+ gamescopeSession = let
+ width = "2560";
+ height = "1440";
+ in {
+ enable = true;
+ args = [
+ "-W ${width}" "-H ${height}"
+ "-w ${width}" "-h ${height}"
+ "-r 144"
+ "-O ${s.monitors.monitor1}"
+ "--rt"
+ "-f"
+ "-e"
+# "-o 10"
+ "--adaptive-sync"
+# "--force-grab-cursor"
+# "--mangoapp"
+ ];
+ };
+ };
+ programs.gamescope = {
+ enable = true;
+ package = pkgs.gamescope;
+ capSysNice = true;
+ };
+# services.ananicy = {
+# enable = true;
+# # package = pkgs.ananicy-cpp;
+# settings = {
+# apply_nice = true;
+# };
+# extraTypes = [
+# { type = "realtime"; nice = -20; }
+# ];
+# extraRules = [
+# { name = "gamescope"; type = "realtime"; }
+# ];
+# };
+# security.wrappers = {
+# gamescope = {
+# owner = "root";
+# group = "root";
+# source = "${pkgs.gamescope}/bin/gamescope";
+# capabilities = "cap_sys_nice+eip";
+# };
+# };
+ home-manager.users.andrew = let
+ homeDir = "${config.users.users.andrew.home}";
+ in {
+ programs.mangohud = {
+ enable = true;
+ enableSessionWide = false;
+ settings = {
+ gamemode = true;
+ cpu_temp = true;
+ cpu_mhz = true;
+ vulkan_driver = true;
+ gpu_name = true;
+ gpu_junction_temp = true;
+ gpu_core_clock = true;
+ vram = true;
+ gpu_mem_temp = true;
+ gpu_mem_clock = true;
+ engine_version = true;
+ wine = true;
+ winesync = true;
+ present_mode = true;
+ table_columns = 4;
+ cellpadding_y = -0.100;
+ font_size = 22;
+ round_corners = true;
+ toggle_preset = "";
+ toggle_hud_position = "";
+ toggle_fps_limit = "";
+ toggle_logging = "";
+ reload_cfg = "";
+ upload_log = "";
+ toggle_hud = "Shift_R+F10";
+ };
+ };
+ };
+}
diff --git a/nix/intel.nix b/nix/intel.nix
new file mode 100644
index 0000000..8601f6b
--- /dev/null
+++ b/nix/intel.nix
@@ -0,0 +1,15 @@
+{ pkgs, ... }: {
+ environment.sessionVariables = {
+ VDPAU_DRIVER = "va_gl";
+ LIBVA_DRIVER_NAME = "iHD";
+ AMD_VULKAN_ICD = "ANV";
+ VK_ICD_FILENAMES="${pkgs.pkgsi686Linux.mesa.drivers}/share/vulkan/icd.d/intel_icd.i686.json:${pkgs.mesa.drivers}/share/vulkan/icd.d/intel_icd.x86_64.json";
+ __EGL_VENDOR_LIBRARY_FILENAMES="${pkgs.pkgsi686Linux.mesa.drivers}/share/glvnd/egl_vendor.d/50_mesa.json:${pkgs.mesa.drivers}/share/glvnd/egl_vendor.d/50_mesa.json";
+ };
+ hardware.graphics = {
+ extraPackages = with pkgs; [
+ intel-media-driver
+ ];
+ };
+ hardware.intel-gpu-tools.enable = true;
+}
diff --git a/nix/mesa_git.nix b/nix/mesa_git.nix
new file mode 100644
index 0000000..b4bfd1f
--- /dev/null
+++ b/nix/mesa_git.nix
@@ -0,0 +1,16 @@
+{ pkgs, ... }: {
+ environment.systemPackages = with pkgs; [
+ (pkgs.writeShellScriptBin "proton-env-anv" ''
+ export AMD_VULKAN_ICD="ANV"
+ export VK_ICD_FILENAMES="${pkgs.pkgsi686Linux.mesa_git.drivers}/share/vulkan/icd.d/intel_icd.i686.json:${pkgs.mesa_git.drivers}/share/vulkan/icd.d/intel_icd.x86_64.json"
+ proton-env "$@"
+ '')
+ (pkgs.writeShellScriptBin "proton-env-radv" ''
+ export AMD_VULKAN_ICD="RADV"
+ export VK_ICD_FILENAMES="${pkgs.pkgsi686Linux.mesa_git.drivers}/share/vulkan/icd.d/radeon_icd.i686.json:${pkgs.mesa_git.drivers}/share/vulkan/icd.d/radeon_icd.x86_64.json"
+ export __EGL_VENDOR_LIBRARY_FILENAMES="${pkgs.pkgsi686Linux.mesa_git.drivers}/share/glvnd/egl_vendor.d/50_mesa.json:${pkgs.mesa_git.drivers}/share/glvnd/egl_vendor.d/50_mesa.json"
+ export LD_LIBRARY_PATH="${pkgs.pkgsi686Linux.mesa_git.drivers}/lib:${pkgs.mesa_git.drivers}/lib:$LD_LIBRARY_PATH"
+ proton-env "$@"
+ '')
+ ];
+}
diff --git a/nix/programs/firefox.nix b/nix/programs/firefox.nix
new file mode 100644
index 0000000..9aa94f5
--- /dev/null
+++ b/nix/programs/firefox.nix
@@ -0,0 +1,145 @@
+{ config, pkgs, ... }:
+let
+ s = config.local;
+in {
+ environment.systemPackages = with pkgs; [
+ firefox-wayland
+ ];
+ environment.sessionVariables = {
+ BROWSER = "firefox";
+ };
+ services.psd.enable = true;
+ home-manager.users.andrew = {
+ home.file."user-overrides.js" = {
+ target = ".mozilla/firefox/default/user-overrides.js";
+ source = ../../files/firefox/user-overrides.js;
+ };
+ home.file."firefox-gnome-theme" = {
+ target = ".mozilla/firefox/default/chrome/firefox-gnome-theme";
+ source = (pkgs.fetchFromGitHub {
+ owner = "rafaelmardojai";
+ repo = "firefox-gnome-theme";
+ rev = "1ddcd160fd349130aa71473adc217de304d673ee";
+ hash = "sha256-2TzbuzEZ+pSBKZgtTcIDVnB1FXVKHX3bgOolgWsqerM=";
+ });
+ };
+ home.file."customChrome.css" = {
+ target = ".mozilla/firefox/default/chrome/customChrome.css";
+ source = pkgs.writeText "customChrome.css" ''
+ @namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
+
+ @media (prefers-color-scheme: dark) {
+ :root {
+ /* Accent */
+ --gnome-accent-bg: var(--gnome-palette-blue-3);
+ --gnome-accent: #${s.scheme.color1};
+
+ --gnome-toolbar-star-button: var(--gnome-palette-yellow-1);
+
+ /* Window */
+ --gnome-window-background: #${s.scheme.background};
+ --gnome-window-color: #${s.scheme.foreground};
+ --gnome-view-background: #${s.scheme.background};
+ --gnome-sidebar-background: #${s.scheme.color1};
+ --gnome-secondary-sidebar-background: #${s.scheme.color3};
+
+ /* Card */
+ --gnome-card-background: #${s.scheme.background};
+ --gnome-card-shade-color: #${s.scheme.color5};
+
+ /* Menu */
+ --gnome-menu-background: #${s.scheme.background};
+
+ /* Header bar */
+ --gnome-headerbar-background: #${s.scheme.background};
+ --gnome-headerbar-shade-color: #${s.scheme.background};
+
+ /* Toolbars */
+ --gnome-toolbar-icon-fill: #${s.scheme.foreground};
+
+ /* Tabs */
+ --gnome-tabbar-tab-hover-background: #${s.scheme.color3};
+ --gnome-tabbar-tab-active-background: #${s.scheme.color2};
+ --gnome-tabbar-tab-active-background-contrast: #${s.scheme.background};
+ --gnome-tabbar-tab-active-hover-background: #${s.scheme.color3};
+
+ --gnome-tabbar-identity-color-green: var(--gnome-palette-green-1);
+ --gnome-tabbar-identity-color-yellow: var(--gnome-palette-yellow-2);
+ --gnome-tabbar-identity-color-orange: var(--gnome-palette-orange-3);
+ --gnome-tabbar-identity-color-red: var(--gnome-palette-red-1);
+ --gnome-tabbar-identity-color-purple: var(--gnome-palette-purple-1);
+
+ /* Text color for Firefox Logo in new private tab */
+ --gnome-private-wordmark: #${s.scheme.background};
+ /* New private tab background */
+ --gnome-private-in-content-page-background: #${s.scheme.background};
+ /* Private browsing info box */
+ --gnome-private-text-primary-color: #${s.scheme.background};
+ }
+
+ /* Backdrop colors */
+ :root:-moz-window-inactive {
+ --gnome-tabbar-tab-hover-background: #${s.scheme.background};
+ --gnome-tabbar-tab-active-background: #${s.scheme.background};
+ }
+
+ /* Private colors */
+ :root[privatebrowsingmode="temporary"] {
+ --gnome-accent-fg: #${s.scheme.color3};
+ /* Headerbar */
+ --gnome-headerbar-background: #${s.scheme.color4} !important;
+ /* Tabs */
+ --gnome-tabbar-tab-hover-background: #${s.scheme.color4};
+ --gnome-tabbar-tab-active-background: #${s.scheme.color6};
+ --gnome-tabbar-tab-active-background-contrast: #${s.scheme.background};
+ --gnome-tabbar-tab-active-hover-background: #${s.scheme.color6};
+ }
+
+ /* Private and backdrop colors */
+ :root[privatebrowsingmode="temporary"]:-moz-window-inactive {
+ --gnome-headerbar-background: #${s.scheme.color4} !important;
+ --gnome-tabbar-tab-hover-background: #${s.scheme.color4};
+ --gnome-tabbar-tab-active-background: #${s.scheme.color4};
+ }
+ }
+ '';
+ };
+ home.sessionVariables = {
+ MOZ_WEBRENDER = "1";
+ MOZ_USE_XINPUT2 = "1";
+ MOZ_ENABLE_WAYLAND = "1";
+ };
+ programs.firefox = {
+ enable = true;
+ profiles.default = {
+ extensions = with pkgs.nur.repos.rycee.firefox-addons; [
+ ublock-origin
+ skip-redirect
+ cookies-txt
+ youtube-recommended-videos
+ istilldontcareaboutcookies
+ hls-stream-detector
+ old-reddit-redirect
+ tampermonkey
+ enhanced-h264ify
+ ];
+ userChrome = ''
+ @import "firefox-gnome-theme/userChrome.css";
+ @import "customChrome.css";
+ #urlbar .search-one-offs {
+ display: none !important;
+ }
+ #tabbrowser-tabpanels{
+ background-color: #${s.scheme.background} !important;
+ }
+ '';
+ userContent = ''
+ @import "firefox-gnome-theme/userContent.css";
+ @-moz-document url("about:home"),url("about:blank"),url("about:newtab"),url("about:privatebrowsing") {
+ body{ background-color: #${s.scheme.background} !important }
+ }
+ '';
+ };
+ };
+ };
+}
diff --git a/nix/programs/foot.nix b/nix/programs/foot.nix
new file mode 100644
index 0000000..52e9fe3
--- /dev/null
+++ b/nix/programs/foot.nix
@@ -0,0 +1,50 @@
+{ config, pkgs, ... }:
+let
+ s = config.local;
+in {
+ environment.sessionVariables = {
+ TERMINAL = "footclient";
+ };
+ home-manager.users.andrew = {
+ programs.foot = {
+ enable = true;
+ server.enable = true;
+ settings = {
+ main = {
+ font = "${s.font.name}:size=${toString s.font.size}";
+ };
+ colors = {
+ foreground = "${s.scheme.foreground}";
+ background = "${s.scheme.background}";
+ regular0 = "${s.scheme.color0}";
+ regular1 = "${s.scheme.color1}";
+ regular2 = "${s.scheme.color2}";
+ regular3 = "${s.scheme.color3}";
+ regular4 = "${s.scheme.color4}";
+ regular5 = "${s.scheme.color5}";
+ regular6 = "${s.scheme.color6}";
+ regular7 = "${s.scheme.color7}";
+ bright0 = "${s.scheme.color8}";
+ bright1 = "${s.scheme.color9}";
+ bright2 = "${s.scheme.color10}";
+ bright3 = "${s.scheme.color11}";
+ bright4 = "${s.scheme.color12}";
+ bright5 = "${s.scheme.color13}";
+ bright6 = "${s.scheme.color14}";
+ bright7 = "${s.scheme.color15}";
+ alpha = "1.0";
+ };
+ };
+ };
+ wayland.windowManager.sway = {
+ config = rec {
+ terminal = "${pkgs.foot}/bin/footclient";
+ keybindings = let
+ mod1 = "Mod1";
+ in {
+ "${mod1}+Return" = "exec ${terminal}";
+ };
+ };
+ };
+ };
+}
diff --git a/nix/programs/kdeconnect.nix b/nix/programs/kdeconnect.nix
new file mode 100644
index 0000000..8d8b366
--- /dev/null
+++ b/nix/programs/kdeconnect.nix
@@ -0,0 +1,12 @@
+{ ... }: {
+ networking.firewall = {
+ allowedTCPPortRanges = [ { from = 1714; to = 1764; } ];
+ allowedUDPPortRanges = [ { from = 1714; to = 1764; } ];
+ };
+ home-manager.users.andrew = {
+ services.kdeconnect = {
+ enable = true;
+ indicator = false;
+ };
+ };
+}
diff --git a/nix/programs/kitty.nix b/nix/programs/kitty.nix
new file mode 100644
index 0000000..aa6ffdf
--- /dev/null
+++ b/nix/programs/kitty.nix
@@ -0,0 +1,79 @@
+{ config, lib, pkgs, ... }:
+let
+ s = config.local;
+ inherit (import ../../nix/utils.nix) optimizeWithFlags;
+in {
+ environment.sessionVariables = {
+ TERMINAL = "kitty -1";
+ };
+ home-manager.users.andrew = {
+ programs.kitty = {
+ enable = true;
+ package = (optimizeWithFlags pkgs.kitty "-O2 -march=native -mtune=native -fomit-frame-pointer");
+ font = {
+ name = s.font.name;
+ size = s.font.size;
+ };
+ shellIntegration = {
+ mode = "enabled";
+ enableZshIntegration = true;
+ };
+ extraConfig = ''
+ update_check_interval 0
+ confirm_os_window_close 0
+ sync_to_monitor yes
+ allow_remote_control yes
+ linux_display_server wayland
+ remember_window_size no
+ resize_debounce_time 0.025 0.5
+ placement_strategy top-left
+ scrollback_lines 3000
+ paste_actions confirm,confirm-if-large
+ disable_ligatures always
+ modify_font baseline ${toString s.font.baseline}
+ cursor #${s.scheme.foreground}
+ cursor_shape block
+ cursor_blink_interval -1 linear ease-out
+ cursor_stop_blinking_after 20.0
+ cursor_trail 15
+ foreground #${s.scheme.foreground}
+ background #${s.scheme.background}
+ color0 #${s.scheme.color0}
+ color1 #${s.scheme.color1}
+ color2 #${s.scheme.color2}
+ color3 #${s.scheme.color3}
+ color4 #${s.scheme.color4}
+ color5 #${s.scheme.color5}
+ color6 #${s.scheme.color6}
+ color7 #${s.scheme.color7}
+ color8 #${s.scheme.color8}
+ color9 #${s.scheme.color9}
+ color10 #${s.scheme.color10}
+ color11 #${s.scheme.color11}
+ color12 #${s.scheme.color12}
+ color13 #${s.scheme.color13}
+ color14 #${s.scheme.color14}
+ color15 #${s.scheme.color15}
+ selection_foreground #${s.scheme.background}
+ selection_background #${s.scheme.color6}
+ mark1_foreground #${s.scheme.background}
+ mark1_background #${s.scheme.color5}
+ mark2_foreground #${s.scheme.background}
+ mark2_background #${s.scheme.color6}
+ mark3_foreground #${s.scheme.background}
+ mark3_background #${s.scheme.color4}
+ background_opacity ${toString s.scheme.alpha}
+ '';
+ };
+ wayland.windowManager.sway = {
+ config = rec {
+ terminal = "${pkgs.kitty}/bin/kitty -1";
+ keybindings = let
+ mod1 = "Mod1";
+ in {
+ "${mod1}+Return" = "exec ${terminal}";
+ };
+ };
+ };
+ };
+}
diff --git a/nix/programs/nvim.nix b/nix/programs/nvim.nix
new file mode 100644
index 0000000..2e4b3f0
--- /dev/null
+++ b/nix/programs/nvim.nix
@@ -0,0 +1,178 @@
+{ config, pkgs, ... }:
+let
+ s = config.local;
+ inherit (import ../../nix/utils.nix) optimizeWithFlags;
+ local = pkgs.vimUtils.buildVimPlugin {
+ pname = "local";
+ version = "0.2";
+ src = ../../files/nvim/local;
+ };
+ # https://github.com/neovim/neovim/blob/879d17ea8d62c199ea0c91c5f37a4f25495be7ce/src/nvim/highlight_group.c#L414
+ wal = pkgs.vimUtils.buildVimPlugin {
+ pname = "wal";
+ version = "3.1";
+ src = pkgs.writeTextDir "colors/wal-gui.vim" ''
+ let g:colors_name = "wal-gui"
+ hi Normal guifg=#${s.scheme.foreground} guibg=#${s.scheme.background}
+ hi Added guifg=#${s.scheme.color4}
+ hi Changed guifg=#${s.scheme.color2}
+ hi ColorColumn guibg=#${s.scheme.color6}
+ hi Conceal guifg=#${s.scheme.color6}
+ hi CurSearch guifg=#${s.scheme.color0} guibg=#${s.scheme.color4}
+ hi CursorColumn guibg=#${s.scheme.color6}
+ hi CursorLine guibg=#${s.scheme.color2}
+ hi DiffAdd guifg=#${s.scheme.color4} guibg=#${s.scheme.background}
+ hi DiffChange guifg=#${s.scheme.color4} guibg=#${s.scheme.background}
+ hi DiffDelete guifg=#${s.scheme.color3} guibg=#${s.scheme.background} gui=bold
+ hi DiffText guifg=#${s.scheme.color6} guibg=#${s.scheme.background}
+ hi Directory guifg=#${s.scheme.color2}
+ hi ErrorMsg guifg=#${s.scheme.color4}
+ hi FloatShadow guibg=#${s.scheme.color6} blend=80
+ hi FloatShadowThrough guibg=#${s.scheme.color6} blend=100
+ hi Folded guifg=#${s.scheme.color5} guibg=#${s.scheme.color6}
+ hi LineNr guifg=#${s.scheme.color6}
+ hi MatchParen guifg=#${s.scheme.color3} guibg=#${s.scheme.background} gui=bold
+ hi ModeMsg guifg=#${s.scheme.color4}
+ hi MoreMsg guifg=#${s.scheme.color2}
+ hi NonText guifg=#${s.scheme.color6}
+ hi NormalFloat guibg=#${s.scheme.color6}
+ hi Pmenu guibg=#${s.scheme.color6}
+ hi PmenuSel guifg=#${s.scheme.color6} guibg=#${s.scheme.foreground} blend=0
+ hi PmenuThumb guibg=#${s.scheme.color6}
+ hi Question guifg=#${s.scheme.color2}
+ hi QuickFixLine guifg=#${s.scheme.color2}
+ hi RedrawDebugClear guibg=#${s.scheme.color2}
+ hi RedrawDebugComposed guibg=#${s.scheme.color4}
+ hi RedrawDebugRecompose guibg=#${s.scheme.color3}
+ hi Removed guifg=#${s.scheme.color4}
+ hi Search guifg=#${s.scheme.color0} guibg=#${s.scheme.color6}
+ hi SignColumn guifg=#${s.scheme.color6} guibg=NONE gui=NONE
+ hi SpecialKey guifg=#${s.scheme.color6}
+ hi SpellBad guisp=#${s.scheme.color4} gui=undercurl
+ hi SpellCap guisp=#${s.scheme.color3} gui=undercurl
+ hi SpellLocal guisp=#${s.scheme.color4} gui=undercurl
+ hi SpellRare guisp=#${s.scheme.color2} gui=undercurl
+ hi StatusLine guifg=#${s.scheme.background} guibg=#${s.scheme.color6}
+ hi StatusLineNC guifg=#${s.scheme.background} guibg=#${s.scheme.color2}
+ hi Title guifg=#${s.scheme.color2} gui=bold
+ hi Visual guibg=#${s.scheme.color6}
+ hi WarningMsg guifg=#${s.scheme.color4}
+ hi WinBar guifg=#${s.scheme.color5} guibg=#${s.scheme.color0} gui=bold
+ hi WinBarNC guifg=#${s.scheme.color5} guibg=#${s.scheme.color0}
+ hi Constant guifg=#${s.scheme.color6}
+ hi Operator guifg=#${s.scheme.foreground}
+ hi PreProc guifg=#${s.scheme.foreground}
+ hi Type guifg=#${s.scheme.color3}
+ hi Delimiter guifg=#${s.scheme.color2}
+ hi Comment guifg=#${s.scheme.color5} gui=italic
+ hi String guifg=#${s.scheme.color4}
+ hi Identifier guifg=#${s.scheme.foreground}
+ hi Function guifg=#${s.scheme.color2}
+ hi Statement guifg=#${s.scheme.color6} gui=bold
+ hi Special guifg=#${s.scheme.color2}
+ hi Error guifg=#${s.scheme.color5} guibg=#${s.scheme.color3}
+ hi Todo guifg=#${s.scheme.foreground} gui=bold
+ hi DiagnosticError guifg=#${s.scheme.color5}
+ hi DiagnosticWarn guifg=#${s.scheme.color4}
+ hi DiagnosticInfo guifg=#${s.scheme.color2}
+ hi DiagnosticHint guifg=#${s.scheme.color1}
+ hi DiagnosticOk guifg=#${s.scheme.color4}
+ hi DiagnosticUnderlineError guisp=#${s.scheme.color4} gui=underline
+ hi DiagnosticUnderlineWarn guisp=#${s.scheme.color3} gui=underline
+ hi DiagnosticUnderlineInfo guisp=#${s.scheme.color2} gui=underline
+ hi DiagnosticUnderlineHint guisp=#${s.scheme.color1} gui=underline
+ hi DiagnosticUnderlineOk guisp=#${s.scheme.color4} gui=underline
+ hi DiagnosticDeprecated guisp=#${s.scheme.color4} gui=strikethrough
+ hi @variable guifg=#${s.scheme.foreground}
+ hi ExtraWhitespace guibg=#${s.scheme.color4}
+ hi MiniStarterInactive guifg=#${s.scheme.foreground}
+ hi MiniStarterQuery guifg=#${s.scheme.color3}
+ hi MiniStarterItemPrefix guifg=#${s.scheme.color4}
+ hi! link CurSearch Search
+ '';
+ };
+in {
+ environment.sessionVariables = {
+ EDITOR = "nvim";
+ };
+ home-manager.users.andrew = {
+ programs.neovim = {
+ enable = true;
+ package = (optimizeWithFlags pkgs.neovim-unwrapped "-O2 -march=native -mtune=native -fomit-frame-pointer");
+ viAlias = true;
+ vimAlias = true;
+ extraConfig = ''
+ lua << EOF
+ -- Simpler mini.starter builtin actions.
+ local builtin_actions_edit = function()
+ return {
+ { name = 'Edit new buffer', action = 'enew', section = 'Actions' },
+ { name = 'Quit', action = 'qall', section = 'Actions' }
+ }
+ end
+ local starter = require('mini.starter')
+ starter.setup({
+ items = {
+ starter.sections.sessions(6, true),
+ starter.sections.recent_files(7, false, false),
+ builtin_actions_edit()
+ },
+ content_hooks = {
+ starter.gen_hook.adding_bullet(),
+ starter.gen_hook.aligning('center', 'center')
+ },
+ footer = '${s.starter.footer}',
+ footer_offset = ${toString s.starter.footer_offset},
+ picture = {
+ path = '${s.starter.picture}',
+ kitty = true,
+ width = ${toString s.starter.width},
+ position = '${s.starter.position}',
+ padding = {
+ top = ${toString s.starter.padding.top},
+ left = ${toString s.starter.padding.left},
+ text = ${toString s.starter.padding.text}
+ }
+ }
+ })
+ EOF
+ '' + builtins.readFile(../../files/nvim/init.vim);
+ extraPackages = with pkgs; [
+ tree-sitter
+ fzf
+ chafa
+ ripgrep
+ xxd
+ ];
+ plugins = with pkgs.vimPlugins; [
+ local
+ wal
+ ccc-nvim
+ undotree
+ vim-gitbranch
+ vim-signify
+ nvim-lspconfig
+ lsp-status-nvim
+ inc-rename-nvim
+ (nvim-treesitter.withPlugins (plugins: with plugins; [ c cpp lua bash python nix ]))
+ fzfWrapper
+ fzf-vim
+ mini-nvim
+ neogit
+ plenary-nvim
+ diffview-nvim
+ (pkgs.vimUtils.buildVimPlugin {
+ pname = "vim-stay";
+ version = "v1.4.3";
+ src = pkgs.fetchFromGitHub {
+ owner = "zhimsel";
+ repo = "vim-stay";
+ rev = "af6141815b88de1d84f92709f42cb98b0af5f3b1";
+ hash = "sha256-Vg6gV3UefIqkIC24jZdDgeXIEdSDWIhF3DpW4D6nAHU=";
+ };
+ meta.homepage = "https://github.com/zhimsel/vim-stay/";
+ })
+ ];
+ };
+ };
+}
diff --git a/nix/programs/obs.nix b/nix/programs/obs.nix
new file mode 100644
index 0000000..59dca35
--- /dev/null
+++ b/nix/programs/obs.nix
@@ -0,0 +1,11 @@
+{ config, pkgs, ... }: {
+ environment.systemPackages = with pkgs; [
+ obs-studio
+ ];
+ home-manager.users.andrew = let
+ homeDir = "${config.users.users.andrew.home}";
+ in {
+ home.file.".config/obs-studio/plugins/wlrobs/bin/64bit/libwlrobs.so".source = "${pkgs.obs-studio-plugins.wlrobs}/lib/obs-plugins/libwlrobs.so";
+ home.file.".config/obs-studio/plugins/wlrobs/bin/64bit/obs-vaapi.so".source = "${pkgs.obs-studio-plugins.obs-vaapi}/lib/obs-plugins/obs-vaapi.so";
+ };
+}
diff --git a/nix/programs/sunshine.nix b/nix/programs/sunshine.nix
new file mode 100644
index 0000000..6820f06
--- /dev/null
+++ b/nix/programs/sunshine.nix
@@ -0,0 +1,29 @@
+{ pkgs, ... }: {
+# environment.systemPackages = with pkgs; [ sunshine ];
+ services.sunshine = {
+ enable = true;
+ capSysAdmin = true;
+ settings = {
+ sunshine_name = "Iroha";
+ };
+ applications = {
+ env = {
+ PATH = "$(PATH)";
+ };
+ apps = [
+ {
+ name = "Steam Gamescope";
+ cmd = "gamescope -w 960 -W 960 -h 544 -H 544 -r 60 -O DP-1 -e -- steam steam://open/bigpicture";
+ }
+ ];
+ };
+ };
+# security.wrappers = {
+# sunshine = {
+# owner = "root";
+# group = "root";
+# source = "${pkgs.sunshine}/bin/sunshine";
+# capabilities = "cap_sys_admin+p";
+# };
+# };
+}
diff --git a/nix/programs/sway.nix b/nix/programs/sway.nix
new file mode 100644
index 0000000..22c6873
--- /dev/null
+++ b/nix/programs/sway.nix
@@ -0,0 +1,321 @@
+{ config, lib, pkgs, ... }:
+let
+ s = config.local;
+in {
+ programs.sway = {
+ enable = true;
+ extraPackages = with pkgs; [
+ libinput
+ swaybg
+ swayidle
+ wl-clipboard
+ libnotify
+ bemenu
+ slurp
+ grim
+ wf-recorder
+ wlsunset
+ xorg.xprop
+ xorg.xset
+ xorg.xrdb
+ xorg.xrandr
+ ];
+ };
+ services.dbus.enable = true;
+ security.polkit.enable = true;
+ programs.dconf.enable = true;
+ xdg.portal = {
+ enable = true;
+ wlr.enable = true;
+ extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
+ };
+ xdg.icons.enable = true;
+# services.getty.autologinUser = "andrew";
+# services.greetd = {
+# enable = false;
+# settings = {
+# vt=3;
+# default_session = {
+# command = "run-sway";
+# user = "root";
+# };
+# };
+# };
+ home-manager.users.andrew = {
+ home.sessionVariables = {
+ XDG_CURRENT_DESKTOP = "sway";
+ MOZ_ENABLE_WAYLAND = "1";
+ #SDL_VIDEODRIVER = "wayland";
+ GDK_BACKEND = "wayland,x11";
+ QT_QPA_PLATFORM = "wayland;xcb";
+ QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
+ _JAVA_AWT_WM_NONREPARENTING = "1";
+ };
+ xresources.properties = {
+ "*background" = "#${s.scheme.background}";
+ "*foreground" = "#${s.scheme.foreground}";
+ "*color0" = "#${s.scheme.color0}";
+ "*color1" = "#${s.scheme.color1}";
+ "*color2" = "#${s.scheme.color2}";
+ "*color3" = "#${s.scheme.color3}";
+ "*color4" = "#${s.scheme.color4}";
+ "*color5" = "#${s.scheme.color5}";
+ "*color6" = "#${s.scheme.color6}";
+ "*color7" = "#${s.scheme.color7}";
+ "*color8" = "#${s.scheme.color8}";
+ "*color9" = "#${s.scheme.color9}";
+ "*color10" = "#${s.scheme.color10}";
+ "*color11" = "#${s.scheme.color11}";
+ "*color12" = "#${s.scheme.color12}";
+ "*color13" = "#${s.scheme.color13}";
+ "*color14" = "#${s.scheme.color14}";
+ "*color15" = "#${s.scheme.color15}";
+ };
+ gtk = let
+ extraCss3 = ''
+ @define-color window_bg_color #${s.scheme.background};
+ @define-color window_fg_color #${s.scheme.foreground};
+ @define-color view_bg_color #${s.scheme.background};
+ @define-color view_fg_color #${s.scheme.foreground};
+ @define-color accent_bg_color #${s.scheme.color1};
+ @define-color accent_fg_color #${s.scheme.background};
+ @define-color accent_color #${s.scheme.color1};
+ @define-color headerbar_bg_color #${s.scheme.background};
+ @define-color headerbar_fg_color #${s.scheme.foreground};
+ @define-color headerbar_backdrop_color #${s.scheme.background};
+ @define-color headerbar_border_color #${s.scheme.color6};
+ @define-color headerbar_shade_color #${s.scheme.color6};
+ @define-color card_bg_color #${s.scheme.background};
+ @define-color card_fg_color #${s.scheme.foreground};
+ @define-color card_shade_color #${s.scheme.color6};
+ @define-color popover_bg_color #${s.scheme.background};
+ @define-color popover_fg_color #${s.scheme.foreground};
+ @define-color dialog_bg_color #${s.scheme.background};
+ @define-color dialog_fg_color #${s.scheme.foreground};
+ @define-color panel_bg_color #${s.scheme.background};
+ @define-color panel_fg_color #${s.scheme.foreground};
+ @define-color sidebar_bg_color #${s.scheme.background};
+ @define-color sidebar_fg_color #${s.scheme.foreground};
+ @define-color sidebar_backdrop_color #${s.scheme.background};
+ @define-color sidebar_shade_color #${s.scheme.color6};
+ @define-color incognito_bg_color #${s.scheme.color5};
+ @define-color warning_bg_color #${s.scheme.color3};
+ @define-color warning_fg_color #${s.scheme.foreground};
+ @define-color warning_color #${s.scheme.color3};
+ @define-color error_bg_color #${s.scheme.color4};
+ @define-color error_fg_color #${s.scheme.foreground};
+ @define-color error_color #${s.scheme.color4};
+ @define-color success_bg_color #${s.scheme.color1};
+ @define-color success_fg_color #${s.scheme.background};
+ @define-color success_color #${s.scheme.color1};
+ @define-color destructive_bg_color #${s.scheme.color5};
+ @define-color destructive_fg_color #${s.scheme.background};
+ @define-color destructive_color #${s.scheme.color5};
+ '';
+ extraCss4 = ''
+ '';
+ in {
+ enable = true;
+ theme = {
+ name = "adw-gtk3-dark";
+ package = pkgs.adw-gtk3;
+ };
+ cursorTheme = {
+ name = "WhiteSur-cursors";
+ };
+# iconTheme = {
+# name = "suru";
+# package = pkgs.ubuntu-themes;
+# };
+ gtk3.extraCss = extraCss3;
+ gtk4.extraCss = extraCss3;
+ };
+ home.pointerCursor = {
+ name = "WhiteSur-cursors";
+ package = pkgs.whitesur-cursors;
+ };
+ wayland.windowManager.sway = {
+ enable = true;
+ systemd.enable = true;
+ xwayland = true;
+ wrapperFeatures = { base = true; gtk = true; };
+ swaynag = {
+ enable = true;
+ settings = {
+ "<config>" = {
+ edge = "top";
+ font = "${s.ui-font.name} ${toString s.ui-font.size}";
+ background = "${s.scheme.background}";
+ border = "${s.scheme.background}";
+ text = "${s.scheme.foreground}";
+ button-text = "${s.scheme.foreground}";
+ button-background = "${s.scheme.color2}";
+ message-padding = 5;
+ border-bottom-size = 1;
+ details-border-size = 1;
+ button-border-size = 1;
+ button-gap = 3;
+ button-dismiss-gap = 7;
+ button-padding = 3;
+ button-margin-right = 5;
+ };
+ };
+ };
+ config = rec {
+ input = {
+ "type:keyboard" = {
+ repeat_rate = "45";
+ repeat_delay = "220";
+ xkb_options = "ctrl:nocaps";
+ };
+ "type:touchpad" = {
+ natural_scroll = "enabled";
+ };
+ "1189:32769:BenQ_ZOWIE_BenQ_ZOWIE_Gaming_Mouse" = {
+ accel_profile = "flat";
+ pointer_accel = "-0.675";
+ scroll_factor = "1.0";
+ };
+ "1241:44368:USB_Gaming_Mouse" = { # Finalmouse Ultralight 2
+ accel_profile = "flat";
+ scroll_factor = "0.75";
+ };
+ "1133:45104:Logi_POP_Mouse" = {
+ accel_profile = "flat";
+ scroll_factor = "0.75";
+ };
+ "1133:50504:Logitech_USB_Receiver_Mouse" = {
+ accel_profile = "flat";
+ scroll_factor = "0.75";
+ };
+ "2362:9488:PixArt_USB_Optical_Mouse" = {
+ accel_profile = "flat";
+ scroll_factor = "0.75";
+ };
+ "1390:268:ELECOM_TrackBall_Mouse_HUGE_TrackBall_Mouse" = {
+ accel_profile = "flat";
+ scroll_factor = "0.25";
+ scroll_method = "on_button_down";
+ scroll_button = "276";
+ };
+ "1386:890:Wacom_One_by_Wacom_S_Pen" = {
+ map_to_output = s.monitors.monitor1;
+ left_handed = "enabled";
+ };
+ };
+ modifier = "Mod1";
+ menu = "dmenu-path | bemenu-colored | ${pkgs.findutils}/bin/xargs swaymsg exec --";
+ focus.wrapping = "yes";
+ keybindings = let
+ mod1 = "Mod1";
+ in {
+ "button4" = "nop";
+ "button5" = "nop";
+ "${mod1}+d" = "exec ${menu}";
+ "${mod1}+e" = "exec dmenu-emoji | bemenu-colored | awk '{split($0,a);printf \"%s\", a[1];}' | wl-copy";
+ "${mod1}+q" = "exec screenshot qrcode";
+ "${mod1}+c" = "exec screenshot color";
+ "${mod1}+Shift+q" = "kill";
+ "${mod1}+h" = "focus left";
+ "${mod1}+j" = "focus down";
+ "${mod1}+k" = "focus up";
+ "${mod1}+l" = "focus right";
+ "${mod1}+Shift+h" = "move left";
+ "${mod1}+Shift+j" = "move down";
+ "${mod1}+Shift+k" = "move up";
+ "${mod1}+Shift+l" = "move right";
+ "${mod1}+b" = "split h";
+ "${mod1}+v" = "split v";
+ "${mod1}+f" = "fullscreen toggle";
+ "${mod1}+space" = "floating toggle";
+ "${mod1}+r" = "mode \"resize\"";
+ "${mod1}+Shift+c" = "reload";
+ "${mod1}+Shift+e" = "exec swaynag -m 'Do you really want to exit?' -B 'Yes' 'swaymsg exit'";
+ "Print" = "exec screenshot main";
+ "Shift+Print" = "exec screenshot full";
+ "${mod1}+Shift+s" = "exec screenshot";
+ "${mod1}+s" = "exec wlsunset-toggle";
+ "${mod1}+Shift+t" = "exec swaymsg -- input 1386:890:Wacom_One_by_Wacom_S_Pen events disabled";
+ };
+ modes = {
+ resize = {
+ Escape = "mode default";
+ h = "resize shrink width 1 px";
+ j = "resize grow height 1 px";
+ k = "resize shrink height 1 px";
+ l = "resize grow width 1 px";
+ };
+ };
+ fonts = {
+ names = [ s.ui-font.name ];
+ style = "Regular";
+ size = s.ui-font.size + 0.0;
+ };
+ bars = [ ];
+ window = {
+ border = 2;
+ titlebar = false;
+ commands = [
+ { command = "move to scratchpad"; criteria.app_id = "kitty-server"; }
+ { command = "max_render_time 1"; criteria.app_id = "kitty"; }
+ { command = "floating enable; max_render_time 1"; criteria.app_id = "cmv"; }
+ { command = "floating enable"; criteria.class = "cmv.exe"; }
+ { command = "floating enable"; criteria.app_id = "mauri"; }
+ { command = "inhibit_idle fullscreen"; criteria.title = "Parsec"; }
+ { command = "inhibit_idle fullscreen"; criteria.class = "steam_app_.*"; }
+ { command = "inhibit_idle fullscreen; allow_tearing yes"; criteria.app_id = "gamescope"; }
+ { command = "inhibit_idle fullscreen; allow_tearing yes"; criteria.class = ".gamescope-wrapped"; }
+ { command = "inhibit_idle fullscreen; allow_tearing yes"; criteria.app_id = "osu!"; }
+ { command = "inhibit_idle fullscreen; allow_tearing yes"; criteria.class = "cs2"; }
+ #{ command = "inhibit_idle fullscreen; allow_tearing yes"; criteria.title = "Overwatch"; }
+ { command = "inhibit_idle fullscreen"; criteria.class = "Ryujinx"; }
+ { command = "inhibit_idle fullscreen"; criteria.app_id = "org.yuzu_emu.yuzu"; }
+ { command = "inhibit_idle fullscreen"; criteria.class = "dolphin-emu"; }
+ { command = "inhibit_idle fullscreen"; criteria.class = "AppRun"; } # Ishiiruka-Dolphin
+ { command = "inhibit_idle fullscreen"; criteria.class = "SuperMeatBoy"; }
+ ];
+ };
+ colors = let
+ bg = "#${s.scheme.background}";
+ fg = "#${s.scheme.foreground}";
+ c2 = "#${s.scheme.color1}";
+ urgent = "#${s.scheme.color3}";
+ in {
+ background = bg;
+ focused = { background = bg; border = c2; childBorder = c2; indicator = c2; text = fg; };
+ focusedInactive = { background = bg; border = c2; childBorder = c2; indicator = c2; text = fg; };
+ unfocused = { background = bg; border = bg; childBorder = bg; indicator = bg; text = fg; };
+ urgent = { background = urgent; border = urgent; childBorder = urgent; indicator = urgent; text = fg; };
+ placeholder = { background = bg; border = bg; childBorder = bg; indicator = bg; text = fg; };
+ };
+ startup = let
+ gnome-schema = "org.gnome.desktop.interface";
+ in [
+ { command = "dconf write /org/gnome/desktop/interface/color-scheme \"'prefer-dark'\""; always = true; }
+ { command = "dbus-sway-environment"; }
+ { command = "swaymsg 'seat * hide_cursor 4000'"; always = true; }
+ { command = "kitty -1 --class=\"kitty-server\""; }
+ { command = "wlsunset-toggle"; }
+ ];
+ };
+ };
+ services.swayidle = {
+ enable = true;
+ timeouts = [
+ {
+ timeout = 300;
+ command = "${pkgs.sway}/bin/swaymsg \"output * dpms off\"";
+ resumeCommand = "${pkgs.sway}/bin/swaymsg \"output * dpms on\"";
+ }
+ ];
+ };
+ services.mako = {
+ enable = true;
+ defaultTimeout = 14000;
+ font = "${s.font.name} ${toString s.ui-font.size}";
+ backgroundColor = "#${s.scheme.background}";
+ textColor = "#${s.scheme.foreground}";
+ borderColor = "#${s.scheme.color2}";
+ };
+ };
+}
diff --git a/nix/programs/waydroid.nix b/nix/programs/waydroid.nix
new file mode 100644
index 0000000..af0c207
--- /dev/null
+++ b/nix/programs/waydroid.nix
@@ -0,0 +1,3 @@
+{ ... }: {
+ virtualisation.waydroid.enable = true;
+}
diff --git a/nix/programs/zsh.nix b/nix/programs/zsh.nix
new file mode 100644
index 0000000..3ea1ee5
--- /dev/null
+++ b/nix/programs/zsh.nix
@@ -0,0 +1,76 @@
+{ config, pkgs, ... }:
+let
+ inherit (import ../../nix/utils.nix) optimizeWithFlags;
+in {
+ programs.zsh.enable = true;
+
+ environment.shells = [ pkgs.zsh ];
+ environment.pathsToLink = [ "/share/zsh" ];
+ users.defaultUserShell = pkgs.zsh;
+
+ home-manager.users.andrew = let
+ homeDir = "${config.users.users.andrew.home}";
+ in {
+ programs.zsh = {
+ enable = true;
+ package = (optimizeWithFlags pkgs.zsh "-O2 -march=native -mtune=native -fomit-frame-pointer");
+ shellAliases = {
+ sudo = "nocorrect sudo ";
+ xargs = "nocorrect xargs ";
+ cp = "rsync -avz";
+ top = "htop";
+ bc = "bc -l";
+ pgrep = "pgrep -f";
+ make = "make -j6";
+ diff = "diff -u";
+ mail = "neomutt";
+ iroha = "ssh andrew@iroha";
+ moyo = "ssh andrew@moyo";
+ zasshi = "ssh andrew@zasshi";
+ denpa = "ssh moyo -t 'ssh 192.168.122.89'";
+ rod = "ssh -p 1738 rod";
+ bmrg = "ssh boomerang";
+ cmv = "$HOME/c/camu/scripts/cmv.sh";
+ cmv-add = "$HOME/c/camu/scripts/cmv_add.sh";
+ cmv-pause = "cmv-add PAUSE";
+ cmv-next = "cmv-add NEXT";
+ cmv-prev = "cmv-add PREV";
+ cmv-shuffle = "cmv-add SHUFFLE";
+ cmv-sort = "cmv-add SORT";
+ cmv-reverse = "cmv-add REVERSE";
+ cmv-clear = "cmv-add CLEAR";
+ };
+ defaultKeymap = "emacs";
+ history = {
+ save = 10000;
+ size = 10000;
+ append = true;
+ expireDuplicatesFirst = true;
+ extended = true;
+ path = "${homeDir}/.histfile";
+ # Don't share history between sessions.
+ share = false;
+ };
+ # Completion tanks startup performance.
+ enableCompletion = false;
+ zprof.enable = false;
+ initExtra = ''
+ autoload -U colors && colors
+ exit_code_guy()
+ {
+ if [[ $? == 0 ]]; then
+ echo "(・_・) >"
+ else
+ echo "(″ロ゛) > %{$fg[red]%}$?%{$fg[cyan]%}"
+ fi
+ }
+ setopt prompt_subst
+ if [[ -v NIX_SHELL ]]; then
+ PS1="($NIX_SHELL)%{$fg[yellow]%}%n%{$fg[red]%}@%{$fg[light\ red]%}%M%{$fg[cyan]%}:%~\$(exit_code_guy)%{$reset_color%} "
+ else
+ PS1="%{$fg[yellow]%}%n%{$fg[red]%}@%{$fg[light\ red]%}%M%{$fg[cyan]%}:%~\$(exit_code_guy)%{$reset_color%} "
+ fi
+ '';
+ };
+ };
+}
diff --git a/nix/scripts.nix b/nix/scripts.nix
new file mode 100644
index 0000000..bada1ff
--- /dev/null
+++ b/nix/scripts.nix
@@ -0,0 +1,46 @@
+{ config, lib, pkgs, ... }:
+let
+ s = config.local;
+ script-files = [
+ "dbus-sway-environment"
+ "dmenu-path"
+ "dmenu-emoji"
+ "cpu-vulns"
+ "battery"
+ "spell"
+ "ts-date"
+ "screenshot"
+ "wlsunset-toggle"
+ "mount-nfs"
+ "img-fstype"
+ "gpg-pubkey"
+ "rewrite-git"
+ "term-font-size"
+ "shift-jis-zip"
+ "moonrune-charset-utf8"
+ "xbox360-ffmpeg-enc"
+ "discord-wayland"
+ ];
+in {
+ environment.etc = {
+ "emoji.json".source = builtins.fetchurl {
+ url = "https://raw.githubusercontent.com/github/gemoji/0eca75db9301421efc8710baf7a7576793ae452a/db/emoji.json";
+ sha256 = "sha256-sXSuKusyG1L2Stuf9BL5ZqfzOIOdeAeE3RXcrXAsLdY=";
+ };
+ };
+ environment.systemPackages = [
+ (pkgs.writeShellScriptBin "bemenu-colored" ''
+ bemenu -C --single-instance -B 0 -M 0 --hp 6 \
+ --fn "${s.font.name} ${toString (s.font.size - 1)}" -H ${toString ((s.font.size - 1) * 2)} \
+ --hf "#${s.scheme.background}" --hb "#${s.scheme.color2}" \
+ --nf "#${s.scheme.foreground}" --nb "#${s.scheme.background}" \
+ --ff "#${s.scheme.foreground}" --fb "#${s.scheme.background}" \
+ --af "#${s.scheme.foreground}" --ab "#${s.scheme.background}" -p ""
+ '')
+ ] ++ (lib.lists.forEach script-files (x: pkgs.writeTextFile {
+ name = x;
+ text = (builtins.readFile ../scripts/${x});
+ executable = true;
+ destination = "/bin/${x}";
+ }));
+}
diff --git a/nix/system.nix b/nix/system.nix
new file mode 100644
index 0000000..dca4371
--- /dev/null
+++ b/nix/system.nix
@@ -0,0 +1,136 @@
+{ config, lib, pkgs, ... }: {
+ nix = {
+ settings = {
+ experimental-features = [ "nix-command" "flakes" ];
+ auto-optimise-store = true;
+ system-features = [ "big-parallel" "kvm" ];
+ download-buffer-size = 134217728;
+ };
+ gc.automatic = false;
+ optimise.automatic = true;
+ };
+
+ security.pam.loginLimits = [
+ {
+ domain = "*";
+ type = "soft";
+ item = "nice";
+ value = "-11";
+ }
+ {
+ domain = "*";
+ type = "hard";
+ item = "nice";
+ value = "-11";
+ }
+ {
+ domain = "*";
+ type = "soft";
+ item = "rtprio";
+ value = "99";
+ }
+ {
+ domain = "*";
+ type = "hard";
+ item = "rtprio";
+ value = "99";
+ }
+ {
+ domain = "*";
+ type = "soft";
+ item = "nofile";
+ value = "8192";
+ }
+ {
+ domain = "*";
+ type = "hard";
+ item = "nofile";
+ value = "1048576";
+ }
+ {
+ domain = "*";
+ type = "soft";
+ item = "memlock";
+ value = "unlimited";
+ }
+ {
+ domain = "*";
+ type = "hard";
+ item = "memlock";
+ value = "unlimited";
+ }
+ ];
+ #systemd.services.nix-daemon.serviceConfig.LimitNOFILE = lib.mkForce 134217728;
+
+ security.wrappers = {
+ ping = {
+ owner = "root";
+ group = "root";
+ source = "${pkgs.iputils.out}/bin/ping";
+ capabilities = "cap_net_raw+p";
+ };
+ };
+
+ nixpkgs.config.allowUnfree = true;
+ hardware.enableRedistributableFirmware = true;
+
+ virtualisation.libvirtd.enable = false;
+ virtualisation.spiceUSBRedirection.enable = true;
+
+ hardware.graphics = {
+ enable = true;
+ enable32Bit = true;
+ extraPackages = with pkgs; [
+ libvdpau-va-gl
+ vaapiVdpau
+ ];
+ };
+ services.xserver.videoDrivers = [ "modesetting" ];
+
+ environment.systemPackages = with pkgs; [
+ git # flakes
+ i2c-tools
+ lm_sensors
+ pciutils
+ appimage-run
+ vulkan-loader
+ vulkan-validation-layers
+ vulkan-tools
+ libdrm
+ libva-utils
+ mesa-demos
+ ];
+
+ boot.binfmt.registrations.appimage = {
+ wrapInterpreterInShell = false;
+ interpreter = "${pkgs.appimage-run}/bin/appimage-run";
+ recognitionType = "magic";
+ offset = 0;
+ mask = ''\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff'';
+ magicOrExtension = ''\x7fELF....AI\x02'';
+ };
+
+ time.timeZone = "America/New_York";
+ i18n.defaultLocale = "en_US.UTF-8";
+ i18n.supportedLocales = [
+ "C.UTF-8/UTF-8"
+ "${config.i18n.defaultLocale}/UTF-8"
+ "ja_JP.UTF-8/UTF-8"
+ "ko_KR.UTF-8/UTF-8"
+ ];
+ i18n.glibcLocales = pkgs.glibcLocales.override {
+ allLocales = false;
+ locales = [
+ "C.UTF-8/UTF-8"
+ "${config.i18n.defaultLocale}/UTF-8"
+ "ja_JP.UTF-8/UTF-8"
+ "ko_KR.UTF-8/UTF-8"
+ ];
+ };
+
+ console = {
+ font = "Lat2-Terminus16";
+ keyMap = "us";
+ useXkbConfig = false;
+ };
+}
diff --git a/nix/user.nix b/nix/user.nix
new file mode 100644
index 0000000..69d31f7
--- /dev/null
+++ b/nix/user.nix
@@ -0,0 +1,156 @@
+{ config, pkgs, ... }: let
+ s = config.local;
+in {
+ users.users.andrew = {
+ isNormalUser = true;
+ uid = 1000;
+ extraGroups = [ "wheel" "input" "audio" "video" "render" "disk" "cdrom" ];
+ };
+ nix.settings.trusted-users = [ "andrew" ];
+
+ documentation = {
+ enable = true;
+ man.enable = true;
+ dev.enable = true;
+ };
+
+ fonts = {
+ fontDir.enable = true;
+ packages = with pkgs; [
+ local-fonts
+ noto-fonts
+ noto-fonts-extra
+ noto-fonts-cjk-sans
+ noto-fonts-cjk-serif
+ noto-fonts-emoji-blob-bin
+ mplus-outline-fonts.osdnRelease
+ intel-one-mono
+ nanum-gothic-coding
+ ];
+ fontconfig = {
+ enable = true;
+ includeUserConf = false;
+ antialias = true;
+ hinting.enable = false;
+ allowBitmaps = true;
+ subpixel = {
+ rgba = "none";
+ lcdfilter = "default";
+ };
+ defaultFonts = {
+ serif = [ s.ui-font.name ];
+ sansSerif = [ s.ui-font.name ];
+ monospace = [ s.font.name ];
+ emoji = [ s.emoji-font.name ];
+ };
+ };
+ };
+
+ environment.systemPackages = with pkgs; [
+ man-pages
+ man-pages-posix
+ home-manager
+ mercurial
+ file
+ bc
+ screen
+ sloccount
+ (aspellWithDicts (dicts: with dicts; [ en en-computers en-science ]))
+ rsync
+ python3
+ htop
+ neofetch
+ cmatrix
+ hollywood
+ hdparm
+ usbutils
+ cryptsetup
+ nix-index
+ imagemagick
+ optipng
+ dmtx-utils
+ zbar
+ perlPackages.ArchiveZip
+ b3sum
+ libfaketime
+ cpulimit
+ dos2unix
+ curl
+ socat
+ (unzip.override { enableNLS = true; })
+ unrar
+ p7zip
+ rclone
+ ffmpeg-headless
+ xdg-utils
+ jq
+ when
+ evtest
+ wev
+ gcr
+ pass
+ zenity
+ zathura
+ virt-manager
+ spice-gtk
+ ];
+
+ programs.screen = {
+ enable = true;
+ screenrc = ''
+ termcapinfo xterm* ti@:te@
+ defscrollback 10000
+ startup_message off
+ '';
+ };
+
+ programs.mtr.enable = true;
+ services.openssh.enable = true;
+ services.gnome.gnome-keyring.enable = false;
+ programs.gnupg.agent = {
+ enable = true;
+ pinentryPackage = pkgs.pinentry-gnome3;
+ enableSSHSupport = true;
+ settings = {
+ default-cache-ttl = 28800;
+ max-cache-ttl = 28800;
+ };
+ };
+ programs.ssh = {
+ extraConfig = "AddKeysToAgent yes";
+ };
+
+ home-manager.users.andrew = let
+ homeDir = "${config.users.users.andrew.home}";
+ in {
+ home.username = "andrew";
+ xdg.userDirs = {
+ enable = true;
+ desktop = "${homeDir}/tmp";
+ documents = "${homeDir}/docs";
+ download = "${homeDir}/dl";
+ music = "${homeDir}/music";
+ pictures = "${homeDir}/pics";
+ publicShare = "${homeDir}/tmp";
+ templates = "${homeDir}/tmp";
+ videos = "${homeDir}/dl/mp4";
+ };
+ home.sessionVariables = {
+ GOPATH = "${homeDir}/tmp/go";
+ };
+ programs.git = {
+ enable = true;
+ userEmail = "andrew@akon.city";
+ userName = "Andrew Opalach";
+ signing = {
+ key = "99659CB58598BDDB";
+ signByDefault = true;
+ };
+ extraConfig = {
+ format.signOff = true;
+ init.defaultBranch = "master";
+ };
+ };
+ home.file.".config/gdb/gdbinit".source = ../files/gdbinit;
+ };
+}
diff --git a/nix/utils.nix b/nix/utils.nix
new file mode 100644
index 0000000..d0ed577
--- /dev/null
+++ b/nix/utils.nix
@@ -0,0 +1,12 @@
+{
+ disks = {
+ nfs_options = [ "rw" "bg" "hard" "rsize=32768" "wsize=32768" "tcp" "timeo=600" "nfsvers=4.1" "x-systemd.automount" "noauto" "x-systemd.idle-timeout=60" "x-systemd.device-timeout=5s" "x-systemd.mount-timeout=5s" ];
+ hdd_options = [ "noatime" ];
+ cdrom_options = [ "ro" "user" "noauto" "unhide" ];
+ ntfs_options = [ "uid=1000" "gid=100" "rw" "user" "exec" "umask=000" ];
+ };
+ optimizeWithFlags = pkg: flag:
+ pkg.overrideAttrs (attrs: {
+ NIX_CFLAGS_COMPILE = (attrs.NIX_CFLAGS_COMPILE or "") + " ${flag}";
+ });
+}