diff --git a/flake.lock b/flake.lock index ce93b121..3d273f1f 100644 --- a/flake.lock +++ b/flake.lock @@ -1,40 +1,19 @@ { "nodes": { - "devshell": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": [ - "nixvim", - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1717408969, - "narHash": "sha256-Q0OEFqe35fZbbRPPRdrjTUUChKVhhWXz3T9ZSKmaoVY=", - "owner": "numtide", - "repo": "devshell", - "rev": "1ebbe68d57457c8cae98145410b164b5477761f4", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "devshell", - "type": "github" - } - }, "flake-compat": { + "flake": false, "locked": { "lastModified": 1696426674, "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "revCount": 57, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" + "type": "github" }, "original": { - "type": "tarball", - "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" } }, "flake-compat_2": { @@ -69,25 +48,12 @@ "type": "github" } }, - "flake-compat_4": { - "flake": false, - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-parts": { "inputs": { - "nixpkgs-lib": "nixpkgs-lib" + "nixpkgs-lib": [ + "neovim-nightly-overlay", + "nixpkgs" + ] }, "locked": { "lastModified": 1717285511, @@ -106,41 +72,22 @@ "flake-parts_2": { "inputs": { "nixpkgs-lib": [ - "nixvim", - "nixvim", + "neovim-nightly-overlay", + "hercules-ci-effects", "nixpkgs" ] }, "locked": { - "lastModified": 1717285511, - "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", + "lastModified": 1712014858, + "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", + "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", "type": "github" }, "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" + "id": "flake-parts", + "type": "indirect" } }, "git-hooks": { @@ -148,13 +95,11 @@ "flake-compat": "flake-compat_2", "gitignore": "gitignore", "nixpkgs": [ - "nixvim", - "nixvim", + "neovim-nightly-overlay", "nixpkgs" ], "nixpkgs-stable": [ - "nixvim", - "nixvim", + "neovim-nightly-overlay", "nixpkgs" ] }, @@ -175,8 +120,7 @@ "gitignore": { "inputs": { "nixpkgs": [ - "nixvim", - "nixvim", + "neovim-nightly-overlay", "git-hooks", "nixpkgs" ] @@ -195,25 +139,25 @@ "type": "github" } }, - "gitignore_2": { + "hercules-ci-effects": { "inputs": { + "flake-parts": "flake-parts_2", "nixpkgs": [ - "nixvim", - "pre-commit-hooks", + "neovim-nightly-overlay", "nixpkgs" ] }, "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "lastModified": 1718018037, + "narHash": "sha256-03rLBd/lKecgaKz0j5ESUf9lDn5R0SJatZTKLL5unWE=", "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "repo": "hercules-ci-effects", + "rev": "0ab08b23ce3c3f75fe9a5598756b6fb8bcf0b414", "type": "github" }, "original": { "owner": "hercules-ci", - "repo": "gitignore.nix", + "repo": "hercules-ci-effects", "type": "github" } }, @@ -237,57 +181,54 @@ "type": "github" } }, - "home-manager_2": { + "neovim-nightly-overlay": { "inputs": { + "flake-compat": "flake-compat", + "flake-parts": "flake-parts", + "git-hooks": "git-hooks", + "hercules-ci-effects": "hercules-ci-effects", + "neovim-src": "neovim-src", "nixpkgs": [ - "nixvim", - "nixvim", "nixpkgs" ] }, "locked": { - "lastModified": 1718788307, - "narHash": "sha256-SqiOz0sljM0GjyQEVinPXQxaGcbOXw5OgpCWGPgh/vo=", + "lastModified": 1718935491, + "narHash": "sha256-Dk+ZTVu3CuVv4UPbif3GmR7eT3zAE/mQ+3UUvFHknKE=", "owner": "nix-community", - "repo": "home-manager", - "rev": "d7830d05421d0ced83a0f007900898bdcaf2a2ca", + "repo": "neovim-nightly-overlay", + "rev": "cc2d148e283e05cce751c5cc50ce38bbc0589f61", "type": "github" }, "original": { "owner": "nix-community", - "repo": "home-manager", + "repo": "neovim-nightly-overlay", "type": "github" } }, - "nix-darwin": { - "inputs": { - "nixpkgs": [ - "nixvim", - "nixvim", - "nixpkgs" - ] - }, + "neovim-src": { + "flake": false, "locked": { - "lastModified": 1718662658, - "narHash": "sha256-AKG7BsqtVWDlefgzyKz7vjaKTLi4+bmTSBhowbQoZtM=", - "owner": "lnl7", - "repo": "nix-darwin", - "rev": "29b3096a6e283d7e6779187244cb2a3942239fdf", + "lastModified": 1718890629, + "narHash": "sha256-TLJ8xTHKgnbsMnlmfQ7eF5+aafjo5PlFQFF3mkrIsBs=", + "owner": "neovim", + "repo": "neovim", + "rev": "0e3e1e6b6d8370f1fcc9887d5cb931b131450a1c", "type": "github" }, "original": { - "owner": "lnl7", - "repo": "nix-darwin", + "owner": "neovim", + "repo": "neovim", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1718895438, - "narHash": "sha256-k3JqJrkdoYwE3fHE6xGDY676AYmyh4U2Zw+0Bwe5DLU=", + "lastModified": 1719075281, + "narHash": "sha256-CyyxvOwFf12I91PBWz43iGT1kjsf5oi6ax7CrvaMyAo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d603719ec6e294f034936c0d0dc06f689d91b6c3", + "rev": "a71e967ef3694799d0c418c98332f7ff4cc5f6af", "type": "github" }, "original": { @@ -297,18 +238,6 @@ "type": "github" } }, - "nixpkgs-lib": { - "locked": { - "lastModified": 1717284937, - "narHash": "sha256-lIbdfCsf8LMFloheeE6N31+BMIeixqyQWbSr2vk79EQ=", - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" - } - }, "nixpkgs-stable": { "locked": { "lastModified": 1718835956, @@ -325,110 +254,19 @@ "type": "github" } }, - "nixpkgs-stable_2": { - "locked": { - "lastModified": 1718447546, - "narHash": "sha256-JHuXsrC9pr4kA4n7LuuPfWFJUVlDBVJ1TXDVpHEuUgM=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "842253bf992c3a7157b67600c2857193f126563a", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-23.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixvim": { - "inputs": { - "flake-parts": "flake-parts", - "nixpkgs": [ - "nixpkgs" - ], - "nixvim": "nixvim_2", - "pre-commit-hooks": "pre-commit-hooks" - }, - "locked": { - "lastModified": 1719085595, - "narHash": "sha256-Dvk+5eKgRwrTkx8FF6RceQP3+oEtQ+HYHNuM1MLtYcE=", - "owner": "cnsta", - "repo": "cnixvim", - "rev": "4a3f231c6e979b77ccdae4c6766e231b821a50b1", - "type": "github" - }, - "original": { - "owner": "cnsta", - "repo": "cnixvim", - "type": "github" - } - }, - "nixvim_2": { - "inputs": { - "devshell": "devshell", - "flake-compat": "flake-compat", - "flake-parts": "flake-parts_2", - "git-hooks": "git-hooks", - "home-manager": "home-manager_2", - "nix-darwin": "nix-darwin", - "nixpkgs": [ - "nixvim", - "nixpkgs" - ], - "treefmt-nix": "treefmt-nix" - }, - "locked": { - "lastModified": 1719042662, - "narHash": "sha256-xwj8hxu02myIPkNsch/v2NbxuRmuvlcphrbYPECE49c=", - "owner": "nix-community", - "repo": "nixvim", - "rev": "49452662b7b4dd2467cbac19e0f9820d570d8976", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixvim", - "type": "github" - } - }, - "pre-commit-hooks": { - "inputs": { - "flake-compat": "flake-compat_3", - "gitignore": "gitignore_2", - "nixpkgs": [ - "nixvim", - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable_2" - }, - "locked": { - "lastModified": 1718879355, - "narHash": "sha256-RTyqP4fBX2MdhNuMP+fnR3lIwbdtXhyj7w7fwtvgspc=", - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "rev": "8cd35b9496d21a6c55164d8547d9d5280162b07a", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "type": "github" - } - }, "root": { "inputs": { "home-manager": "home-manager", + "neovim-nightly-overlay": "neovim-nightly-overlay", "nixpkgs": "nixpkgs", "nixpkgs-stable": "nixpkgs-stable", - "nixvim": "nixvim", "solaar": "solaar", - "systems": "systems_2" + "systems": "systems" } }, "solaar": { "inputs": { - "flake-compat": "flake-compat_4", + "flake-compat": "flake-compat_3", "nixpkgs": [ "nixpkgs" ] @@ -447,21 +285,6 @@ } }, "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_2": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -473,28 +296,6 @@ "id": "systems", "type": "indirect" } - }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "nixvim", - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1718522839, - "narHash": "sha256-ULzoKzEaBOiLRtjeY3YoGFJMwWSKRYOic6VNw2UyTls=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "68eb1dc333ce82d0ab0c0357363ea17c31ea1f81", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index e0d89e6d..baf7b00c 100644 --- a/flake.nix +++ b/flake.nix @@ -21,36 +21,41 @@ inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = { - self, - nixpkgs, - home-manager, - systems, - solaar, - ... - } @ inputs: let - inherit (self) outputs; - lib = nixpkgs.lib // home-manager.lib; - forEachSystem = f: lib.genAttrs (import systems) (system: f pkgsFor.${system}); - pkgsFor = lib.genAttrs (import systems) ( - system: + outputs = + { + self, + nixpkgs, + home-manager, + systems, + solaar, + ... + }@inputs: + let + inherit (self) outputs; + lib = nixpkgs.lib // home-manager.lib; + forEachSystem = f: lib.genAttrs (import systems) (system: f pkgsFor.${system}); + pkgsFor = lib.genAttrs (import systems) ( + system: import nixpkgs { inherit system; config.allowUnfree = true; } - ); - in { - # NixOS configuration entrypoint - # Available through 'nixos-rebuild --flake .#your-hostname' - nixosConfigurations = { - cnix = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs outputs;}; - # > Our main nixos configuration file < - modules = [ - solaar.nixosModules.default - ./nixos/configuration.nix - ]; + ); + in + { + # NixOS configuration entrypoint + # Available through 'nixos-rebuild --flake .#your-hostname' + nixosConfigurations = { + cnix = nixpkgs.lib.nixosSystem { + specialArgs = { + inherit inputs outputs; + }; + # > Our main nixos configuration file < + modules = [ + solaar.nixosModules.default + ./nixos/configuration.nix + ]; + }; }; }; - }; } diff --git a/home-manager/git/default.nix b/home-manager/git/default.nix new file mode 100644 index 00000000..e65de30c --- /dev/null +++ b/home-manager/git/default.nix @@ -0,0 +1,7 @@ +{ + programs.git = { + enable = true; + userName = "cnst"; + userEmail = "cnst@cana.st"; + }; +} diff --git a/home-manager/gtk/default.nix b/home-manager/gtk/default.nix new file mode 100644 index 00000000..bc31e625 --- /dev/null +++ b/home-manager/gtk/default.nix @@ -0,0 +1,18 @@ +{ pkgs, ... }: +{ + gtk = { + enable = true; + theme = { + package = pkgs.orchis-theme; + name = "Orchis-Grey-Dark-Compact"; + }; + iconTheme = { + package = pkgs.gruvbox-plus-icons; + name = "Gruvbox-Plus-Dark"; + }; + font = { + name = "FiraCode Nerd Font Light"; + size = 11; + }; + }; +} diff --git a/home-manager/home.nix b/home-manager/home.nix index ee91a120..5e6703fb 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -6,10 +6,14 @@ config, pkgs, ... -}: { +}: +{ # You can import other home-manager modules here imports = [ ./neovim + ./git + ./gtk + ./shell ]; nixpkgs = { @@ -91,9 +95,20 @@ ''; systemd.enable = true; }; - - xdg.portal.extraPortals = [pkgs.xdg-desktop-portal-gtk]; + xdg.portal = { + enable = true; + xdgOpenUsePortal = true; + config = { + common.default = [ "gtk" ]; + hyprland.default = [ + "gtk" + "hyprland" + ]; + }; + + extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + }; home.sessionVariables = { MOZ_ENABLE_WAYLAND = 1; NIXOS_OZONE_WL = 1; @@ -102,52 +117,8 @@ QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; }; - gtk = { - enable = true; - theme = { - package = pkgs.orchis-theme; - name = "Orchis-Grey-Dark-Compact"; - }; - iconTheme = { - package = pkgs.gruvbox-plus-icons; - name = "Gruvbox-Plus-Dark"; - }; - font = { - name = "FiraCode Nerd Font Light"; - size = 11; - }; - }; + programs.home-manager.enable = true; - programs = { - home-manager.enable = true; - git = { - enable = true; - userName = "cnst"; - userEmail = "cnst@cana.st"; - }; - zsh = { - enable = true; - enableCompletion = true; - autosuggestion.enable = true; - syntaxHighlighting.enable = true; - - shellAliases = { - nixconfig = "cd /home/cnst/.nix-config/"; - ll = "ls -l"; - nixupdate = "sudo nixos-rebuild switch --flake .#cnix"; - flakeupdate = "nix flake update"; - }; - history = { - size = 10000; - path = "${config.xdg.dataHome}/zsh/history"; - }; - oh-my-zsh = { - enable = true; - plugins = ["git" "thefuck"]; - theme = "robbyrussell"; - }; - }; - }; # Nicely reload system units when changing configs systemd.user.startServices = "sd-switch"; diff --git a/home-manager/hypr/hypridle.conf b/home-manager/hypr/hypridle.conf deleted file mode 100644 index c4fb5637..00000000 --- a/home-manager/hypr/hypridle.conf +++ /dev/null @@ -1,18 +0,0 @@ -$lock_cmd = pidof hyprlock || hyprlock -$suspend_cmd = pidof steam || systemctl suspend || loginctl suspend # fuck nvidia - -general { - lock_cmd = $lock_cmd - before_sleep_cmd = $lock_cmd -} - -listener { - timeout = 900 # 15mins - on-timeout = $lock_cmd -} - -listener { - timeout = 1200 # 20mins - on-timeout = hyprctl dispatch dpms off - on-resume = hyprctl dispatch dpms on -} diff --git a/home-manager/hypr/hyprlock.conf b/home-manager/hypr/hyprlock.conf deleted file mode 100644 index 3c8570ac..00000000 --- a/home-manager/hypr/hyprlock.conf +++ /dev/null @@ -1,112 +0,0 @@ -# $text_color = rgba(F6DECEFF) -# $entry_background_color = rgba(1C110811) -# $entry_border_color = rgba(A48C7B55) -# $entry_color = rgba(DDC1AEFF) -$text_color = rgba(FFFFFFFF) -$entry_background_color = rgba(33333311) -$entry_border_color = rgba(3B3B3B55) -$entry_color = rgba(FFFFFFFF) -$font_family = JetBrains Mono -#$font_family_clock = DSEG14 Classic Mini -$font_family_clock = JetBrains Mono -# font_material_symbols = FontAwesome - -background { - # color = rgba(170C04FF) - color = rgba(000000FF) - path = ~/Images/lockscreen.png - # path = screenshot - blur_size = 3 - blur_passes = 2 -} -input-field { - monitor = - size = 200, 50 - outline_thickness = 2 - dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8 - dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0 - dots_center = true - dots_rounding = -1 # -1 default circle, -2 follow input-field rounding - outer_color = rgba(3B3B3B55) - inner_color = rgba(33333311) - font_color = rgba(FFFFFFFF) - fade_on_empty = true - fade_timeout = 5000 # Milliseconds before fade_on_empty is triggered. - placeholder_text = # Text rendered in the input box when it's empty. - hide_input = false - rounding = -1 # -1 means complete rounding (circle/oval) - check_color = rgb(204, 136, 34) - fail_color = rgb(204, 34, 34) # if authentication failed, changes outer_color and fail message color - fail_text = $FAIL ($ATTEMPTS) # can be set to empty - fail_transition = 300 # transition time in ms between normal outer_color and fail_color - capslock_color = -1 - numlock_color = -1 - bothlock_color = -1 # when both locks are active. -1 means don't change outer color (same for above) - invert_numlock = false # change color if numlock is off - swap_font_color = false # see below - position = 0, -20 - halign = center - valign = center - shadow_passes = - shadow_size = - shadow_color = rgb(0,0,0) - shadow_boost = -} - - -label { # Clock - monitor = - text = cmd[update:1000] echo "$TIME" - shadow_passes = 1 - shadow_boost = 0.5 - color = $text_color - font_size = 85 - font_family = $font_family_clock - - position = 0, 300 - halign = center - valign = center -} - -label { # Date - monitor = - text = cmd[update:1000] echo "$(date -I)" - shadow_passes = 1 - shadow_boost = 0.5 - color = $text_color - font_size = 25 - font_family = $font_family_clock - - position = 0, 280 - halign = center - valign = center -} - -label { # "locked" text - monitor = - text = locked - shadow_passes = 1 - shadow_boost = 0.5 - color = $text_color - font_size = 14 - font_family = $font_family - - position = 0, 45 - halign = center - valign = bottom -} - -label { # Status - monitor = - text = cmd[update:5000] ~/.config/hypr/hyprlock/status.sh - shadow_passes = 1 - shadow_boost = 0.5 - color = $text_color - font_size = 14 - font_family = $font_family - - position = 30, 30 - halign = left - valign = top -} - diff --git a/home-manager/hypr/hyprlock/status.sh b/home-manager/hypr/hyprlock/status.sh deleted file mode 100755 index 0d4ec2dc..00000000 --- a/home-manager/hypr/hyprlock/status.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash - -############ Variables ############ -enable_battery=false -battery_charging=false - -####### Check availability ######## -for battery in /sys/class/power_supply/*BAT*; do - if [[ -f "$battery/uevent" ]]; then - enable_battery=true - if [[ $(cat /sys/class/power_supply/*/status | head -1) == "Charging" ]]; then - battery_charging=true - fi - break - fi -done - -############# Output ############# -if [[ $enable_battery == true ]]; then - if [[ $battery_charging == true ]]; then - echo -n "(+) " - fi - echo -n "$(cat /sys/class/power_supply/*/capacity | head -1)"% - if [[ $battery_charging == false ]]; then - echo -n " remaining" - fi -fi - -echo '' diff --git a/home-manager/hypr/hyprpaper.conf b/home-manager/hypr/hyprpaper.conf deleted file mode 100644 index 428e6f3b..00000000 --- a/home-manager/hypr/hyprpaper.conf +++ /dev/null @@ -1,16 +0,0 @@ -preload = /home/cnst/Pictures/wallhaven-gpxl97.jpg -#if more than one preload is desired then continue to preload other backgrounds -#preload = /path/to/next_image.png -# .. more preloads - -#set the default wallpaper(s) seen on initial workspace(s) --depending on the number of monitors used -wallpaper = DP-3,/home/cnst/Pictures/wallhaven-gpxl97.jpg -#if more than one monitor in use, can load a 2nd image -#wallpaper = monitor2,/path/to/next_image.png -# .. more monitors - -#enable splash text rendering over the wallpaper -splash = false - -#fully disable ipc -# ipc = off diff --git a/home-manager/hypr/land/appearance.conf b/home-manager/hypr/land/appearance.conf deleted file mode 100644 index c1b11a9a..00000000 --- a/home-manager/hypr/land/appearance.conf +++ /dev/null @@ -1,49 +0,0 @@ -# APPEARANCE - -general { - gaps_in = 3 - gaps_out = 6 - border_size = 2 - #col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg - #col.inactive_border = rgba(595959aa) - col.active_border = rgb(689d6a) # rgba(b16286ee) 45deg - col.inactive_border = rgb(504945) - layout = dwindle -} - -decoration { - rounding = 0 - blur { - enabled = true - size = 8 - passes = 1 - vibrancy = 0.1696 - } - - drop_shadow = true - shadow_range = 4 - shadow_render_power = 3 - # col.shadow = rgba(1a1a1aee) -} - -animations { - enabled = true - bezier = myBezier, 0.05, 0.9, 0.1, 1.05 - animation = windows, 1, 3, myBezier - animation = windowsOut, 1, 3, default, popin 80% - animation = border, 1, 3, default - animation = borderangle, 1, 8, default - animation = fade, 1, 7, default - animation = workspaces, 1, 3, default -} - -dwindle { - # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more - pseudotile = true # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below - preserve_split = true # you probably want this -} - -master { - # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more - new_is_master = true -} diff --git a/home-manager/hypr/land/inputs.conf b/home-manager/hypr/land/inputs.conf deleted file mode 100644 index e24762a6..00000000 --- a/home-manager/hypr/land/inputs.conf +++ /dev/null @@ -1,53 +0,0 @@ -# INPUTS - -monitor=DP-3,2560x1440@143.86,0x0,1 -monitor=eDP-1,1920x1200@60.02,0x0,1 - -# Some default env vars. -env = XCURSOR_SIZE,24 -# env = QT_QPA_PLATFORMTHEME,qt6ct # change to qt6ct if you have that -# env = GTK_THEME,Orchis-Orange-Dark - -# For all categories, see https://wiki.hyprland.org/Configuring/Variables/ -input { - follow_mouse = 1 - accel_profile = flat - sensitivity = 0 # -1.0 - 1.0, 0 means no modification. - - touchpad { - natural_scroll = true - disable_while_typing = true - clickfinger_behavior = true - scroll_factor = 0.5 - } -} - # Desktop keyboard -device { - name = pfu-limited-hhkb-hybrid - kb_layout = hhkbse - kb_options = lv3:rwin_switch -} - # Laptop keyboard -device { - name = at-translated-set-2-keyboard - kb_layout = se - kb_options = ctrl:swapcaps -} -gestures { - workspace_swipe = true - workspace_swipe_distance = 400 - workspace_swipe_fingers = 3 - workspace_swipe_cancel_ratio = 0.2 - workspace_swipe_min_speed_to_force = 5 - workspace_swipe_direction_lock = true - workspace_swipe_direction_lock_threshold = 10 - workspace_swipe_create_new = true -} -misc { - vrr = 0 - mouse_move_enables_dpms = 1 - key_press_enables_dpms = 0 - force_default_wallpaper = 0 - disable_hyprland_logo = true - disable_splash_rendering = true -} diff --git a/home-manager/hypr/land/keybinds.conf b/home-manager/hypr/land/keybinds.conf deleted file mode 100644 index da4e3325..00000000 --- a/home-manager/hypr/land/keybinds.conf +++ /dev/null @@ -1,92 +0,0 @@ -# KEYBINDS - -$terminal = alacritty -$fileManager = thunar -$passwordManager = keepassxc -$menu = pkill tofi-run || tofi-run | xargs hyprctl dispatch exec -- -$browser = firefox -$browserinc = firefox --private-window - -# See https://wiki.hyprland.org/Configuring/Keywords/ for more -$mainMod = SUPER - -# Custom binds -bind = SUPER SHIFT, B, exec, killall -SIGUSR2 waybar # Reload waybar - -# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more -bind = SUPER, A, exec, pkill -SIGUSR1 waybar -bind = SUPER, T, exec, $terminal -bind = SUPER, W, exec, $browser -bind = SUPER, K, exec, $passwordManager -bind = SUPER SHIFT, W, exec, $browserinc -bind = SUPER, Q, killactive, -bind = SUPER, M, exec, hyprctl dispatch exit -#bind = SUPER, E, exec, $fileManager -bind = SUPER, E, exec, hyprctl dispatch togglespecialworkspace fm | hyprctl dispatch rangerscript & -bind = SUPER SHIFT, E, exec, $fileManager -bind = SUPER, F, fullscreen, -bind = SUPER SHIFT, F, togglefloating, -bind = SUPER, SPACE, exec, $menu -bind = SUPER, P, pseudo, # dwindle -bind = SUPER, J, togglesplit, # dwindle -bind = SUPER, C, exec, hyprctl dispatch exec copyq toggle - -# Move focus with mainMod + arrow keys -bind = SUPER, left, movefocus, l -bind = SUPER, right, movefocus, r -bind = SUPER, up, movefocus, u -bind = SUPER, down, movefocus, d - -# Switch workspaces with mainMod + [0-9] -bind = SUPER, 1, workspace, 1 -bind = SUPER, 2, workspace, 2 -bind = SUPER, 3, workspace, 3 -bind = SUPER, 4, workspace, 4 -bind = SUPER, 5, workspace, 5 -bind = SUPER, 6, workspace, 6 -bind = SUPER, 7, workspace, 7 -bind = SUPER, 8, workspace, 8 -bind = SUPER, 9, workspace, 9 -bind = SUPER, 0, workspace, 10 - -# Move active window to a workspace with mainMod + SHIFT + [0-9] -bind = SUPER SHIFT, 1, movetoworkspace, 1 -bind = SUPER SHIFT, 2, movetoworkspace, 2 -bind = SUPER SHIFT, 3, movetoworkspace, 3 -bind = SUPER SHIFT, 4, movetoworkspace, 4 -bind = SUPER SHIFT, 5, movetoworkspace, 5 -bind = SUPER SHIFT, 6, movetoworkspace, 6 -bind = SUPER SHIFT, 7, movetoworkspace, 7 -bind = SUPER SHIFT, 8, movetoworkspace, 8 -bind = SUPER SHIFT, 9, movetoworkspace, 9 -bind = SUPER SHIFT, 0, movetoworkspace, 10 - -# Laptop controls -bind = ,XF86AudioLowerVolume, exec, pactl -- set-sink-volume 0 -5% -bind = ,XF86AudioRaiseVolume, exec, pactl -- set-sink-volume 0 +5% -bind = ,XF86AudioMute, exec, pactl -- set-sink-mute 0 toggle -bind = ,XF86AudioMicMute, exec, pactl -- set-source-mute 0 toggle -bind = ,XF86MonBrightnessDown, exec, brightnessctl s 10%- -bind = ,XF86MonBrightnessUp, exec, brightnessctl s +10% - -bind = SUPER, XF86MonBrightnessUp, exec, hyprctl dispatch dpms on -bind = SUPER, XF86MonBrightnessDown, exec, hyprctl dispatch dpms off - -# Screenshot a window -bind = SUPER, F10, exec, hyprshot -m window -# Screenshot a monitor -bind = , F10, exec, hyprshot -m output -# Screenshot a region -bind = SUPER SHIFT, F10, exec, hyprshot -m region - -# Example special workspace (scratchpad) -bind = SUPER, S, togglespecialworkspace, magic -bind = SUPER SHIFT, S, movetoworkspace, special:magic - -# Scroll through existing workspaces with mainMod + scroll -bind = SUPER, mouse_down, workspace, e+1 -bind = SUPER, mouse_up, workspace, e-1 - -# Move/resize windows with mainMod + LMB/RMB and dragging -bindm = SUPER, mouse:272, movewindow -bindm = SUPER, mouse:273, resizewindow diff --git a/home-manager/hypr/land/rules.conf b/home-manager/hypr/land/rules.conf deleted file mode 100644 index 49a552e8..00000000 --- a/home-manager/hypr/land/rules.conf +++ /dev/null @@ -1,35 +0,0 @@ -# RULES - -# CALCURSE SETTINGS -windowrulev2 = float,class:(floatcal) -windowrulev2 = size 843 650,class:(floatcal) -windowrulev2 = move 100%-w-20 40,class:(floatcal) -#windowrulev2 = move 1708 32,class:(floatcal) - -# RANGER/NNN SETTINGS -windowrulev2 = float,class:(floatranger) -windowrulev2 = float,class:(floatnnn) -#windowrulev2 = size 843 650,class:(floatranger) -#windowrulev2 = move 1708 32,class:(floatranger) -#windowrulev2 = move 1708 32;size 843 650;dimaround;float,class:^(kitty)$,title:^(kitty)$ -# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more -windowrulev2 = suppressevent maximize, class:.* # You'll probably like this. -#windowrulev2 = noshadow, floating:0 -windowrulev2 = float,class:^(org.keepassxc.KeePassXC)$ -windowrulev2 = center,class:^(org.keepassxc.KeePassXC)$ -windowrule = float, ^(xarchiver)$ -windowrulev2 = float,class:^(imv)$ -windowrulev2 = float,class:^(com.github.hluk.copyq)$ -windowrule = center, ^(xarchiver)$ -windowrulev2 = float,class:^(blueman-manager)$ -windowrulev2 = center,class:^(nwg-look)$ -windowrulev2 = float,class:^(nwg-look)$ -windowrulev2 = float,class:^(Lxappearance)$ -windowrulev2 = float,class:^(org.pulseaudio.pavucontrol)$ -windowrule = move 1813 33,^(org.pulseaudio.pavucontrol)$ -windowrule = size 741 585,^(org.pulseaudio.pavucontrol)$ -windowrule = dimaround,^(org.pulseaudio.pavucontrol)$ - -windowrulev2 = float,class: ^(thunar) -windowrulev2 = float,class: ^(thunar) -windowrulev2 = workspace special:fm,class: ^(thunar) diff --git a/home-manager/hypr/land/startup.conf b/home-manager/hypr/land/startup.conf deleted file mode 100644 index 5179a1d3..00000000 --- a/home-manager/hypr/land/startup.conf +++ /dev/null @@ -1,13 +0,0 @@ -# STARTUP - -exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP -exec-once = /usr/lib/polkit-kde-authentication-agent-1 -exec-once = pamixer --set-volume 50 & -exec-once = dunst & waybar & hypridle & blueman-applet & udiskie -Nt & -exec-once = nm-applet --indicator & -exec-once = mullvad-vpn & -exec-once = swaybg -i ~/Images/wallpaper.png & -exec-once = wl-clip-persist --clipboard regular --all-mime-type-regex '^(?!x-kde-passwordManagerHint).+' -exec-once = hyprctl dispatch exec "sleep 4s && copyq --start-server" -exec-once = hyprctl dispatch exec "sleep 5s && keepassxc" -exec-once = hyprctl dispatch exec "sleep 3s && solaar -w hide" diff --git a/home-manager/hypr/scripts/calvin b/home-manager/hypr/scripts/calvin deleted file mode 100755 index 87297d71..00000000 --- a/home-manager/hypr/scripts/calvin +++ /dev/null @@ -1,36 +0,0 @@ -ignore-empty-password -disable-caps-lock-text -image=$HOME/.config/hypr/bg/calvin2.jpeg -font=Calvin and Hobbes - -text-ver-color=00000000 -text-wrong-color=00000000 -text-clear-color=00000000 -inside-color=00000000 -inside-ver-color=00000000 -inside-wrong-color=00000000 -inside-clear-color=00000000 -inside-caps-lock-color=00000000 -ring-color=00000000 -ring-ver-color=00000000 -ring-wrong-color=00000000 -ring-clear-color=00000000 -line-color=00000000 -line-clear-color=00000000 -line-ver-color=00000000 -key-hl-color=00000000 -bs-hl-color=00000000 -caps-lock-bs-hl-color=00000000 -caps-lock-key-hl-color=00000000 -separator-color=00000000 - -scaling=fill -indicator -clock -timestr=%I:%M %p -datestr=%A, %d %B -indicator-x-position=400 -indicator-y-position=875 -indicator-radius=450 -font-size=200 -text-color=080808 diff --git a/home-manager/hypr/scripts/exit.sh b/home-manager/hypr/scripts/exit.sh deleted file mode 100755 index e23661e4..00000000 --- a/home-manager/hypr/scripts/exit.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -sleep 1 -killall -9 Hyprland sleep 2 diff --git a/home-manager/hypr/scripts/logoutlaunch.sh b/home-manager/hypr/scripts/logoutlaunch.sh deleted file mode 100755 index 00b7c217..00000000 --- a/home-manager/hypr/scripts/logoutlaunch.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env sh - -# set variables -wLayout="$HOME/.config/wlogout/layout_2" -wlTmplt="$HOME/.config/wlogout/style_2.css" - -# set font size -fntSize=`gsettings get org.gnome.desktop.interface font-name | sed "s/'//g" | awk '{print $2}'` -export fntSize=$(( fntSize * 2 )) - -# set scaling as per monitor res -res=`cat /sys/class/drm/*/modes | head -1 | cut -d 'x' -f 2` -case $1 in - 1) wlColms=1 - export mgn=$(( res * 10 / 100 )) - export hvr=$(( res * 5 / 100 )) ;; - 2) wlColms=5 - export mgn=$(( res * 8 / 100 )) - export mgn2=$(( res * 65 / 100 )) - export hvr=$(( res * 3 / 100 )) - export hvr2=$(( res * 60 / 100 )) ;; - *) echo "Error: invalid parameter passed..." - exit 1 ;; -esac - -# eval config files -wlStyle=`envsubst < $wlTmplt` - -# launch wlogout -wlogout -b $wlColms -c 0 -r 0 --layout $wLayout --css <(echo "$wlStyle") --protocol layer-shell diff --git a/home-manager/neovim/default.nix b/home-manager/neovim/default.nix index e8556c61..8709e698 100644 --- a/home-manager/neovim/default.nix +++ b/home-manager/neovim/default.nix @@ -34,11 +34,6 @@ let gotools ]; - haskell = [ - haskell-language-server - ghc - ]; - lua = [ lua-language-server stylua @@ -69,16 +64,9 @@ let ]; rust = [ - rustToolchain - bacon # background code check - ]; - rustToolchain = pkgs.fenix.stable.withComponents [ - "cargo" - "clippy" - "rust-src" - "rustc" - "rustfmt" - "rust-analyzer" + cargo + rustfmt + rust-analyzer ]; shell = [ @@ -98,18 +86,7 @@ let ]; extraPackages = - tools - ++ c - ++ gamedev - ++ golang - ++ haskell - ++ lua - ++ markup - ++ nix - ++ python - ++ rust - ++ shell - ++ web; + tools ++ c ++ gamedev ++ golang ++ lua ++ markup ++ nix ++ python ++ rust ++ shell ++ web; in { @@ -123,9 +100,4 @@ in plugins = with pkgs.vimPlugins; [ telescope-cheat-nvim ]; inherit extraPackages; }; - - programs.helix = { - enable = true; - inherit extraPackages; - }; } diff --git a/home-manager/shell/default.nix b/home-manager/shell/default.nix new file mode 100644 index 00000000..d881a156 --- /dev/null +++ b/home-manager/shell/default.nix @@ -0,0 +1,45 @@ +{ config, ... }: +{ + programs.starship = { + enable = true; + settings = { + add_newline = false; + # character = { + # success_symbol = "[➜](bold green)"; + # error_symbol = "[➜](bold red)"; + # }; + }; + }; + programs.zsh = { + enable = true; + enableCompletion = true; + autosuggestion.enable = true; + syntaxHighlighting.enable = true; + + shellAliases = { + nixconfig = "cd /home/cnst/.nix-config/"; + ll = "ls -l"; + nixupdate = "sudo nixos-rebuild switch --flake .#cnix"; + flakeupdate = "nix flake update"; + }; + history = { + size = 1000; + path = "${config.xdg.dataHome}/zsh/history"; + }; + oh-my-zsh = { + enable = true; + plugins = [ + "git" + "thefuck" + ]; + theme = "robbyrussell"; + }; + initExtra = '' + ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=241' + eval $(thefuck --alias) + eval $(thefuck --alias FUCK) + + eval "$(starship init zsh)" + ''; + }; +} diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 5cd50078..5150c68e 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -8,7 +8,8 @@ pkgs, system, ... -}: { +}: +{ # You can import other NixOS modules here imports = [ inputs.home-manager.nixosModules.home-manager @@ -24,7 +25,9 @@ ]; home-manager = { - extraSpecialArgs = {inherit inputs outputs;}; + extraSpecialArgs = { + inherit inputs outputs; + }; users = { # Import your home-manager configuration cnst = import ../home-manager/home.nix; @@ -51,47 +54,73 @@ }; }; - nix = let - flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs; - in { - settings = { - # Enable flakes and new 'nix' command - experimental-features = "nix-command flakes"; - # Opinionated: disable global registry - flake-registry = ""; - # Workaround for https://github.com/NixOS/nix/issues/9574 - nix-path = config.nix.nixPath; - }; - # Opinionated: disable channels - channel.enable = false; + nix = + let + flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs; + in + { + settings = { + warn-dirty = false; + # Enable flakes and new 'nix' command + experimental-features = "nix-command flakes"; + # Opinionated: disable global registry + flake-registry = ""; + # Workaround for https://github.com/NixOS/nix/issues/9574 + nix-path = config.nix.nixPath; + }; + # Opinionated: disable channels + channel.enable = false; - # Opinionated: make flake registry and nix path match flake inputs - registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs; - nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs; - }; + # Opinionated: make flake registry and nix path match flake inputs + registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs; + nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs; + }; # System packages environment = { systemPackages = [ - inputs.nixvim.packages.${pkgs.system}.default + # Dev pkgs.git pkgs.pyright pkgs.python3 pkgs.gcc - pkgs.nodejs_22 + pkgs.go + pkgs.nodePackages_latest.npm + pkgs.nodePackages_latest.nodejs + pkgs.nodePackages.prettier + pkgs.nodePackages.prettier-plugin-toml + pkgs.lua-language-server + pkgs.stylua + pkgs.prettierd pkgs.cargo - pkgs.gnumake + pkgs.hyprlang + pkgs.nixd + pkgs.nil + pkgs.black + pkgs.python312Packages.jedi-language-server + pkgs.isort + pkgs.bacon + pkgs.clang + pkgs.clang-tools + pkgs.alejandra + + # Util pkgs.stow + pkgs.gnumake pkgs.wget pkgs.curl pkgs.ripgrep - pkgs.nixd pkgs.python312Packages.oauth2 pkgs.python312Packages.httplib2 + pkgs.python312Packages.pip pkgs.killall - pkgs.alejandra pkgs.tree-sitter pkgs.lazygit + pkgs.tmux + pkgs.tmuxifier + pkgs.unzip + pkgs.p7zip + pkgs.unrar ]; localBinInPath = true; }; @@ -103,7 +132,15 @@ fira-code-symbols font-awesome jetbrains-mono - (nerdfonts.override {fonts = ["JetBrainsMono" "FiraCode" "Iosevka" "3270" "DroidSansMono"];}) + (nerdfonts.override { + fonts = [ + "JetBrainsMono" + "FiraCode" + "Iosevka" + "3270" + "DroidSansMono" + ]; + }) ]; # Bootloader boot.loader = { systemd-boot.enable = true; @@ -123,6 +160,11 @@ }; graphics = { enable = true; + extraPackages = with pkgs; [ + libva + vaapiVdpau + libvdpau-va-gl + ]; }; }; @@ -134,6 +176,12 @@ solaar.enable = true; nix-ld.enable = true; adb.enable = true; + nh = { + enable = true; + clean.enable = true; + clean.extraArgs = "--keep-since 4d --keep 3"; + flake = "/home/cnst/.nix-config"; + }; neovim = { enable = true; defaultEditor = true; @@ -177,7 +225,12 @@ isNormalUser = true; shell = pkgs.zsh; # openssh.authorizedKeys.keys = []; - extraGroups = ["wheel" "networkmanager" "audio" "video"]; + extraGroups = [ + "wheel" + "networkmanager" + "audio" + "video" + ]; }; }; @@ -218,7 +271,7 @@ xkb = { extraLayouts.hhkbse = { description = "HHKBse by cnst"; - languages = ["se"]; + languages = [ "se" ]; symbolsFile = /home/cnst/.nix-config/nixos/xkb/symbols/hhkbse; }; layout = "hhkbse"; diff --git a/nixos/hardware-configuration.nix b/nixos/hardware-configuration.nix index 598229a2..b61bbd23 100644 --- a/nixos/hardware-configuration.nix +++ b/nixos/hardware-configuration.nix @@ -1,30 +1,54 @@ # 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, ... }: +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/de372c64-89a2-4bbe-ad57-926cdd98e97d"; - fsType = "ext4"; + boot = { + initrd = { + availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + "usbhid" + "usb_storage" + "sd_mod" + ]; + kernelModules = [ ]; }; + kernelModules = [ "kvm-amd" ]; + kernelPackages = pkgs.linuxPackages_latest; + consoleLogLevel = 3; + kernelParams = [ + "quiet" + "splash" + ]; + extraModulePackages = [ ]; + }; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/de372c64-89a2-4bbe-ad57-926cdd98e97d"; + fsType = "ext4"; + }; boot.initrd.luks.devices."luks-60ba815c-481b-4932-94d2-b8d29465d3eb".device = "/dev/disk/by-uuid/60ba815c-481b-4932-94d2-b8d29465d3eb"; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/0954-2370"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/0954-2370"; + fsType = "vfat"; + options = [ + "fmask=0022" + "dmask=0022" + ]; + }; swapDevices = [ ]; diff --git a/nixos/xkb/symbols/hhkbse b/nixos/xkb/symbols/hhkbse index 3a3037f0..c2c387d5 100644 --- a/nixos/xkb/symbols/hhkbse +++ b/nixos/xkb/symbols/hhkbse @@ -2,8 +2,6 @@ default partial alphanumeric_keys xkb_symbols "hhkbse" { - include "latin(type2)" - include "se(se)" name[Group1]="Sweden - HHKBse"; @@ -56,5 +54,4 @@ xkb_symbols "hhkbse" { key {[ comma, semicolon ]}; key {[ period, colon ]}; key {[ minus, underscore, endash ]}; - };