Merge remote-tracking branch 'origin/nixos'

This commit is contained in:
Daniel Flanagan 2020-10-23 11:02:45 -05:00
commit 21245498e4
Signed by: lytedev
GPG Key ID: 5B2020A0F9921EF4
12 changed files with 192 additions and 9 deletions

View File

@ -2,7 +2,7 @@
border: none;
border-radius: 0;
/* `otf-font-awesome` is required to be installed for icons */
font-family: "iosevka-lyte", Roboto, Helvetica, Arial, sans-serif;
font-family: "Iosevka", Roboto, Helvetica, Arial, sans-serif;
font-size: 16px;
min-height: 0;
}

View File

@ -1,4 +1,4 @@
font_family iosevka-lyte
font_family Iosevka
repaint_delay 5
input_delay 1

View File

@ -63,5 +63,6 @@ mkdir -p $NOTES_PATH $USER_LOGS_PATH $SCROTS_PATH
# start a tmux session by default if possible and we're not already in
# a terminal multiplexer
if has_command tmux && string match -v -q '*tmux*' $TERM && string match -v -q '*screen*' $TERM
tmux start-server
tmux attach -t default || tmux new -s default
end

View File

@ -9,7 +9,7 @@ fn="$SCROTS_PATH/clipshot_$d.png"
if is_wayland; then
dim="$(slurp -d)"
if [ $? -eq 0 ]; then
grim -g "$dim" - | wl-copy
grim -g "$dim" - | wl-copy -t image/png
wl-paste -n > "$fn"
echo "$fn"
# grim -g "$dim" - | tee "$fn" | wl-copy -f

View File

@ -5,7 +5,7 @@
flags=("")
case "$TERMINAL" in
kitty )
flags=(-o remember_window_size=no -o initial_window_width=122c -o initial_window_height=24c --class floating_terminal)
flags=(-o remember_window_size=no -o initial_window_width=60c -o initial_window_height=12c --class floating_terminal)
;;
# TODO: rxvt?

View File

@ -1,3 +1,4 @@
#!/usr/bin/env bash
loginctl show-session "$(loginctl | grep "$(whoami)" | head -n 1 | field 1)" -p Type | grep -i wayland >/dev/null
exit 0
# loginctl show-session "$(loginctl | grep "$(whoami)" | head -n 1 | field 1)" -p Type | grep -i wayland >/dev/null

View File

@ -7,8 +7,9 @@ app="$(
awk 'NF{NF--};1' | \
cat - <(dmenu_path) | \
sort | uniq -c | sort -nr | \
sd '^\s+' '' | \
sd -fm '^\s+' '' | \
cut -d' ' -f2- | \
grep "\S" | \
fzf
)"
echo "$app $(date +%s)" >> "$LAUNCHER_HISTORY_FILE"

40
env/laptop/hardware.nix vendored Normal file
View File

@ -0,0 +1,40 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }:
{
imports =
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.kernelParams = [ "resume=/swapfile" "resume_offset=874496" ];
boot.resumeDevice = "/dev/disk/by-uuid/d1d92974-c0c0-4566-8131-c3dda9b21122";
fileSystems."/" =
{ device = "/dev/disk/by-uuid/d1d92974-c0c0-4566-8131-c3dda9b21122";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/3EB9-C18F";
fsType = "vfat";
};
swapDevices = [
{
device = "/swapfile";
priority = 0;
size = 16000;
}
];
nix.maxJobs = lib.mkDefault 4;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
# High-DPI console
console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz";
}

View File

@ -2,9 +2,6 @@ exec libinput-gestures -c $DOTFILES_PATH/apps/de/libinput/sway-gestures.conf
# exec swayidle -w timeout 300 'swaylock -f -c 000000' timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -f -c 000000'
# TODO: setup displays (when docked for work?)
output eDP-1 res 1600x900 pos 0 0
bindswitch lid:toggle exec swaylock
input type:touchpad {
@ -18,3 +15,7 @@ input type:touchpad {
input type:keyboard {
xkb_options ctrl:nocaps
}
# TODO: setup displays (when docked for work?)
output eDP-1 res 1600x900 pos 0 0

129
env/nix/personal-machine.nix vendored Normal file
View File

@ -0,0 +1,129 @@
{ config, pkgs, ... }:
{
imports = [ /etc/nixos/hardware-configuration.nix ];
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
nixpkgs.config = {
allowUnfree = true;
packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
};
};
networking = {
networkmanager.enable = true;
hostName = "third.lyte.dev";
};
i18n.defaultLocale = "en_US.UTF-8";
console.keyMap = "us";
time.timeZone = "America/Chicago";
environment = {
systemPackages = with pkgs; [
fish bash tmux
vim neovim
networkmanager
wget curl w3m
git
pciutils usbutils binutils
ripgrep sd
nodejs python3
rsync
];
variables = {
EDITOR = "nvim";
};
};
fonts.fonts = with pkgs; [ iosevka ];
virtualisation.docker.enable = true;
hardware = {
bluetooth = {
enable = true;
};
pulseaudio = {
enable = true;
support32Bit = true;
package = pkgs.pulseaudioFull;
# extraConfig = "
# load-module module-switch-on-connect
# ";
};
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [
vaapiIntel
vaapiVdpau
libvdpau-va-gl
];
};
};
programs = {
fish.enable = true;
mtr.enable = true;
gnupg.agent = {
enable = true;
enableSSHSupport = true;
pinentryFlavor = "curses";
};
};
services = {
openssh.enable = true;
};
networking.firewall.enable = false;
sound.enable = true;
users.users.daniel = {
isNormalUser = true;
extraGroups = [ "wheel" "docker" ];
shell = pkgs.fish;
home = "/home/daniel/.home";
packages = with pkgs; [
steam
pulsemixer
file
appimage-run
kitty
sway waybar mako wl-clipboard
firefox-devedition-bin
fzf
fortune
dmenu
ranger
pass
brightnessctl
vulkan-tools # TODO: vulkan?
rustup
clang
pavucontrol
pamixer
strongswan
gnumake
elixir
docker docker-compose
postgresql
htop
google-cloud-sdk
slurp grim
];
};
system.stateVersion = "20.03";
}

7
env/nix/pkgs/home.nix vendored Normal file
View File

@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
programs.home-manager.enable = true;
home.stateVersion = "20.03";
}

View File

@ -122,6 +122,9 @@ links=(
# MPD client
"apps/ncmpcpp" "$HOME/.ncmpcpp"
# XDG user directories
"env/nix/pkgs" "$XDG_CONFIG_HOME/nixpkgs"
)
chmod 700 -R "$HOME/.bin"