diff --git a/apps/de/waybar/style.css b/apps/de/waybar/style.css index a6f4d73..6f47ab3 100644 --- a/apps/de/waybar/style.css +++ b/apps/de/waybar/style.css @@ -2,7 +2,7 @@ border: none; border-radius: 0; /* `otf-font-awesome` is required to be installed for icons */ - font-family: "iosevka-lyte", Roboto, Helvetica, Arial, sans-serif; + font-family: "Iosevka", Roboto, Helvetica, Arial, sans-serif; font-size: 16px; min-height: 0; } diff --git a/apps/kitty/kitty.conf b/apps/kitty/kitty.conf index 0f39402..d8f9366 100644 --- a/apps/kitty/kitty.conf +++ b/apps/kitty/kitty.conf @@ -1,4 +1,4 @@ -font_family iosevka-lyte +font_family Iosevka repaint_delay 5 input_delay 1 diff --git a/apps/shell/fish/config.fish b/apps/shell/fish/config.fish index 7b326c6..7cc7b60 100755 --- a/apps/shell/fish/config.fish +++ b/apps/shell/fish/config.fish @@ -63,5 +63,6 @@ mkdir -p $NOTES_PATH $USER_LOGS_PATH $SCROTS_PATH # start a tmux session by default if possible and we're not already in # a terminal multiplexer if has_command tmux && string match -v -q '*tmux*' $TERM && string match -v -q '*screen*' $TERM + tmux start-server tmux attach -t default || tmux new -s default end diff --git a/bin/clipshot b/bin/clipshot index 033999e..c4b4d4d 100755 --- a/bin/clipshot +++ b/bin/clipshot @@ -9,7 +9,7 @@ fn="$SCROTS_PATH/clipshot_$d.png" if is_wayland; then dim="$(slurp -d)" if [ $? -eq 0 ]; then - grim -g "$dim" - | wl-copy + grim -g "$dim" - | wl-copy -t image/png wl-paste -n > "$fn" echo "$fn" # grim -g "$dim" - | tee "$fn" | wl-copy -f diff --git a/bin/floating-term b/bin/floating-term index f07fff9..98680dd 100755 --- a/bin/floating-term +++ b/bin/floating-term @@ -5,7 +5,7 @@ flags=("") case "$TERMINAL" in kitty ) - flags=(-o remember_window_size=no -o initial_window_width=122c -o initial_window_height=24c --class floating_terminal) + flags=(-o remember_window_size=no -o initial_window_width=60c -o initial_window_height=12c --class floating_terminal) ;; # TODO: rxvt? diff --git a/bin/is_wayland b/bin/is_wayland index 60c9321..0bdd24b 100755 --- a/bin/is_wayland +++ b/bin/is_wayland @@ -1,3 +1,4 @@ #!/usr/bin/env bash -loginctl show-session "$(loginctl | grep "$(whoami)" | head -n 1 | field 1)" -p Type | grep -i wayland >/dev/null +exit 0 +# loginctl show-session "$(loginctl | grep "$(whoami)" | head -n 1 | field 1)" -p Type | grep -i wayland >/dev/null diff --git a/bin/launch b/bin/launch index d18fa57..a7a63f8 100755 --- a/bin/launch +++ b/bin/launch @@ -7,8 +7,9 @@ app="$( awk 'NF{NF--};1' | \ cat - <(dmenu_path) | \ sort | uniq -c | sort -nr | \ - sd '^\s+' '' | \ + sd -fm '^\s+' '' | \ cut -d' ' -f2- | \ + grep "\S" | \ fzf )" echo "$app $(date +%s)" >> "$LAUNCHER_HISTORY_FILE" diff --git a/env/laptop/hardware.nix b/env/laptop/hardware.nix new file mode 100644 index 0000000..2b0f5b8 --- /dev/null +++ b/env/laptop/hardware.nix @@ -0,0 +1,40 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, ... }: + +{ + imports = + [ + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + boot.kernelParams = [ "resume=/swapfile" "resume_offset=874496" ]; + boot.resumeDevice = "/dev/disk/by-uuid/d1d92974-c0c0-4566-8131-c3dda9b21122"; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/d1d92974-c0c0-4566-8131-c3dda9b21122"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/3EB9-C18F"; + fsType = "vfat"; + }; + + swapDevices = [ + { + device = "/swapfile"; + priority = 0; + size = 16000; + } + ]; + + nix.maxJobs = lib.mkDefault 4; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + # High-DPI console + console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz"; +} diff --git a/env/laptop/sway/config.d/main b/env/laptop/sway/config.d/main index e3e1218..61a3a53 100644 --- a/env/laptop/sway/config.d/main +++ b/env/laptop/sway/config.d/main @@ -2,9 +2,6 @@ exec libinput-gestures -c $DOTFILES_PATH/apps/de/libinput/sway-gestures.conf # exec swayidle -w timeout 300 'swaylock -f -c 000000' timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -f -c 000000' -# TODO: setup displays (when docked for work?) -output eDP-1 res 1600x900 pos 0 0 - bindswitch lid:toggle exec swaylock input type:touchpad { @@ -18,3 +15,7 @@ input type:touchpad { input type:keyboard { xkb_options ctrl:nocaps } + +# TODO: setup displays (when docked for work?) +output eDP-1 res 1600x900 pos 0 0 + diff --git a/env/nix/personal-machine.nix b/env/nix/personal-machine.nix new file mode 100644 index 0000000..ae4321f --- /dev/null +++ b/env/nix/personal-machine.nix @@ -0,0 +1,129 @@ +{ config, pkgs, ... }: + +{ + imports = [ /etc/nixos/hardware-configuration.nix ]; + + boot = { + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + }; + + nixpkgs.config = { + allowUnfree = true; + packageOverrides = pkgs: { + vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; + }; + }; + + networking = { + networkmanager.enable = true; + hostName = "third.lyte.dev"; + }; + + i18n.defaultLocale = "en_US.UTF-8"; + console.keyMap = "us"; + + time.timeZone = "America/Chicago"; + + environment = { + systemPackages = with pkgs; [ + fish bash tmux + vim neovim + networkmanager + wget curl w3m + git + pciutils usbutils binutils + ripgrep sd + nodejs python3 + rsync + ]; + variables = { + EDITOR = "nvim"; + }; + }; + + fonts.fonts = with pkgs; [ iosevka ]; + + virtualisation.docker.enable = true; + + hardware = { + bluetooth = { + enable = true; + }; + pulseaudio = { + enable = true; + support32Bit = true; + package = pkgs.pulseaudioFull; + # extraConfig = " + # load-module module-switch-on-connect + # "; + }; + opengl = { + enable = true; + driSupport = true; + driSupport32Bit = true; + extraPackages = with pkgs; [ + vaapiIntel + vaapiVdpau + libvdpau-va-gl + ]; + }; + }; + + programs = { + fish.enable = true; + mtr.enable = true; + gnupg.agent = { + enable = true; + enableSSHSupport = true; + pinentryFlavor = "curses"; + }; + }; + + services = { + openssh.enable = true; + }; + + networking.firewall.enable = false; + + sound.enable = true; + + users.users.daniel = { + isNormalUser = true; + extraGroups = [ "wheel" "docker" ]; + shell = pkgs.fish; + home = "/home/daniel/.home"; + packages = with pkgs; [ + steam + pulsemixer + file + appimage-run + kitty + sway waybar mako wl-clipboard + firefox-devedition-bin + fzf + fortune + dmenu + ranger + pass + brightnessctl + vulkan-tools # TODO: vulkan? + rustup + clang + pavucontrol + pamixer + strongswan + gnumake + elixir + docker docker-compose + postgresql + htop + google-cloud-sdk + slurp grim + ]; + }; + + system.stateVersion = "20.03"; +} diff --git a/env/nix/pkgs/home.nix b/env/nix/pkgs/home.nix new file mode 100644 index 0000000..a4bf7f8 --- /dev/null +++ b/env/nix/pkgs/home.nix @@ -0,0 +1,7 @@ +{ config, pkgs, ... }: + +{ + programs.home-manager.enable = true; + + home.stateVersion = "20.03"; +} diff --git a/setup.bash b/setup.bash index 22280f9..d731581 100755 --- a/setup.bash +++ b/setup.bash @@ -122,6 +122,9 @@ links=( # MPD client "apps/ncmpcpp" "$HOME/.ncmpcpp" + + # XDG user directories + "env/nix/pkgs" "$XDG_CONFIG_HOME/nixpkgs" ) chmod 700 -R "$HOME/.bin"