From 292a03354f7ac59a32b7fe3eb22e9b574ed14490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?c=C4=83t=C4=83lin?= Date: Wed, 6 Jul 2022 08:09:09 +0200 Subject: [PATCH 01/79] add base nix conf --- bspwm/bspwmrc | 31 --- chaakoo/sls_offline.yml | 26 --- dunst/dunstrc | 54 ----- fish/conf.d/aliases.fish | 3 - fish/conf.d/common.fish | 2 - fish/conf.d/paths.fish | 8 - fish/conf.d/rust.fish | 1 - ideavim | 29 --- jupiter/configuration.nix | 327 +++++++++++++++++++++++++++++ jupiter/hardware-configuration.nix | 33 +++ kermit | 73 ------- polybar/config | 200 ------------------ polybar/get_workspace | 5 - polybar/launch.sh | 14 -- polybar/scrot.png | Bin 810970 -> 0 bytes polybar/scrot2.png | Bin 2721121 -> 0 bytes quickmarks | 13 -- qute | 2 - rofi/config.rasi | 1 - sxhkd/sxhkdrc | 140 ------------ utils/asciify.sh | 4 - utils/asciify.txt | 31 --- utils/clone-and-install.py | 12 -- utils/curl2tar.sh | 4 - utils/set-monitors.sh | 14 -- utils/toggle-keyboard-layout.sh | 7 - walls/00-80s.jpg | Bin 93055 -> 0 bytes walls/653118.jpg | Bin 789827 -> 0 bytes walls/vapor1.png | Bin 1773945 -> 0 bytes walls/vapor2.png | Bin 1519321 -> 0 bytes walls/vapor3.png | Bin 981665 -> 0 bytes walls/vapor4.jpg | Bin 240408 -> 0 bytes walls/wp4601789.jpg | Bin 75450 -> 0 bytes 33 files changed, 360 insertions(+), 674 deletions(-) delete mode 100755 bspwm/bspwmrc delete mode 100644 chaakoo/sls_offline.yml delete mode 100644 dunst/dunstrc delete mode 100644 fish/conf.d/aliases.fish delete mode 100644 fish/conf.d/common.fish delete mode 100644 fish/conf.d/paths.fish delete mode 100644 fish/conf.d/rust.fish delete mode 100644 ideavim create mode 100644 jupiter/configuration.nix create mode 100644 jupiter/hardware-configuration.nix delete mode 100644 kermit delete mode 100644 polybar/config delete mode 100755 polybar/get_workspace delete mode 100755 polybar/launch.sh delete mode 100644 polybar/scrot.png delete mode 100644 polybar/scrot2.png delete mode 100644 quickmarks delete mode 100644 qute delete mode 100644 rofi/config.rasi delete mode 100755 sxhkd/sxhkdrc delete mode 100755 utils/asciify.sh delete mode 100644 utils/asciify.txt delete mode 100755 utils/clone-and-install.py delete mode 100755 utils/curl2tar.sh delete mode 100755 utils/set-monitors.sh delete mode 100755 utils/toggle-keyboard-layout.sh delete mode 100644 walls/00-80s.jpg delete mode 100644 walls/653118.jpg delete mode 100644 walls/vapor1.png delete mode 100644 walls/vapor2.png delete mode 100644 walls/vapor3.png delete mode 100644 walls/vapor4.jpg delete mode 100644 walls/wp4601789.jpg diff --git a/bspwm/bspwmrc b/bspwm/bspwmrc deleted file mode 100755 index a6e42a0..0000000 --- a/bspwm/bspwmrc +++ /dev/null @@ -1,31 +0,0 @@ -#! /bin/sh - -#### -#### misc tools -#### - -sxhkd & -wal -i ~/Pictures/walls/odin-dark.jpg -. "${HOME}/.cache/wal/colors.sh" -compton & -~/.config/polybar/launch.sh -pidof dunst && killall dunst && dunst &-c ~/.config/dunst/dunstrc > /dev/null 2>&1 & -xsetroot -cursor_name left_ptr & -wmname LG3D & - -bspc monitor -d eDP-1 1 2 3 4 -bspc monitor -d HDMI-1 5 6 7 8 9 - -#### -#### bspwm -#### - -~/.builds/bin/set-monitors.sh - -bspc config border_width 5 -bspc config window_gap 8 - -bspc config split_ratio 0.52 -bspc config borderless_monocle true -bspc config gapless_monocle true - diff --git a/chaakoo/sls_offline.yml b/chaakoo/sls_offline.yml deleted file mode 100644 index fe13792..0000000 --- a/chaakoo/sls_offline.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: sls-offline -windows: - - grid: | - term term - sls-start docs-serve - name: window1 - commands: - - pane: term - command: | - source .venv/bin/activate.fish - source ../.env-prod.fish - set -x AWS_DEFAULT_REGION "eu-west-1" - clear - workdir: /home/catalin/dev/ceco/valexa - - pane: sls-start - command: | - source ../.env-prod.fish - make sls-stop - make sls-start - make sls-flog - workdir: /home/catalin/dev/ceco/valexa - - pane: docs-serve - command: | - source .venv/bin/activate.fish - make docs-serve - workdir: /home/catalin/dev/ceco/valexa diff --git a/dunst/dunstrc b/dunst/dunstrc deleted file mode 100644 index 7f92ab7..0000000 --- a/dunst/dunstrc +++ /dev/null @@ -1,54 +0,0 @@ -[global] -monitor = 0 -follow = mouse -geometry = "300x60-20+48" -indicate_hidden = yes -shrink = no -separator_height = 0 -padding = 32 -horizontal_padding = 32 -frame_width = 2 -sort = no -idle_threshold = 120 -font = rissole 8 -line_height = 4 -markup = full -format = %s\n%b -alignment = left -show_age_threshold = 60 -word_wrap = yes -ignore_newline = no -stack_duplicates = false -hide_duplicate_count = yes -show_indicators = no -icon_position = off -sticky_history = yes -history_length = 20 -browser = /usr/bin/firefox -new-tab -always_run_script = true -title = Dunst -class = Dunst - -[shortcuts] -close = ctrl+space -close_all = ctrl+shift+space -history = ctrl+grave -context = ctrl+shift+period - -[urgency_low] -timeout = 4 -background = "#141c21" -foreground = "#93a1a1" -frame_color = "#8bc34a" - -[urgency_normal] -timeout = 8 -background = "#141c21" -foreground = "#93a1a1" -frame_color = "#ba68c8" - -[urgency_critical] -timeout = 0 -background = "#141c21" -foreground = "#93a1a1" -frame_color = "#ff7043" diff --git a/fish/conf.d/aliases.fish b/fish/conf.d/aliases.fish deleted file mode 100644 index e1bbc80..0000000 --- a/fish/conf.d/aliases.fish +++ /dev/null @@ -1,3 +0,0 @@ -alias ls 'exa -alh' -alias cat 'batcat' -alias cva 'chaakoo -c $HOME/.config/chaakoo/sls_offline.yml 2> /dev/null ; tmux a -t sls-offline' diff --git a/fish/conf.d/common.fish b/fish/conf.d/common.fish deleted file mode 100644 index bc6fd5d..0000000 --- a/fish/conf.d/common.fish +++ /dev/null @@ -1,2 +0,0 @@ -set -gx EDITOR vim - diff --git a/fish/conf.d/paths.fish b/fish/conf.d/paths.fish deleted file mode 100644 index 000fe48..0000000 --- a/fish/conf.d/paths.fish +++ /dev/null @@ -1,8 +0,0 @@ -set -gx PATH ~/.local/bin $PATH -set -gx PATH ~/.local/bin/185504a9-utils/ $PATH -set -gx PATH $ANDROID_HOME/emulator $PATH -set -gx PATH $ANDROID_HOME/tools $PATH -set -gx PATH $ANDROID_HOME/tools/bin $PATH -set -gx PATH $ANDROID_HOME/platform-tools $PATH - - diff --git a/fish/conf.d/rust.fish b/fish/conf.d/rust.fish deleted file mode 100644 index 98d36e9..0000000 --- a/fish/conf.d/rust.fish +++ /dev/null @@ -1 +0,0 @@ -set -gx PATH "$HOME/.cargo/bin" $PATH; diff --git a/ideavim b/ideavim deleted file mode 100644 index 6ed5420..0000000 --- a/ideavim +++ /dev/null @@ -1,29 +0,0 @@ -"" Source your .vimrc -"source ~/.vimrc -set clipboard+=unnamed - -"" -- Suggested options -- -" Show a few lines of context around the cursor. Note that this makes the -" text scroll if you mouse-click near the start or end of the window. -set scrolloff=5 - -" Do incremental searching. -set incsearch - -" Don't use Ex mode, use Q for formatting. -map Q gq - - -"" -- Map IDE actions to IdeaVim -- https://jb.gg/abva4t -"" Map \r to the Reformat Code action -"map \r (ReformatCode) - -"" Map d to start debug -"map d (Debug) - -"" Map \b to toggle the breakpoint on the current line -"map \b (ToggleLineBreakpoint) - - -" Find more examples here: https://jb.gg/share-ideavimrc -set ideajoin diff --git a/jupiter/configuration.nix b/jupiter/configuration.nix new file mode 100644 index 0000000..9b67899 --- /dev/null +++ b/jupiter/configuration.nix @@ -0,0 +1,327 @@ +{ config, pkgs, ... }: +let + home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz"; +in +let + unstableTarball = + fetchTarball + https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz; +in +{ + imports = + [ + ./hardware-configuration.nix + (import "${home-manager}/nixos") + ]; + + # Bootloader. + boot = { + loader = { + grub = { + enable = true; + device = "/dev/sda"; + useOSProber = true; + enableCryptodisk=true; + }; + }; + initrd = { + kernelModules = [ "amdgpu" ]; + luks.devices."luks-1e776713-4d94-401d-b9bf-60e70f1a8b3e".keyFile = "/crypto_keyfile.bin"; + # Setup keyfile + secrets = { + "/crypto_keyfile.bin" = null; + }; + }; + + }; + networking.hostName = "jupiter"; # Define your hostname. + + + networking.networkmanager.enable = true; + + time.timeZone = "Europe/Madrid"; + i18n.defaultLocale = "en_US.utf8"; + i18n.extraLocaleSettings = { + LC_ADDRESS = "es_US.utf8"; + LC_IDENTIFICATION = "es_ES.utf8"; + LC_MEASUREMENT = "es_ES.utf8"; + LC_MONETARY = "es_ES.utf8"; + LC_NAME = "es_ES.utf8"; + LC_NUMERIC = "es_ES.utf8"; + LC_PAPER = "es_ES.utf8"; + LC_TELEPHONE = "es_ES.utf8"; + LC_TIME = "es_ES.utf8"; + }; + + sound.enable = true; + hardware = { + pulseaudio.enable = false; + opengl = { + driSupport32Bit = true; + driSupport = true; + + extraPackages = with pkgs; [ + amdvlk + ]; + extraPackages32 = with pkgs; [ + driversi686Linux.amdvlk + ]; + }; + }; + security.rtkit.enable = true; + + users = { + mutableUsers = false; + users.europa = { + uid = 1000; + shell = pkgs.fish; + hashedPassword = "$6$QV9sH1LG6jxHdly3$g5rM6cH1HHKHaXHOxNONFPMRW7ZFJCuGgI20KzA/OYiZbc.0JbIsWiYB4vDubIZXSF8od6EBKQoq9wwCeKNzR0"; + isNormalUser = true; + description = "europa"; + extraGroups = [ "networkmanager" "wheel" ]; + }; + }; + + home-manager.users.europa = { + home.packages = with pkgs; [ + lutris + rofi-rbw + rofi + bspwm + kermit-terminal + steam-tui + gnome3.adwaita-icon-theme + ]; + programs = { + git = { + enable = true; + aliases = { + c = "commit"; + ch = "checkout"; + d = "diff"; + r = "rebase"; + s = "status"; + st = "stash"; + sw = "switch"; + }; + delta.enable = true; + userEmail = "catalin@roboces.dev"; + userName = "185504a9"; + signing = { + key = null; + signByDefault = true; + }; + }; + ssh = { + enable = true; + extraConfig = " + +Host fuku.lilith + HostName lilith.fuku + User catalin + IdentityFile ~/.ssh/id_ed25519_robo + IdentitiesOnly yes + +Host fuku.ramiel + HostName ramiel.fuku + User catalin + IdentityFile ~/.ssh/id_ed25519_robo + IdentitiesOnly yes + +Host ceco.mars + HostName 192.168.2.130 + User catalin + IdentityFile ~/.ssh/id_ed25519_robo + IdentitiesOnly yes + +Host fuku.iramiel + HostName ramiel.fukurokuju.dev + User catalin + Port 23209 + IdentityFile ~/.ssh/id_ed25519_robo + IdentitiesOnly yes + +Host fuku.ililith + HostName ramiel.fukurokuju.dev + User catalin + Port 22209 + IdentityFile ~/.ssh/id_ed25519_robo + IdentitiesOnly yes + +Host fuku.containers + HostName containers.fuku + User bullseye + IdentityFile ~/.ssh/id_ed25519_robo + +Host fuku.sandalphon + HostName sandalphon.fuku + User pi + IdentityFile ~/.ssh/id_ed25519_robo + IdentitiesOnly yes + +Host fuku.zeruel + HostName zeruel.fuku + User pi + IdentityFile ~/.ssh/id_ed25519_robo IdentitiesOnly yes + +Host fuku.dns + HostName dns.fuku + User root + IdentityFile ~/.ssh/id_ed25519_robo + IdentitiesOnly yes + +Host fuku.cloud + HostName cloud.fuku + User root + IdentityFile ~/.ssh/id_ed25519_robo + IdentitiesOnly yes + +Host fuku.postgres + HostName postgres.fuku + User root + +Host fuku.postgres13 + HostName postgres13.fuku + IdentityFile ~/.ssh/id_ed25519_robo + IdentitiesOnly yes + User root + +Host fuku.smough + HostName smough.fuku + User root + +Host fuku.gitea + HostName gitea.fuku + User root + +Host fuku.nginx + HostName nginx.fuku + User root + +Host fuku.redis + HostName redis.fuku + User root + +Host fuku.mail + HostName mail.fukurokuju.dev + User root + +Host gitlab.com + HostName gitlab.com + IdentityFile ~/.ssh/id_ed25519_ceco + IdentitiesOnly yes + +Host gitlab.gitops + HostName gitlab.com + User git + AddKeysToAgent yes + IdentitiesOnly yes + IdentityFile ~/.ssh/id_ed25519.pub + "; + }; + fish = { + enable = true; + plugins = [{ + name = "z"; + src = pkgs.fetchFromGitHub { + owner = "jethrokuan"; + repo = "z"; + rev = "85f863f20f24faf675827fb00f3a4e15c7838d76"; + sha256 = "sha256-+FUBM7CodtZrYKqU542fQD+ZDGrd2438trKM0tIESs0="; + }; + }]; + }; + }; + }; + + nixpkgs = { + overlays = [ + (import (builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz")) + (self: super: { + neovim = super.neovim.override { + viAlias = true; + vimAlias = true; + }; + }) + ]; + config = { + allowUnfree = true; + packageOverrides = pkgs: { + unstable = import unstableTarball { + config = config.nixpkgs.config; + }; + }; + }; + }; + + environment = { + variables = { + EDITOR = "nvim"; + }; + systemPackages = with pkgs; [ + yank + gcc + git + fd + procs + tealdeer + ripgrep + bottom + du-dust + hyperfine + bandwhich + delta + gnumake + cargo + rustc + neovim + wget + curl + firefox + tmux + ]; + }; + + programs = { + neovim = { + enable = true; + viAlias = true; + }; + fish.enable = true; + }; + + + + + services = { + printing.enable = true; + flatpak.enable = true; + + xserver = { + enable = true; + displayManager.gdm.enable = true; + desktopManager.gnome.enable = true; + layout = "us"; + xkbVariant = ""; + windowManager.bspwm.enable = true; + videoDrivers = [ "amdgpu" ]; + }; + + pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + + openssh = { + enable = true; + passwordAuthentication = true; + permitRootLogin = "no"; + }; + + }; + system.stateVersion = "22.05"; +} + + diff --git a/jupiter/hardware-configuration.nix b/jupiter/hardware-configuration.nix new file mode 100644 index 0000000..1e2358b --- /dev/null +++ b/jupiter/hardware-configuration.nix @@ -0,0 +1,33 @@ +# 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, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "ehci_pci" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/bc2bc233-2c0b-4649-8cc1-c5853c1ce2e9"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."luks-1e776713-4d94-401d-b9bf-60e70f1a8b3e".device = "/dev/disk/by-uuid/1e776713-4d94-401d-b9bf-60e70f1a8b3e"; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.ens3.useDHCP = lib.mkDefault true; + + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/kermit b/kermit deleted file mode 100644 index eb2137a..0000000 --- a/kermit +++ /dev/null @@ -1,73 +0,0 @@ -# kermit ~ terminal configuration file - -# Locale (numeric) -locale en_US.UTF-8 - -# Word char exceptions -char "-./?%&#_=+@~" - -# Action key binding (alt/shift) -key shift - -# Cursor shape (block/ibeam/underline) -cursor_shape block - -# Custom command key bindings -# bind/bindx [KEY]~"[COMMAND]" -# bindx f~"df -h" - -# Tab position (top/bottom) -tab bottom - -# Terminal font -font monospace 16 - -# Terminal transparency -opacity 0.75 - -# Foreground color -foreground 0xbfd6d1 -foreground_bold 0xffffff - -# Cursor color -cursor 0x00cc00 -cursor_foreground 0xefecf4 - -# Background color -background 0x030C0E - -# Color palette (16) -#color0 0x3f3f3f -#color1 0xcf0000 -#color2 0xa8ff60 -#color3 0xf3f828 -#color4 0x3c70a4 -#color5 0xcc00ff -#color6 0x3c70a4 -#color7 0xdcdccc -#color8 0x808080 -#color9 0xcf0000 -#color10 0xa8ff60 -#color11 0x6b6b6b -#color12 0x3c70a4 -#color13 0xcc00ff -#color14 0x3c70a4 -#color15 0xdcdccc - -color0 0x030C0E -color1 0x28504C -color2 0x1E6B61 -color3 0x496F6F -color4 0x278E72 -color5 0x427788 -color6 0x4CBFA4 -color7 0xbfd6d1 -color8 0x859592 -color9 0x28504C -color10 0x1E6B61 -color11 0x496F6F -color12 0x278E72 -color13 0x427788 -color14 0x4CBFA4 -color15 0xbfd6d1 - diff --git a/polybar/config b/polybar/config deleted file mode 100644 index c070b67..0000000 --- a/polybar/config +++ /dev/null @@ -1,200 +0,0 @@ -[colors] - -background = ${xrdb:color0:#222} -color1 = ${xrdb:color2} -color2 = ${xrdb:color4} -color3 = ${xrdb:color6} - -; _ -; | |__ __ _ _ __ ___ -; | '_ \ / _` | '__/ __| -; | |_) | (_| | | \__ \ -; |_.__/ \__,_|_| |___/ - -[bar/base] -enable-ipc = true -font-0=cherry:size=14;3 -font-1=FontAwesome5Free:style=Regular:pixelsize=8:antialias=true;2 -font-2=FontAwesome5Free:style=Solid:pixelsize=8:antialias=true;2 -font-3=IPAGothic:style=Regular:size=11:antialias=true;3 - -bottom = true -border-size = 0 -border-color = ${self.foreground} - -height = 50 - -background = ${colors.background} -override-redirect=false -offset-y = 10 - -wm-restack = bspwm - -[bar/ws] -inherit = bar/base -width = 36% -bottom = true - -foreground = ${colors.color1} - -offset-x = 10 - -; bspwm -modules-left = bspwm xwindow -scroll-up = bspwm-desknext -scroll-down = bspwm-deskprev - - -[bar/music] -inherit = bar/base -enable-ipc = true -width = 32% - -foreground = ${colors.color2} -offset-x = 50.7% - -modules-left = battery -modules-right= network -padding = 10 - -[bar/tray] -inherit = bar/base -width = 16.2% - -offset-x = 83.3% -foreground = ${colors.color3} - -;tray-position = right - -modules-left = pulseaudio time power - -[bar/dummy] -height = 60 -background = #0000 -modules-center = dummy-module -override-redirect = false -bottom = true - -; _ _ -; _ __ ___ ___ __| |_ _| | ___ ___ -; | '_ ` _ \ / _ \ / _` | | | | |/ _ \/ __| -; | | | | | | (_) | (_| | |_| | | __/\__ \ -; |_| |_| |_|\___/ \__,_|\__,_|_|\___||___/ - -[module/wsnumber] -type = custom/script -exec = ~/.config/polybar/get_workspace -tail = true -interval = 0 -format-padding = 0 -format = "