From 6a41699dc36982e208f8f8d98bcee1c74249c4f0 Mon Sep 17 00:00:00 2001 From: Morten Olsen Date: Tue, 12 Sep 2023 08:28:05 +0200 Subject: [PATCH] init --- desktop/gnome/default.nix | 36 +++ desktop/hyprland/default.nix | 31 +++ desktop/hyprland/environment.nix | 23 ++ desktop/kde/default.nix | 52 ++++ flake.lock | 78 ++++++ flake.nix | 38 +++ machines/xps/configuration.nix | 39 +++ machines/xps/hardware-configuration.nix | 43 +++ modules/audio/default.nix | 19 ++ modules/basic/default.nix | 18 ++ modules/basic/locales.nix | 24 ++ modules/basic/network.nix | 5 + modules/basic/nix.nix | 16 ++ modules/basic/security.nix | 18 ++ modules/docker/default.nix | 10 + modules/flatpak/default.nix | 5 + modules/gpu/intel/default.nix | 22 ++ modules/laptop/default.nix | 11 + modules/samba/default.nix | 6 + update.sh | 1 + user/default.nix | 21 ++ user/files/bash/config | 9 + user/files/eww/eww.scss | 247 ++++++++++++++++++ user/files/eww/eww.yuck | 222 ++++++++++++++++ user/files/eww/scripts/battery | 44 ++++ .../files/eww/scripts/change-active-workspace | 21 ++ user/files/eww/scripts/get-active-workspace | 3 + user/files/eww/scripts/get-workspaces | 11 + user/files/eww/scripts/getram | 2 + user/files/eww/scripts/getvol | 2 + user/files/eww/scripts/wifi | 13 + user/files/git/config | 44 ++++ user/files/gpg/gpg-agent.conf | 10 + user/files/gpg/gpg.conf | 54 ++++ user/files/hyprland/binds.conf | 62 +++++ user/files/hyprland/exec.conf | 11 + user/files/hyprland/general.conf | 74 ++++++ user/files/hyprland/hyprland.conf | 18 ++ user/files/hyprland/hyprpaper.conf | 3 + user/files/hyprland/input.conf | 24 ++ user/files/hyprland/scripts/brightness.sh | 14 + user/files/hyprland/scripts/eww.sh | 4 + user/files/hyprland/scripts/idle.sh | 5 + user/files/hyprland/scripts/lock.sh | 16 ++ user/files/hyprland/scripts/screensharing.sh | 8 + user/files/hyprland/scripts/volume.sh | 36 +++ user/files/kitty/kitty.conf | 8 + user/files/shell/rc.d/00-vars.sh | 0 user/files/shell/rc.d/01-scripts.sh | 2 + user/files/shell/rc.d/02-alias.sh | 34 +++ user/files/shell/rc.d/02-bat.sh | 6 + user/files/shell/rc.d/03-ssh.sh | 8 + user/files/shell/rc.d/05-npm.sh | 7 + user/files/shell/rc.d/07-fzf.sh | 1 + user/files/shell/rc.d/10-gpg-agent.sh | 5 + user/files/shell/rc.d/10-nvim.sh | 3 + user/files/ssh/authorized_keys | 4 + user/files/ssh/config | 7 + user/files/ssh/config.d | 1 + user/files/ssh/known_hosts | 0 user/files/tmux/config | 112 ++++++++ user/files/wofi/INSTALL.md | 13 + user/files/wofi/LICENSE | 21 ++ user/files/wofi/README.md | 27 ++ user/files/wofi/screenshot.png | Bin 0 -> 17021 bytes user/files/wofi/style.css | 39 +++ user/files/zsh/config | 108 ++++++++ user/home.nix | 142 ++++++++++ user/overlays/steam.nix | 19 ++ 69 files changed, 2040 insertions(+) create mode 100644 desktop/gnome/default.nix create mode 100644 desktop/hyprland/default.nix create mode 100644 desktop/hyprland/environment.nix create mode 100644 desktop/kde/default.nix create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 machines/xps/configuration.nix create mode 100644 machines/xps/hardware-configuration.nix create mode 100644 modules/audio/default.nix create mode 100644 modules/basic/default.nix create mode 100644 modules/basic/locales.nix create mode 100644 modules/basic/network.nix create mode 100644 modules/basic/nix.nix create mode 100644 modules/basic/security.nix create mode 100644 modules/docker/default.nix create mode 100644 modules/flatpak/default.nix create mode 100644 modules/gpu/intel/default.nix create mode 100644 modules/laptop/default.nix create mode 100644 modules/samba/default.nix create mode 100755 update.sh create mode 100644 user/default.nix create mode 100644 user/files/bash/config create mode 100644 user/files/eww/eww.scss create mode 100644 user/files/eww/eww.yuck create mode 100755 user/files/eww/scripts/battery create mode 100755 user/files/eww/scripts/change-active-workspace create mode 100755 user/files/eww/scripts/get-active-workspace create mode 100755 user/files/eww/scripts/get-workspaces create mode 100755 user/files/eww/scripts/getram create mode 100755 user/files/eww/scripts/getvol create mode 100755 user/files/eww/scripts/wifi create mode 100644 user/files/git/config create mode 100644 user/files/gpg/gpg-agent.conf create mode 100644 user/files/gpg/gpg.conf create mode 100644 user/files/hyprland/binds.conf create mode 100644 user/files/hyprland/exec.conf create mode 100644 user/files/hyprland/general.conf create mode 100644 user/files/hyprland/hyprland.conf create mode 100644 user/files/hyprland/hyprpaper.conf create mode 100644 user/files/hyprland/input.conf create mode 100755 user/files/hyprland/scripts/brightness.sh create mode 100755 user/files/hyprland/scripts/eww.sh create mode 100755 user/files/hyprland/scripts/idle.sh create mode 100755 user/files/hyprland/scripts/lock.sh create mode 100755 user/files/hyprland/scripts/screensharing.sh create mode 100755 user/files/hyprland/scripts/volume.sh create mode 100644 user/files/kitty/kitty.conf create mode 100644 user/files/shell/rc.d/00-vars.sh create mode 100644 user/files/shell/rc.d/01-scripts.sh create mode 100644 user/files/shell/rc.d/02-alias.sh create mode 100644 user/files/shell/rc.d/02-bat.sh create mode 100644 user/files/shell/rc.d/03-ssh.sh create mode 100644 user/files/shell/rc.d/05-npm.sh create mode 100644 user/files/shell/rc.d/07-fzf.sh create mode 100644 user/files/shell/rc.d/10-gpg-agent.sh create mode 100644 user/files/shell/rc.d/10-nvim.sh create mode 100644 user/files/ssh/authorized_keys create mode 100644 user/files/ssh/config create mode 120000 user/files/ssh/config.d create mode 100644 user/files/ssh/known_hosts create mode 100644 user/files/tmux/config create mode 100644 user/files/wofi/INSTALL.md create mode 100644 user/files/wofi/LICENSE create mode 100644 user/files/wofi/README.md create mode 100644 user/files/wofi/screenshot.png create mode 100644 user/files/wofi/style.css create mode 100644 user/files/zsh/config create mode 100644 user/home.nix create mode 100644 user/overlays/steam.nix diff --git a/desktop/gnome/default.nix b/desktop/gnome/default.nix new file mode 100644 index 0000000..261f59a --- /dev/null +++ b/desktop/gnome/default.nix @@ -0,0 +1,36 @@ +{ config, pkgs, ... }: + +{ + # Enable the X11 windowing system. + services.xserver.enable = true; + + # Enable the GNOME Desktop Environment. + services.xserver.displayManager.gdm.enable = true; + services.xserver.desktopManager.gnome.enable = true; + + # Configure keymap in X11 + services.xserver = { + layout = "dk"; + xkbVariant = ""; + xkbOptions = "caps:swapescape"; + }; + + # Enable CUPS to print documents. + # services.printing.enable = true; + fonts = { + packages = with pkgs; [ + (nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" ]; }) + ubuntu_font_family + ]; + enableDefaultPackages = true; + fontconfig = { + defaultFonts = { + serif = [ "Ubuntu" ]; + sansSerif = [ "Ubuntu" ]; + monospace = [ "Ubuntu" ]; + }; + }; + fontDir.enable = true; + }; + +} diff --git a/desktop/hyprland/default.nix b/desktop/hyprland/default.nix new file mode 100644 index 0000000..a678cc2 --- /dev/null +++ b/desktop/hyprland/default.nix @@ -0,0 +1,31 @@ +{ config, pkgs, ... }: + +{ + imports = [ + ./environment.nix + ]; + environment.systemPackages = [ + pkgs.hyprland + pkgs.eww + pkgs.wofi + pkgs.swaylock-effects + pkgs.swayidle + ]; + + fonts = { + packages = with pkgs; [ + (nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" ]; }) + ubuntu_font_family + ]; + enableDefaultPackages = true; + fontconfig = { + defaultFonts = { + serif = [ "Ubuntu" ]; + sansSerif = [ "Ubuntu" ]; + monospace = [ "Ubuntu" ]; + }; + }; + fontDir.enable = true; + }; + +} diff --git a/desktop/hyprland/environment.nix b/desktop/hyprland/environment.nix new file mode 100644 index 0000000..f8c2b0f --- /dev/null +++ b/desktop/hyprland/environment.nix @@ -0,0 +1,23 @@ +{ config, pkgs, ... }: + +{ + home = { + sessionVariables = { + EDITOR = "nvim"; + BROWSER = "firefox"; + TERMINAL = "kitty"; + #GBM_BACKEND= "nvidia-drm"; + #__GLX_VENDOR_LIBRARY_NAME= "nvidia"; + #LIBVA_DRIVER_NAME= "nvidia"; # hardware acceleration + __GL_VRR_ALLOWED="1"; + WLR_NO_HARDWARE_CURSORS = "1"; + WLR_RENDERER_ALLOW_SOFTWARE = "1"; + CLUTTER_BACKEND = "wayland"; + WLR_RENDERER = "vulkan"; + + XDG_CURRENT_DESKTOP = "Hyprland"; + XDG_SESSION_DESKTOP = "Hyprland"; + XDG_SESSION_TYPE = "wayland"; + }; + }; +} diff --git a/desktop/kde/default.nix b/desktop/kde/default.nix new file mode 100644 index 0000000..4dbbd0f --- /dev/null +++ b/desktop/kde/default.nix @@ -0,0 +1,52 @@ +{ config, pkgs, ... }: + +{ + boot.plymouth = { + enable = true; + }; + + location = { + provider = "geoclue2"; + }; + + programs.dconf.enable = true; + + # broken due to geoclue being stupid + #services.localtime.enable = true; + + fonts = { + fontDir.enable = true; + enableGhostscriptFonts = true; + packages = with pkgs; [ + corefonts + source-code-pro + source-sans-pro + source-serif-pro + dejavu_fonts + iosevka-bin + ]; + }; + + services.xserver = { + enable = true; + #layout = "da"; + desktopManager.plasma5.enable = true; + displayManager = { + defaultSession = "plasmawayland"; + sddm = { + enable = true; + #enableHidpi = true; + }; + }; + }; + + environment.systemPackages = [ + pkgs.numix-icon-theme + pkgs.papirus-icon-theme + pkgs.arc-icon-theme + #pkgs.plasma5Packages.kdeconnect-kde + # this doesn't do much, but makes it easier to see the settings + pkgs.sddm-kcm + ]; + networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..459f9ca --- /dev/null +++ b/flake.lock @@ -0,0 +1,78 @@ +{ + "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1694375657, + "narHash": "sha256-32X8dcty4vPXx+D4yJPQZBo5hJ1NQikALhevGv6elO4=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "f7848d3e5f15ed02e3f286029697e41ee31662d7", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "nixos-hardware": { + "locked": { + "lastModified": 1693718952, + "narHash": "sha256-+nGdJlgTk0MPN7NygopipmyylVuAVi7OItIwTlwtGnw=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "793de77d9f83418b428e8ba70d1e42c6507d0d35", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixos-hardware", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1693663421, + "narHash": "sha256-ImMIlWE/idjcZAfxKK8sQA7A1Gi/O58u5/CJA+mxvl8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e56990880811a451abd32515698c712788be5720", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1694183432, + "narHash": "sha256-YyPGNapgZNNj51ylQMw9lAgvxtM2ai1HZVUu3GS8Fng=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "db9208ab987cdeeedf78ad9b4cf3c55f5ebd269b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nixos-hardware": "nixos-hardware", + "nixpkgs": "nixpkgs_2" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..592dcfe --- /dev/null +++ b/flake.nix @@ -0,0 +1,38 @@ +# https://github.com/michaelpj/nixos-config +# https://github.com/HeinzDev/Hyprland-dotfiles/blob/main/nixos/configuration.nix +{ + inputs = { + nixpkgs = { + url = "github:NixOS/nixpkgs/nixos-unstable"; + }; + nixos-hardware = { + url = "github:NixOS/nixos-hardware"; + }; + home-manager = { + url = "github:nix-community/home-manager"; + }; + }; + + outputs = { self, nixpkgs, nixos-hardware, home-manager }: { + nixosConfigurations = { + alice-xps = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + (import ./machines/xps/configuration.nix) + ({ + # Let 'nixos-version --json' know about the Git revision + # of this flake. + system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev; + }) + ({ + # For compatibility with other things, puts nixpkgs into NIX_PATH + environment.etc.nixpkgs.source = nixpkgs; + nix.nixPath = ["nixpkgs=/etc/nixpkgs"]; + }) + ]; + specialArgs = { inherit nixos-hardware home-manager; }; + }; + }; + + }; +} diff --git a/machines/xps/configuration.nix b/machines/xps/configuration.nix new file mode 100644 index 0000000..70adbfa --- /dev/null +++ b/machines/xps/configuration.nix @@ -0,0 +1,39 @@ +{ config, pkgs, nixos-hardware, home-manager, lib, ... }: + +{ + imports = + [ + ./hardware-configuration.nix + nixos-hardware.nixosModules.dell-xps-13-7390 + home-manager.nixosModules.home-manager + ../../user + ../../modules/gpu/intel + ../../modules/basic + ../../modules/audio + ../../modules/samba + ../../modules/laptop + ../../modules/docker + ../../modules/flatpak + ../../desktop/gnome + ]; + + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + # Setup keyfile + boot.initrd.secrets = { + "/crypto_keyfile.bin" = null; + }; + + # Enable swap on luks + boot.initrd.luks.devices."luks-20428df9-98ee-45a6-9dc1-fcafc0ce86f2".device = "/dev/disk/by-uuid/20428df9-98ee-45a6-9dc1-fcafc0ce86f2"; + boot.initrd.luks.devices."luks-20428df9-98ee-45a6-9dc1-fcafc0ce86f2".keyFile = "/crypto_keyfile.bin"; + + boot.kernelParams = [ "i915.force_probe=9b41" ]; + + networking.hostName = "alice-xps"; # Define your hostname. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + + system.stateVersion = "23.05"; # Did you read the comment? +} diff --git a/machines/xps/hardware-configuration.nix b/machines/xps/hardware-configuration.nix new file mode 100644 index 0000000..5f3cb42 --- /dev/null +++ b/machines/xps/hardware-configuration.nix @@ -0,0 +1,43 @@ +# 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 + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/56f7a61b-1689-42b6-b697-5c88b8e75fc1"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."luks-f8db07f5-1808-4591-8bbf-81798eb5d4c1".device = "/dev/disk/by-uuid/f8db07f5-1808-4591-8bbf-81798eb5d4c1"; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/90A7-3803"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/e92ed4b9-8ee0-4d87-9249-f6e4223abbbe"; } + ]; + + # 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.enp112s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/modules/audio/default.nix b/modules/audio/default.nix new file mode 100644 index 0000000..bc2fe0b --- /dev/null +++ b/modules/audio/default.nix @@ -0,0 +1,19 @@ +{ config, pkgs, ... }: + +{ + sound.enable = true; + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + # If you want to use JACK applications, uncomment this + #jack.enable = true; + + # use the example session manager (no others are packaged yet so this is enabled by default, + # no need to redefine it in your config for now) + #media-session.enable = true; + }; +} diff --git a/modules/basic/default.nix b/modules/basic/default.nix new file mode 100644 index 0000000..f3ff83d --- /dev/null +++ b/modules/basic/default.nix @@ -0,0 +1,18 @@ +{ config, pkgs, ... }: + +{ + imports = [ + ./locales.nix + ./nix.nix + ./security.nix + ]; + + services = { + fwupd.enable = true; + + # override nixos-hardware profile + throttled.enable = false; + thermald.enable = true; + }; +} + diff --git a/modules/basic/locales.nix b/modules/basic/locales.nix new file mode 100644 index 0000000..da85f66 --- /dev/null +++ b/modules/basic/locales.nix @@ -0,0 +1,24 @@ +{ config, pkgs, ... }: + +{ + console = { + font = "lat9w-16"; + keyMap = "dk-latin1"; + }; + + i18n.defaultLocale = "en_DK.UTF-8"; + + time.timeZone = "Europe/Copenhagen"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "da_DK.UTF-8"; + LC_IDENTIFICATION = "da_DK.UTF-8"; + LC_MEASUREMENT = "da_DK.UTF-8"; + LC_MONETARY = "da_DK.UTF-8"; + LC_NAME = "da_DK.UTF-8"; + LC_NUMERIC = "da_DK.UTF-8"; + LC_PAPER = "da_DK.UTF-8"; + LC_TELEPHONE = "da_DK.UTF-8"; + LC_TIME = "da_DK.UTF-8"; + }; +} diff --git a/modules/basic/network.nix b/modules/basic/network.nix new file mode 100644 index 0000000..34b6b7c --- /dev/null +++ b/modules/basic/network.nix @@ -0,0 +1,5 @@ +{ config, pkgs, ... }: + +{ + networking.networkmanager.enable = true; +} diff --git a/modules/basic/nix.nix b/modules/basic/nix.nix new file mode 100644 index 0000000..c5b7f7a --- /dev/null +++ b/modules/basic/nix.nix @@ -0,0 +1,16 @@ +{ config, pkgs, ... }: + +{ + nixpkgs.config.allowUnfree = true; + nix = { + package = pkgs.nixUnstable; + settings = { + sandbox = true; + cores = 0; + trusted-users = [ "@wheel" ]; + substituters = [ "https://cache.nixos.org/" ]; + builders-use-substitutes = true; + experimental-features = [ "nix-command" "flakes" ]; + }; + }; +} diff --git a/modules/basic/security.nix b/modules/basic/security.nix new file mode 100644 index 0000000..c258816 --- /dev/null +++ b/modules/basic/security.nix @@ -0,0 +1,18 @@ +{ config, pkgs, ... }: + +{ + # enable smart card reader driver + services.pcscd.enable = true; + + # yubikey stuff + services.udev.packages = [ pkgs.yubikey-personalization ]; + environment.systemPackages = [ + pkgs.yubikey-personalization + pkgs.yubikey-personalization-gui + pkgs.yubikey-manager + pkgs.yubikey-manager-qt + pkgs.yubioath-flutter + pkgs.gnupg + pkgs.pinentry-gnome + ]; +} diff --git a/modules/docker/default.nix b/modules/docker/default.nix new file mode 100644 index 0000000..44fcee4 --- /dev/null +++ b/modules/docker/default.nix @@ -0,0 +1,10 @@ +{ config, pkgs, ... }: + +{ + virtualisation.docker.enable = true; + users.groups.docker.members = [ "alice" ]; + + environment.systemPackages = with pkgs; [ + docker-compose + ]; +} diff --git a/modules/flatpak/default.nix b/modules/flatpak/default.nix new file mode 100644 index 0000000..5ce1594 --- /dev/null +++ b/modules/flatpak/default.nix @@ -0,0 +1,5 @@ +{ config, pkgs, ... }: + +{ + services.flatpak.enable = true; +} diff --git a/modules/gpu/intel/default.nix b/modules/gpu/intel/default.nix new file mode 100644 index 0000000..e0990cd --- /dev/null +++ b/modules/gpu/intel/default.nix @@ -0,0 +1,22 @@ +{ config, pkgs, ... }: + +{ + nixpkgs.config.packageOverrides = pkgs: { + vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; + }; + services.xserver.videoDrivers = [ "intel" ]; # modesetting didn't help + boot.blacklistedKernelModules = [ "nouveau" "nvidia" ]; # bbswitch + boot.kernelParams = [ "acpi_rev_override=5" "i915.enable_guc=2" ]; + boot.kernelModules = [ "kvm-intel" ]; + hardware.opengl = { + enable = true; + driSupport = true; + extraPackages = with pkgs; [ + intel-media-driver # LIBVA_DRIVER_NAME=iHD + #vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium) + vaapiVdpau + libvdpau-va-gl + ]; + }; + #hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ vaapiIntel ]; +} diff --git a/modules/laptop/default.nix b/modules/laptop/default.nix new file mode 100644 index 0000000..860f81e --- /dev/null +++ b/modules/laptop/default.nix @@ -0,0 +1,11 @@ +{ config, pkgs, ... }: + +{ + environment.systemPackages = with pkgs; [ + pkgs.powertop + pkgs.acpi + pkgs.upower + ]; + + services.upower.enable = true; +} diff --git a/modules/samba/default.nix b/modules/samba/default.nix new file mode 100644 index 0000000..40005ce --- /dev/null +++ b/modules/samba/default.nix @@ -0,0 +1,6 @@ +{ config, pkgs, ... }: + +{ + services.gvfs.enable = true; + networking.firewall.extraCommands = ''iptables -t raw -A OUTPUT -p udp -m udp --dport 137 -j CT --helper netbios-ns''; +} diff --git a/update.sh b/update.sh new file mode 100755 index 0000000..5d19064 --- /dev/null +++ b/update.sh @@ -0,0 +1 @@ +sudo nixos-rebuild switch --flake . diff --git a/user/default.nix b/user/default.nix new file mode 100644 index 0000000..bf15fc2 --- /dev/null +++ b/user/default.nix @@ -0,0 +1,21 @@ +{ config, pkgs, ... }: + +{ + programs.zsh.enable = true; + + users.users.alice = { + isNormalUser = true; + description = "Alice"; + extraGroups = [ "networkmanager" "wheel" "docker" ]; + shell = pkgs.zsh; + }; + + programs.steam = { + enable = true; + remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play + dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server + }; + + home-manager.useGlobalPkgs = true; + home-manager.users.alice = import ./home.nix; +} diff --git a/user/files/bash/config b/user/files/bash/config new file mode 100644 index 0000000..94097a3 --- /dev/null +++ b/user/files/bash/config @@ -0,0 +1,9 @@ +# Load all files from .shell/rc.d directory +if [ -d $HOME/.shellrc/rc.d ]; then + for file in $HOME/.shellrc/rc.d/*.sh; do + source $file + done +fi + +[ -f ~/.fzf.bash ] && source ~/.fzf.bash + diff --git a/user/files/eww/eww.scss b/user/files/eww/eww.scss new file mode 100644 index 0000000..cb1e4bf --- /dev/null +++ b/user/files/eww/eww.scss @@ -0,0 +1,247 @@ +/* Created by https://github.com/rxyhn + Designed by https://github.com/rxyhn + Maintaned by https://github.com/rxyhn +*/ + +// Global +*{ + all: unset; +} + +// Variable Color's +$background: #1A1B26; +$foreground: #A9B1D6; + +$black: #24283B; +$gray: #565F89; +$red: #F7768E; +$green: #73DACA; +$yellow: #E0AF68; +$blue: #7AA2F7; +$magenta: #BB9AF7; +$cyan: #7DCFFF; +$white: $foreground; + +// EWW BAR +.eww_bar{ + background-color: $background; + padding: .3rem; +} + +// Launcher +.launcher_icon{ + color: $cyan; + font-family: "Font Awesome 6"; + font-size: 1.7em; + padding: 1rem 0 1rem 0; +} + +// Workspaces +.works { +font-family: "Font Awesome 6"; +padding: .2rem .7rem .2rem .7rem; +background-color: $black; +border-radius: 5px; +} + +.0 , .01, .02, .03, .04, .05, .06, +.011, .022, .033, .044, .055, .066{ + margin: .55rem 0 .55rem 0; +} + +/* Unoccupied */ +.0 { +color: $gray; +} + +/* Occupied */ +.01, .02, .03, .04, .05, .06 { + color: $gray; +} + +/* Focused */ +.011, +.022, +.033, +.044, +.055, +.066 { + color: $foreground; +} + +.0:nth-child(1), +.0:nth-child(3){ + font-size: 1.5em; +} +.0:nth-child(2){ + font-size: 1.4em; +} +.0:nth-child(4), +.0:nth-child(5){ + font-size: 1.6em; +} +.0:nth-child(6){ + font-size: 1.7em; +} +.01, +.011, +.03, +.033{ + font-size: 1.5em; +} +.02, +.022{ + font-size: 1.4em; +} +.04, +.05, +.044, +.055{ + font-size: 1.6em; +} +.06, +.066{ + font-size: 1.7em; +} + +// Control Panel +.control { +padding: .5rem; +font-family: Material Icons; +font-size: 1.6em; +background-color: $black; +border-radius: 5px; +} +.bat{ + font-family: JetBrainsMono Nerd Font; + font-size: 1.2em; + padding-right: .5rem; + color: $blue; +} +.wifi-icon{ + margin-bottom: .2rem; + color: $magenta; +} +.brightness-icon{ + margin: .2rem 0 .2rem 0; + color: $yellow; +} +.volume-icon{ + font-family: "Fira Code Nerd Font"; + margin: 0rem .0rem 0rem -.6rem; + color: $green; +} +scale trough { + all: unset; + background-color: $background; + border-radius: 5px; + min-height: 80px; + min-width: 10px; + margin: .3rem 0 .3rem 0; +} +.bribar trough highlight { + background-color: $yellow; + border-radius: 5px; +} +.volbar trough highlight { + background-color: $green; + border-radius: 5px; +} + +// Clock +.time { + font-family: Comic Mono; + font-weight: bold; + font-size: 1.2em; + background-color: $black; + color: $white; + border-radius: 5px; + padding: .7rem 0 .5rem 0; + margin: .5rem 0 .5rem 0; +} + +.workspace-entry { + margin: 5px; + border-radius: 5px; + padding: .1rem .2rem; + border: solid 3px transparent; + + &.occupied { + background-color: $black; + } + + &.current { + border: solid 3px transparent; + background: #e67e22; + } +} + +// Calendar +.cal-box { + background-color: $black; + font-family: Comic Mono; + font-size: 1em; + font-weight: bold; + + .cal-inner-box { + padding: 1rem 1rem .2rem; + + .cal { + &.highlight { + padding: 10rem; + } + + padding: .8rem .25rem 0rem; + margin-left: 10px; + } + } +} + +calendar:selected { + color: $blue; +} + +calendar.header { +color: $blue; +font-weight: bold; +} + +calendar.button { +color: $magenta; +} + +calendar.highlight { +color: $magenta; +font-weight: bold; +} + +calendar:indeterminate { +color: $background; +} + +// Powermenu +.powermenu { + font-family: feather; + font-size: 1.4em; + font-weight: bold; +} +.button-bspres, .button-reb, .button-lock, +.button-quit, .button-off{ + padding: .5rem .2rem .3rem .2rem; +} +.button-off{ + margin-bottom: .5rem; + color: $red; +} +.button-bspres{ + color: $green; +} +.button-reb{ + color: $yellow +} +.button-quit{ + color: $magenta; +} +.button-lock{ + color: $blue; +} diff --git a/user/files/eww/eww.yuck b/user/files/eww/eww.yuck new file mode 100644 index 0000000..27afb2a --- /dev/null +++ b/user/files/eww/eww.yuck @@ -0,0 +1,222 @@ +(deflisten workspaces :initial "[]" "bash ~/.config/eww/scripts/get-workspaces") +(deflisten current_workspace :initial "1" "bash ~/.config/eww/scripts/get-active-workspace") +(defwidget workspaces [] + (eventbox :onscroll "bash ~/.config/eww/scripts/change-active-workspace {} ${current_workspace}" :class "workspaces-widget" + (box :space-evenly true :orientation "v" + (for workspace in workspaces + (eventbox :onclick "hyprctl dispatch workspace ${workspace.id}" + (box :orientation "v" :class "workspace-entry ${workspace.id == current_workspace ? "current" : ""} ${workspace.windows > 0 ? "occupied" : "empty"}" + (label :text "${workspace.id}") + ) + ) + ) + ) + ) + ) + + + + +;; Created by https://github.com/rxyhn +;; Designed by https://github.com/rxyhn +;; Maintaned by https://github.com/rxyhn + +;; put path to aesthetic bar config files here ;; +(defvar eww "/usr/bin/eww -c $HOME/.config/eww") + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Widget Section's ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Launcher Widgets ;; +(defwidget launcher [] + (box :orientation "v" + :space-evenly "false" + :spacing -15 + (button :class "launcher_icon" + :onclick "scripts/popup launcher" ""))) + +;; Volume Widgets ;; +(defwidget volum [] + (eventbox :onhover "${eww} update volum=true" + :onhoverlost "${eww} update volum=false" + (box :orientation "v" + :space-evenly "false" + :spacing "2" + (revealer :transition "slideup" + :reveal volum + :duration "150ms" + (scale :class "volbar" + :value current-volume + :orientation "v" + :flipped true + :tooltip "Volume: ${current-volume}%" + :max 101 + :min 0 + :onchange "amixer sset Master {}%" )) + (button :onclick "pavucontrol" :class "volume-icon" "")))) +(defpoll current-volume :interval "1s" "~/.config/eww/scripts/getvol") +(defvar volum false) + + +;; Wifi Widgets ;; +(defwidget wifi [] + (box :orientation "v" + :tooltip wifi-name + (button :onclick "scripts/popup wifi" + :class "wifi-icon" wifi-icon))) +(defpoll wifi-icon :interval "1s" "scripts/wifi icon") +(defpoll wifi-name :interval "1s" "scripts/wifi name") + +;; Brightness Widgets ;; +(defwidget bright [] + (eventbox :onhover "${eww} update bright=true" + :onhoverlost "${eww} update bright=false" + (box :orientation "v" + :space-evenly "false" + :spacing 2 + (revealer :transition "slideup" + :reveal bright + :duration "550ms" + (scale :class "bribar" + :value current-brightness + :tooltip "Brightness: ${current-brightness}%" + :onchange "brightnessctl set {}%" + :orientation "v" + :flipped true + :max 101 + :min 0)) + (label :class "brightness-icon" + :text "")))) +(defpoll current-brightness :interval "1s" "brightnessctl -m | awk -F, '{print substr($4, 0, length($4)-1)}' | tr -d '%'") +(defvar bright false) + +;; Control Panel Widgets ;; +(defwidget control [] + (box :orientation "v" + :space-evenly false + :class "control" +(volum)(bright)(wifi))) + +;; Clock Widgets ;; +(defwidget time [] + (box :orientation "v" + :class "time" + :valign "end" + (button :onclick "scripts/popup calendar" + :class "time-hour" hour) + (button :onclick "scripts/popup calendar" + :class "time-min" min))) +(defpoll hour :interval "1s" "date '+%H'") +(defpoll min :interval "1s" "date '+%M'") + +;; Calendar Widgets ;; +(defwidget cal [] + (box :class "cal-box" + :orientation "v" + (box :class "cal-inner-box" + (calendar :class "cal" + :day calendar_day + :month calendar_month + :year calendar_year)))) +(defpoll calendar_day :interval "10h" + "date '+%d'") +(defpoll calendar_month :interval "10h" + "scripts/calendar") +(defpoll calendar_year :interval "10h" + "date '+%Y'") + +;; Powermenu Widgets ;; +(defwidget power [] + (eventbox :onhover "${eww} update power=true" + :onhoverlost "${eww} update power=false" + (box :orientation "v" + :space-evenly "false" + :vexpand "false" + :class "powermenu" + (revealer :transition "slideup" + :reveal power + :duration "550ms" + (box :orientation "v" + :space-evenly "false" + + (button :class "button-bspres" + :tooltip "BSPWM Restart" + :onclick "bspc wm -r" "" ) + + (button :class "button-reb" + :tooltip "Reboot" + :onclick "reboot" "") + + (button :class "button-quit" + :tooltip "Logout" + :onclick "killall bspwm" "") + + (button :class "button-lock" + :tooltip "Lock Screen" + :onclick "betterlockscreen -l" ""))) + + (button :class "button-off" + :tooltip "Shutdown" + :onclick "shutdown now" "")))) +(defvar power false) + +;; Top Widgets ;; +(defwidget top [] + (box :orientation "v" + :space-evenly "false" + :valign "start" +(launcher) +(workspaces))) + +;; Bottom Widgets ;; +(defwidget bottom [] + (box :orientation "v" + :space-evenly false +(time) +(power))) + +;; End Widgets ;; +(defwidget end [] + (box :orientation "v" + :space-evenly "false" + :valign "end" + :spacing 5 +(control) +(bottom))) + +;; Bar Widgets ;; +(defwidget bar [] + (box :class "eww_bar" + :orientation "v" + :vexpand "false" + :hexpand "false" +(top) +(end))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Window Section's ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Bar Windows ;; +(defwindow bar + :geometry (geometry :x "0" + :y "0" + :height "100%" + :width "47px") + :monitor 0 + :reserve (struts :distance "35px" + :side "left") + :wm-ignore false + :hexpand "false" + :vexpand "false" +(bar)) + +;; Calendar Windows ;; +(defwindow calendar + :geometry (geometry :x "70px" + :y "65%" + :width "270px" + :height "60px") +(cal)) + + + diff --git a/user/files/eww/scripts/battery b/user/files/eww/scripts/battery new file mode 100755 index 0000000..300c017 --- /dev/null +++ b/user/files/eww/scripts/battery @@ -0,0 +1,44 @@ +#!/bin/sh + +bat=/sys/class/power_supply/BAT0/ +per="$(cat "$bat/capacity")" + +icon() { + +[ $(cat "$bat/status") = Charging ] && echo "" && exit + +if [ "$per" -gt "90" ]; then + icon="" +elif [ "$per" -gt "80" ]; then + icon="" +elif [ "$per" -gt "70" ]; then + icon="" +elif [ "$per" -gt "60" ]; then + icon="" +elif [ "$per" -gt "50" ]; then + icon="" +elif [ "$per" -gt "40" ]; then + icon="" +elif [ "$per" -gt "30" ]; then + icon="" +elif [ "$per" -gt "20" ]; then + icon="" +elif [ "$per" -gt "10" ]; then + icon="" + notify-send -u critical "Battery Low" "Connect Charger" +elif [ "$per" -gt "0" ]; then + icon="" + notify-send -u critical "Battery Low" "Connect Charger" +else + echo  && exit +fi +echo "$icon" +} + +percent() { +echo $per +} + +[ "$1" = "icon" ] && icon && exit +[ "$1" = "percent" ] && percent && exit +exit diff --git a/user/files/eww/scripts/change-active-workspace b/user/files/eww/scripts/change-active-workspace new file mode 100755 index 0000000..af2ce35 --- /dev/null +++ b/user/files/eww/scripts/change-active-workspace @@ -0,0 +1,21 @@ +#! /bin/bash +function clamp { + min=$1 + max=$2 + val=$3 + python -c "print(max($min, min($val, $max)))" +} + +direction=$1 +current=$2 +if test "$direction" = "down" +then + target=$(clamp 1 10 $(($current+1))) + echo "jumping to $target" + hyprctl dispatch workspace $target +elif test "$direction" = "up" +then + target=$(clamp 1 10 $(($current-1))) + echo "jumping to $target" + hyprctl dispatch workspace $target +fi diff --git a/user/files/eww/scripts/get-active-workspace b/user/files/eww/scripts/get-active-workspace new file mode 100755 index 0000000..5791828 --- /dev/null +++ b/user/files/eww/scripts/get-active-workspace @@ -0,0 +1,3 @@ +#!/bin/bash +hyprctl monitors -j | jq --raw-output .[0].activeWorkspace.id +socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | stdbuf -o0 grep '^workspace>>' | stdbuf -o0 awk -F '>>|,' '{print $2}' diff --git a/user/files/eww/scripts/get-workspaces b/user/files/eww/scripts/get-workspaces new file mode 100755 index 0000000..570ff6e --- /dev/null +++ b/user/files/eww/scripts/get-workspaces @@ -0,0 +1,11 @@ +#!/bin/bash + +spaces (){ + WORKSPACE_WINDOWS=$(hyprctl workspaces -j | jq 'map({key: .id | tostring, value: .windows}) | from_entries') + seq 1 10 | jq --argjson windows "${WORKSPACE_WINDOWS}" --slurp -Mc 'map(tostring) | map({id: ., windows: ($windows[.]//0)})' +} + +spaces +socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | while read -r line; do + spaces +done diff --git a/user/files/eww/scripts/getram b/user/files/eww/scripts/getram new file mode 100755 index 0000000..791a5a5 --- /dev/null +++ b/user/files/eww/scripts/getram @@ -0,0 +1,2 @@ +#!/bin/sh +printf "%.0f\n" $(free -m | grep Mem | awk '{print ($3/$2)*100}') diff --git a/user/files/eww/scripts/getvol b/user/files/eww/scripts/getvol new file mode 100755 index 0000000..5f2e4ea --- /dev/null +++ b/user/files/eww/scripts/getvol @@ -0,0 +1,2 @@ +#!/bin/sh +amixer sget Master | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%' | head -1 diff --git a/user/files/eww/scripts/wifi b/user/files/eww/scripts/wifi new file mode 100755 index 0000000..65c23c9 --- /dev/null +++ b/user/files/eww/scripts/wifi @@ -0,0 +1,13 @@ +#!/bin/sh + +symbol() { +[ $(cat /sys/class/net/w*/operstate) = down ] && echo  && exit +echo  +} + +name() { +nmcli | grep "^wlp" | sed 's/\ connected\ to\ /Connected to /g' | cut -d ':' -f2 +} + +[ "$1" = "icon" ] && symbol && exit +[ "$1" = "name" ] && name && exit diff --git a/user/files/git/config b/user/files/git/config new file mode 100644 index 0000000..9432b98 --- /dev/null +++ b/user/files/git/config @@ -0,0 +1,44 @@ +[user] + email = fbtijfdq@void.black + name = Morten Olsen + signingkey = 0x4269430A8C3D09A8 + +[alias] + graph = log --graph --color --pretty=format:"%C(yellow)%H%C(green)%d%C(reset)%n%x20%cd%n%x20%cn%C(blue)%x20(%ce)%x20%C(cyan)[gpg:%GK%x20%G?]%C(reset)%n%x20%s%n" + ll = log --oneline + st = status -sb + cm = commit -m + append = commit --amend --no-edit + sobmodules = submodule update --init --recursive + df = difftool -t nvimdiff -y + last = log -1 --stat + br = branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate + brr = branch --remote --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate + undo = reset HEAD~1 --mixed + unstage = reset HEAD -- + +[difftool "nvimdiff"] + cmd = "nvim -d \"$LOCAL\" \"$REMOTE\"" +[commit] + gpgsign = true +[url "git@gitlab.com:maersktankers/"] + insteadOf = https://gitlab.com/maersktankers/ +[url "git@github.com:morten-olsen/"] + insteadOf = https://github.com/morten-olsen/ +[url "git@github.com:0north/"] + insteadOf = https://github.com/0north/ +[url "https://"] + insteadOf = git:// + +[core] + pager = delta + hooksPath = /dev/null + +[interactive] + diffFilter = delta --color-only + +[pull] + ff = only +[init] + defaultBranch = main + diff --git a/user/files/gpg/gpg-agent.conf b/user/files/gpg/gpg-agent.conf new file mode 100644 index 0000000..06cf5db --- /dev/null +++ b/user/files/gpg/gpg-agent.conf @@ -0,0 +1,10 @@ +# https://github.com/drduh/config/blob/master/gpg-agent.conf +# https://www.gnupg.org/documentation/manuals/gnupg/Agent-Options.html +enable-ssh-support +default-cache-ttl 60 +max-cache-ttl 120 +#pinentry-program /usr/bin/pinentry-curses +#pinentry-program /usr/bin/pinentry-curses +#pinentry-program /usr/local/bin/pinentry-curses +pinentry-program /run/current-system/sw/bin/pinentry-gnome3 + diff --git a/user/files/gpg/gpg.conf b/user/files/gpg/gpg.conf new file mode 100644 index 0000000..1cf37dd --- /dev/null +++ b/user/files/gpg/gpg.conf @@ -0,0 +1,54 @@ +# https://github.com/drduh/config/blob/master/gpg.conf +# https://www.gnupg.org/documentation/manuals/gnupg/GPG-Configuration-Options.html +# https://www.gnupg.org/documentation/manuals/gnupg/GPG-Esoteric-Options.html +# Use AES256, 192, or 128 as cipher +personal-cipher-preferences AES256 AES192 AES +# Use SHA512, 384, or 256 as digest +personal-digest-preferences SHA512 SHA384 SHA256 +# Use ZLIB, BZIP2, ZIP, or no compression +personal-compress-preferences ZLIB BZIP2 ZIP Uncompressed +# Default preferences for new keys +default-preference-list SHA512 SHA384 SHA256 AES256 AES192 AES ZLIB BZIP2 ZIP Uncompressed +# SHA512 as digest to sign keys +cert-digest-algo SHA512 +# SHA512 as digest for symmetric ops +s2k-digest-algo SHA512 +# AES256 as cipher for symmetric ops +s2k-cipher-algo AES256 +# UTF-8 support for compatibility +charset utf-8 +# Show Unix timestamps +fixed-list-mode +# No comments in signature +no-comments +# No version in signature +no-emit-version +# Long hexidecimal key format +keyid-format 0xlong +# Display UID validity +list-options show-uid-validity +verify-options show-uid-validity +# Display all keys and their fingerprints +with-fingerprint +# Display key origins and updates +#with-key-origin +# Cross-certify subkeys are present and valid +require-cross-certification +# Disable caching of passphrase for symmetrical ops +no-symkey-cache +# Enable smartcard +use-agent +# Disable recipient key ID in messages +throw-keyids +# Default/trusted key ID to use (helpful with throw-keyids) +default-key 0xE38E38DDAF34677F +#trusted-key 0xFF3E7D88647EBCDB +# Keyserver URL +#keyserver hkps://pgp.mit.edu +#keyserver hkps://hkps.pool.sks-keyservers.net +#keyserver hkps://keys.openpgp.org +keyserver hkps://keyserver.ubuntu.com:443 +#keyserver hkps://pgp.ocf.berkeley.edu +# Proxy to use for keyservers +#keyserver-options http-proxy=socks5-hostname://127.0.0.1:9050 + diff --git a/user/files/hyprland/binds.conf b/user/files/hyprland/binds.conf new file mode 100644 index 0000000..bfb3dfe --- /dev/null +++ b/user/files/hyprland/binds.conf @@ -0,0 +1,62 @@ +# See https://wiki.hyprland.org/Configuring/Keywords/ for more +$mainMod = SUPER + +# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more +bind = $mainMod SHIFT, escape, exec, systemctl suspend +bind = $mainMod, return, exec, kitty +bind = $mainMod, d, exec, wofi --show drun +bind = $mainMod, v, exec, pavucontrol +bind=SUPER,Q,killactive, +bind=SUPERCONTROL,Q,exec,hyprctl kill +bind=SUPER,F,fullscreen +bind = $mainMod, M, exit, +bind = $mainMod SHIFT, return, exec, flatpak run org.mozilla.firefox +bind = $mainMod, t, togglefloating, + +# Move focus with mainMod + arrow keys +bind = $mainMod, h, movefocus, l +bind = $mainMod, l, movefocus, r +bind = $mainMod, k, movefocus, u +bind = $mainMod, j, movefocus, d + +# Switch workspaces with mainMod + [0-9] +bind = $mainMod, 1, workspace, 1 +bind = $mainMod, 2, workspace, 2 +bind = $mainMod, 3, workspace, 3 +bind = $mainMod, 4, workspace, 4 +bind = $mainMod, 5, workspace, 5 +bind = $mainMod, 6, workspace, 6 +bind = $mainMod, 7, workspace, 7 +bind = $mainMod, 8, workspace, 8 +bind = $mainMod, 9, workspace, 9 +bind = $mainMod, 0, workspace, 10 + +# Move active window to a workspace with mainMod + SHIFT + [0-9] +bind = $mainMod SHIFT, 1, movetoworkspace, 1 +bind = $mainMod SHIFT, 2, movetoworkspace, 2 +bind = $mainMod SHIFT, 3, movetoworkspace, 3 +bind = $mainMod SHIFT, 4, movetoworkspace, 4 +bind = $mainMod SHIFT, 5, movetoworkspace, 5 +bind = $mainMod SHIFT, 6, movetoworkspace, 6 +bind = $mainMod SHIFT, 7, movetoworkspace, 7 +bind = $mainMod SHIFT, 8, movetoworkspace, 8 +bind = $mainMod SHIFT, 9, movetoworkspace, 9 +bind = $mainMod SHIFT, 0, movetoworkspace, 10 + +# Scroll through existing workspaces with mainMod + scroll +bind = $mainMod, mouse_down, workspace, e+1 +bind = $mainMod, mouse_up, workspace, e-1 + +# Move/resize windows with mainMod + LMB/RMB and dragging +bindm = $mainMod, mouse:272, movewindow +bindm = $mainMod, mouse:273, resizewindow + +# Audio controls +bind=,XF86AudioMute,exec,~/.config/hypr/scripts/volume.sh mute +bind=,XF86AudioLowerVolume,exec,~/.config/hypr/scripts/volume.sh down +bind=,XF86AudioRaiseVolume,exec,~/.config/hypr/scripts/volume.sh up +bind=,XF86AudioMicMute,exec,pactl set-source-mute @DEFAULT_SOURCE@ toggle + +# Display brightness +bindle=,XF86MonBrightnessUp,exec,~/.config/hypr/scripts/brightness.sh up # increase screen brightness +bindle=,XF86MonBrightnessDown,exec,~/.config/hypr/scripts/brightness.sh down # decrease screen brightnes diff --git a/user/files/hyprland/exec.conf b/user/files/hyprland/exec.conf new file mode 100644 index 0000000..4401cde --- /dev/null +++ b/user/files/hyprland/exec.conf @@ -0,0 +1,11 @@ +exec=mako +exec-once=avizo-service +exec-once=redshift -c ~/.config/redshift/config +exec-once=kanshi +exec-once=libinput-gestures +exec-once=hyprpaper +exec-once=~/.config/hypr/scripts/screensharing.sh +exec-once=~/.config/hypr/scripts/idle.sh +exec-once=~/.config/hypr/scripts/eww.sh +exec-once /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 + diff --git a/user/files/hyprland/general.conf b/user/files/hyprland/general.conf new file mode 100644 index 0000000..c8814e4 --- /dev/null +++ b/user/files/hyprland/general.conf @@ -0,0 +1,74 @@ +general { + sensitivity=1.00 + apply_sens_to_raw=1 + cursor_inactive_timeout=5 + layout=dwindle + border_size=0 + col.active_border=0xffc0392b + col.inactive_border=0x00292a37 +} + +decoration { + rounding=4 + #blur=1 + inactive_opacity = 0.8 + drop_shadow=0 + shadow_range=20 + col.shadow=0xffb072d1 + dim_inactive=1 + dim_strength=0.6 +} + +gestures { + workspace_swipe=1 + workspace_swipe_distance=400 + workspace_swipe_invert=1 + workspace_swipe_min_speed_to_force=30 + workspace_swipe_cancel_ratio=0.5 + workspace_swipe_create_new=0 + workspace_swipe_forever=1 +} + +#Decoration section in theme file +blurls=lockscreen + +bezier=slow,0,0.85,0.3,1 +bezier=overshot,0.7,0.6,0.1,1.1 +bezier=bounce,1,1.6,0.1,0.85 +bezier=slingshot,1,-1,0.15,1.25 +bezier=nice,0,6.9,0.5,-4.20 + +animations { + enabled=1 + animation=windows,1,4,overshot,slide + animation=border,1,20,default + animation=fade,1,5,overshot + animation=workspaces,1,3,overshot,slidevert +} + +dwindle { + pseudotile=0 # enable pseudotiling on dwindle +} + +master { + new_is_master=0 + new_on_top=0 +} + +binds { + workspace_back_and_forth=1 + allow_workspace_cycles=1 + pass_mouse_when_bound=0 + } + +misc { + #no_vfr=0 + enable_swallow=1 + swallow_regex=^(foot:kitty:Alacritty)$ + no_direct_scanout=1 +} + +windowrule=float,pavucontrol +windowrule=float,title:^(Firefox — Sharing Indicator)$ +windowrule=move 95% 95%,title:^(Firefox — Sharing Indicator)$ +windowrule=nofullscreenrequest,title:^(Firefox — Sharing Indicator)$ diff --git a/user/files/hyprland/hyprland.conf b/user/files/hyprland/hyprland.conf new file mode 100644 index 0000000..55ebea8 --- /dev/null +++ b/user/files/hyprland/hyprland.conf @@ -0,0 +1,18 @@ +monitor=,preferred,auto,auto +monitor=DP-2,addreserved,0,0,50,0 +monitor=eDP-1,addreserved,0,0,50,0 +monitor=DP-2,preferred,auto,1 +monitor=DP-2,preferred,auto,1 + +#55a75e044c80 + +bindl=,switch:on:Lid Switch,exec,hyprctl keyword monitor "eDP-1, disable" +bindl=,switch:off:Lid Switch,exec,hyprctl keyword monitor "eDP-1, prefered, auto, 1" + +workspace=eDP-1,1 +workspace=DP-2,9 + +source=~/.config/hypr/general.conf +source=~/.config/hypr/input.conf +source=~/.config/hypr/exec.conf +source=~/.config/hypr/binds.conf diff --git a/user/files/hyprland/hyprpaper.conf b/user/files/hyprland/hyprpaper.conf new file mode 100644 index 0000000..0e5028b --- /dev/null +++ b/user/files/hyprland/hyprpaper.conf @@ -0,0 +1,3 @@ +preload = ~/wallpaper.jpg + +wallpaper = ,~/wallpaper.jpg diff --git a/user/files/hyprland/input.conf b/user/files/hyprland/input.conf new file mode 100644 index 0000000..904c75a --- /dev/null +++ b/user/files/hyprland/input.conf @@ -0,0 +1,24 @@ +input { + kb_layout = us + kb_variant = + kb_model = + kb_options = caps:swapescape + kb_rules = + + follow_mouse = 1 + + touchpad { + disable_while_typing=1 + natural_scroll=1 + clickfinger_behavior=1 + middle_button_emulation=0 + tap-to-click=1 + } + + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. +} + +device:at-translated-set-2-keyboard { + kb_layout = dk + kb_variant = nodeadkeys +} diff --git a/user/files/hyprland/scripts/brightness.sh b/user/files/hyprland/scripts/brightness.sh new file mode 100755 index 0000000..2015d9b --- /dev/null +++ b/user/files/hyprland/scripts/brightness.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +# +down() { + brightnessctl s '10%-' +} + +up() { + brightnessctl s +10% +} + +case "$1" in + up) up;; + down) down;; +esac diff --git a/user/files/hyprland/scripts/eww.sh b/user/files/hyprland/scripts/eww.sh new file mode 100755 index 0000000..d631a9b --- /dev/null +++ b/user/files/hyprland/scripts/eww.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +eww daemon +eww open bar diff --git a/user/files/hyprland/scripts/idle.sh b/user/files/hyprland/scripts/idle.sh new file mode 100755 index 0000000..bc57b5c --- /dev/null +++ b/user/files/hyprland/scripts/idle.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +# +swayidle -w \ + before-sleep 'loginctl lock-session $XDG_SESSION_ID' \ + lock '~/.config/hypr/scripts/lock.sh' diff --git a/user/files/hyprland/scripts/lock.sh b/user/files/hyprland/scripts/lock.sh new file mode 100755 index 0000000..0c4cbf0 --- /dev/null +++ b/user/files/hyprland/scripts/lock.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +swaylock \ + --screenshots \ + --clock \ + --indicator-radius 200 \ + --indicator-thickness 8 \ + --datestr "%a %e.%m.%Y" --timestr "%k:%M" \ + --effect-scale 1 \ + --effect-blur 7x7 \ + --ring-color 000000 \ + --key-hl-color 880033 \ + --line-color 00000000 \ + --inside-color 00000066 \ + --separator-color 00000000 \ + --fade-in 0.6 + #--effect-vignette 0.5:0.5 \ diff --git a/user/files/hyprland/scripts/screensharing.sh b/user/files/hyprland/scripts/screensharing.sh new file mode 100755 index 0000000..cd9afac --- /dev/null +++ b/user/files/hyprland/scripts/screensharing.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +sleep 1 +killall xdg-desktop-portal-hyprland +killall xdg-desktop-portal-wlr +killall xdg-desktop-portal +/usr/libexec/xdg-desktop-portal-hyprland & +sleep 2 +/usr/lib/xdg-desktop-portal & diff --git a/user/files/hyprland/scripts/volume.sh b/user/files/hyprland/scripts/volume.sh new file mode 100755 index 0000000..492784c --- /dev/null +++ b/user/files/hyprland/scripts/volume.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash + +down() { +pamixer -u +pamixer -d 5 +volume=$(pamixer --get-volume) +[ $volume -gt 0 ] && volume=`expr $volume` +prec=`echo "scale=2; $volume / 100" | bc` +avizo-client --progress=$prec --time=0.5 --background="#222" --foreground="#f39c12" +} + +up() { +pamixer -u +pamixer -i 5 +volume=$(pamixer --get-volume) +[ $volume -lt 100 ] && volume=`expr $volume` +prec=`echo "scale=2; $volume / 100" | bc` +avizo-client --progress=$prec --time=1 +} + +mute() { +muted="$(pamixer --get-mute)" +if $muted; then + pamixer -u + notify-send "Unmuted" +else + pamixer -m + notify-send "Muted" +fi +} + +case "$1" in + up) up;; + down) down;; + mute) mute;; +esac diff --git a/user/files/kitty/kitty.conf b/user/files/kitty/kitty.conf new file mode 100644 index 0000000..f8b290b --- /dev/null +++ b/user/files/kitty/kitty.conf @@ -0,0 +1,8 @@ +font_family FiraCode Nerd Font Reg +bold_font FiraCode Nerd Font Bold +italic_font auto +bold_italic_font auto +disable_ligatures cursor +enable_audio_bell no +bell_on_tab no +background_opacity 0.8 diff --git a/user/files/shell/rc.d/00-vars.sh b/user/files/shell/rc.d/00-vars.sh new file mode 100644 index 0000000..e69de29 diff --git a/user/files/shell/rc.d/01-scripts.sh b/user/files/shell/rc.d/01-scripts.sh new file mode 100644 index 0000000..416e3ef --- /dev/null +++ b/user/files/shell/rc.d/01-scripts.sh @@ -0,0 +1,2 @@ +export PATH="$PATH:$HOME/.local/bin" + diff --git a/user/files/shell/rc.d/02-alias.sh b/user/files/shell/rc.d/02-alias.sh new file mode 100644 index 0000000..287b9ed --- /dev/null +++ b/user/files/shell/rc.d/02-alias.sh @@ -0,0 +1,34 @@ +alias ..="cd .." + +alias g="git" +alias ls="eza" +alias mutt="neomutt" + +alias gr="cd \`git rev-parse --show-toplevel\`" + +# Enable aliases to be sudo’ed +alias sudo='sudo ' + +# Get week number +alias week='date +%V' + +# macOS has no `md5sum`, so use `md5` as a fallback +command -v md5sum > /dev/null || alias md5sum="md5" + +# macOS has no `sha1sum`, so use `shasum` as a fallback +command -v sha1sum > /dev/null || alias sha1sum="shasum" + +# Print each PATH entry on a separate line +alias path='echo -e ${PATH//:/\\n}' + +# Enable tab completion for `g` by marking it as an alias for `git` +command -v _git > /dev/null && command -v complete > /dev/null && complete -o default -o nospace -F _git g + +command -v xsel > /dev/null || alias copy='xsel -ib' +command -v urxvt > /dev/null || alias n="setsid urxvt &>/dev/null" + +alias sc="sudo systemctl" +alias usermount="sudo mount -o gid=users,fmask=113,dmask=002" +alias fzf="fzf --preview 'bat {} --line-range 0:100 --color always'" +alias stmux="tmux a -t base || tmux new -s base" + diff --git a/user/files/shell/rc.d/02-bat.sh b/user/files/shell/rc.d/02-bat.sh new file mode 100644 index 0000000..49ed73a --- /dev/null +++ b/user/files/shell/rc.d/02-bat.sh @@ -0,0 +1,6 @@ +if hash bat &> /dev/null; then + export MANPAGER="sh -c 'col -bx | bat -l man -p'" + export BAT_THEME="MonokaiExtended" + alias cat="bat" +fi + diff --git a/user/files/shell/rc.d/03-ssh.sh b/user/files/shell/rc.d/03-ssh.sh new file mode 100644 index 0000000..965cfe9 --- /dev/null +++ b/user/files/shell/rc.d/03-ssh.sh @@ -0,0 +1,8 @@ +export TMPDIR=${TMPDIR:-/tmp} + +if ! pgrep -U "$UID" ssh-agent > /dev/null; then + ssh-agent > "$XDG_RUNTIME_DIR/ssh-agent.env" +fi +if [[ ! "$SSH_AUTH_SOCK" ]]; then + eval "$(<"$XDG_RUNTIME_DIR/ssh-agent.env")" +fi diff --git a/user/files/shell/rc.d/05-npm.sh b/user/files/shell/rc.d/05-npm.sh new file mode 100644 index 0000000..468d3cf --- /dev/null +++ b/user/files/shell/rc.d/05-npm.sh @@ -0,0 +1,7 @@ +export GH_TOKEN=${GH_TOKEN:-unset} +export NPM_GH_TOKEN=${GH_TOKEN:-unset} +export NPM_NPM_TOKEN=${NPM_NPM_TOKEN:-unset} +export PUBLISH_NPM_GITLAB_TOKEN=${NPM_NPM_TOKEN:-unset} +export NPM_PRIVATE_TOKEN=${NPM_PRIVATE_TOKEN:-unset} +npm set prefix ~/.npm-global + diff --git a/user/files/shell/rc.d/07-fzf.sh b/user/files/shell/rc.d/07-fzf.sh new file mode 100644 index 0000000..e81930f --- /dev/null +++ b/user/files/shell/rc.d/07-fzf.sh @@ -0,0 +1 @@ +export FZF_DEFAULT_COMMAND='ag -g ""' diff --git a/user/files/shell/rc.d/10-gpg-agent.sh b/user/files/shell/rc.d/10-gpg-agent.sh new file mode 100644 index 0000000..049cf20 --- /dev/null +++ b/user/files/shell/rc.d/10-gpg-agent.sh @@ -0,0 +1,5 @@ +export GPG_TTY="$(tty)" +export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) +gpgconf --launch gpg-agent +gpg-connect-agent updatestartuptty /bye > /dev/null + diff --git a/user/files/shell/rc.d/10-nvim.sh b/user/files/shell/rc.d/10-nvim.sh new file mode 100644 index 0000000..ffaea50 --- /dev/null +++ b/user/files/shell/rc.d/10-nvim.sh @@ -0,0 +1,3 @@ +export EDITOR=nvim +alias vim=nvim + diff --git a/user/files/ssh/authorized_keys b/user/files/ssh/authorized_keys new file mode 100644 index 0000000..cb773d8 --- /dev/null +++ b/user/files/ssh/authorized_keys @@ -0,0 +1,4 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCoklnJCZ77Pr9Vd89Wi5jlmRzRGAbGF63lxsRW46C0jwf3BT0B1rFDPr0Opi0uFG5dMbIN9YbXHnh2rVFjxhBqifkWU0zOTRcRNZUI4p28RR0H7wCPohMCOvalkf8NGbNSkBi47nVMUauJ2CASlgyGeSg6kvAtB8y4i/jF0pBsFaOdu2J088itPqoHjqFIlQ3p8lefGm2Fsj5V5g7xtPuhPmR8tvU+K1iPauptLMLbfeqNVlHoMZq0LoGnMkgx0gwFatt3Pyhe91HFJBX+Kd/yN8nkokkEd/abkbiJ2OkeHfF94NMyco9VlgRTXpkxnAldHp7a4OJGdiVh0d+k0B7EEXMQgq9M2+kBBjOBN4f3nw6ftZyJ3hYsK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k4hh0lIQTOC5AMucH2jRJSyQb2AA3kbPuWOwHDDIlSUnNFsI/xUVs1lfx3ikIZEb9oZcKwWBB2PeL/KT6ca7dsI3PyFL+hC5Wi7ll0Aj5w+dBZOxwW1agSo4ujPKO9oIVwqEA+PqoK/GZtIHAx6t/m3DK8T4HAo2GZMqyzRgcqk1bttaCFzX2h074yW1du8+l4yIqWrooqD474V3MT05HUxkA1+9S5ldEwK4J50WfKlhNuZn5YeiHLngisu8WyIGREYDGlkM+1qxwHiJGohigS20kpmTUkKvyLRXItAcvQYBknCV3qb8B1Kj1bvbN3sCaqQAeVWxDw== diff --git a/user/files/ssh/config b/user/files/ssh/config new file mode 100644 index 0000000..a419e16 --- /dev/null +++ b/user/files/ssh/config @@ -0,0 +1,7 @@ +Include ~/.ssh/config.d/* + +Host * + Controlmaster auto + Controlpath ${TMPDIR}/ssh-%r@%h:%p + + diff --git a/user/files/ssh/config.d b/user/files/ssh/config.d new file mode 120000 index 0000000..9e90cea --- /dev/null +++ b/user/files/ssh/config.d @@ -0,0 +1 @@ +../.dotfiles/git/.ssh/config.d \ No newline at end of file diff --git a/user/files/ssh/known_hosts b/user/files/ssh/known_hosts new file mode 100644 index 0000000..e69de29 diff --git a/user/files/tmux/config b/user/files/tmux/config new file mode 100644 index 0000000..9903ed6 --- /dev/null +++ b/user/files/tmux/config @@ -0,0 +1,112 @@ +set -g mouse on +set -g default-terminal "screen-256color-bce" +set -g status-justify centre + +#set -ga terminal-overrides ',xterm-256color:Tc' + + +set -g base-index 1 +set -g renumber-windows on +set -g lock-command physlock +bind q lock-client + +# use C-a +# unbind C-b +# set-option -g prefix C-a +# bind-key C-a send-prefix + +# split with | and - +#bind | split-window -h +#bind - split-window -v +unbind '"' +unbind % + +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R + +bind -r H resize-pane -L 10 +bind -r J resize-pane -D 10 +bind -r K resize-pane -U 10 +bind -r L resize-pane -R 10 + +# switch panes using Alt-arrow without prefix +bind -n M-Left select-pane -L +bind -n M-Right select-pane -R +bind -n M-Up select-pane -U +bind -n M-Down select-pane -D + +bind o attach -c "#{pane_current_path}" + +# don't rename windows automatically +set-option -g allow-rename off + +set -g @plugin 'tmux-plugins/tpm' + +run -b '~/.tmux/plugins/tpm/tpm' +if "test ! -d ~/.tmux/plugins/tpm" \ + "run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'" + +# set -g @plugin "arcticicestudio/nord-tmux" +# set -g @plugin 'dracula/tmux' +# set -g @dracula-show-powerline true +set -g @plugin 'wfxr/tmux-power' +# open pane in vim +bind-key / capture-pane -S -102400 -J \; new-window 'vim -c ":read !tmux save-buffer - ; tmux delete-buffer;" -c ":normal gg" -c ":set buftype=nofile" -c ":silent! ChompWhitespace"' + +# clear history +# bind k send-keys -R \; clear-history + +# copy mode +setw -g mode-keys vi +bind Escape copy-mode +unbind [ +unbind p +bind p paste-buffer +bind -Tcopy-mode-vi v send -X begin-selection +bind -Tcopy-mode-vi y send -X copy-selection +bind -Tcopy-mode-vi Escape send -X cancel + +# panes +bind - split-window -v -c "#{pane_current_path}" +bind | split-window -h -c "#{pane_current_path}" +bind C-z resize-pane -Z +bind g swap-pane -U +bind æ swap-pane -D + +# panes +#set -g window-active-style 'bg=colour236' +#set -g window-style 'bg=black' + + +# Smart pane switching with awareness of Vim splits. +# See: https://github.com/christoomey/vim-tmux-navigator +is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ + | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" +bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L' +bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D' +bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U' +bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R' + +bind -n 'M-h' if-shell "$is_vim" 'send-keys M-h' 'resize-pane -L 1' +bind -n 'M-j' if-shell "$is_vim" 'send-keys M-j' 'resize-pane -D 1' +bind -n 'M-k' if-shell "$is_vim" 'send-keys M-k' 'resize-pane -U 1' +bind -n 'M-l' if-shell "$is_vim" 'send-keys M-l' 'resize-pane -R 1' + +tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")' +if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \ + "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'" +if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \ + "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'" + + +bind-key -T copy-mode-vi 'C-h' select-pane -L +bind-key -T copy-mode-vi 'C-j' select-pane -D +bind-key -T copy-mode-vi 'C-k' select-pane -U +bind-key -T copy-mode-vi 'C-l' select-pane -R +bind-key -T copy-mode-vi 'C-\' select-pane -l + +# Utils +bind -r g display-popup -d '#{pane_current_path}' -w80% -h80% -E lazygit + diff --git a/user/files/wofi/INSTALL.md b/user/files/wofi/INSTALL.md new file mode 100644 index 0000000..b6ba9f2 --- /dev/null +++ b/user/files/wofi/INSTALL.md @@ -0,0 +1,13 @@ +### [wofi](https://hg.sr.ht/~scoopta/wofi) + +#### Install using Git + +If you are a git user, you can install the theme and keep up to date by cloning the repo: + + $ git clone https://github.com/dracula/wofi.git + +#### Install manually + +Download using the [GitHub .zip download](https://github.com/dracula/wofi/archive/master.zip) option and unzip them. +Place `style.css` in your `~/.config/wofi` directory. + diff --git a/user/files/wofi/LICENSE b/user/files/wofi/LICENSE new file mode 100644 index 0000000..2095990 --- /dev/null +++ b/user/files/wofi/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020 Dracula Theme + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/user/files/wofi/README.md b/user/files/wofi/README.md new file mode 100644 index 0000000..4a46ff7 --- /dev/null +++ b/user/files/wofi/README.md @@ -0,0 +1,27 @@ +# Dracula for [wofi](https://hg.sr.ht/~scoopta/wofi) + +> A dark theme for [wofi](https://hg.sr.ht/~scoopta/wofi). + +![Screenshot](./screenshot.png) + +## Install + +All instructions can be found at [draculatheme.com/wofi](https://draculatheme.com/wofi). + +## Team + +This theme is maintained by the following person(s) and a bunch of [awesome contributors](https://github.com/dracula/wofi/graphs/contributors). + +| [![elumbella](https://avatars3.githubusercontent.com/u/2538681?v=4&s=70)](https://github.com/elumbella) | +| ------------------------------------------------------------------------------------------------------- | +| [elumbella](https://github.com/elumbella) | + +## Community + +- [Twitter](https://twitter.com/draculatheme) - Best for getting updates about themes and new stuff. +- [GitHub](https://github.com/dracula/dracula-theme/discussions) - Best for asking questions and discussing issues. +- [Discord](https://draculatheme.com/discord-invite) - Best for hanging out with the community. + +## License + +[MIT License](./LICENSE) diff --git a/user/files/wofi/screenshot.png b/user/files/wofi/screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..9f0466cefd320ae20ab377922809db35e7e26f3a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BKi2H9;uVfG-O?qG2!F_p+pV;TdJ| zUrTkvO^thd+|9tHOYT}hV*1mPL=NSI9r#ok&61~6LSAhAFTY$%7oe_FB9p)4_J~4{ zzoVLIP5ui9J=bdx6m*&DpNri17sd0kP40ix)C!`6$07H|a`&$V7n3u&;LQKUV{?DZ tZT!Efv-o39Ifl*3jPleU8n%nhE{EB&JuH3Stxo9sH5KhE#Y#8t{4X3#RcZhL literal 0 HcmV?d00001 diff --git a/user/files/wofi/style.css b/user/files/wofi/style.css new file mode 100644 index 0000000..58e27ba --- /dev/null +++ b/user/files/wofi/style.css @@ -0,0 +1,39 @@ +window { +margin: 0px; +border: 1px solid #bd93f9; +background-color: #282a36; +} + +#input { +margin: 5px; +border: none; +color: #f8f8f2; +background-color: #44475a; +} + +#inner-box { +margin: 5px; +border: none; +background-color: #282a36; +} + +#outer-box { +margin: 5px; +border: none; +background-color: #282a36; +} + +#scroll { +margin: 0px; +border: none; +} + +#text { +margin: 5px; +border: none; +color: #f8f8f2; +} + +#entry:selected { +background-color: #44475a; +} diff --git a/user/files/zsh/config b/user/files/zsh/config new file mode 100644 index 0000000..ba23b06 --- /dev/null +++ b/user/files/zsh/config @@ -0,0 +1,108 @@ +# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. +# Initialization code that may require console input (password prompts, [y/n] +# confirmations, etc.) must go above this block; everything else may go below. +# if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then +# source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" +# fi +# POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true +# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. +# [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh + +export XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-$HOME/.cache} +export ZSH="$HOME/.oh-my-zsh" +export ZSH_CUSTOM="$HOME/.config/zsh/custom" + +#ZSH_THEME="powerlevel10k/powerlevel10k" +#ZSH_THEME="spaceship" +ZSH_THEME="robbyrussell" + +plugins=( + git + zsh-autosuggestions + copypath + copyfile + copybuffer + dirhistory + history + z + bgnotify + zsh-syntax-highlighting +) +source $ZSH/oh-my-zsh.sh +export LANG=en_US.UTF-8 + +plugins+=(zsh-vi-mode) +source $ZSH_CUSTOM/zsh-vi-mode/zsh-vi-mode.plugin.zsh + +zvm_after_init() { + FZF_SHARE=/usr/share/fzf + [ -f $FZF_SHARE/completion.zsh ] && . "$FZF_SHARE/completion.zsh" + [ -f $FZF_SHARE/key-bindings.zsh ] && . "$FZF_SHARE/key-bindings.zsh" +} + +# Load all files from .shell/rc.d directory +if [ -d $HOME/.shellrc/rc.d ]; then + for file in $HOME/.shellrc/rc.d/*.sh; do + source $file + done +fi + +# Load all files from .shell/zshrc.d directory +if [ -d $HOME/.shellrc/zshrc.d ]; then + for file in $HOME/.shellrc/zshrc.d/*.zsh; do + source $file + done +fi +export GPG_TTY=$(tty) +if [[ -n "$SSH_CONNECTION" ]] ;then + export PINENTRY_USER_DATA="USE_CURSES=1" +fi + + +[ -f ~/.env ] && source ~/.env + +alias luamake=~/.config/lua-language-server/3rd/luamake/luamake + +if [ `tput cols` -gt "70" ]; then +function PRINT_CENTER { + COLS=`tput cols` + OFFSET=$(( ($COLS - $1) / 2 )) + PRE="" + for i in `seq $OFFSET`; do + PRE="$PRE " + done + while IFS= read -r line; do + echo "$PRE$line" + done <<< "$2" +} +PRINT_CENTER 60 " + + ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ + █░▄▄▀█▀▄▄▀█░▄▄░█▄░▄█▀▄▀██░▄░██░██░█░▄▄█░▄▄░█ + █░▀▀▄█░██░█░▀▄░██░██░█▀█░▀▀░▀█░██░█▄▄▀███▄██ + █▄█▄▄██▄▄██░▀▀░██▄███▄█████░███▄▄▄█▄▄▄█░▀▀░█ + ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ + + ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ + ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ + ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ + ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ + ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ + ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ + ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ + ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ + ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ + ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ + ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ +▄▄▄ . ▌ ▐·▪ ▄▄▌ ▄▄▌ ▐ ▄▌▪ ▄▄▄▄▄ ▄ .▄ ▄• ▄▌▄▄▄▄▄ +▀▄.▀·▪█·█▌██ ██• ██· █▌▐███ •██ ██▪▐█ ▄█▀▄ █▪██▌•██ +▐▀▀▪▄▐█▐█•▐█·██ ▪ ██▪▐█▐▐▌▐█· ▐█.▪██▀▀█▐█▌.▐▌█▌▐█▌ ▐█.▪ +▐█▄▄▌ ███ ▐█▌▐█▌ ▄ ▐█▌██▐█▌▐█▌ ▐█▌·██▌▐▀▐█▌.▐▌▐█▄█▌ ▐█▌· + ▀▀▀ . ▀ ▀▀▀.▀▀▀ ▀▀▀▀ ▀▪▀▀▀ ▀▀▀ ▀▀▀ · ▀█▄▀▪ ▀▀▀ ▀▀▀ + + > welcome x_x +" +fi + +which wrk > /dev/null && eval `wrk tools bash` + diff --git a/user/home.nix b/user/home.nix new file mode 100644 index 0000000..2f14ebd --- /dev/null +++ b/user/home.nix @@ -0,0 +1,142 @@ +{ config, pkgs, ... }: + +let + astronvim = builtins.fetchGit { + url = "https://github.com/AstroNvim/AstroNvim"; + rev = "dad0bec1fef2833561d04ea446a544fbfde92539"; + }; + astronvimUser = builtins.fetchGit { + url = "https://foo:foo@github.com/morten-olsen/astrovim"; + rev = "44b38567fe3adedd972b5b07f5883d47600a9078"; + }; +in { + home.username = "alice"; + home.homeDirectory = "/home/alice"; + + home.stateVersion = "23.11"; + home.packages = [ + pkgs.kitty + pkgs.eza + pkgs.bat + pkgs.fzf + pkgs.fd + pkgs.curl + pkgs.jq + pkgs.spotify + pkgs.slack + pkgs.rustup + pkgs.silver-searcher + pkgs.ncspot + pkgs.ripgrep + pkgs.thefuck + pkgs.unzip + pkgs.nodejs + pkgs.gnumake + pkgs.gcc + pkgs.terraform + pkgs.signal-desktop + pkgs.nodePackages.pnpm + pkgs.nodePackages.yarn + pkgs.steam-run + pkgs.python3 + pkgs.gimp + pkgs.blender + pkgs.gh + pkgs.discord + pkgs.binutils + pkgs.pkg-config + ]; + + programs.firefox.enable = true; + programs.zsh.enable = true; + programs.neovim.enable = true; + programs.tmux = { + enable = true; + extraConfig = builtins.readFile ./files/tmux/config; + }; + programs.git.enable = true; + + home.file = { + ".gitconfig".source = ./files/git/config; + ".tmux.conf".source = ./files/tmux/config; + ".zshrc".source = ./files/zsh/config; + ".bashrc".source = ./files/bash/config; + + ".shellrc/rc.d" = { + source = ./files/shell/rc.d; + }; + + ".gnupg" = { + source = ./files/gpg; + recursive = true; + }; + + ".oh-my-zsh" = { + source = builtins.fetchGit { + url = "https://github.com/ohmyzsh/ohmyzsh"; + rev = "b07c8cfe692bc6c7702f0aef5d493b12dfb43392"; + }; + }; + ".config/zsh/custom/plugins/zsh-autosuggestions" = { + source = builtins.fetchGit { + url = "https://github.com/zsh-users/zsh-autosuggestions"; + rev = "c3d4e576c9c86eac62884bd47c01f6faed043fc5"; + }; + }; + ".config/zsh/custom/plugins/zsh-syntax-highlighting" = { + source = builtins.fetchGit { + url = "https://github.com/zsh-users/zsh-syntax-highlighting"; + rev = "143b25eb98aa3227af63bd7f04413e1b3e7888ec"; + }; + }; + + ".config/zsh/custom/zsh-vi-mode" = { + source = builtins.fetchGit { + url = "https://github.com/jeffreytse/zsh-vi-mode"; + rev = "1f28e1886dc8e49f41b817634d5c7695b6abb145"; + }; + }; + + ".config/ssh" = { + source = ./files/ssh; + recursive = true; + }; + + ".config/hypr" = { + source = ./files/hyprland; + recursive = true; + }; + ".config/kitty" = { + source = ./files/kitty; + recursive = true; + }; + ".config/eww" = { + source = ./files/eww; + recursive = true; + }; + ".config/wofi" = { + source = ./files/wofi; + recursive = true; + }; + ".config/nvim" = { + source = astronvim; + recursive = true; + }; + ".config/nvim/lua/user" = { + source = astronvimUser; + }; + }; + + home.sessionVariables = { + # EDITOR = "emacs"; + }; + + programs.home-manager.enable = true; + + nixpkgs = { + overlays = [ + (import ./overlays/steam.nix) + ]; + + }; +} diff --git a/user/overlays/steam.nix b/user/overlays/steam.nix new file mode 100644 index 0000000..fc27493 --- /dev/null +++ b/user/overlays/steam.nix @@ -0,0 +1,19 @@ +self: super: +{ + steam = super.steam.override { + extraPkgs = p: [ + self.gtk3 + self.atk + self.at-spi2-atk + self.zlib + self.glib + self.fontconfig + self.freetype + self.dbus + self.cairo + self.gdk-pixbuf + self.pango + self.xorg.libxcb + ]; + }; +}