From 4f0185bc89f7ba707808eecd926635e4b3fa1834 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sat, 24 Oct 2020 09:06:34 -0500 Subject: [PATCH 01/17] Work on modularizing nix config --- env/laptop/hardware.nix | 12 +--- env/nix/machines/third.nix | 96 ++++++++++++++++++++++++++++ env/nix/modules/intel.nix | 10 +++ env/nix/modules/network-manager.nix | 5 ++ env/nix/modules/systemd-boot-efi.nix | 10 +++ env/nix/personal-machine.nix | 4 ++ env/nix/profiles/base.nix | 27 ++++++++ env/nix/profiles/laptop.nix | 7 ++ 8 files changed, 161 insertions(+), 10 deletions(-) create mode 100644 env/nix/machines/third.nix create mode 100644 env/nix/modules/intel.nix create mode 100644 env/nix/modules/network-manager.nix create mode 100644 env/nix/modules/systemd-boot-efi.nix create mode 100644 env/nix/profiles/base.nix create mode 100644 env/nix/profiles/laptop.nix diff --git a/env/laptop/hardware.nix b/env/laptop/hardware.nix index 2b0f5b8..eb893b0 100644 --- a/env/laptop/hardware.nix +++ b/env/laptop/hardware.nix @@ -8,12 +8,10 @@ [ ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "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"; @@ -25,13 +23,7 @@ fsType = "vfat"; }; - swapDevices = [ - { - device = "/swapfile"; - priority = 0; - size = 16000; - } - ]; + swapDevices = [ ]; nix.maxJobs = lib.mkDefault 4; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; diff --git a/env/nix/machines/third.nix b/env/nix/machines/third.nix new file mode 100644 index 0000000..56ef8a4 --- /dev/null +++ b/env/nix/machines/third.nix @@ -0,0 +1,96 @@ +{ config, pkgs, ... }: + +{ + imports = [ + ../profiles/laptop.nix + ../modules/systemd-boot-efi.nix + ../modules/intel.nix + ]; + + networking.hostName "third.lyte.dev"; + + 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 + unzip + automake + autoconf + ncurses + ]; + }; +} diff --git a/env/nix/modules/intel.nix b/env/nix/modules/intel.nix new file mode 100644 index 0000000..e9bb96d --- /dev/null +++ b/env/nix/modules/intel.nix @@ -0,0 +1,10 @@ +{ config, pkgs, ... }: + +{ + nixpkgs.config = { + allowUnfree = true; + packageOverrides = pkgs: { + vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; + }; + }; +} diff --git a/env/nix/modules/network-manager.nix b/env/nix/modules/network-manager.nix new file mode 100644 index 0000000..f0a2d3d --- /dev/null +++ b/env/nix/modules/network-manager.nix @@ -0,0 +1,5 @@ +{ config, pkgs, ... }: + +{ + networkmanager.enable = true; +} diff --git a/env/nix/modules/systemd-boot-efi.nix b/env/nix/modules/systemd-boot-efi.nix new file mode 100644 index 0000000..aee64f6 --- /dev/null +++ b/env/nix/modules/systemd-boot-efi.nix @@ -0,0 +1,10 @@ +{ config, pkgs, ... }: + +{ + boot = { + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + }; +} diff --git a/env/nix/personal-machine.nix b/env/nix/personal-machine.nix index ae4321f..d075727 100644 --- a/env/nix/personal-machine.nix +++ b/env/nix/personal-machine.nix @@ -122,6 +122,10 @@ htop google-cloud-sdk slurp grim + unzip + automake + autoconf + ncurses ]; }; diff --git a/env/nix/profiles/base.nix b/env/nix/profiles/base.nix new file mode 100644 index 0000000..5d6bd15 --- /dev/null +++ b/env/nix/profiles/base.nix @@ -0,0 +1,27 @@ +{ config, pkgs, ... }: + +{ + i18n.defaultLocale = "en_US.UTF-8"; + console.keyMap = "us"; + time.timeZone = "America/Chicago"; + + environment = { + systemPackages = with pkgs; [ + fish bash + tmux + neovim + networkmanager + wget curl + rsync + w3m + git + pciutils usbutils binutils + ripgrep sd fd + ]; + variables = { + EDITOR = "nvim"; + PAGER = "nvim"; + VISUAL = "nvim"; + }; + }; +} diff --git a/env/nix/profiles/laptop.nix b/env/nix/profiles/laptop.nix new file mode 100644 index 0000000..6647721 --- /dev/null +++ b/env/nix/profiles/laptop.nix @@ -0,0 +1,7 @@ +{ config, pkgs, ... }: + +{ + imports = [ + ./base.nix + ]; +} From 4e807b5759990deb0f18e4abc6402a52cee36202 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sat, 24 Oct 2020 10:03:34 -0500 Subject: [PATCH 02/17] More nix modules --- env/nix/machines/third.nix | 97 ++----------------- env/nix/modules/bash.nix | 3 + env/nix/modules/bluetooth.nix | 3 + env/nix/modules/de/base.nix | 15 +++ env/nix/modules/de/sway.nix | 17 ++++ env/nix/modules/docker.nix | 3 + env/nix/modules/fish.nix | 5 + env/nix/modules/intel.nix | 11 ++- env/nix/modules/neovim.nix | 3 + env/nix/modules/network-manager.nix | 7 +- env/nix/modules/pulseaudio.nix | 8 ++ env/nix/modules/systemd-boot-efi.nix | 4 +- env/nix/modules/tmux.nix | 4 + env/nix/modules/users/daniel.nix | 38 ++++++++ env/nix/modules/users/valerie.nix | 7 ++ env/nix/personal-machine.nix | 133 --------------------------- env/nix/pkgs/home.nix | 5 +- env/nix/profiles/base.nix | 36 ++++++-- env/nix/profiles/laptop.nix | 8 +- 19 files changed, 157 insertions(+), 250 deletions(-) create mode 100644 env/nix/modules/bash.nix create mode 100644 env/nix/modules/bluetooth.nix create mode 100644 env/nix/modules/de/base.nix create mode 100644 env/nix/modules/de/sway.nix create mode 100644 env/nix/modules/docker.nix create mode 100644 env/nix/modules/fish.nix create mode 100644 env/nix/modules/neovim.nix create mode 100644 env/nix/modules/pulseaudio.nix create mode 100644 env/nix/modules/tmux.nix create mode 100644 env/nix/modules/users/daniel.nix create mode 100644 env/nix/modules/users/valerie.nix delete mode 100644 env/nix/personal-machine.nix diff --git a/env/nix/machines/third.nix b/env/nix/machines/third.nix index 56ef8a4..45e79cc 100644 --- a/env/nix/machines/third.nix +++ b/env/nix/machines/third.nix @@ -1,96 +1,17 @@ -{ config, pkgs, ... }: - -{ +{ config, pkgs, ... }: { imports = [ ../profiles/laptop.nix ../modules/systemd-boot-efi.nix ../modules/intel.nix + ../modules/docker.nix + ../modules/network-manager.nix + ../modules/bluetooth.nix + ../modules/pulseaudio.nix + ../modules/de/sway.nix + ../modules/users/daniel.nix + ../modules/users/valerie.nix ]; - networking.hostName "third.lyte.dev"; - - 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.hostName = "third.lyte.dev"; 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 - unzip - automake - autoconf - ncurses - ]; - }; } diff --git a/env/nix/modules/bash.nix b/env/nix/modules/bash.nix new file mode 100644 index 0000000..1ad937e --- /dev/null +++ b/env/nix/modules/bash.nix @@ -0,0 +1,3 @@ +{ config, pkgs, ... }: { + environment.systemPackages = [ pkgs.bash ]; +} diff --git a/env/nix/modules/bluetooth.nix b/env/nix/modules/bluetooth.nix new file mode 100644 index 0000000..1a80e13 --- /dev/null +++ b/env/nix/modules/bluetooth.nix @@ -0,0 +1,3 @@ +{ config, pkgs, ... }: { + hardware.bluetooth.enable = true; +} diff --git a/env/nix/modules/de/base.nix b/env/nix/modules/de/base.nix new file mode 100644 index 0000000..1b5f7ce --- /dev/null +++ b/env/nix/modules/de/base.nix @@ -0,0 +1,15 @@ +{ config, pkgs, ... }: { + fonts.fonts = with pkgs; [ iosevka ]; + hardware.opengl = { + enable = true; + driSupport = true; + driSupport32Bit = true; + }; + environment = { + systemPackages = with pkgs; [ + firefox-devedition-bin + pavucontrol + brightnessctl + ]; + }; +} diff --git a/env/nix/modules/de/sway.nix b/env/nix/modules/de/sway.nix new file mode 100644 index 0000000..abf884d --- /dev/null +++ b/env/nix/modules/de/sway.nix @@ -0,0 +1,17 @@ +{ config, pkgs, ... }: { + imports = [ ./base.nix ]; + programs.sway = { + enable = true; + extraPackages = with pkgs; [ + swaylock + swayidle + xwayland + waybar + mako + kanshi + wl-clipboard + slurp + grim + ]; + }; +} diff --git a/env/nix/modules/docker.nix b/env/nix/modules/docker.nix new file mode 100644 index 0000000..8092545 --- /dev/null +++ b/env/nix/modules/docker.nix @@ -0,0 +1,3 @@ +{ config, pkgs, ... }: { + imports = [ /etc/nixos/hardware-configuration.nix ]; +} diff --git a/env/nix/modules/fish.nix b/env/nix/modules/fish.nix new file mode 100644 index 0000000..65f35dc --- /dev/null +++ b/env/nix/modules/fish.nix @@ -0,0 +1,5 @@ +{ config, pkgs, ... }: { + environment.systemPackages = [ pkgs.fish ]; + programs.fish.enable = true; +} + diff --git a/env/nix/modules/intel.nix b/env/nix/modules/intel.nix index e9bb96d..9072b7d 100644 --- a/env/nix/modules/intel.nix +++ b/env/nix/modules/intel.nix @@ -1,10 +1,15 @@ -{ config, pkgs, ... }: - -{ +{ config, pkgs, ... }: { nixpkgs.config = { allowUnfree = true; packageOverrides = pkgs: { vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; }; }; + hardware.opengl = { + extraPackages = with pkgs; [ + vaapiIntel + vaapiVdpau + libvdpau-va-gl + ]; + }; } diff --git a/env/nix/modules/neovim.nix b/env/nix/modules/neovim.nix new file mode 100644 index 0000000..0f3b2f7 --- /dev/null +++ b/env/nix/modules/neovim.nix @@ -0,0 +1,3 @@ +{ config, pkgs, ... }: { + environment.systemPackages = [ pkgs.neovim ]; +} diff --git a/env/nix/modules/network-manager.nix b/env/nix/modules/network-manager.nix index f0a2d3d..3bf4d09 100644 --- a/env/nix/modules/network-manager.nix +++ b/env/nix/modules/network-manager.nix @@ -1,5 +1,4 @@ -{ config, pkgs, ... }: - -{ - networkmanager.enable = true; +{ config, pkgs, ... }: { + networking.networkmanager.enable = true; + environment.systemPackages = [ pkgs.networkmanager ]; } diff --git a/env/nix/modules/pulseaudio.nix b/env/nix/modules/pulseaudio.nix new file mode 100644 index 0000000..20ae008 --- /dev/null +++ b/env/nix/modules/pulseaudio.nix @@ -0,0 +1,8 @@ +{ config, pkgs, ... }: { + hardware.pulseaudio = { + enable = true; + support32Bit = true; + package = pkgs.pulseaudioFull; + }; + sound.enable = true; +} diff --git a/env/nix/modules/systemd-boot-efi.nix b/env/nix/modules/systemd-boot-efi.nix index aee64f6..813a8af 100644 --- a/env/nix/modules/systemd-boot-efi.nix +++ b/env/nix/modules/systemd-boot-efi.nix @@ -1,6 +1,4 @@ -{ config, pkgs, ... }: - -{ +{ config, pkgs, ... }: { boot = { loader = { systemd-boot.enable = true; diff --git a/env/nix/modules/tmux.nix b/env/nix/modules/tmux.nix new file mode 100644 index 0000000..ea9ad57 --- /dev/null +++ b/env/nix/modules/tmux.nix @@ -0,0 +1,4 @@ +{ config, pkgs, ... }: { + environment.systemPackages = [ pkgs.tmux ]; +} + diff --git a/env/nix/modules/users/daniel.nix b/env/nix/modules/users/daniel.nix new file mode 100644 index 0000000..921cbd0 --- /dev/null +++ b/env/nix/modules/users/daniel.nix @@ -0,0 +1,38 @@ +{ config, pkgs, ... }: { + users.users.daniel = { + isNormalUser = true; + extraGroups = [ "wheel" "docker" ]; + shell = pkgs.fish; + home = "/home/daniel/.home"; + packages = with pkgs; [ + fortune + steam + pulsemixer + file + appimage-run + kitty + 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 + unzip + automake + autoconf + ncurses + ]; + }; +} diff --git a/env/nix/modules/users/valerie.nix b/env/nix/modules/users/valerie.nix new file mode 100644 index 0000000..73005e2 --- /dev/null +++ b/env/nix/modules/users/valerie.nix @@ -0,0 +1,7 @@ +{ config, pkgs, ... }: { + users.users.valerie = { + isNormalUser = true; + shell = pkgs.fish; + home = "/home/valerie"; + }; +} diff --git a/env/nix/personal-machine.nix b/env/nix/personal-machine.nix deleted file mode 100644 index d075727..0000000 --- a/env/nix/personal-machine.nix +++ /dev/null @@ -1,133 +0,0 @@ -{ 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 - unzip - automake - autoconf - ncurses - ]; - }; - - system.stateVersion = "20.03"; -} diff --git a/env/nix/pkgs/home.nix b/env/nix/pkgs/home.nix index a4bf7f8..cb99cae 100644 --- a/env/nix/pkgs/home.nix +++ b/env/nix/pkgs/home.nix @@ -1,7 +1,4 @@ -{ config, pkgs, ... }: - -{ +{ config, pkgs, ... }: { programs.home-manager.enable = true; - home.stateVersion = "20.03"; } diff --git a/env/nix/profiles/base.nix b/env/nix/profiles/base.nix index 5d6bd15..ba9e6da 100644 --- a/env/nix/profiles/base.nix +++ b/env/nix/profiles/base.nix @@ -1,27 +1,45 @@ -{ config, pkgs, ... }: - -{ +{ config, pkgs, ... }: { + imports = [ + ../modules/fish.nix + ../modules/bash.nix + ../modules/tmux.nix + ../modules/neovim.nix + ]; i18n.defaultLocale = "en_US.UTF-8"; console.keyMap = "us"; time.timeZone = "America/Chicago"; environment = { systemPackages = with pkgs; [ - fish bash - tmux - neovim - networkmanager + less wget curl rsync w3m git pciutils usbutils binutils ripgrep sd fd + unzip ]; variables = { EDITOR = "nvim"; - PAGER = "nvim"; - VISUAL = "nvim"; + PAGER = "less"; + VISUAL = "less"; + }; + shellAliases = { + vim = "neovim"; + vi = "neovim"; }; }; + + programs = { + gnupg.agent = { + enable = true; + enableSSHSupport = true; + pinentryFlavor = "curses"; + }; + }; + + services = { + openssh.enable = true; + }; } diff --git a/env/nix/profiles/laptop.nix b/env/nix/profiles/laptop.nix index 6647721..64d8d9d 100644 --- a/env/nix/profiles/laptop.nix +++ b/env/nix/profiles/laptop.nix @@ -1,7 +1,3 @@ -{ config, pkgs, ... }: - -{ - imports = [ - ./base.nix - ]; +{ config, pkgs, ... }: { + imports = [ ./base.nix ]; } From a92d79f96f2c4bacf489c73b2040906e6a51a1e5 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sat, 24 Oct 2020 10:12:39 -0500 Subject: [PATCH 03/17] More modularization --- env/nix/modules/neovim.nix | 11 ++++++++++- env/nix/profiles/base.nix | 5 ----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/env/nix/modules/neovim.nix b/env/nix/modules/neovim.nix index 0f3b2f7..162bf31 100644 --- a/env/nix/modules/neovim.nix +++ b/env/nix/modules/neovim.nix @@ -1,3 +1,12 @@ { config, pkgs, ... }: { - environment.systemPackages = [ pkgs.neovim ]; + environment = { + systemPackages = [ pkgs.neovim ]; + variables = { + EDITOR = "nvim"; + }; + shellAliases = { + vim = "neovim"; + vi = "neovim"; + }; + }; } diff --git a/env/nix/profiles/base.nix b/env/nix/profiles/base.nix index ba9e6da..3f7dd42 100644 --- a/env/nix/profiles/base.nix +++ b/env/nix/profiles/base.nix @@ -21,14 +21,9 @@ unzip ]; variables = { - EDITOR = "nvim"; PAGER = "less"; VISUAL = "less"; }; - shellAliases = { - vim = "neovim"; - vi = "neovim"; - }; }; programs = { From 7690b3a1065e7987ad5fa11850cb4ea82127ae46 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sat, 24 Oct 2020 10:14:04 -0500 Subject: [PATCH 04/17] Remove random file? --- bofa.json | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 bofa.json diff --git a/bofa.json b/bofa.json deleted file mode 100644 index e4d4630..0000000 --- a/bofa.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "date": "d/m/Y", - "default_account": 1, - "delimiter": "comma", - "headers": true, - "ignore_duplicate_lines": true, - "ignore_duplicate_transactions": true, - "rules": true, - "skip_form": false, - "specifics": [ - "AppendHash" - ], - "roles": [ - "date_transaction", - "description", - "amount", - ], - "do_mapping": [true, true ,true], - "mapping": { - "3": { - "Savings Account": 3 - }, - "4": { - "Savings Account": 3 - } - }, - "version": 2 -} From 0cd107a09d7ec06fa8915d9b83c69a1cf50a7380 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sat, 24 Oct 2020 16:03:39 -0500 Subject: [PATCH 05/17] Work on lightdm/sway stuff --- apps/shell/bash/aliases.bash | 4 ---- apps/shell/fish/aliases.fish | 4 ---- bin/vman | 8 -------- env/nix/modules/de/base.nix | 2 ++ env/nix/modules/de/sway.nix | 2 ++ env/nix/modules/docker.nix | 8 +++++++- env/nix/modules/lightdm.nix | 22 ++++++++++++++++++++++ env/nix/modules/neovim.nix | 6 ++++-- env/nix/modules/users/daniel.nix | 1 - 9 files changed, 37 insertions(+), 20 deletions(-) delete mode 100755 bin/vman create mode 100644 env/nix/modules/lightdm.nix diff --git a/apps/shell/bash/aliases.bash b/apps/shell/bash/aliases.bash index 5a98b69..3578b55 100644 --- a/apps/shell/bash/aliases.bash +++ b/apps/shell/bash/aliases.bash @@ -140,10 +140,6 @@ alias pa="pulsemixer" # this sometimes fixes steam dynamic library issues? alias lsteam="LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /usr/$LIB/libxcb.so.1 /usr/$LIB/libgpg-error.so' steam" -# override the man commands with vim -alias _man="\\man" -alias man="vman" - # neomutt is better alias mutt="neomutt" diff --git a/apps/shell/fish/aliases.fish b/apps/shell/fish/aliases.fish index 91efb4d..943bd4d 100755 --- a/apps/shell/fish/aliases.fish +++ b/apps/shell/fish/aliases.fish @@ -171,10 +171,6 @@ alias vd vdiff # this sometimes fixes steam dynamic library issues? alias lsteam "env LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /usr/$LIB/libxcb.so.1 /usr/$LIB/libgpg-error.so' steam" -# override the man commands with vim -alias _man "\\man" -alias man "vman" - # neomutt is better alias mutt "neomutt" alias mail "mutt" diff --git a/bin/vman b/bin/vman deleted file mode 100755 index 0e608fa..0000000 --- a/bin/vman +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env sh - -# our vim config is setup to not auto-load sessions if we set the -# `asmanviewer` variable, so launch vim that way when using vim as our man -# page viewer - -"$EDITOR" --cmd "let asmanviewer=1" -c "SuperMan $*" || \ - ( echo "No manual entry for $*" && exit 1 ) diff --git a/env/nix/modules/de/base.nix b/env/nix/modules/de/base.nix index 1b5f7ce..794bcdd 100644 --- a/env/nix/modules/de/base.nix +++ b/env/nix/modules/de/base.nix @@ -1,4 +1,5 @@ { config, pkgs, ... }: { + imports = [ ../lightdm.nix ]; fonts.fonts = with pkgs; [ iosevka ]; hardware.opengl = { enable = true; @@ -7,6 +8,7 @@ }; environment = { systemPackages = with pkgs; [ + glxinfo firefox-devedition-bin pavucontrol brightnessctl diff --git a/env/nix/modules/de/sway.nix b/env/nix/modules/de/sway.nix index abf884d..847a0c8 100644 --- a/env/nix/modules/de/sway.nix +++ b/env/nix/modules/de/sway.nix @@ -12,6 +12,8 @@ wl-clipboard slurp grim + font-awesome ]; }; + # services.xserver.displayManager.defaultSession = "sway-lytedev"; } diff --git a/env/nix/modules/docker.nix b/env/nix/modules/docker.nix index 8092545..c38dee1 100644 --- a/env/nix/modules/docker.nix +++ b/env/nix/modules/docker.nix @@ -1,3 +1,9 @@ { config, pkgs, ... }: { - imports = [ /etc/nixos/hardware-configuration.nix ]; + virtualisation.docker = { + enable = true; + enableOnBoot = false; + }; + environment.systemPackages = with pkgs; [ + docker docker-compose + ]; } diff --git a/env/nix/modules/lightdm.nix b/env/nix/modules/lightdm.nix new file mode 100644 index 0000000..aad1fe0 --- /dev/null +++ b/env/nix/modules/lightdm.nix @@ -0,0 +1,22 @@ +{ config, pkgs, ... }: { + # services.xserver.displayManager.defaultSession + services.xserver = { + enable = true; + displayManager.lightdm = { + enable = true; + greeter = { + enable = true; + }; + greeters.gtk = { + enable = true; + theme = { + package = pkgs.arc-theme; + name = "Arc-Dark"; + }; + clock-format = "%H:%M:%S"; + }; + # background = ""; + }; + }; + environment.systemPackages = with pkgs; [ lightdm lightdm_gtk_greeter ]; +} diff --git a/env/nix/modules/neovim.nix b/env/nix/modules/neovim.nix index 162bf31..368b0dd 100644 --- a/env/nix/modules/neovim.nix +++ b/env/nix/modules/neovim.nix @@ -3,10 +3,12 @@ systemPackages = [ pkgs.neovim ]; variables = { EDITOR = "nvim"; + MANPAGER = "nvim +Man!"; + MANWIDTH = "80"; }; shellAliases = { - vim = "neovim"; - vi = "neovim"; + vim = "nvim"; + vi = "nvim"; }; }; } diff --git a/env/nix/modules/users/daniel.nix b/env/nix/modules/users/daniel.nix index 921cbd0..d154d5e 100644 --- a/env/nix/modules/users/daniel.nix +++ b/env/nix/modules/users/daniel.nix @@ -25,7 +25,6 @@ strongswan gnumake elixir - docker docker-compose postgresql htop google-cloud-sdk From 122dd688a6b7a939317def450ed6c42b326d76cd Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sat, 24 Oct 2020 21:48:02 -0500 Subject: [PATCH 06/17] Cleaning, wrapping up base nix config --- apps/config | 18 -- apps/de/bspwm/config | 52 ----- apps/de/bspwm/rc | 20 -- apps/de/bspwm/wallpapers | 2 - apps/de/bspwm/wmstart | 3 - apps/de/compton/compton.conf | 59 ------ apps/de/dunst/rc | 312 ----------------------------- apps/de/libinput/touchpad.conf | 9 - apps/de/sway/init | 34 ---- apps/de/sxhkd/rc | 266 ------------------------ apps/de/x/init | 14 -- apps/de/x/loadresources | 23 --- apps/de/x/modmap | 7 - apps/de/x/profile | 20 -- apps/de/x/resources | 100 --------- apps/shell/fish/aliases.fish | 2 +- apps/udev-rules/lowbat | 2 - apps/udev-rules/usb-device-plugin | 1 - apps/udev-rules/wifi-powersave | 1 - bin/lib/sudo_setup | 10 - env/desktop/gitconfig | 6 - env/desktop/x/resources | 8 - env/laptop/gitconfig | 6 - env/laptop/polybar | 9 - env/laptop/vim | 0 env/laptop/x/docked.resources | 7 - env/laptop/x/games.resources | 7 - env/laptop/x/home.docked.resources | 4 - env/laptop/x/profile | 3 - env/laptop/x/resources | 21 -- env/nix/machines/third.nix | 18 +- env/nix/modules/de/base.nix | 4 + env/nix/modules/de/sway.nix | 61 ++++-- env/nix/modules/intel.nix | 15 +- env/nix/modules/users/daniel.nix | 1 + env/nix/profiles/base.nix | 24 +++ 36 files changed, 102 insertions(+), 1047 deletions(-) delete mode 100644 apps/config delete mode 100755 apps/de/bspwm/config delete mode 100755 apps/de/bspwm/rc delete mode 100755 apps/de/bspwm/wallpapers delete mode 100755 apps/de/bspwm/wmstart delete mode 100644 apps/de/compton/compton.conf delete mode 100644 apps/de/dunst/rc delete mode 100644 apps/de/libinput/touchpad.conf delete mode 100755 apps/de/sway/init delete mode 100755 apps/de/sxhkd/rc delete mode 100644 apps/de/x/init delete mode 100755 apps/de/x/loadresources delete mode 100644 apps/de/x/modmap delete mode 100755 apps/de/x/profile delete mode 100755 apps/de/x/resources delete mode 100644 apps/udev-rules/lowbat delete mode 100644 apps/udev-rules/usb-device-plugin delete mode 100644 apps/udev-rules/wifi-powersave delete mode 100644 env/desktop/gitconfig delete mode 100755 env/desktop/x/resources delete mode 100644 env/laptop/gitconfig delete mode 100755 env/laptop/polybar delete mode 100755 env/laptop/vim delete mode 100755 env/laptop/x/docked.resources delete mode 100644 env/laptop/x/games.resources delete mode 100644 env/laptop/x/home.docked.resources delete mode 100755 env/laptop/x/profile delete mode 100755 env/laptop/x/resources diff --git a/apps/config b/apps/config deleted file mode 100644 index cf91234..0000000 --- a/apps/config +++ /dev/null @@ -1,18 +0,0 @@ - -;; Added by Package.el. This must come before configurations of -;; installed packages. Don't delete this line. If you don't want it, -;; just comment it out by adding a semicolon to the start of the line. -;; You may delete these explanatory comments. - -;; jk - -(require 'package) -(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/")) -(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) -(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/")) -(package-initialize) - -;; Given all of this, just `package-refresh-contents` - -(require 'evil) -(evil-mode 5) diff --git a/apps/de/bspwm/config b/apps/de/bspwm/config deleted file mode 100755 index e6a54a9..0000000 --- a/apps/de/bspwm/config +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env sh - -NUM_DESKTOPS="$(xrq bspwm.num_desktops || echo '10')" -REVERSE_DESKTOP_ORDERING="$(xrq bspwm.reverse_desktop_ordering)" -REVERSE_MONITOR_DESKTOPS="$(xrq bspwm.reverse_monitor_desktops)" -BSPWM_MONITORS=$(bspc query -M) -MONITOR_COUNT=$(echo "$BSPWM_MONITORS" | wc -w | awk '{ printf $1 }') -PER_MONITOR="$(xrq bspwm.num_desktops_per_monitor || echo $((NUM_DESKTOPS / MONITOR_COUNT)))" -DESKTOPS=$(seq "$NUM_DESKTOPS") - -[ "$REVERSE_MONITOR_DESKTOPS" -eq 1 ] && BSPWM_MONITORS=$(echo "$BSPWM_MONITORS" | tac) - -bspc config normal_border_color "$(xrq bspwm.normal_border_color)" -bspc config focused_border_color "$(xrq bspwm.focused_border_color)" -bspc config active_border_color "$(xrq bspwm.active_border_color)" -bspc config presel_feedback_color "$(xrq bspwm.presel_feedback_color)" -bspc config border_width "$(xrq bspwm.border_width)" -bspc config split_ratio "$(xrq bspwm.split_ratio)" -bspc config window_gap "$(xrq bspwm.window_gap)" -bspc config borderless_monocle true -bspc config gapless_monocle true -bspc config pointer_modifier "mod4" -bspc config remove_unplugged_monitors true -bspc config remove_disabled_monitors true - -bspc rule -a "*" split_dir=right - -i=1 -total_screens=0 -for mon in $BSPWM_MONITORS; do - max=$((i + PER_MONITOR - 1)) - screens="" - for j in $(seq $i $max); do - [[ "$total_screens" -ge "$NUM_DESKTOPS" ]] || screens="${screens}${j} " - total_screens=$((total_screens+1)) - echo $NUM_DESKTOPS $total_screens $screens - done - bspc monitor "$mon" -d $screens - i=$((max + 1)) -done - -if [ "$REVERSE_DESKTOP_ORDERING" -eq 1 ]; then - prev_mon= - for mon in ${BSPWM_MONITORS}; do - if [ ! -z $prev_mon ]; then - bspc monitor "$mon" --swap "$prev_mon" - fi - prev_mon="$mon" - done -fi - -. maybe_source_env_file bspwm-after diff --git a/apps/de/bspwm/rc b/apps/de/bspwm/rc deleted file mode 100755 index f586483..0000000 --- a/apps/de/bspwm/rc +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env sh - -# . "$DOTFILES_PATH/apps/de/x/profile" - -BAR_COMMAND="startbar" -BSPWM_STATE_FILE="$HOME/.bspwm_state" - -[ -e "$BSPWM_STATE" ] && bspc wm -l "$BSPWM_STATE" && rm "$BSPWM_STATE" - -. "$DOTFILES_PATH/apps/de/bspwm/config" - -[ -f "$HOME/.fehbg" ] && "$HOME/.fehbg" & -[ "$(xrq bspwm.start_compton)" -eq 1 ] && has_command compton && compton & -[ "$(xrq bspwm.start_bar)" -eq 1 ] && has_command "${BAR_COMMAND}" && "${BAR_COMMAND}" & -has_command urxvtd && urxvtd & -has_command dunst && dunst & -has_command sxhkd && sxhkd -m -1 & -has_command unclutter && unclutter & - -bspc wm -o diff --git a/apps/de/bspwm/wallpapers b/apps/de/bspwm/wallpapers deleted file mode 100755 index be8102e..0000000 --- a/apps/de/bspwm/wallpapers +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -feh --no-fehbg --bg-fill '/home/daniel/.home/../img/walls/530895_souredapple_clouds.png' diff --git a/apps/de/bspwm/wmstart b/apps/de/bspwm/wmstart deleted file mode 100755 index 5f68f09..0000000 --- a/apps/de/bspwm/wmstart +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -bspwm diff --git a/apps/de/compton/compton.conf b/apps/de/compton/compton.conf deleted file mode 100644 index 224a379..0000000 --- a/apps/de/compton/compton.conf +++ /dev/null @@ -1,59 +0,0 @@ -shadow = true; -clearshadow = true; -shadow-radius = 20; -shadow-offset-x = -20; -shadow-offset-y = -15; -shadow-opacity = 0.5; -shadow-red = 0.0; -shadow-green = 0.0; -shadow-blue = 0.0; -shadow-ignore-shaped = false; - -inactive-opacity = 1.0; -active-opacity = 1.0; -frame-opacity = 1.0; -inactive-opacity-override = false; - -fading = false; -fade-in-step = 0.06; -fade-out-step = 0.06; -inactive-dim = 0.0; - -focus-exclude = [ "n:e:rofi" ] - -mark-wmwin-focused = true; -mark-ovredir-focused = false; -detect-rounded-corners = true; -detect-client-opacity = false; - -backend = "glx"; -vsync = true; -refresh-rate = 100; -glx-no-stencil = true; -glx-no-rebind-pixmap = true; -glx-copy-from-front = false; -xrender-sync-fence = true; -use-damage = true; - -dbe = false; -detect-transient = true; -detect-client-leader = true; -invert-color-include = [ ]; - -blur-background = true; -blur-background-frame = true; -blur-background-fixed = true; - -blur-kern = "3x3box"; -blur-method = "kawase"; -blur-strength = "50"; - -opacity-rule - -wintypes : -{ - tooltip : { fade = false; shadow = false; opacity = 1.0; }; - dock : { fade = false; opacity = 1.0; }; - dnd : { fade = false; shadow = false; opacity = 1.0; }; -}; - diff --git a/apps/de/dunst/rc b/apps/de/dunst/rc deleted file mode 100644 index 046f711..0000000 --- a/apps/de/dunst/rc +++ /dev/null @@ -1,312 +0,0 @@ -[global] - monitor = 0 - follow = keyboard - - # The geometry of the window: - # [{width}]x{height}[+/-{x}+/-{y}] - # The geometry of the message window. - # The height is measured in number of notifications everything else - # in pixels. If the width is omitted but the height is given - # ("-geometry x2"), the message window expands over the whole screen - # (dmenu-like). If width is 0, the window expands to the longest - # message displayed. A positive x is measured from the left, a - # negative from the right side of the screen. Y is measured from - # the top and down respectively. - # The width can be negative. In this case the actual width is the - # screen width minus the width defined in within the geometry option. - geometry = "900x5-20+20" - - # Show how many messages are currently hidden (because of geometry). - indicate_hidden = yes - - # Shrink window if it's smaller than the width. Will be ignored if - # width is 0. - shrink = yes - - # The transparency of the window. Range: [0; 100]. - # This option will only work if a compositing window manager is - # present (e.g. xcompmgr, compiz, etc.). - transparency = 25 - - # The height of the entire notification. If the height is smaller - # than the font height and padding combined, it will be raised - # to the font height and padding. - notification_height = 0 - - # Draw a line of "separator_height" pixel height between two - # notifications. - # Set to 0 to disable. - separator_height = 2 - - # Padding between text and separator. - padding = 8 - - # Horizontal padding. - horizontal_padding = 8 - - # Defines width in pixels of frame around the notification window. - # Set to 0 to disable. - frame_width = 2 - - # Defines color of the frame around the notification window. - frame_color = "#888888" - - # Define a color for the separator. - # possible values are: - # * auto: dunst tries to find a color fitting to the background; - # * foreground: use the same color as the foreground; - # * frame: use the same color as the frame; - # * anything else will be interpreted as a X color. - separator_color = frame - - # Sort messages by urgency. - sort = yes - - # Don't remove messages, if the user is idle (no mouse or keyboard input) - # for longer than idle_threshold seconds. - # Set to 0 to disable. - # Transient notifications ignore this setting. - idle_threshold = 120 - - ### Text ### - - font = Iosevka 9 - - # The spacing between lines. If the height is smaller than the - # font height, it will get raised to the font height. - line_height = 3 - - # Possible values are: - # full: Allow a small subset of html markup in notifications: - # bold - # italic - # strikethrough - # underline - # - # For a complete reference see - # . - # - # strip: This setting is provided for compatibility with some broken - # clients that send markup even though it's not enabled on the - # server. Dunst will try to strip the markup but the parsing is - # simplistic so using this option outside of matching rules for - # specific applications *IS GREATLY DISCOURAGED*. - # - # no: Disable markup parsing, incoming notifications will be treated as - # plain text. Dunst will not advertise that it has the body-markup - # capability if this is set as a global setting. - # - # It's important to note that markup inside the format option will be parsed - # regardless of what this is set to. - markup = full - - # The format of the message. Possible variables are: - # %a appname - # %s summary - # %b body - # %i iconname (including its path) - # %I iconname (without its path) - # %p progress value if set ([ 0%] to [100%]) or nothing - # %n progress value if set without any extra characters - # %% Literal % - # Markup is allowed - format = "%s via %a %I %i -> " - - # Alignment of message text. - # Possible values are "left", "center" and "right". - alignment = left - - # Show age of message if message is older than show_age_threshold - # seconds. - # Set to -1 to disable. - show_age_threshold = 60 - - # Split notifications into multiple lines if they don't fit into - # geometry. - word_wrap = yes - - # When word_wrap is set to no, specify where to ellipsize long lines. - # Possible values are "start", "middle" and "end". - ellipsize = middle - - # Ignore newlines '\n' in notifications. - ignore_newline = no - - # Merge multiple notifications with the same content - stack_duplicates = true - - # Hide the count of merged notifications with the same content - hide_duplicate_count = false - - # Display indicators for URLs (U) and actions (A). - show_indicators = no - - ### Icons ### - - # Align icons left/right/off - icon_position = right - - # Scale larger icons down to this size, set to 0 to disable - max_icon_size = 16 - - # Paths to default icons. - icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/32x32/devices/ - - ### History ### - - # Should a notification popped up from history be sticky or timeout - # as if it would normally do. - sticky_history = yes - - # Maximum amount of notifications kept in history - history_length = 20 - - ### Misc/Advanced ### - - # dmenu path. - dmenu = /usr/bin/dmenu -p dunst: - - # Browser for opening urls in context menu. - browser = /usr/bin/firefox-developer-edition -new-tab - - # Always run rule-defined scripts, even if the notification is suppressed - always_run_script = true - - # Define the title of the windows spawned by dunst - title = Notification - - # Define the class of the windows spawned by dunst - class = Notification - - # Print a notification on startup. - # This is mainly for error detection, since dbus (re-)starts dunst - # automatically after a crash. - # startup_notification = true - startup_notification = false - - ### Legacy - - # Use the Xinerama extension instead of RandR for multi-monitor support. - # This setting is provided for compatibility with older nVidia drivers that - # do not support RandR and using it on systems that support RandR is highly - # discouraged. - # - # By enabling this setting dunst will not be able to detect when a monitor - # is connected or disconnected which might break follow mode if the screen - # layout changes. - force_xinerama = false - -# Experimental features that may or may not work correctly. Do not expect them -# to have a consistent behaviour across releases. -[experimental] - # Calculate the dpi to use on a per-monitor basis. - # If this setting is enabled the Xft.dpi value will be ignored and instead - # dunst will attempt to calculate an appropriate dpi value for each monitor - # using the resolution and physical size. This might be useful in setups - # where there are multiple screens with very different dpi values. - per_monitor_dpi = true - -[shortcuts] - - # Shortcuts are specified as [modifier+][modifier+]...key - # Available modifiers are "ctrl", "mod1" (the alt-key), "mod2", - # "mod3" and "mod4" (windows-key). - # Xev might be helpful to find names for keys. - - # Close notification. - close = ctrl+space - - # Close all notifications. - close_all = ctrl+shift+space - - # Redisplay last message(s). - # On the US keyboard layout "grave" is normally above TAB and left - # of "1". Make sure this key actually exists on your keyboard layout, - # e.g. check output of 'xmodmap -pke' - history = ctrl+grave - - # Context menu. - context = ctrl+mod1+space - -[urgency_low] - # IMPORTANT: colors have to be defined in quotation marks. - # Otherwise the "#" and following would be interpreted as a comment. - background = "#222222" - foreground = "#aaaaaa" - timeout = 5 - # Icon for notifications with low urgency, uncomment to enable - #icon = /path/to/icon - -[urgency_normal] - background = "#222222" - foreground = "#ffffff" - timeout = 10 - # Icon for notifications with normal urgency, uncomment to enable - #icon = /path/to/icon - -[urgency_critical] - background = "#f92672" - foreground = "#111111" - frame_color = "#c90642" - timeout = 30 - # Icon for notifications with critical urgency, uncomment to enable - #icon = /path/to/icon - -# Every section that isn't one of the above is interpreted as a rules to -# override settings for certain messages. -# Messages can be matched by "appname", "summary", "body", "icon", "category", -# "msg_urgency" and you can override the "timeout", "urgency", "foreground", -# "background", "new_icon" and "format". -# Shell-like globbing will get expanded. -# -# SCRIPTING -# You can specify a script that gets run when the rule matches by -# setting the "script" option. -# The script will be called as follows: -# script appname summary body icon urgency -# where urgency can be "LOW", "NORMAL" or "CRITICAL". -# -# NOTE: if you don't want a notification to be displayed, set the format -# to "". -# NOTE: It might be helpful to run dunst -print in a terminal in order -# to find fitting options for rules. - -#[espeak] -# summary = "*" -# script = dunst_espeak.sh - -#[script-test] -# summary = "*script*" -# script = dunst_test.sh - -#[ignore] -# # This notification will not be displayed -# summary = "foobar" -# format = "" - -#[history-ignore] -# # This notification will not be saved in history -# summary = "foobar" -# history_ignore = yes - -#[signed_on] -# appname = Pidgin -# summary = "*signed on*" -# urgency = low -# -#[signed_off] -# appname = Pidgin -# summary = *signed off* -# urgency = low -# -#[says] -# appname = Pidgin -# summary = *says* -# urgency = critical -# -#[twitter] -# appname = Pidgin -# summary = *twitter.com* -# urgency = normal -# -# vim: ft=cfg diff --git a/apps/de/libinput/touchpad.conf b/apps/de/libinput/touchpad.conf deleted file mode 100644 index 6c7b894..0000000 --- a/apps/de/libinput/touchpad.conf +++ /dev/null @@ -1,9 +0,0 @@ -Section "InputClass" - Identifier "libinput touchpad" - MatchDevicePath "/dev/input/event*" - Driver "libinput" - MatchIsTouchpad "on" - Option "Tapping" "on" - Option "NaturalScrolling" "true" - Option "DisableWhileTyping" "false" -EndSection diff --git a/apps/de/sway/init b/apps/de/sway/init deleted file mode 100755 index 3ac04c8..0000000 --- a/apps/de/sway/init +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env sh - -[ -z "$XDG_CONFIG_HOME" ] && export XDG_CONFIG_HOME="$HOME/.config" -[ -z "$DOTFILES_PATH" ] && export DOTFILES_PATH="$XDG_CONFIG_HOME/dotfiles" - -. "$DOTFILES_PATH/bin/prelude" - -# killall -9 dunst &> /dev/null -# killall -9 urxvtd -# urxvtd & - -# key repeat -export WLC_REPEAT_DELAY=200 -export WLC_REPEAT_RATE=60 - -# caps lock -> escape key mapping -# export XKB_DEFAULT_OPTIONS=caps:escape - -# enable wayland support for some applications -export CLUTTER_BACKEND=wayland -export SDL_VIDEODRIVER=wayland -export MOZ_ENABLE_WAYLAND=1 -# export GDK_BACKEND=wayland -# export QT_QPA_PLATFORM=wayland-egl - -# configuration flag for some of my dotfiles scripts -export IS_WAYLAND=1 - -sway - -# mako & -# has_command libinput-gestures-setup && libinput-gestures-setup start -# has_command kdeconnect-indicator && kdeconnect-indicator & -# has_command gnome-keyring-daemon && eval "$(gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)" diff --git a/apps/de/sxhkd/rc b/apps/de/sxhkd/rc deleted file mode 100755 index 71ede19..0000000 --- a/apps/de/sxhkd/rc +++ /dev/null @@ -1,266 +0,0 @@ -# node manager shortcuts - -# focus the node for the given path jump -super + {p,b,comma,period} - bspc node -f @{parent,brother,first,second} - -# set modes to tiled/floating for current node -super + {s,f} - bspc node -t {tiled,floating} - -# set modes to pseudo_tiled/fullscreen for current node -super + shift + {s,f} - bspc node -t {pseudo_tiled,fullscreen -l above} - -# focus the last node/desktop -super + {grave,Tab} - bspc {node,desktop} -f last - -# focus the next floating node -super + ctrl + f - bspc node -f next.floating - -# swap positions with the previous node -super + apostrophe - bspc node -s last - -# swap the current node with the biggest node on the current desktop -super + m - bspc node -s biggest - -# move/swap between nodes using vim-style arrows -super + {_,shift + }{h,j,k,l} - bspc node -{f,s} {west,south,north,east} - -# swap previous/next desktops - -super + bracket{left,right} - bspc desktop -f {prev,next} - -# preselect the splitting area for the current node -super + ctrl + {h,j,k,l} - bspc node -p {west,south,north,east} - -# clear the splitting area -super + ctrl + {_,shift + }space - bspc {node -p cancel,desktop -c} - -# expand the current node -super + alt + {h,j,k,l} - bspc node {@west -r -10,@south -r +10,@north -r -10,@east -r +10} - -# shrink the current node -super + alt + shift + {h,j,k,l} - bspc node {@east -r -10,@north -r +10,@south -r -10,@west -r +10} - -# set node split ratio -super + ctrl + {1-9} - bspc node -o 0.{1-9} - -# move a floating window very slowly -super + shift + {Left,Down,Up,Right} - bspc node --move {-1 0, 0 1, 0 -1, 1 0} - -# move a floating window -super + {Left,Down,Up,Right} - bspc node --move {-20 0, 0 20, 0 -20, 20 0} - -# focus/move node to the selected desktop -super + {_,shift + }{1-9,0} - bspc {desktop -f,node -d} {1-9,10} - -# # focus clicked node -~button1 - bspc node -f pointed - -# set the current node's dimensions to 1920x1080 (for streaming) -super + shift + alt + ctrl + s - wres1080 - -# # mouse controls for node movement and resizing -# super + button{1-3} -# bspc pointer -g {move,resize_side,resize_corner} - -# # simulate mouse2 -# shift + super + button1 -# bspc pointer -g resize_corner - -# # ??? -# super + !button{1-3} -# bspc pointer -t %i %i - -# # ??? -# super + @button{1-3} -# bspc pointer -u - -# change node gap and desktop padding -super + plus - bspc config -d focused window_gap $((`bspc config -d focused window_gap` + 5 )) - -super + equal - bspc config -m $(bspc query -M | head -n 1) top_padding $TOP_BAR_PADDING; bspc config -m $(bspc query -M | head -n 1) bottom_padding $BOTTOM_BAR_PADDING; bspc config -d focused window_gap $WINDOW_GAP - -super + minus - bspc config -d focused window_gap $((`bspc config -d focused window_gap` - 5 )) - -super + alt + r - bspc config -m $(bspc query -M | head -n 1) bottom_padding $BOTTOM_BAR_PADDING; bspc config -m $(bspc query -M | head -n 1) top_padding $TOP_BAR_PADDING; bspc config -d focused window_gap $WINDOW_GAP - -super + alt + equal - bspc config -d focused bottom_padding 0; bspc config -d focused top_padding 0; bspc config -d focused left_padding 0; bspc config -d focused right_padding 0 - -super + alt + plus - bspc config -d focused bottom_padding $(expr $(bspc config -d focused bottom_padding) + 5); bspc config -d focused top_padding $(expr $(bspc config -d focused top_padding) + 5); bspc config -d focused left_padding $(expr $(bspc config -d focused left_padding) + 5); bspc config -d focused right_padding $(expr $(bspc config -d focused right_padding) + 5) - -super + ctrl + alt + k - bspc config -d focused bottom_padding $(expr $(bspc config -d focused bottom_padding) - 5); bspc config -d focused top_padding $(expr $(bspc config -d focused top_padding) - 5) - -super + ctrl + alt + j - bspc config -d focused bottom_padding $(expr $(bspc config -d focused bottom_padding) + 5); bspc config -d focused top_padding $(expr $(bspc config -d focused top_padding) + 5) - -super + ctrl + alt + h - bspc config -d focused left_padding $(expr $(bspc config -d focused left_padding) - 5); bspc config -d focused right_padding $(expr $(bspc config -d focused right_padding) - 5) - -super + ctrl + alt + l - bspc config -d focused left_padding $(expr $(bspc config -d focused left_padding) + 5); bspc config -d focused right_padding $(expr $(bspc config -d focused right_padding) + 5) - -super + alt + plus - bspc config -d focused bottom_padding $(expr $(bspc config -d focused bottom_padding) + 5); bspc config -d focused top_padding $(expr $(bspc config -d focused top_padding) + 5); bspc config -d focused left_padding $(expr $(bspc config -d focused left_padding) + 5); bspc config -d focused right_padding $(expr $(bspc config -d focused right_padding) + 5) - -super + ctrl + alt + shift + space - bspc config -d focused bottom_padding 0; bspc config -d focused top_padding 0; bspc config -d focused left_padding 0; bspc config -d focused right_padding 0 - -super + ctrl + alt + space - bspc config -d focused bottom_padding 200; bspc config -d focused top_padding 200; bspc config -d focused left_padding 400; bspc config -d focused right_padding 400 - -super + alt + minus - bspc config -d focused bottom_padding $(expr $(bspc config -d focused bottom_padding) - 5) - -# rotate the current node -super + r - bspc node -R 90 - -# balance the current node's leaves -super + shift + b - bspc node -B - -# balance the current node's sibling leaves -super + ctrl + b - bspc node -f parent && bspc node -B - -# wm-independant shortcuts - -# spawn a transparent node -super + alt + t - "$TERMINAL" && compton-trans -c -o 0 - -# make current node transparent -super + t - compton-trans -c -o 0 - -# make current node fully opaque -super + shift + t - compton-trans -c -o 100 - -# swap sxhkd config with an alternate file and reload the new one -# super + shift + alt + ctrl + r -# if [ -e ~/.config/sxhkd/altsxhkdrc ]; then mv ~/.config/sxhkd/sxhkdrc ~/.config/sxhkd/origsxhkdrc && mv ~/.config/sxhkd/altsxhkdrc ~/.config/sxhkd/sxhkdrc && pkill -USR1 -x sxhkd; fi - -# spawn a terminal -super + Return - "$TERMINAL" - -# spawn a rock-solid and reliable terminal for when I break things -super + alt + Return - urxvt - -# spawn a floating terminal -super + shift + Return - bspc rule -a '*' -o state=floating && "$TERMINAL" - -# spawn the app launcher -super + space - app-launcher -modi run -show run - -# lock the desktop -super + ctrl + shift + l - dm-tool switch-to-greeter - # $SHELL -c '$DOTFILES_PATH/env/x/screensaver/lock.sh' - -# spawn gui file explorer -super + e - thunar - -# volumes controls and media navigation for media keys -{_,shift + }XF86AudioLowerVolume - amixer -D pulse sset Master 5%- - - # pulseaudio-ctl lower - # ADJ={10,1} && amixer -c 1 sset Speaker $ADJ%- && amixer -c 1 sset Headphone $ADJ%- && amixer -c 1 sset Master $ADJ%- && update_bar_MasterVolume - -{_,shift + }XF86AudioRaiseVolume - amixer -D pulse sset Master 5%+ - - # pulseaudio-ctl raise - # ADJ={10,1} && amixer -c 1 sset Speaker $ADJ%+ && amixer -c 1 sset Headphone $ADJ%+ && amixer -c 1 sset Master $ADJ%+ && update_bar_MasterVolume - -XF86AudioMute - amixer -D pulse sset Master toggle - - # pulseaudio-ctl mute - # amixer -c 1 sset Master toggle && update_bar_MasterVolume - -XF86AudioPlay - mpc toggle - -XF86AudioNext - mpc next - -XF86AudioPrev - mpc prev - -# monitor brightness controls for monitor birghtness keys -{_,shift + }XF86MonBrightnessUp - xbacklight + 10 - -{_,shift + }XF86MonBrightnessDown - xbacklight - 10 - -# open rofi as a window switcher -super + w - "app-launcher" -modi window,run -show window - -super + shift + v - sh -c 'kill -USR1 $(cat "/var/run/user/$UID/polybar-mic-script.sh.pid")' - -super + shift + v - sh -c 'kill -USR1 $(cat "/var/run/user/$UID/polybar-mic-script.sh.pid")' - -super + shift + e - rofimoji --insert-with-clipboard --rofi-args='--sort -sorting-method fzf' - -super + shift + p - rofi-pass - -# close the current application -super + c - bspc node -c - -# kill the current application -super + shift + c - bspc node -k - -# kill the wm, if alt is held, it will reload instead of truly quitting... -# I think? -super + ctrl + {alt +,_} Escape - sh -c '{bspc wm -d > "$BSPWM_STATE_FILE" && bspc quit, bspc quit 1}' - -# make sxhkd reload its configuration files: -super + Escape - pkill -USR1 -x sxhkd - -super + ctrl + c - bspc rule -a '*' -o state=floating && kitty -o remember_window_size=no -o initial_window_width=66c -o initial_window_height=10c sh -c "cal -n 3 && printf 'Press [ENTER] to close.' && read" - -super + ctrl + p - pass-chooser diff --git a/apps/de/x/init b/apps/de/x/init deleted file mode 100644 index af08cb0..0000000 --- a/apps/de/x/init +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env sh - -# as far as I can tell, this file is only executed when you run startx from the -# TTY - you probably want to modify xprofile - -[ -z "$XDG_CONFIG_HOME" ] && export XDG_CONFIG_HOME="$HOME/.config" -[ -z "$DOTFILES_PATH" ] && export DOTFILES_PATH="$XDG_CONFIG_HOME/dotfiles" - -. "$DOTFILES_PATH/bin/prelude" - -[ -f "$HOME/.xprofile" ] && . "$HOME/.xprofile" -[ -f "$ENV_PATH/x/init" ] && . "$ENV_PATH/x/init" - -exec "$DOTFILES_PATH/apps/de/bspwm/wmstart" diff --git a/apps/de/x/loadresources b/apps/de/x/loadresources deleted file mode 100755 index 70b5e07..0000000 --- a/apps/de/x/loadresources +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env sh - -xqm() { - f="$1"; shift; [ -f "$f" ] && xrdb -merge "$f" "$@" &>/dev/null -} - -xqm "/etc/X11/xinit/.Xresources" -xqm "$HOME/.Xresources" -xqm "$DOTFILES_PATH/bin/lib/colors/xresources" -xqm "$ENV_PATH/x/resources" - -sysmodmap="/etc/X11/xinit/.Xmodmap" -usermodmap="$ENV_PATH/x/modmap" - -[ -f "$sysmodmap" ] && xmodmap "$sysmodmap" &>/dev/null -[ -f "$usermodmap" ] && xmodmap "$usermodmap" &>/dev/null - -if [ -d "/etc/X11/xinit/xinitrc.d" ] ; then - for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do - [ -x "$f" ] && . "$f" - done - unset f -fi diff --git a/apps/de/x/modmap b/apps/de/x/modmap deleted file mode 100644 index bb412e3..0000000 --- a/apps/de/x/modmap +++ /dev/null @@ -1,7 +0,0 @@ -! convert caps lock to control -clear Lock -keycode 66 = Control_L -add Control = Control_L - -! a fake keycode for xcape -keycode 254 = Escape diff --git a/apps/de/x/profile b/apps/de/x/profile deleted file mode 100755 index 766838d..0000000 --- a/apps/de/x/profile +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -[ -z "$XDG_CONFIG_HOME" ] && export XDG_CONFIG_HOME="$HOME/.config" -[ -z "$DOTFILES_PATH" ] && export DOTFILES_PATH="$XDG_CONFIG_HOME/dotfiles" - -. "$DOTFILES_PATH/bin/prelude" - -[ -f "$DOTFILES_PATH/apps/de/x/loadresources" ] && "$DOTFILES_PATH/apps/de/x/loadresources" -[ -f "$HOME/.xmodmap" ] && xmodmap "$HOME/.xmodmap" -has_command libinput-gestures-setup && libinput-gestures-setup start -has_command autorandr && autorandr -c -# has_command redshift && redshift -r -l 39.1:-94.6 -t 6500K:3000K & -has_command kdeconnect-indicator && kdeconnect-indicator & - -has_command gnome-keyring-daemon && eval "$(gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)" -export SSH_AUTH_SOCK - -xset r rate 250 80 & # keyrepeat - -source maybe_source_env_file x/profile diff --git a/apps/de/x/resources b/apps/de/x/resources deleted file mode 100755 index 3d47fe4..0000000 --- a/apps/de/x/resources +++ /dev/null @@ -1,100 +0,0 @@ -! font -#define mono_font iosevka-lyte -#define mono_font_size 14 -#define bar_font_size 12 -#define mono_font_letterspace 0 -#define icon_font Font Awesome 5 Free Solid -#define icon_font_size 12 -#define bold_mono_font iosevka-lyte Semibold -#define emoji_font Noto Emoji -#define font_fallback_stack xft:icon_font,xft:FreeSans - -! window spacing -#define window_padding 24 -#define window_border 5 -#define window_margin 0 - -! dpi -#define base_dpi 92 - -! alternatives -!#define mono_font scientifica -!#define mono_font_size 11 -!#define mono_font curie -!#define mono_font_size 10 - -! font -*.font: xft:mono_font:pixelsize=mono_font_size,xft:emoji_font,font_fallback_stack -*.boldFont: xft:bold_mono_font:pixelsize=mono_font_size -*.letterSpace: mono_font_letterspace - -! rxvt-unicode -URxvt.termName: rxvt-unicode -URxvt.scrollBar: false -URxvt.cursorUnderline: true -URxvt.cursorBlink: true -URxvt.intensityStyles: true -URxvt.utf8: 1 -URxvt.scaleHeight: 1 -URxvt.depth: 32 -URxvt.internalBorder: window_padding -URxvt.perl-ext-common: default,matcher,resize-font -URxvt.keysym.M-Escape: perl:keyboard-select:activate -URxvt.resize-font.smaller: C-Down -URxvt.resize-font.bigger: C-Up -URxvt.url-launcher: /usr/bin/xdg-open -URxvt.matcher.button: 1 -URxvt.iso14755: False - -! misc -Xcursor.theme: human - -! dpi -dpi: base_dpi -.dpi: base_dpi -*dpi: base_dpi -Xft.dpi: base_dpi - -! font rendering -! TODO: is this still relevant? -*autohint: 0 -*lcdfilter: lcddefault -*hintstyle: hintfull -*hinting: 1 -*antialias: 1 -*rgba: rgb - -! bspwm -bspwm.window_gap: window_margin -bspwm.border_width: window_border -bspwm.num_desktops: 10 -bspwm.reverse_desktop_ordering: 0 -bspwm.reverse_monitor_desktops: 0 -bspwm.split_ratio: 0.5 -bspwm.start_compton: 0 -bspwm.start_bar: 1 - -! polybar -polybar.primary_font: mono_font:pixelsize=bar_font_size;1 -polybar.secondary_font: icon_font:style=Regular:pixelsize=icon_font_size;1 -polybar.display_monitor: DisplayPort-0 -polybar.bottom_of_display: 1 -polybar.margin: window_margin -polybar.storage_volume: / -polybar.ethernet_interface: eth0 -polybar.wireless_interface: wan0 -polybar.width: 100% -polybar.height: 40 -! if you have a margin value, be sure to include that in your offsets -polybar.offset_x: 0 -polybar.offset_y: 0 - -! rofi -rofi.font: mono_font mono_font_size -rofi.padding: window_padding -rofi.bw: window_border -rofi.color-enabled: true -rofi.monitor: -4 -rofi.width: 600 -rofi.sort: true -rofi.sorting-method: fzf diff --git a/apps/shell/fish/aliases.fish b/apps/shell/fish/aliases.fish index 943bd4d..eaa0899 100755 --- a/apps/shell/fish/aliases.fish +++ b/apps/shell/fish/aliases.fish @@ -48,7 +48,7 @@ function ltld echo $l end -alias vltl "vim (ltl)" +alias vltl "$EDITOR (ltl)" alias cdltl "cd (ltld)" alias ltlv vltl diff --git a/apps/udev-rules/lowbat b/apps/udev-rules/lowbat deleted file mode 100644 index 2077231..0000000 --- a/apps/udev-rules/lowbat +++ /dev/null @@ -1,2 +0,0 @@ -# Suspend the system when battery level drops to 3% or lower -SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="[0-5]", RUN+="/usr/bin/systemctl hibernate" diff --git a/apps/udev-rules/usb-device-plugin b/apps/udev-rules/usb-device-plugin deleted file mode 100644 index c2873e0..0000000 --- a/apps/udev-rules/usb-device-plugin +++ /dev/null @@ -1 +0,0 @@ -ACTION=="add", SUBSYSTEM=="usb_device", RUN+="xset r rate 300 80" diff --git a/apps/udev-rules/wifi-powersave b/apps/udev-rules/wifi-powersave deleted file mode 100644 index 334068d..0000000 --- a/apps/udev-rules/wifi-powersave +++ /dev/null @@ -1 +0,0 @@ -ACTION=="add", SUBSYSTEM=="net", KERNEL=="wl*", RUN+="/usr/bin/iw dev $name set power_save on" diff --git a/bin/lib/sudo_setup b/bin/lib/sudo_setup index 741440a..628d882 100755 --- a/bin/lib/sudo_setup +++ b/bin/lib/sudo_setup @@ -10,18 +10,8 @@ dfp=$(cd "$(dirname "${BASH_SOURCE[0]}" )/../../" && pwd) source "${dfp}/bin/lib/setup_helpers.bash" links=( - # display manager files - "apps/de/sway/init" "/usr/bin/sway-lytedev" - "apps/de/sway/dm-entry" "/usr/share/wayland-sessions/sway-lytedev.desktop" - - # TODO: laptop-specific setup? part of laptop env? - - # touchpad - "apps/de/libinput/touchpad.conf" "/etc/X11/xorg.conf.d/41-libinput-lytedev-touchpad-options.conf" - # udev rules "apps/udev-rules/lowbat" "/etc/udev/rules.d/99-lowbat.rules" - "apps/udev-rules/wifi-powersave" "/etc/udev/rules.d/81-wifi-powersave.rules" # tmpfiles "apps/tmpfiles/disable-lid-wakeup" "/etc/tmpfiles.d/disable-lid-wakeup.conf" diff --git a/env/desktop/gitconfig b/env/desktop/gitconfig deleted file mode 100644 index a389a95..0000000 --- a/env/desktop/gitconfig +++ /dev/null @@ -1,6 +0,0 @@ -[user] - signingkey = daniel@lytedev.io - -[commit] - gpgsign = true - diff --git a/env/desktop/x/resources b/env/desktop/x/resources deleted file mode 100755 index c809d1a..0000000 --- a/env/desktop/x/resources +++ /dev/null @@ -1,8 +0,0 @@ -#define bar_font_size 12 -# TODO: this needs fixing -polybar.primary_font: iosevka\-lyte:pixelsize=bar_font_size;1 -bspwm.num_desktops_per_monitor: 3 -bspwm.reverse_desktop_ordering: 0 -bspwm.reverse_monitor_desktops: 0 -polybar.display_monitor: DisplayPort-0 -polybar.height: 40 diff --git a/env/laptop/gitconfig b/env/laptop/gitconfig deleted file mode 100644 index a389a95..0000000 --- a/env/laptop/gitconfig +++ /dev/null @@ -1,6 +0,0 @@ -[user] - signingkey = daniel@lytedev.io - -[commit] - gpgsign = true - diff --git a/env/laptop/polybar b/env/laptop/polybar deleted file mode 100755 index 7c46a11..0000000 --- a/env/laptop/polybar +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -export BAR_SIDE_MARGIN=0 -export BAR_HEIGHT=80 - -[[ -v OVERRIDE_BAR_MONITOR ]] && export BAR_MONITOR="$OVERRIDE_BAR_MONITOR" -[[ -v OVERRIDE_BAR_HEIGHT ]] && export BAR_HEIGHT="$OVERRIDE_BAR_HEIGHT" - -return 0 diff --git a/env/laptop/vim b/env/laptop/vim deleted file mode 100755 index e69de29..0000000 diff --git a/env/laptop/x/docked.resources b/env/laptop/x/docked.resources deleted file mode 100755 index fe0ad9b..0000000 --- a/env/laptop/x/docked.resources +++ /dev/null @@ -1,7 +0,0 @@ -dpi: 92 -.dpi: 92 -*dpi: 92 -Xft.dpi: 92 - -polybar.display_monitor: DP1-1-8 -polybar.height: 40 diff --git a/env/laptop/x/games.resources b/env/laptop/x/games.resources deleted file mode 100644 index 3122459..0000000 --- a/env/laptop/x/games.resources +++ /dev/null @@ -1,7 +0,0 @@ -dpi: 92 -.dpi: 92 -*dpi: 92 -Xft.dpi: 92 - -polybar.display_monitor: eDP1 -polybar.height: 40 diff --git a/env/laptop/x/home.docked.resources b/env/laptop/x/home.docked.resources deleted file mode 100644 index 7229388..0000000 --- a/env/laptop/x/home.docked.resources +++ /dev/null @@ -1,4 +0,0 @@ -polybar.display_monitor: DP1-1 -polybar.height: 40 -bspwm.reverse_monitor_desktops: 1 -bspwm.reverse_desktop_ordering: 1 diff --git a/env/laptop/x/profile b/env/laptop/x/profile deleted file mode 100755 index 5911cfd..0000000 --- a/env/laptop/x/profile +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env sh - -has_command xcape && xcape -e 'Control_L=Escape' & diff --git a/env/laptop/x/resources b/env/laptop/x/resources deleted file mode 100755 index a36eb1c..0000000 --- a/env/laptop/x/resources +++ /dev/null @@ -1,21 +0,0 @@ -#define mono_font iosevka-lyte -#define mono_font_size 12 -#define bar_font_size 12 -#define icon_font Font Awesome 5 Free Solid -#define icon_font_size 12 - -*.font: xft:mono_font:pixelsize=mono_font_size,xft:Noto Emoji,xft:Font Awesome 5 Free:pixelsize=14,xft:FreeSans:pixelsize=14 -*.boldFont: xft:mono_font:style=bold:pixelsize=mono_font_size,xft:Font Awesome 5 Free:pixelsize=14,xft:FreeSans:pixelsize=14 - -# URxvt.font: xft:mono_font:pixelsize=32,xft:Noto Emoji,xft:Font Awesome 5 Free:pixelsize=14,xft:FreeSans:pixelsize=14 -# URxvt.boldFont: xft:mono_font:style=bold:pixelsize=32,xft:Font Awesome 5 Free:pixelsize=14,xft:FreeSans:pixelsize=14 - -dpi: 190 -.dpi: 190 -*dpi: 190 -Xft.dpi: 190 - -polybar.height: 70 -polybar.display_monitor: eDP1 -polybar.primary_font: mono_font:pixelsize=bar_font_size;1 -polybar.secondary_font: icon_font:style=Regular:pixelsize=icon_font_size;1 diff --git a/env/nix/machines/third.nix b/env/nix/machines/third.nix index 45e79cc..ad3fd7e 100644 --- a/env/nix/machines/third.nix +++ b/env/nix/machines/third.nix @@ -12,6 +12,20 @@ ../modules/users/valerie.nix ]; - networking.hostName = "third.lyte.dev"; - networking.firewall.enable = false; + networking = { + hostName = "third.lyte.dev"; + firewall.enable = false; + networkmanager.wifi.powersave = true; + }; + + services.fwupd = { + enable = true; + }; + + console.font = "TER16x32"; + + # services.upower = { + # enable = true; + # criticalPowerAction = "Hibernate"; + # }; } diff --git a/env/nix/modules/de/base.nix b/env/nix/modules/de/base.nix index 794bcdd..2877010 100644 --- a/env/nix/modules/de/base.nix +++ b/env/nix/modules/de/base.nix @@ -14,4 +14,8 @@ brightnessctl ]; }; + qt5 = { + platformTheme = "gtk2"; + style = "gtk2"; + }; } diff --git a/env/nix/modules/de/sway.nix b/env/nix/modules/de/sway.nix index 847a0c8..009cdc1 100644 --- a/env/nix/modules/de/sway.nix +++ b/env/nix/modules/de/sway.nix @@ -1,19 +1,52 @@ -{ config, pkgs, ... }: { +{ config, pkgs, ... }: + +let + unstable = import { config = { allowUnfree = true; }; }; +in { imports = [ ./base.nix ]; - programs.sway = { + programs = { + sway = { + enable = true; + extraPackages = with pkgs; [ + swaylock + swayidle + xwayland + waybar + mako + kanshi + wl-clipboard + slurp + grim + font-awesome + unstable.gammastep + ]; + extraSessionCommands = '' + export WLC_REPEAT_DELAY=200 + export WLC_REPEAT_RATE=60 + export CLUTTER_BACKEND=wayland + export SDL_VIDEODRIVER=wayland + export MOZ_ENABLE_WAYLAND=1 + export XDG_SESSION_TYPE=wayland + export XDG_CURRENT_DESKTOP=sway + ''; + }; + waybar.enable = true; + }; + services = { + pipewire.enable = true; + xserver.libinput = { + enable = true; + tapping = true; + naturalScrolling = true; + disableWhileTyping = false; + }; + }; + xdg.portal = { enable = true; - extraPackages = with pkgs; [ - swaylock - swayidle - xwayland - waybar - mako - kanshi - wl-clipboard - slurp - grim - font-awesome + gtkUsePortal = true; + extraPortals = with pkgs; [ + xdg-desktop-portal-gtk + xdg-desktop-portal-wlr ]; }; - # services.xserver.displayManager.defaultSession = "sway-lytedev"; } diff --git a/env/nix/modules/intel.nix b/env/nix/modules/intel.nix index 9072b7d..57b86a4 100644 --- a/env/nix/modules/intel.nix +++ b/env/nix/modules/intel.nix @@ -5,11 +5,14 @@ vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; }; }; - hardware.opengl = { - extraPackages = with pkgs; [ - vaapiIntel - vaapiVdpau - libvdpau-va-gl - ]; + hardware = { + cpu.intel.updateMicrocode = true; + opengl = { + extraPackages = with pkgs; [ + vaapiIntel + vaapiVdpau + libvdpau-va-gl + ]; + }; }; } diff --git a/env/nix/modules/users/daniel.nix b/env/nix/modules/users/daniel.nix index d154d5e..ef55ff0 100644 --- a/env/nix/modules/users/daniel.nix +++ b/env/nix/modules/users/daniel.nix @@ -32,6 +32,7 @@ automake autoconf ncurses + weechat ]; }; } diff --git a/env/nix/profiles/base.nix b/env/nix/profiles/base.nix index 3f7dd42..1c45506 100644 --- a/env/nix/profiles/base.nix +++ b/env/nix/profiles/base.nix @@ -37,4 +37,28 @@ services = { openssh.enable = true; }; + + console = { + earlySetup = true; + colors = [ + "111111" + "f92672" + "a6e22e" + "f4bf75" + "66d9ef" + "ae81ff" + "a1efe4" + "f8f8f2" + "75715e" + "f92672" + "a6e22e" + "f4bf75" + "66d9ef" + "ae81ff" + "a1efe4" + "f9f8f5" + ]; + # useXkbConfig = true; + # TODO: setup caps-lock as Control/Escape? + }; } From f3c1b1b2cec6c360045151386298d497c89f244f Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sat, 24 Oct 2020 21:48:46 -0500 Subject: [PATCH 07/17] Use unstable xdg-desktop-portal-wlr --- env/nix/modules/de/sway.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env/nix/modules/de/sway.nix b/env/nix/modules/de/sway.nix index 009cdc1..1005883 100644 --- a/env/nix/modules/de/sway.nix +++ b/env/nix/modules/de/sway.nix @@ -46,7 +46,7 @@ in { gtkUsePortal = true; extraPortals = with pkgs; [ xdg-desktop-portal-gtk - xdg-desktop-portal-wlr + unstable.xdg-desktop-portal-wlr ]; }; } From ba7e4d52d533199a41161740427738cc53ea4215 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sun, 25 Oct 2020 00:33:20 -0500 Subject: [PATCH 08/17] Fix pulseaudio indicator in waybar --- apps/de/sway/config | 12 +++++------- apps/de/waybar/config | 15 ++++++++------- apps/de/waybar/style.css | 3 +-- apps/kitty/kitty.conf | 10 +--------- bin/app-launcher | 7 ++----- bin/floating-term | 27 +++++++-------------------- bin/term | 3 --- env/laptop/sway/config.d/main | 10 ++++------ env/nix/machines/third.nix | 5 ++++- env/nix/modules/de/sway.nix | 8 +++++--- env/nix/modules/docker.nix | 4 +--- env/nix/modules/lightdm.nix | 4 ++++ env/nix/modules/pulseaudio.nix | 1 + env/nix/modules/tmux.nix | 3 +++ env/nix/modules/users/daniel.nix | 1 + env/nix/profiles/base.nix | 4 +--- 16 files changed, 48 insertions(+), 69 deletions(-) delete mode 100755 bin/term diff --git a/apps/de/sway/config b/apps/de/sway/config index 35953d1..4a1cb67 100644 --- a/apps/de/sway/config +++ b/apps/de/sway/config @@ -1,3 +1,5 @@ +include $HOME/.env/sway/config.d/main + # TODO: # # + Super+r should rotate the selected group of windows. @@ -9,9 +11,9 @@ set $left h set $down j set $up k set $right l -set $term term -set $fterm floating-term -set $menu app-launcher +set $term kitty +set $fterm /home/daniel/.home/.config/dotfiles/bin/floating-term +set $menu /home/daniel/.home/.config/dotfiles/bin/app-launcher set $fileexplorer thunar output * bg $HOME/.wallpaper fill @@ -27,7 +29,6 @@ bindsym Control+Space exec makoctl dismiss bindsym $mod+Return exec $term bindsym $mod+shift+Return exec $fterm bindsym $mod+t exec $term -bindsym $mod+Alt+Return exec urxvt bindsym $mod+Shift+Alt+Return exec kitty bindsym $mod+c kill bindsym $mod+Shift+c kill # TODO: kill -9? @@ -162,6 +163,3 @@ exec mako exec gammastep -t 6500:3500 -l 39.0:-94.5 exec_always makoctl reload exec_always notify-send -a "Sway" -i ~/.wallpaper "Sway configuration loaded." - -include $ENV_PATH/sway/config.d/* - diff --git a/apps/de/waybar/config b/apps/de/waybar/config index 4e9565c..a8554ef 100644 --- a/apps/de/waybar/config +++ b/apps/de/waybar/config @@ -54,7 +54,7 @@ "interval": 3 }, "memory": { - "format": "{} " + "format": "{} " }, "temperature": { // "thermal-zone": 2, @@ -92,14 +92,14 @@ }, "pulseaudio": { // "scroll-step": 1, // %, can be a float - "format": "{volume} {icon} {format_source}", + "format": "{volume} {icon} {format_source}", //"format": "{volume}% {icon} {format_source}", //"format-bluetooth": "{volume}% {icon} {format_source}", //"format-bluetooth-muted": " {icon} {format_source}", - //"format-muted": " {format_source}", - "format-muted": " {format_source}", - "format-source": "", - "format-source-muted": "", + //"format-muted": " {format_source}", + "format-muted": " {format_source}", + "format-source": "", + "format-source-muted": "", "format-icons": { "headphones": "", "handsfree": "", @@ -107,8 +107,9 @@ "phone": "", "portable": "", "car": "", - "default": ["", "", ""] + "default": ["", "", ""] }, + // TODO: toggle mute? "on-click": "pavucontrol" } } diff --git a/apps/de/waybar/style.css b/apps/de/waybar/style.css index 6f47ab3..a3b69d0 100644 --- a/apps/de/waybar/style.css +++ b/apps/de/waybar/style.css @@ -1,8 +1,7 @@ * { border: none; border-radius: 0; - /* `otf-font-awesome` is required to be installed for icons */ - font-family: "Iosevka", Roboto, Helvetica, Arial, sans-serif; + font-family: "Iosevka", "Font Awesome 5 Free", sans-serif; font-size: 16px; min-height: 0; } diff --git a/apps/kitty/kitty.conf b/apps/kitty/kitty.conf index d8f9366..54af113 100644 --- a/apps/kitty/kitty.conf +++ b/apps/kitty/kitty.conf @@ -4,8 +4,6 @@ repaint_delay 5 input_delay 1 sync_to_monitor no -# font_features Iosevka Fixed SS07 Medium -liga -dlig -calt - font_size 11.0 adjust_line_height 0 window_padding_width 10.0 @@ -22,15 +20,11 @@ enable_audio_bell yes url_style curly -# https://google.com - strip_trailing_spaces smart kitty_mod ctrl+shift+alt open_url_modifiers ctrl -# dark theme - # TODO: generate via color scheme generator background #111111 @@ -55,7 +49,7 @@ color13 #f5f4f1 color14 #cc6633 color15 #f9f8f5 -# color18 #333333 +color18 #333333 # # light theme # @@ -82,9 +76,7 @@ color15 #f9f8f5 # color15 #f9f8f5 # # color18 #cccccc -# -color18 #333333 kitty_mod ctrl+shift+alt open_url_modifiers ctrl wheel_scroll_multiplier 5.0 diff --git a/bin/app-launcher b/bin/app-launcher index ed2e008..3560a34 100755 --- a/bin/app-launcher +++ b/bin/app-launcher @@ -1,7 +1,4 @@ #!/usr/bin/env sh -if is_wayland; then - floating-term sh -c "launch | xargs swaymsg exec --" -else - rofi -combi-modi run,window -show combi -modi combi -sorting-method fzf --sort "$@" -fi +source "$HOME/.config/dotfiles/bin/prelude" +floating-term sh -c "launch | xargs swaymsg exec --" diff --git a/bin/floating-term b/bin/floating-term index 98680dd..9cb8688 100755 --- a/bin/floating-term +++ b/bin/floating-term @@ -1,21 +1,8 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh -# TODO: geomoetry flags? - -flags=("") -case "$TERMINAL" in - kitty ) - flags=(-o remember_window_size=no -o initial_window_width=60c -o initial_window_height=12c --class floating_terminal) - ;; - - # TODO: rxvt? -esac - -if is_wayland; then - # wayland only needs app_id or class set to "floating_terminal" - : # no-op -else - bspc rule -a '*' -o state=floating -fi - -"$TERMINAL" "${flags[@]}" "$@" +kitty \ + -o remember_window_size=no \ + -o initial_window_width=60c \ + -o initial_window_height=12c \ + --class floating_terminal \ + "$@" diff --git a/bin/term b/bin/term deleted file mode 100755 index ae16d6f..0000000 --- a/bin/term +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -"$TERMINAL" diff --git a/env/laptop/sway/config.d/main b/env/laptop/sway/config.d/main index 61a3a53..d0fb39f 100644 --- a/env/laptop/sway/config.d/main +++ b/env/laptop/sway/config.d/main @@ -1,6 +1,8 @@ -exec libinput-gestures -c $DOTFILES_PATH/apps/de/libinput/sway-gestures.conf +# TODO: setup displays (when docked for work?) +output eDP-1 res 1600x900 pos 0 0 -# 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' +exec libinput-gestures -c $HOME/.config/dotfiles/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' bindswitch lid:toggle exec swaylock @@ -15,7 +17,3 @@ 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/machines/third.nix b/env/nix/machines/third.nix index ad3fd7e..ff114cc 100644 --- a/env/nix/machines/third.nix +++ b/env/nix/machines/third.nix @@ -22,7 +22,10 @@ enable = true; }; - console.font = "TER16x32"; + console.useXkbConfig = true; + services.xserver.xkbOptions = "ctrl:nocaps"; + # TODO: setup caps-lock as Control/Escape? + # console.font = "TER16x32"; # services.upower = { # enable = true; diff --git a/env/nix/modules/de/sway.nix b/env/nix/modules/de/sway.nix index 1005883..f41dce1 100644 --- a/env/nix/modules/de/sway.nix +++ b/env/nix/modules/de/sway.nix @@ -10,9 +10,9 @@ in { extraPackages = with pkgs; [ swaylock swayidle - xwayland - waybar + unstable.xwayland mako + waybar kanshi wl-clipboard slurp @@ -21,6 +21,9 @@ in { unstable.gammastep ]; extraSessionCommands = '' + systemctl --user import-environment + export TERMINAL=kitty + export BROWSER=firefox-devedition export WLC_REPEAT_DELAY=200 export WLC_REPEAT_RATE=60 export CLUTTER_BACKEND=wayland @@ -30,7 +33,6 @@ in { export XDG_CURRENT_DESKTOP=sway ''; }; - waybar.enable = true; }; services = { pipewire.enable = true; diff --git a/env/nix/modules/docker.nix b/env/nix/modules/docker.nix index c38dee1..cc3ce8c 100644 --- a/env/nix/modules/docker.nix +++ b/env/nix/modules/docker.nix @@ -3,7 +3,5 @@ enable = true; enableOnBoot = false; }; - environment.systemPackages = with pkgs; [ - docker docker-compose - ]; + environment.systemPackages = [ pkgs.docker-compose ]; } diff --git a/env/nix/modules/lightdm.nix b/env/nix/modules/lightdm.nix index aad1fe0..92bcfa8 100644 --- a/env/nix/modules/lightdm.nix +++ b/env/nix/modules/lightdm.nix @@ -14,6 +14,10 @@ name = "Arc-Dark"; }; clock-format = "%H:%M:%S"; + extraConfig = '' + xft-dpi=260 + font-name=Iosevka + ''; }; # background = ""; }; diff --git a/env/nix/modules/pulseaudio.nix b/env/nix/modules/pulseaudio.nix index 20ae008..76ab651 100644 --- a/env/nix/modules/pulseaudio.nix +++ b/env/nix/modules/pulseaudio.nix @@ -4,5 +4,6 @@ support32Bit = true; package = pkgs.pulseaudioFull; }; + nixpkgs.config.pulseaudio = true; sound.enable = true; } diff --git a/env/nix/modules/tmux.nix b/env/nix/modules/tmux.nix index ea9ad57..5949874 100644 --- a/env/nix/modules/tmux.nix +++ b/env/nix/modules/tmux.nix @@ -1,4 +1,7 @@ { config, pkgs, ... }: { environment.systemPackages = [ pkgs.tmux ]; + programs.tmux = { + enable = true; + }; } diff --git a/env/nix/modules/users/daniel.nix b/env/nix/modules/users/daniel.nix index ef55ff0..469d72d 100644 --- a/env/nix/modules/users/daniel.nix +++ b/env/nix/modules/users/daniel.nix @@ -33,6 +33,7 @@ autoconf ncurses weechat + # thunar thunar-archive-plugin thunar-volman ]; }; } diff --git a/env/nix/profiles/base.nix b/env/nix/profiles/base.nix index 1c45506..dfe2421 100644 --- a/env/nix/profiles/base.nix +++ b/env/nix/profiles/base.nix @@ -6,7 +6,6 @@ ../modules/neovim.nix ]; i18n.defaultLocale = "en_US.UTF-8"; - console.keyMap = "us"; time.timeZone = "America/Chicago"; environment = { @@ -19,6 +18,7 @@ pciutils usbutils binutils ripgrep sd fd unzip + killall ]; variables = { PAGER = "less"; @@ -58,7 +58,5 @@ "a1efe4" "f9f8f5" ]; - # useXkbConfig = true; - # TODO: setup caps-lock as Control/Escape? }; } From a4bebff2b479a55401d41fe6ba8571d496a5f212 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sun, 25 Oct 2020 00:45:21 -0500 Subject: [PATCH 09/17] Fix icons/colors in pulseaudio waybar --- apps/de/waybar/config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/de/waybar/config b/apps/de/waybar/config index a8554ef..9b2fa63 100644 --- a/apps/de/waybar/config +++ b/apps/de/waybar/config @@ -98,8 +98,8 @@ //"format-bluetooth-muted": " {icon} {format_source}", //"format-muted": " {format_source}", "format-muted": " {format_source}", - "format-source": "", - "format-source-muted": "", + "format-source": "", + "format-source-muted": "", "format-icons": { "headphones": "", "handsfree": "", From 6d76edc52bab8f538354ff98467b41164e64f58c Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 26 Oct 2020 11:25:35 -0500 Subject: [PATCH 10/17] Allow unfree --- env/nix/pkgs/config.nix | 1 + env/nix/profiles/base.nix | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 env/nix/pkgs/config.nix diff --git a/env/nix/pkgs/config.nix b/env/nix/pkgs/config.nix new file mode 100644 index 0000000..69baf10 --- /dev/null +++ b/env/nix/pkgs/config.nix @@ -0,0 +1 @@ +{ allowUnfree = true; } diff --git a/env/nix/profiles/base.nix b/env/nix/profiles/base.nix index dfe2421..0493c73 100644 --- a/env/nix/profiles/base.nix +++ b/env/nix/profiles/base.nix @@ -5,6 +5,9 @@ ../modules/tmux.nix ../modules/neovim.nix ]; + + nixpkgs.config.allowUnfree = true; + i18n.defaultLocale = "en_US.UTF-8"; time.timeZone = "America/Chicago"; From 857be77224c5a036e618254f3ba619aadcae929d Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 26 Oct 2020 13:15:11 -0500 Subject: [PATCH 11/17] Add desktop configuration --- env/nix/machines/wallwart.nix | 23 +++++++++++++++++++++++ env/nix/modules/amd-gpu.nix | 3 +++ env/nix/modules/amd.nix | 5 +++++ env/nix/modules/intel.nix | 1 + env/nix/profiles/desktop.nix | 3 +++ 5 files changed, 35 insertions(+) create mode 100644 env/nix/machines/wallwart.nix create mode 100644 env/nix/modules/amd-gpu.nix create mode 100644 env/nix/modules/amd.nix create mode 100644 env/nix/profiles/desktop.nix diff --git a/env/nix/machines/wallwart.nix b/env/nix/machines/wallwart.nix new file mode 100644 index 0000000..4f867eb --- /dev/null +++ b/env/nix/machines/wallwart.nix @@ -0,0 +1,23 @@ +{ config, pkgs, ... }: { + imports = [ + ../profiles/desktop.nix + ../modules/systemd-boot-efi.nix + ../modules/amd.nix + ../modules/amd-gpu.nix + ../modules/docker.nix + ../modules/network-manager.nix + ../modules/bluetooth.nix + ../modules/pulseaudio.nix + ../modules/de/sway.nix + ../modules/users/daniel.nix + ../modules/users/valerie.nix + ]; + + networking = { + hostName = "wallwart.lyte.dev"; + firewall.enable = false; + }; + + console.useXkbConfig = true; + services.xserver.xkbOptions = "ctrl:nocaps"; +} diff --git a/env/nix/modules/amd-gpu.nix b/env/nix/modules/amd-gpu.nix new file mode 100644 index 0000000..3da049e --- /dev/null +++ b/env/nix/modules/amd-gpu.nix @@ -0,0 +1,3 @@ +{ config, pkgs, ... }: { + services.xserver.videoDrivers = [ "amdgpu" ]; +} diff --git a/env/nix/modules/amd.nix b/env/nix/modules/amd.nix new file mode 100644 index 0000000..8e8842b --- /dev/null +++ b/env/nix/modules/amd.nix @@ -0,0 +1,5 @@ +{ config, pkgs, ... }: { + hardware = { + cpu.amd.updateMicrocode = true; + }; +} diff --git a/env/nix/modules/intel.nix b/env/nix/modules/intel.nix index 57b86a4..6cd9e21 100644 --- a/env/nix/modules/intel.nix +++ b/env/nix/modules/intel.nix @@ -1,4 +1,5 @@ { config, pkgs, ... }: { + services.xserver.videoDrivers = [ "intel" ]; nixpkgs.config = { allowUnfree = true; packageOverrides = pkgs: { diff --git a/env/nix/profiles/desktop.nix b/env/nix/profiles/desktop.nix new file mode 100644 index 0000000..64d8d9d --- /dev/null +++ b/env/nix/profiles/desktop.nix @@ -0,0 +1,3 @@ +{ config, pkgs, ... }: { + imports = [ ./base.nix ]; +} From cd80dc8ba4c6945cb437d815ecee8d420a7cb754 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 26 Oct 2020 14:26:50 -0500 Subject: [PATCH 12/17] Updates/fixes --- env/nix/modules/users/daniel.nix | 1 + env/nix/profiles/base.nix | 14 +++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/env/nix/modules/users/daniel.nix b/env/nix/modules/users/daniel.nix index 469d72d..d6e05ba 100644 --- a/env/nix/modules/users/daniel.nix +++ b/env/nix/modules/users/daniel.nix @@ -33,6 +33,7 @@ autoconf ncurses weechat + python39Full # thunar thunar-archive-plugin thunar-volman ]; }; diff --git a/env/nix/profiles/base.nix b/env/nix/profiles/base.nix index 0493c73..86f506a 100644 --- a/env/nix/profiles/base.nix +++ b/env/nix/profiles/base.nix @@ -8,8 +8,8 @@ nixpkgs.config.allowUnfree = true; - i18n.defaultLocale = "en_US.UTF-8"; - time.timeZone = "America/Chicago"; + i18n.defaultLocale = "en_US.UTF-8"; + time.timeZone = "America/Chicago"; environment = { systemPackages = with pkgs; [ @@ -29,7 +29,7 @@ }; }; - programs = { + programs = { gnupg.agent = { enable = true; enableSSHSupport = true; @@ -37,8 +37,12 @@ }; }; - services = { - openssh.enable = true; + services = { + openssh = { + enable = true; + passwordAuthentication = false; + permitRootLogin = "no"; + }; }; console = { From 9f5655850705aee4ce676f18b959de68ee2c6032 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 26 Oct 2020 16:39:09 -0500 Subject: [PATCH 13/17] More clear variable names --- init.sh | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/init.sh b/init.sh index 5ea8e48..89c927d 100755 --- a/init.sh +++ b/init.sh @@ -2,10 +2,10 @@ # NOTE: run this from inside a NixOS installation, not from the live USB/CD -rhome="/root" -home="/home/daniel/.home" -nhome="/home/daniel" -cfd="/.config/dotfiles" +root_home="/root" +daniel_home="/home/daniel/.home" +nice_home="/home/daniel" +dotfiles="/.config/dotfiles" add_unstable_channel() { nix-channel --add https://nixos.org/channels/nixos-unstable nixos-unstable @@ -24,39 +24,41 @@ symlink_nixos() { } setup_wallpaper() { - mkdir --parents "$nhome/img/walls" - curl --silent --output "$nhome/img/walls/clouds_by_souredapply.png" \ + mkdir --parents "$nice_home/img/walls" + curl --silent --output "$nice_home/img/walls/clouds_by_souredapply.png" \ "https://art.ngfiles.com/images/530000/530895_souredapple_clouds.png" - rm --recursive --force "$home/.wallpaper" - ln --symbolic "$nhome/img/walls/clouds_by_souredapply.png" "$home/.wallpaper" + rm --recursive --force "$daniel_home/.wallpaper" + ln --symbolic "$nice_home/img/walls/clouds_by_souredapply.png" "$daniel_home/.wallpaper" } generate_ssh_key() { - mkdir --mode 600 --parents "$home/.ssh" - ssh-keygen -N '' -t ed25519 -f "$home/.ssh/$(hostname --short)" - mkdir --mode 640 --parents "$nhome/public" - cp "$home/.ssh/$(hostname --short).pub" "$nhome/public" + mkdir --mode 600 --parents "$daniel_home/.ssh" + keyfile="$daniel_home/.ssh/$(hostname --short)" + ssh-keygen -N '' -t ed25519 -f "$keyfile" + mkdir --mode 640 --parents "$nice_home/public" + cp "$keyfile.pub" "$nice_home/public" + ssh-add "$keyfile" } fix_dotfiles_origin() { - cd "$home$cfd" + cd "$daniel_home$dotfiles" git remote set-url origin "ssh://git@git.lyte.dev:2222/lytedev/dotfiles.git" } init_for_root() { - clone_dotfiles "$rhome$cfd" - symlink_nixos "$rhome$cfd/env/nix/" + clone_dotfiles "$root_home$dotfiles" + symlink_nixos "$root_home$dotfiles/env/nix/" add_unstable_channel nixos-rebuild switch - chown daniel:users "$home" + chown daniel:users "$daniel_home" echo "Re-running as user daniel..." - sudo --user daniel "$rhome$cfd/init.sh" + sudo --user daniel "$root_home$dotfiles/init.sh" } init_for_daniel() { - clone_dotfiles "$home$cfd" + clone_dotfiles "$daniel_home$dotfiles" generate_ssh_key - symlink_nixos "$home$cfd/env/nix/" + symlink_nixos "$daniel_home$dotfiles/env/nix/" setup_wallpaper # TODO: setup ssh/gpg keys # TODO: setup password store @@ -70,7 +72,7 @@ else fi echo "Here is this machine's public SSH key:" -echo " $(cat "$home/.ssh/$(hostname --short).pub")" +echo " $(cat "$daniel_home/.ssh/$(hostname --short).pub")" echo "It needs to be added to existing cloud-based git accounts" echo "and other machines before proceeding." echo From 44f819a1db1cd22bf8bff5328efa2d7fdc6c6181 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 26 Oct 2020 17:38:07 -0500 Subject: [PATCH 14/17] Move some things around and work on adding some stuff --- apps/shell/fish/config.fish | 9 --- .../arch-linux/provisioning/0-adduser.bash | 0 .../arch-linux/provisioning/1-pacaur.bash | 0 .../arch-linux/provisioning/2-essentials.bash | 0 .../arch-linux/provisioning/3-extras.bash | 0 .../arch-linux/provisioning/4-comms.bash | 0 .../arch-linux/provisioning/amd.bash | 0 .../arch-linux/provisioning/irc.bash | 0 .../arch-linux/provisioning/nvidia.bash | 0 .../arch-linux/provisioning/tmux-plugins.bash | 0 .../debian/provisioning/create-my-user.bash | 0 .../debian/provisioning/install-packages.bash | 0 .../provisioning/install-tmux-plugins.bash | 0 env/nix/modules/de/{base.nix => graphics.nix} | 0 env/nix/modules/de/sway.nix | 2 +- env/nix/modules/neovim.nix | 18 ++++-- .../.gitkeep => env/nix/modules/ripcord.nix | 0 env/nix/modules/users/daniel.nix | 60 ++++++++++--------- env/nix/profiles/base.nix | 4 -- 19 files changed, 46 insertions(+), 47 deletions(-) rename {bin/lib => env}/arch-linux/provisioning/0-adduser.bash (100%) rename {bin/lib => env}/arch-linux/provisioning/1-pacaur.bash (100%) rename {bin/lib => env}/arch-linux/provisioning/2-essentials.bash (100%) rename {bin/lib => env}/arch-linux/provisioning/3-extras.bash (100%) rename {bin/lib => env}/arch-linux/provisioning/4-comms.bash (100%) rename {bin/lib => env}/arch-linux/provisioning/amd.bash (100%) rename {bin/lib => env}/arch-linux/provisioning/irc.bash (100%) rename {bin/lib => env}/arch-linux/provisioning/nvidia.bash (100%) rename {bin/lib => env}/arch-linux/provisioning/tmux-plugins.bash (100%) rename {bin/lib => env}/debian/provisioning/create-my-user.bash (100%) rename {bin/lib => env}/debian/provisioning/install-packages.bash (100%) rename {bin/lib => env}/debian/provisioning/install-tmux-plugins.bash (100%) rename env/nix/modules/de/{base.nix => graphics.nix} (100%) rename bin/lib/arch-linux/scripts/.gitkeep => env/nix/modules/ripcord.nix (100%) diff --git a/apps/shell/fish/config.fish b/apps/shell/fish/config.fish index 7cc7b60..db11722 100755 --- a/apps/shell/fish/config.fish +++ b/apps/shell/fish/config.fish @@ -18,15 +18,6 @@ set -Ux BROWSER firefox-developer-edition set -Ux ERL_AFLAGS "-kernel shell_history enabled -kernel shell_history_file_bytes 1024000" # iex history set -Ux LESS "-r" -# set our EDITOR to neovim if we've got it -set -Ux EDITOR vim -if has_command nvim - set -Ux EDITOR nvim -end -alias ovim 'command vim' # always have an alias to normal vim just in case -alias vim $EDITOR -alias vi $EDITOR - # more sane ls colors set -Ux LS_COLORS 'ow=01;36;40' diff --git a/bin/lib/arch-linux/provisioning/0-adduser.bash b/env/arch-linux/provisioning/0-adduser.bash similarity index 100% rename from bin/lib/arch-linux/provisioning/0-adduser.bash rename to env/arch-linux/provisioning/0-adduser.bash diff --git a/bin/lib/arch-linux/provisioning/1-pacaur.bash b/env/arch-linux/provisioning/1-pacaur.bash similarity index 100% rename from bin/lib/arch-linux/provisioning/1-pacaur.bash rename to env/arch-linux/provisioning/1-pacaur.bash diff --git a/bin/lib/arch-linux/provisioning/2-essentials.bash b/env/arch-linux/provisioning/2-essentials.bash similarity index 100% rename from bin/lib/arch-linux/provisioning/2-essentials.bash rename to env/arch-linux/provisioning/2-essentials.bash diff --git a/bin/lib/arch-linux/provisioning/3-extras.bash b/env/arch-linux/provisioning/3-extras.bash similarity index 100% rename from bin/lib/arch-linux/provisioning/3-extras.bash rename to env/arch-linux/provisioning/3-extras.bash diff --git a/bin/lib/arch-linux/provisioning/4-comms.bash b/env/arch-linux/provisioning/4-comms.bash similarity index 100% rename from bin/lib/arch-linux/provisioning/4-comms.bash rename to env/arch-linux/provisioning/4-comms.bash diff --git a/bin/lib/arch-linux/provisioning/amd.bash b/env/arch-linux/provisioning/amd.bash similarity index 100% rename from bin/lib/arch-linux/provisioning/amd.bash rename to env/arch-linux/provisioning/amd.bash diff --git a/bin/lib/arch-linux/provisioning/irc.bash b/env/arch-linux/provisioning/irc.bash similarity index 100% rename from bin/lib/arch-linux/provisioning/irc.bash rename to env/arch-linux/provisioning/irc.bash diff --git a/bin/lib/arch-linux/provisioning/nvidia.bash b/env/arch-linux/provisioning/nvidia.bash similarity index 100% rename from bin/lib/arch-linux/provisioning/nvidia.bash rename to env/arch-linux/provisioning/nvidia.bash diff --git a/bin/lib/arch-linux/provisioning/tmux-plugins.bash b/env/arch-linux/provisioning/tmux-plugins.bash similarity index 100% rename from bin/lib/arch-linux/provisioning/tmux-plugins.bash rename to env/arch-linux/provisioning/tmux-plugins.bash diff --git a/bin/lib/debian/provisioning/create-my-user.bash b/env/debian/provisioning/create-my-user.bash similarity index 100% rename from bin/lib/debian/provisioning/create-my-user.bash rename to env/debian/provisioning/create-my-user.bash diff --git a/bin/lib/debian/provisioning/install-packages.bash b/env/debian/provisioning/install-packages.bash similarity index 100% rename from bin/lib/debian/provisioning/install-packages.bash rename to env/debian/provisioning/install-packages.bash diff --git a/bin/lib/debian/provisioning/install-tmux-plugins.bash b/env/debian/provisioning/install-tmux-plugins.bash similarity index 100% rename from bin/lib/debian/provisioning/install-tmux-plugins.bash rename to env/debian/provisioning/install-tmux-plugins.bash diff --git a/env/nix/modules/de/base.nix b/env/nix/modules/de/graphics.nix similarity index 100% rename from env/nix/modules/de/base.nix rename to env/nix/modules/de/graphics.nix diff --git a/env/nix/modules/de/sway.nix b/env/nix/modules/de/sway.nix index 9c6eefd..65f973d 100644 --- a/env/nix/modules/de/sway.nix +++ b/env/nix/modules/de/sway.nix @@ -3,7 +3,7 @@ let unstable = import { config = { allowUnfree = true; }; }; in { - imports = [ ./base.nix ]; + imports = [ ./graphics.nix ]; programs = { sway = { enable = true; diff --git a/env/nix/modules/neovim.nix b/env/nix/modules/neovim.nix index 368b0dd..5ad8794 100644 --- a/env/nix/modules/neovim.nix +++ b/env/nix/modules/neovim.nix @@ -1,14 +1,20 @@ -{ config, pkgs, ... }: { +{ config, pkgs, ... }: +let + unstable = import { config = { allowUnfree = true; }; }; + aliases = { vim = "nvim"; vi = "nvim"; }; +in +{ environment = { - systemPackages = [ pkgs.neovim ]; + systemPackages = [ unstable.neovim ]; variables = { EDITOR = "nvim"; + PAGER = "nvim"; + VISUAL = "nvim"; MANPAGER = "nvim +Man!"; MANWIDTH = "80"; }; - shellAliases = { - vim = "nvim"; - vi = "nvim"; - }; + shellAliases = aliases; }; + programs.bash.shellAliases = aliases; + programs.fish.shellAliases = aliases; } diff --git a/bin/lib/arch-linux/scripts/.gitkeep b/env/nix/modules/ripcord.nix similarity index 100% rename from bin/lib/arch-linux/scripts/.gitkeep rename to env/nix/modules/ripcord.nix diff --git a/env/nix/modules/users/daniel.nix b/env/nix/modules/users/daniel.nix index 771abdf..58b8db3 100644 --- a/env/nix/modules/users/daniel.nix +++ b/env/nix/modules/users/daniel.nix @@ -5,37 +5,43 @@ shell = pkgs.fish; home = "/home/daniel/.home"; packages = with pkgs; [ - fortune - steam - pulsemixer - file - appimage-run - kitty - fzf - fortune - dmenu - ranger - pass - brightnessctl - vulkan-tools # TODO: vulkan? + fortune # fun sayings + steam # games + pulsemixer # audio + file # identify file types + kitty # terminal emulator + fzf # fuzzy finder + dmenu # TODO: currently only using this for dmenu_path in `bin/launch` + ranger # tui for file management + pass # the standard unix password manager + vulkan-tools # vkcube for making sure vulkan still works rustup clang - pavucontrol - pamixer - strongswan + pavucontrol # gui pulseaudio manager + pamixer # tui pulseaudio manager + strongswan # work vpn gnumake elixir - postgresql - htop - google-cloud-sdk - unzip - automake - autoconf - ncurses - weechat - python39Full - jq - xfce.thunar xfce.thunar-archive-plugin xfce.thunar-volman + postgresql # database + htop # almost as good as bottom (btm) + google-cloud-sdk # gcloud + kubectl # kubernetes cli + awscli # aws cli + unzip # needed by a handful of other utilities + autoconf automake # autotools + weechat # irc + python39Full # python 3.9 + jq # awk for json + xfce.thunar xfce.thunar-archive-plugin xfce.thunar-volman # gui file manager + + # TODO: move this one to just laptop? + brightnessctl # laptop screen brightness + + # nix utils + nox # package querying and installation? + # yay is to pacman, nox is to nix-env + niv # dependency pinning? + lorri # project envrc - like asdf-vm? ]; }; } diff --git a/env/nix/profiles/base.nix b/env/nix/profiles/base.nix index 86f506a..6d3dfd8 100644 --- a/env/nix/profiles/base.nix +++ b/env/nix/profiles/base.nix @@ -23,10 +23,6 @@ unzip killall ]; - variables = { - PAGER = "less"; - VISUAL = "less"; - }; }; programs = { From 984e56ba678a2878f884576229c9af6037b87a5f Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 26 Oct 2020 23:43:18 -0500 Subject: [PATCH 15/17] Setup laptop hibernation and nix dotfiles alias --- apps/shell/fish/aliases.fish | 1 + env/nix/machines/third.nix | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/apps/shell/fish/aliases.fish b/apps/shell/fish/aliases.fish index eaa0899..9730e6b 100755 --- a/apps/shell/fish/aliases.fish +++ b/apps/shell/fish/aliases.fish @@ -77,6 +77,7 @@ alias cdc "d $XDG_CONFIG_HOME" # go to ~/.config alias cdn "d $NOTES_PATH" alias cdl "d $NICE_HOME/dl" alias cdg "d $NICE_HOME/games" +alias cdnx "d $DOTFILES_PATH/env/nix" # quick parent-directory aliases alias .. "d .." diff --git a/env/nix/machines/third.nix b/env/nix/machines/third.nix index f0e614c..4698cbd 100644 --- a/env/nix/machines/third.nix +++ b/env/nix/machines/third.nix @@ -31,6 +31,16 @@ xft-dpi=260 ''; + swapDevices = [ { device = "/swapfile"; size = (1024*16); } ]; + + boot = { + # fallocate -l 16G /swapfile + resumeDevice = "/dev/disk/by-uuid/d1d92974-c0c0-4566-8131-c3dda9b21122"; + # sudo filefrag -v /swapfile | head -n 4 | tail -n 1 | \ + # tr -s "[:blank:]" | field 5 | tr -d ":" + kernelParams = [ "resume_offset=874496" ]; + }; + # services.upower = { # enable = true; # criticalPowerAction = "Hibernate"; From 5d28b53778941f94ab56a3b7d9094812d8fec574 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 26 Oct 2020 23:45:27 -0500 Subject: [PATCH 16/17] Normalize indentation Why isn't .editorconfig working...? --- env/desktop/nix/base.nix | 2 +- env/laptop/hardware.nix | 44 +++++++++++++++---------------- env/nix/machines/third.nix | 6 ++--- env/nix/machines/wallwart.nix | 4 +-- env/nix/modules/bluetooth.nix | 2 +- env/nix/modules/de/graphics.nix | 4 +-- env/nix/modules/de/sway.nix | 18 ++++++------- env/nix/modules/fish.nix | 2 +- env/nix/modules/neovim.nix | 2 +- env/nix/modules/pulseaudio.nix | 4 +-- env/nix/modules/users/daniel.nix | 10 +++---- env/nix/modules/users/valerie.nix | 6 ++--- env/nix/pkgs/home.nix | 4 +-- 13 files changed, 54 insertions(+), 54 deletions(-) diff --git a/env/desktop/nix/base.nix b/env/desktop/nix/base.nix index 0ea6280..f96b4e4 100644 --- a/env/desktop/nix/base.nix +++ b/env/desktop/nix/base.nix @@ -8,7 +8,7 @@ imports = [ ./hardware-configuration.nix # TODO: fork? - (import "${builtins.fetchTarball https://github.com/rycee/home-manager/archive/master.tar.gz}/nixos") + (import "${builtins.fetchTarball https://github.com/rycee/home-manager/archive/master.tar.gz}/nixos") ]; home-manager.users.daniel = { diff --git a/env/laptop/hardware.nix b/env/laptop/hardware.nix index eb893b0..2326f4c 100644 --- a/env/laptop/hardware.nix +++ b/env/laptop/hardware.nix @@ -1,32 +1,32 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes +# 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 = - [ - ]; + imports = + [ + ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "rtsx_pci_sdmmc" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/d1d92974-c0c0-4566-8131-c3dda9b21122"; - fsType = "ext4"; - }; + fileSystems."/" = + { device = "/dev/disk/by-uuid/d1d92974-c0c0-4566-8131-c3dda9b21122"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/3EB9-C18F"; - fsType = "vfat"; - }; + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/3EB9-C18F"; + fsType = "vfat"; + }; - swapDevices = [ ]; + swapDevices = [ ]; - 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"; + 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/nix/machines/third.nix b/env/nix/machines/third.nix index 4698cbd..cb945a8 100644 --- a/env/nix/machines/third.nix +++ b/env/nix/machines/third.nix @@ -31,13 +31,13 @@ xft-dpi=260 ''; - swapDevices = [ { device = "/swapfile"; size = (1024*16); } ]; + swapDevices = [ { device = "/swapfile"; size = (1024*16); } ]; boot = { # fallocate -l 16G /swapfile - resumeDevice = "/dev/disk/by-uuid/d1d92974-c0c0-4566-8131-c3dda9b21122"; + resumeDevice = "/dev/disk/by-uuid/d1d92974-c0c0-4566-8131-c3dda9b21122"; # sudo filefrag -v /swapfile | head -n 4 | tail -n 1 | \ - # tr -s "[:blank:]" | field 5 | tr -d ":" + # tr -s "[:blank:]" | field 5 | tr -d ":" kernelParams = [ "resume_offset=874496" ]; }; diff --git a/env/nix/machines/wallwart.nix b/env/nix/machines/wallwart.nix index 1e33af0..1cbad06 100644 --- a/env/nix/machines/wallwart.nix +++ b/env/nix/machines/wallwart.nix @@ -22,8 +22,8 @@ systemPackages = with pkgs; [ ntfs3g ]; }; - fileSystems."/storage/ext".options = [ "defaults" "user" "nofail" ]; - fileSystems."/storage/butter".options = [ "defaults" "auto" "nofail" ]; + fileSystems."/storage/ext".options = [ "defaults" "user" "nofail" ]; + fileSystems."/storage/butter".options = [ "defaults" "auto" "nofail" ]; fileSystems."/storage/windows" = { device = "/dev/disk/by-uuid/AE624593624560E7"; fsType = "ntfs"; diff --git a/env/nix/modules/bluetooth.nix b/env/nix/modules/bluetooth.nix index 1a80e13..ef5a122 100644 --- a/env/nix/modules/bluetooth.nix +++ b/env/nix/modules/bluetooth.nix @@ -1,3 +1,3 @@ { config, pkgs, ... }: { - hardware.bluetooth.enable = true; + hardware.bluetooth.enable = true; } diff --git a/env/nix/modules/de/graphics.nix b/env/nix/modules/de/graphics.nix index 2877010..ca67c8b 100644 --- a/env/nix/modules/de/graphics.nix +++ b/env/nix/modules/de/graphics.nix @@ -1,6 +1,6 @@ { config, pkgs, ... }: { - imports = [ ../lightdm.nix ]; - fonts.fonts = with pkgs; [ iosevka ]; + imports = [ ../lightdm.nix ]; + fonts.fonts = with pkgs; [ iosevka ]; hardware.opengl = { enable = true; driSupport = true; diff --git a/env/nix/modules/de/sway.nix b/env/nix/modules/de/sway.nix index 65f973d..38f5c41 100644 --- a/env/nix/modules/de/sway.nix +++ b/env/nix/modules/de/sway.nix @@ -1,7 +1,7 @@ { config, pkgs, ... }: let - unstable = import { config = { allowUnfree = true; }; }; + unstable = import { config = { allowUnfree = true; }; }; in { imports = [ ./graphics.nix ]; programs = { @@ -43,12 +43,12 @@ in { disableWhileTyping = false; }; }; - xdg.portal = { - enable = true; - gtkUsePortal = true; - extraPortals = with pkgs; [ - xdg-desktop-portal-gtk - unstable.xdg-desktop-portal-wlr - ]; - }; + xdg.portal = { + enable = true; + gtkUsePortal = true; + extraPortals = with pkgs; [ + xdg-desktop-portal-gtk + unstable.xdg-desktop-portal-wlr + ]; + }; } diff --git a/env/nix/modules/fish.nix b/env/nix/modules/fish.nix index 87050a2..5dc9b4e 100644 --- a/env/nix/modules/fish.nix +++ b/env/nix/modules/fish.nix @@ -1,7 +1,7 @@ { config, pkgs, ... }: let - unstable = import { config = { allowUnfree = true; }; }; + unstable = import { config = { allowUnfree = true; }; }; in { programs.fish = { enable = true; diff --git a/env/nix/modules/neovim.nix b/env/nix/modules/neovim.nix index 5ad8794..37a8a8e 100644 --- a/env/nix/modules/neovim.nix +++ b/env/nix/modules/neovim.nix @@ -1,6 +1,6 @@ { config, pkgs, ... }: let - unstable = import { config = { allowUnfree = true; }; }; + unstable = import { config = { allowUnfree = true; }; }; aliases = { vim = "nvim"; vi = "nvim"; }; in { diff --git a/env/nix/modules/pulseaudio.nix b/env/nix/modules/pulseaudio.nix index 76ab651..f8ad146 100644 --- a/env/nix/modules/pulseaudio.nix +++ b/env/nix/modules/pulseaudio.nix @@ -1,9 +1,9 @@ { config, pkgs, ... }: { - hardware.pulseaudio = { + hardware.pulseaudio = { enable = true; support32Bit = true; package = pkgs.pulseaudioFull; }; nixpkgs.config.pulseaudio = true; - sound.enable = true; + sound.enable = true; } diff --git a/env/nix/modules/users/daniel.nix b/env/nix/modules/users/daniel.nix index 58b8db3..571f1ea 100644 --- a/env/nix/modules/users/daniel.nix +++ b/env/nix/modules/users/daniel.nix @@ -1,8 +1,8 @@ { config, pkgs, ... }: { - users.users.daniel = { - isNormalUser = true; - extraGroups = [ "wheel" "docker" ]; - shell = pkgs.fish; + users.users.daniel = { + isNormalUser = true; + extraGroups = [ "wheel" "docker" ]; + shell = pkgs.fish; home = "/home/daniel/.home"; packages = with pkgs; [ fortune # fun sayings @@ -43,5 +43,5 @@ niv # dependency pinning? lorri # project envrc - like asdf-vm? ]; - }; + }; } diff --git a/env/nix/modules/users/valerie.nix b/env/nix/modules/users/valerie.nix index 73005e2..c3eff59 100644 --- a/env/nix/modules/users/valerie.nix +++ b/env/nix/modules/users/valerie.nix @@ -1,7 +1,7 @@ { config, pkgs, ... }: { - users.users.valerie = { - isNormalUser = true; - shell = pkgs.fish; + users.users.valerie = { + isNormalUser = true; + shell = pkgs.fish; home = "/home/valerie"; }; } diff --git a/env/nix/pkgs/home.nix b/env/nix/pkgs/home.nix index cb99cae..abad047 100644 --- a/env/nix/pkgs/home.nix +++ b/env/nix/pkgs/home.nix @@ -1,4 +1,4 @@ { config, pkgs, ... }: { - programs.home-manager.enable = true; - home.stateVersion = "20.03"; + programs.home-manager.enable = true; + home.stateVersion = "20.03"; } From 0b697cae2a84250b7db1fa33ce3b8183a8b69da4 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Tue, 27 Oct 2020 17:10:54 -0500 Subject: [PATCH 17/17] Nix things --- apps/de/mako/config | 2 +- apps/shell/fish/config.fish | 4 ++++ apps/shell/fish/paths.fish | 5 +++++ env/nix/modules/de/sway.nix | 5 ++++- env/nix/modules/users/daniel.nix | 16 +++++++++++++--- init.sh | 6 ++++++ 6 files changed, 33 insertions(+), 5 deletions(-) diff --git a/apps/de/mako/config b/apps/de/mako/config index 5ac66b0..2ccf86e 100644 --- a/apps/de/mako/config +++ b/apps/de/mako/config @@ -2,7 +2,7 @@ max-visible=5 default-timeout=30000 background-color=#111111 border-color=#666666 -font=iosevka-lyte 11 +font=Iosevka 11 progress-color=source #33333388 # format="%s default-timeout=15000 diff --git a/apps/shell/fish/config.fish b/apps/shell/fish/config.fish index db11722..472c343 100755 --- a/apps/shell/fish/config.fish +++ b/apps/shell/fish/config.fish @@ -57,3 +57,7 @@ if has_command tmux && string match -v -q '*tmux*' $TERM && string match -v -q ' tmux start-server tmux attach -t default || tmux new -s default end + +if set -q $__HM_SESS_VARS_SOURCED + exec bash -c "source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh; exec fish" +end diff --git a/apps/shell/fish/paths.fish b/apps/shell/fish/paths.fish index 65e82a7..a4cd5fc 100755 --- a/apps/shell/fish/paths.fish +++ b/apps/shell/fish/paths.fish @@ -48,3 +48,8 @@ set -Ux TMUX_PLUGIN_MANAGER_PATH $XDG_CONFIG_HOME/tmux/plugins/ set -Ux NOTES_PATH $XDG_DOCUMENTS_DIR/notes set -Ux USER_LOGS_PATH $XDG_DOCUMENTS_DIR/logs set -Ux SCROTS_PATH $XDG_PICTURES_DIR/scrots + +if test -n "$NIX_PATH" + set NIX_PATH : +end +set -Ux NIX_PATH $HOME/.nix-defexpr/channels:$NIX_PATH diff --git a/env/nix/modules/de/sway.nix b/env/nix/modules/de/sway.nix index 38f5c41..bef89cd 100644 --- a/env/nix/modules/de/sway.nix +++ b/env/nix/modules/de/sway.nix @@ -4,13 +4,16 @@ let unstable = import { config = { allowUnfree = true; }; }; in { imports = [ ./graphics.nix ]; + fonts.fonts = with pkgs; [ + noto-fonts-emoji font-awesome + ]; programs = { sway = { enable = true; extraPackages = with pkgs; [ swaylock swayidle - unstable.mako + unstable.mako unstable.libnotify waybar wl-clipboard slurp diff --git a/env/nix/modules/users/daniel.nix b/env/nix/modules/users/daniel.nix index 571f1ea..85d1f28 100644 --- a/env/nix/modules/users/daniel.nix +++ b/env/nix/modules/users/daniel.nix @@ -1,4 +1,7 @@ { config, pkgs, ... }: { + fonts.fonts = with pkgs; [ + # helvetica # needed by zoom + ]; users.users.daniel = { isNormalUser = true; extraGroups = [ "wheel" "docker" ]; @@ -24,15 +27,22 @@ elixir postgresql # database htop # almost as good as bottom (btm) - google-cloud-sdk # gcloud - kubectl # kubernetes cli - awscli # aws cli unzip # needed by a handful of other utilities autoconf automake # autotools weechat # irc python39Full # python 3.9 jq # awk for json xfce.thunar xfce.thunar-archive-plugin xfce.thunar-volman # gui file manager + mpd # music player daemon + ncmpcpp # ncurses music player client + vlc # video player + + # TODO: work module? + google-cloud-sdk # gcloud + kubectl # kubernetes cli + awscli # aws cli + zoom # video conferencing + lastpass-cli # TODO: move this one to just laptop? brightnessctl # laptop screen brightness diff --git a/init.sh b/init.sh index 89c927d..3ac7ece 100755 --- a/init.sh +++ b/init.sh @@ -45,6 +45,12 @@ fix_dotfiles_origin() { git remote set-url origin "ssh://git@git.lyte.dev:2222/lytedev/dotfiles.git" } +setup_home_manager() { + nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager + nix-channel --update + nix-shell '' -A install +} + init_for_root() { clone_dotfiles "$root_home$dotfiles" symlink_nixos "$root_home$dotfiles/env/nix/"