From 51c4e874dc517153a644f446bad5503547f809b8 Mon Sep 17 00:00:00 2001 From: Tyler Kelley Date: Wed, 13 Dec 2023 22:42:21 -0600 Subject: [PATCH] Moving Away From Flakes For Simplicity --- {fonts => configfiles}/UniSans-Heavy.otf | Bin configfiles/tofi/config | 35 +++++ flake.lock | 176 ----------------------- flake.nix | 42 ------ nixos/configuration.nix | 17 +-- nixos/hardware-configuration.nix | 40 ------ nixos/home.nix | 150 +------------------ setup.sh | 18 +++ 8 files changed, 67 insertions(+), 411 deletions(-) rename {fonts => configfiles}/UniSans-Heavy.otf (100%) create mode 100644 configfiles/tofi/config delete mode 100644 flake.lock delete mode 100644 flake.nix delete mode 100644 nixos/hardware-configuration.nix create mode 100755 setup.sh diff --git a/fonts/UniSans-Heavy.otf b/configfiles/UniSans-Heavy.otf similarity index 100% rename from fonts/UniSans-Heavy.otf rename to configfiles/UniSans-Heavy.otf diff --git a/configfiles/tofi/config b/configfiles/tofi/config new file mode 100644 index 0000000..78060e3 --- /dev/null +++ b/configfiles/tofi/config @@ -0,0 +1,35 @@ +# ███████╗ █████╗ ███╗ ██╗███████╗██╗ ██╗███████╗ +# ╚══███╔╝██╔══██╗████╗ ██║██╔════╝╚██╗ ██╔╝██╔════╝ +# ███╔╝ ███████║██╔██╗ ██║█████╗ ╚████╔╝ ███████╗ +# ███╔╝ ██╔══██║██║╚██╗██║██╔══╝ ╚██╔╝ ╚════██║ +# ███████╗██║ ██║██║ ╚████║███████╗ ██║ ███████║ +# ╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝╚══════╝ ╚═╝ ╚══════╝ +# Dotfiles circa 2023 + +# Font +font = Ubuntu Nerd Font +font-size = 18 + +# Window Style +anchor = top +width = 100% +height = 100% +outline-width = 0 +border-width = 0 +min-input-width = 130 +result-spacing = 30 +padding-top = 35% +padding-bottom = 0 +padding-left = 35% +padding-right = 0 +num-results = 5 +prompt-text = "What Ya Need? " + +background-color = #000A +text-color = #c0caf5 +input-color = #7aa2f7 +selection-color = #7dcfff +selection-match-color = #9ece6a + +clip-to-padding = false +require-match = false diff --git a/flake.lock b/flake.lock deleted file mode 100644 index a7f66b0..0000000 --- a/flake.lock +++ /dev/null @@ -1,176 +0,0 @@ -{ - "nodes": { - "home-manager": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1702195709, - "narHash": "sha256-+zRjWkm5rKqQ57PuLZ3JF3xi3vPMiOJzItb1m/43Cq4=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "6761b8188b860f374b457eddfdb05c82eef9752f", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "release-23.11", - "repo": "home-manager", - "type": "github" - } - }, - "hyprland": { - "inputs": { - "hyprland-protocols": "hyprland-protocols", - "nixpkgs": "nixpkgs", - "systems": "systems", - "wlroots": "wlroots", - "xdph": "xdph" - }, - "locked": { - "lastModified": 1702488319, - "narHash": "sha256-goxBCjjWitvx2Oq4AihpA2OhYEirolMLC48fdA7Iey8=", - "owner": "hyprwm", - "repo": "Hyprland", - "rev": "01e5c59d752d3fe7fa484330fa48e010054b8fa1", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "Hyprland", - "type": "github" - } - }, - "hyprland-protocols": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1691753796, - "narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=", - "owner": "hyprwm", - "repo": "hyprland-protocols", - "rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-protocols", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1702312524, - "narHash": "sha256-gkZJRDBUCpTPBvQk25G0B7vfbpEYM5s5OZqghkjZsnE=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "a9bf124c46ef298113270b1f84a164865987a91c", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1702346276, - "narHash": "sha256-eAQgwIWApFQ40ipeOjVSoK4TEHVd6nbSd9fApiHIw5A=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "cf28ee258fd5f9a52de6b9865cdb93a1f96d09b7", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-23.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "home-manager": "home-manager", - "hyprland": "hyprland", - "nixpkgs": "nixpkgs_2" - } - }, - "systems": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "wlroots": { - "flake": false, - "locked": { - "host": "gitlab.freedesktop.org", - "lastModified": 1701368958, - "narHash": "sha256-7kvyoA91etzVEl9mkA/EJfB6z/PltxX7Xc4gcr7/xlo=", - "owner": "wlroots", - "repo": "wlroots", - "rev": "5d639394f3e83b01596dcd166a44a9a1a2583350", - "type": "gitlab" - }, - "original": { - "host": "gitlab.freedesktop.org", - "owner": "wlroots", - "repo": "wlroots", - "rev": "5d639394f3e83b01596dcd166a44a9a1a2583350", - "type": "gitlab" - } - }, - "xdph": { - "inputs": { - "hyprland-protocols": [ - "hyprland", - "hyprland-protocols" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1702334919, - "narHash": "sha256-ibOZ3TLjqndGMcj2f+07NFwDWoum4IbzF58byZuJJNg=", - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "rev": "f5c3576c3b6cb1c31a8dfa3e4113f59bfe40cd71", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/flake.nix b/flake.nix deleted file mode 100644 index 41a9df5..0000000 --- a/flake.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ - description = "ZaneyOS Workstation Edition"; - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; - home-manager = { - url = "github:nix-community/home-manager/release-23.11"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - hyprland.url = "github:hyprwm/Hyprland"; - }; - outputs = { self, nixpkgs, home-manager, hyprland, ... } @ inputs: - let - system = "x86_64-linux"; - in - { - nixosConfigurations = { - hyprnix = nixpkgs.lib.nixosSystem { - inherit system; - specialArgs = { inherit inputs; }; - modules = [ - ./nixos/configuration.nix - home-manager.nixosModules.home-manager - { - home-manager = { - useUserPackages = true; - useGlobalPkgs = true; - users.zaney = ./nixos/home.nix; - }; - } - ]; - }; - }; - homeConfigurations."zaney@hyprnix" = home-manager.lib.homeManagerConfiguration { - pkgs = nixpkgs.legacyPackages.x86_64-linux; - - modules = [ - hyprland.homeManagerModules.default - {wayland.windowManager.hyprland.enable = true;} - ]; - }; - }; -} diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 68c48df..d7c717c 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -2,12 +2,14 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ inputs, config, pkgs, ... }: +{ config, pkgs, ... }: { imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + # Include Home Manager + ]; # Bootloader @@ -45,7 +47,6 @@ }; programs.hyprland.enable = true; - programs.hyprland.package = inputs.hyprland.packages.${pkgs.system}.hyprland; # List packages installed in system profile. To search, run: # $ nix search wget @@ -67,7 +68,7 @@ lm_sensors unzip unrar - xarchiver + gnome.file-roller libnotify swaynotificationcenter tofi @@ -86,8 +87,6 @@ cmatrix lolcat transmission-gtk - rustup - rust-analyzer # Photo & Video mpv gimp @@ -105,6 +104,9 @@ ninja go nodejs_21 + godot_4 + rustup + rust-analyzer # Audio pavucontrol audacity @@ -140,7 +142,6 @@ # Nix Package Management nix = { settings.auto-optimise-store = true; - settings.experimental-features = [ "nix-command" "flakes" ]; gc = { automatic = true; dates = "weekly"; diff --git a/nixos/hardware-configuration.nix b/nixos/hardware-configuration.nix deleted file mode 100644 index ebd7595..0000000 --- a/nixos/hardware-configuration.nix +++ /dev/null @@ -1,40 +0,0 @@ -# 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" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" "v4l2loopback" ]; - boot.extraModulePackages = [ pkgs.linuxPackages.v4l2loopback ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/e6dd518c-8197-46c6-97b5-fe65f024d44b"; - fsType = "ext4"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/EEB4-BC3C"; - fsType = "vfat"; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/90b946f5-09e7-493b-bd1c-288474570711"; } - ]; - - # 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.enp7s0.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp6s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/nixos/home.nix b/nixos/home.nix index 6ab306a..93c89ae 100644 --- a/nixos/home.nix +++ b/nixos/home.nix @@ -13,6 +13,10 @@ source = ../configfiles/.Xresources; recursive = true; }; + home.file.".config/tofi/config" = { + source = ../configfiles/tofi/config; + recursive = true; + }; home.file.".config/wallpaper.png" = { source = ../configfiles/wallpaper.png; recursive = true; @@ -34,7 +38,7 @@ recursive = true; }; home.file.".local/share/fonts/UniSans-Heavy.otf" = { - source = ../fonts/UniSans-Heavy.otf; + source = ../configfiles/UniSans-Heavy.otf; recursive = true; }; home.pointerCursor = { @@ -84,150 +88,6 @@ createDirectories = true; }; }; - wayland.windowManager.hyprland = { - enable = true; - extraConfig = '' - $mainMod = SUPER - bind = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ - bind = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- - bind = , XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle - bind = , XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle - bind = , XF86MonBrightnessDown, exec, brightnessctl set 5%- - bind = , XF86MonBrightnessUp, exec, brightnessctl set +5% - bind = $mainMod, Return, exec, kitty - bind = $mainMod SHIFT, Return, exec, tofi-drun | xargs hyprctl dispatch exec -- - bind = $mainMod SHIFT, W, exec, web-search - bind = $mainMod, W, exec, firefox - bind = $mainMod, E, exec, emopicker9000 - bind = $mainMod, S, exec, grim -g "$(slurp)" - bind = $mainMod, D, exec, discord - bind = $mainMod, O, exec, obs - bind = $mainMod, G, exec, gimp - bind = $mainMod, T, exec, thunar - bind = $mainMod, M, exec, ario - bind = $mainMod, Q, killactive, - bind = $mainMod, P, pseudo, # dwindle - bind = $mainMod SHIFT, I, togglesplit, # dwindle - bind = $mainMod, F, fullscreen, - bind = $mainMod SHIFT, F, togglefloating, - bind = $mainMod SHIFT, C, exit, - bind = $mainMod SHIFT, left, movewindow, l - bind = $mainMod SHIFT, right, movewindow, r - bind = $mainMod SHIFT, up, movewindow, u - bind = $mainMod SHIFT, down, movewindow, d - bind = $mainMod SHIFT, h, movewindow, l - bind = $mainMod SHIFT, l, movewindow, r - bind = $mainMod SHIFT, k, movewindow, u - bind = $mainMod SHIFT, j, movewindow, d - bind = $mainMod, left, movefocus, l - bind = $mainMod, right, movefocus, r - bind = $mainMod, up, movefocus, u - bind = $mainMod, down, movefocus, d - bind = $mainMod, h, movefocus, l - bind = $mainMod, l, movefocus, r - bind = $mainMod, k, movefocus, u - bind = $mainMod, j, movefocus, d - 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 - 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 - bind = $mainMod, mouse_down, workspace, e+1 - bind = $mainMod, mouse_up, workspace, e-1 - bindm = $mainMod, mouse:272, movewindow - bindm = $mainMod, mouse:273, resizewindow - - monitor=,highres,auto,auto # Automatic Configuration - - input { - kb_layout = us - kb_options=caps:super - follow_mouse = 1 - - touchpad { - natural_scroll = false - } - - sensitivity = 0 # -1.0 - 1.0, 0 means no modification. - } - - gestures { - workspace_swipe = true - workspace_swipe_fingers = 3 - } - - animations { - enabled = yes - - # Define Settings For Animation Bezier Curve - bezier = wind, 0.05, 0.9, 0.1, 1.05 - bezier = winIn, 0.1, 1.1, 0.1, 1.1 - bezier = winOut, 0.3, -0.3, 0, 1 - bezier = liner, 1, 1, 1, 1 - - animation = windows, 1, 6, wind, slide - animation = windowsIn, 1, 6, winIn, slide - animation = windowsOut, 1, 5, winOut, slide - animation = windowsMove, 1, 5, wind, slide - animation = border, 1, 1, liner - animation = borderangle, 1, 30, liner, loop - animation = fade, 1, 10, default - animation = workspaces, 1, 5, wind - } - - general { - gaps_in = 4 - gaps_out = 8 - border_size = 3 - col.active_border = rgba(bb9af7ff) rgba(b4f9f8ff) 45deg - col.inactive_border = rgba(565f89cc) rgba(9aa5cecc) 45deg - layout = dwindle - resize_on_border = true - } - - decoration { - rounding = 10 - drop_shadow = false - - blur { - enabled = true - size = 6 - passes = 3 - new_optimizations = on - ignore_opacity = on - xray = true - } - } - - exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 # You Must Have A Polkit - exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # For XDPH - exec-once = dbus-update-activation-environment --systemd --all # For XDPH - exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # For XDPH - exec-once = swww init # Wallpaper Daemon - exec-once = swaync # Notification Center - exec-once = waybar # Status Bar - exec-once = wl-clipboard-history -t # Clipboard - exec-once = thunar --daemon # File Managers Daemon - exec-once = $HOME/.config/hypr/hyprdesktop # Ensure Proper Portals Are Loaded - exec-once = hyprctl setcursor Bibata-Modern-Ice 24 # Set Proper Curser & Size - exec-once = swww img ~/.config/wallpaper.png - ''; - }; programs = { kitty = { enable = true; diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..d6e5053 --- /dev/null +++ b/setup.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +# Add & Update Home Manager Channel +sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz home-manager +sudo nix-channel --update + +sudo rm /etc/nixos/configuration.nix +sudo rm /etc/nixos/home.nix +sudo rm -rf /etc/configfiles +sudo rm -rf /etc/scripts + +sudo cp nixos/configuration.nix /etc/nixos/ +sudo cp nixos/home.nix /etc/nixos/ + +sudo cp -r configfiles/ /etc/ +sudo cp -r scripts/ /etc/ + +sudo nixos-rebuild switch