From 1d924ef973a4af629d8dace8e91140a56b664b8f Mon Sep 17 00:00:00 2001 From: Juni Kim Date: Sun, 17 Apr 2022 07:08:28 -0400 Subject: [PATCH] first commit --- .gitignore | 2 + configuration.nix | 163 +++ dotfiles/bspwm/bspwmrc | 31 + dotfiles/bspwm/kill.sh | 7 + dotfiles/bspwm/polybar/config | 224 ++++ dotfiles/bspwm/polybar/launch.sh | 22 + dotfiles/bspwm/sxhkdrc | 165 +++ dotfiles/bspwm/xinitrc | 3 + dotfiles/config.nix | 3 + dotfiles/eww/eww.scss | 162 +++ dotfiles/eww/eww.yuck | 165 +++ dotfiles/eww/scripts/date.sh | 6 + dotfiles/eww/scripts/music.sh | 28 + dotfiles/eww/scripts/songperc.sh | 8 + dotfiles/init.vim | 201 +++ dotfiles/kitty.conf | 35 + dotfiles/mpd.conf | 428 +++++++ dotfiles/ncmpcpp.conf | 621 ++++++++++ dotfiles/picom.conf | 8 + dotfiles/ranger/commands.py | 62 + dotfiles/ranger/commands_full.py | 1993 ++++++++++++++++++++++++++++++ dotfiles/ranger/rc.conf | 3 + dotfiles/ranger/rifle.conf | 285 +++++ dotfiles/ranger/scope.sh | 350 ++++++ dotfiles/rofi/config.rasi | 90 ++ dotfiles/rofi/geo.png | Bin 0 -> 306184 bytes dotfiles/tmux.conf | 2 + dotfiles/xinitrc | 2 + dotfiles/zshrc | 18 + hardware-configuration.nix | 25 + home.nix | 98 ++ 31 files changed, 5210 insertions(+) create mode 100644 .gitignore create mode 100644 configuration.nix create mode 100755 dotfiles/bspwm/bspwmrc create mode 100755 dotfiles/bspwm/kill.sh create mode 100644 dotfiles/bspwm/polybar/config create mode 100755 dotfiles/bspwm/polybar/launch.sh create mode 100644 dotfiles/bspwm/sxhkdrc create mode 100644 dotfiles/bspwm/xinitrc create mode 100644 dotfiles/config.nix create mode 100644 dotfiles/eww/eww.scss create mode 100644 dotfiles/eww/eww.yuck create mode 100755 dotfiles/eww/scripts/date.sh create mode 100755 dotfiles/eww/scripts/music.sh create mode 100755 dotfiles/eww/scripts/songperc.sh create mode 100644 dotfiles/init.vim create mode 100644 dotfiles/kitty.conf create mode 100644 dotfiles/mpd.conf create mode 100644 dotfiles/ncmpcpp.conf create mode 100644 dotfiles/picom.conf create mode 100644 dotfiles/ranger/commands.py create mode 100644 dotfiles/ranger/commands_full.py create mode 100644 dotfiles/ranger/rc.conf create mode 100644 dotfiles/ranger/rifle.conf create mode 100755 dotfiles/ranger/scope.sh create mode 100644 dotfiles/rofi/config.rasi create mode 100644 dotfiles/rofi/geo.png create mode 100644 dotfiles/tmux.conf create mode 100644 dotfiles/xinitrc create mode 100644 dotfiles/zshrc create mode 100644 hardware-configuration.nix create mode 100644 home.nix diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2bdf874 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/config.nix +/hardware-configuration.nix diff --git a/configuration.nix b/configuration.nix new file mode 100644 index 0000000..c5c349d --- /dev/null +++ b/configuration.nix @@ -0,0 +1,163 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ config, pkgs, ... }: + +let + home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz"; +in +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + (import "${home-manager}/nixos") + ]; + + services.xserver.displayManager.startx.enable = true; + + # Use the GRUB 2 boot loader. + boot.loader.grub.enable = true; + boot.loader.grub.version = 2; + boot.loader.grub.efiSupport = true; + # boot.loader.grub.efiInstallAsRemovable = true; + boot.loader.efi.efiSysMountPoint = "/boot/efi"; + # Define on which hard drive you want to install Grub. + boot.loader.grub.device = "nodev"; # or "nodev" for efi only + boot.loader.grub.useOSProber = true; + + networking.hostName = "nixos-lemp"; # Define your hostname. + #networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + networking.networkmanager.enable = true; + + # Set your time zone. + time.timeZone = "US/Eastern"; + + # The global useDHCP flag is deprecated, therefore explicitly set to false here. + # Per-interface useDHCP will be mandatory in the future, so this generated config + # replicates the default behaviour. + networking.useDHCP = true; + #networking.interfaces.enp1s0.useDHCP = true; + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + console = { + font = "Lat2-Terminus16"; + keyMap = "us"; + }; + + # Enable the X11 windowing system. + services.xserver.enable = true; + + # use nix flakes + nix = { + package = pkgs.nixFlakes; # or versioned attributes like nix_2_7 + extraOptions = '' + experimental-features = nix-command flakes + ''; + }; + + # Configure keymap in X11 + services.xserver.layout = "us"; + services.xserver.xkbOptions = "eurosign:e"; + + # Enable CUPS to print documents. + services.printing.enable = true; + + # Enable sound. + sound.enable = true; + hardware.bluetooth.enable = true; + services.blueman.enable = true; + services.pipewire.enable = true; + services.pipewire.alsa.enable = true; + services.pipewire.pulse.enable = true; + + # Enable touchpad support (enabled default in most desktopManager). + services.xserver.libinput.enable = true; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.junikim = { + isNormalUser = true; + extraGroups = [ "wheel" "video" "audio" "input" ]; # Enable ‘sudo’ for the user. + shell = pkgs.zsh; + }; + programs.zsh.enable = true; + programs.zsh.ohMyZsh.enable = true; + programs.zsh.autosuggestions.enable = true; + programs.zsh.shellAliases = { + "gac" = "git add . && git commit"; + "v" = "nvim"; + "c" = "clear"; + "s" = "ls"; + "e" = "exit"; + "sy" = "systemctl"; + "cp" = "cp -r"; + }; + programs.zsh.ohMyZsh.plugins = [ "git" "command-not-found" ]; + programs.zsh.syntaxHighlighting.enable = true; + + nixpkgs.config.allowUnfree = true; + environment.homeBinInPath = true; + environment.variables = { + "EDITOR" = "nvim"; + }; + + services.gnome.gnome-keyring.enable = true; + + # List packages installed in system profile. To search, run: + # $ nix search wget + fonts.fonts = with pkgs; [ + jetbrains-mono + dejavu_fonts + noto-fonts-emoji + iosevka + nerdfonts + ]; + environment.systemPackages = with pkgs; [ + vim neovim neofetch pfetch tmux + fff + nodejs shellcheck + bash dash git + wget brave scrot + nfs-utils gcc gnumake + mpd htop + ]; + + services.mpd = { + enable = true; + user = "junikim"; + }; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.mtr.enable = true; + programs.gnupg.agent = { + enable = true; + #enableSSHSupport = true; + }; + + # List services that you want to enable: + + # Enable the OpenSSH daemon. + # services.openssh.enable = true; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + #system.stateVersion = "21.11"; # Did you read the comment? + system.stateVersion = "unstable"; # Did you read the comment? +} + diff --git a/dotfiles/bspwm/bspwmrc b/dotfiles/bspwm/bspwmrc new file mode 100755 index 0000000..7020365 --- /dev/null +++ b/dotfiles/bspwm/bspwmrc @@ -0,0 +1,31 @@ +#! /bin/sh + +pkill picom +picom & +nitrogen --restore & +~/.config/polybar/launch.sh + + +pgrep -x sxhkd > /dev/null || sxhkd & + +#bspc monitor -d I II III IV V VI VII VIII IX X +bspc monitor -d 1 2 3 4 5 6 + +bspc config border_width 1 +bspc config window_gap 20 + +bspc config top_padding 25 +bspc config split_ratio 0.50 +bspc config borderless_monocle true +bspc config gapless_monocle true + +bspc rule -a Gimp desktop='^8' state=floating follow=on +bspc rule -a Spotify desktop='^6' + +eww daemon +eww open right + +# only add if nothing is there +#if test "$(mpc playlist | wc -l)" -eq 0 ; then +# mpc ls | mpc add +#fi diff --git a/dotfiles/bspwm/kill.sh b/dotfiles/bspwm/kill.sh new file mode 100755 index 0000000..afc7890 --- /dev/null +++ b/dotfiles/bspwm/kill.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +QUIT=$(printf "No\nYes" | dmenu -i -p "Are you sure u want to kill bspwm?") + +if test "$QUIT" == "Yes" ; then + pkill bspwm +fi diff --git a/dotfiles/bspwm/polybar/config b/dotfiles/bspwm/polybar/config new file mode 100644 index 0000000..cce1b72 --- /dev/null +++ b/dotfiles/bspwm/polybar/config @@ -0,0 +1,224 @@ +;========================================================== +; +; +; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗ +; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗ +; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝ +; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗ +; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║ +; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ +; +; +; To learn more about how to configure Polybar +; go to https://github.com/polybar/polybar +; +; The README contains a lot of information +; +;========================================================== + +[colors] +background = #222 +background-alt = #444 +;foreground = ${xrdb:color7:#222} +foreground = #dfdfdf +foreground-alt = #555 +primary = #cec0af +secondary = #242e35 +alert = #bd2c40 +black = #000 +white = #fff +grey = #aaa +darkgrey = #555 +red = #f00 +green = #0f0 +blue = #2d02d0 +yellow = #d2b55b + +;;; ========================================== +;;; MAIN BAR + +[bar/main] +modules-center = date +font-0 = Jetbrains Mono:style=Regular +height = 30 +width = 320 +offset-x = 15 + +offset-y = 15 +background = ${colors.primary} +radius=5 +override-redirect=true + +[module/date] +type = internal/date +date = "%h-%d-20%y %r" +label-foreground = #000000 + +;;; ========================================== +;;; PULSEAUDIO BAR + +[bar/pulse] +modules-center = pulseaudio +height = 30 +width = 200 +offset-y = 15 +#offset-x = 1300 +offset-x = 350 +radius=5 +override-redirect=true +background = ${colors.secondary} +foreground = #fff +font-0 = Jetbrains Mono:style=Regular +font-1 = FontAwesome:style=Regular +font-2 = "Iosevka:pixelsize=12;0" +font-3 = RobotoMono Nerd Font:pixelsize=12;1 + +[module/pulseaudio] +type = internal/pulseaudio +format-volume-prefix = "VOL " +format-volume-prefix-foreground = ${colors.primary} +format-volume = +label-volume = %percentage%% +label-muted = muted +label-muted-foreground = ${colors.disabled} + +;;; =============================================== +;;; BACKLIGHT BAR + +[bar/backlight] +modules-center = backlight +height = 30 +width = 150 +offset-x = 565 +offset-y = 15 +radius=5 +override-redirect=true +background = ${colors.secondary} +font-0 = Jetbrains Mono:style=Regular + +[module/backlight] + +type = internal/backlight +card = intel_backlight +format = BRI