{ config, pkgs, unstablePkgs, unfreePkgs, unstableUnfreePkgs, userOptions, lib, nixgl, ... }: { imports = [ ../../modules/base.nix ]; home.sessionPath = [ "${userOptions.userHome}/.local/share/coursier/bin" ]; home.packages = [ pkgs.nixgl.nixGLIntel pkgs.podman pkgs.podman-compose ]; xsession = { enable = true; windowManager.i3 = { enable = true; config = { modifier = "Mod4"; fonts = { names = [ "${userOptions.fontName} SemiBold" ]; size = 10.0; }; terminal = "nixGLIntel alacritty"; keybindings = let mod = "Mod4"; in { "${mod}+Return" = "exec nixGLIntel alacritty"; "${mod}+o" = "exec ~/Applications/firefox/firefox"; "${mod}+d" = "exec dmenu_run"; "${mod}+b" = "workspace back_and_forth"; "${mod}+c" = "kill"; "${mod}+f" = "fullscreen toggle"; "${mod}+h" = "split h"; "${mod}+v" = "split v"; "${mod}+Left" = "focus left"; "${mod}+Down" = "focus down"; "${mod}+Up" = "focus up"; "${mod}+Right" = "focus right"; "${mod}+Shift+Left" = "move left"; "${mod}+Shift+Down" = "move down"; "${mod}+Shift+Up" = "move up"; "${mod}+Shift+Right" = "move right"; "${mod}+Shift+c" = "reload"; "${mod}+Shift+r" = "restart"; "${mod}+Shift+e" = "exec i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"; } // lib.listToAttrs ( builtins.concatMap ( i: let key = if i == 10 then "0" else toString i; in [ { name = "${mod}+${key}"; value = "workspace number ${toString i}"; } { name = "${mod}+Shift+${key}"; value = "move container to workspace number ${toString i}"; } ] ) (lib.range 1 10) ); startup = [ { command = "i3-msg workspace 1"; notification = false; } ]; bars = [ { fonts = { names = [ userOptions.fontName ]; style = "SemiBold"; size = 10.0; }; position = "bottom"; statusCommand = "i3status"; } ]; gaps = { smartGaps = true; inner = 10; outer = 5; }; window = { border = 1; titlebar = false; commands = [ { criteria = { window_role = "About"; }; command = "floating enable"; } ]; }; }; }; }; programs.i3status = { enable = true; enableDefault = false; general = { colors = true; interval = 5; }; modules = { "tztime local" = { position = 6; settings = { format = "%Y-%m-%d %H:%M"; }; }; "disk /" = { position = 5; settings = { format = "disk: %free"; }; }; "cpu_usage" = { position = 4; settings = { format = "cpu: %usage"; }; }; "cpu_temperature 0" = { position = 3; settings = { format = "cpu: %degrees°C"; path = "/sys/class/hwmon/hwmon1/temp1_input"; }; }; "cpu_temperature 1" = { position = 2; settings = { format = "gpu: %degrees°C"; path = "/sys/class/hwmon/hwmon2/temp1_input"; }; }; "memory" = { position = 1; settings = { format = "mem: %percentage_used"; }; }; }; }; programs.alacritty.settings.font.size = lib.mkForce 8; services.gpg-agent.pinentry.package = pkgs.pinentry-curses; programs.zsh.shellAliases.pbcopy = "xclip -selection clipboard"; services.sctd-amir = { enable = true; latitude = 53.3498; longitude = -6.2603; }; services.podman = { enable = true; }; home.keyboard = { layout = "us,ir"; options = [ "grp:shifts_toggle" "caps:swapescape" ]; }; }