diff --git a/flake.lock b/flake.lock index 90a430d..0cc8e47 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,45 @@ { "nodes": { + "crane": { + "inputs": { + "nixpkgs": [ + "xremap", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1701386725, + "narHash": "sha256-w4aBlMYh9Y8co1V80m5LzEKMijUJ7CBTq209WbqVwUU=", + "owner": "ipetkov", + "repo": "crane", + "rev": "8b9bad9b30bd7a9ed08782e64846b7485f9d0a38", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "devshell": { + "inputs": { + "nixpkgs": "nixpkgs_4", + "systems": "systems_2" + }, + "locked": { + "lastModified": 1700815693, + "narHash": "sha256-JtKZEQUzosrCwDsLgm+g6aqbP1aseUl1334OShEAS3s=", + "owner": "numtide", + "repo": "devshell", + "rev": "7ad1c417c87e98e56dcef7ecd0e0a2f2e5669d51", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, "disko": { "inputs": { "nixpkgs": [ @@ -20,6 +60,24 @@ "type": "github" } }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1698882062, + "narHash": "sha256-HkhafUayIqxXyHH1X8d9RDl1M2CkFgZLjKD3MzabiEo=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "8c9fa2545007b49a5db5f650ae91f227672c3877", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -41,6 +99,24 @@ "type": "github" } }, + "home-manager_2": { + "inputs": { + "nixpkgs": "nixpkgs_5" + }, + "locked": { + "lastModified": 1701071203, + "narHash": "sha256-lQywA7QU/vzTdZ1apI0PfgCWNyQobXUYghVrR5zuIeM=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "db1878f013b52ba5e4034db7c1b63e8d04173a86", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, "hyprland": { "inputs": { "hyprland-protocols": "hyprland-protocols", @@ -88,6 +164,55 @@ "type": "github" } }, + "hyprland-protocols_2": { + "inputs": { + "nixpkgs": [ + "xremap", + "hyprland", + "nixpkgs" + ], + "systems": [ + "xremap", + "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" + } + }, + "hyprland_2": { + "inputs": { + "hyprland-protocols": "hyprland-protocols_2", + "nixpkgs": "nixpkgs_6", + "systems": "systems_3", + "wlroots": "wlroots_2", + "xdph": "xdph_2" + }, + "locked": { + "lastModified": 1701370414, + "narHash": "sha256-Q7A8BWWS1YndiNaAKM0IP73SGKJiQDfOdZAIdTLGNj8=", + "owner": "hyprwm", + "repo": "Hyprland", + "rev": "b394c1695c05cf3b2133a473aa459d4cd750911b", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "Hyprland", + "type": "github" + } + }, "nixos-hardware": { "locked": { "lastModified": 1679765008, @@ -120,6 +245,24 @@ "type": "github" } }, + "nixpkgs-lib": { + "locked": { + "dir": "lib", + "lastModified": 1698611440, + "narHash": "sha256-jPjHjrerhYDy3q9+s5EAsuhyhuknNfowY6yt6pjn9pc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0cbe9f69c234a7700596e943bfae7ef27a31b735", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-stable": { "locked": { "lastModified": 1679748960, @@ -168,6 +311,70 @@ "type": "github" } }, + "nixpkgs_4": { + "locked": { + "lastModified": 1677383253, + "narHash": "sha256-UfpzWfSxkfXHnb4boXZNaKsAcUrZT9Hw+tao1oZxd08=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9952d6bc395f5841262b006fbace8dd7e143b634", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1700794826, + "narHash": "sha256-RyJTnTNKhO0yqRpDISk03I/4A67/dp96YRxc86YOPgU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5a09cb4b393d58f9ed0d9ca1555016a8543c2ac8", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { + "locked": { + "lastModified": 1700612854, + "narHash": "sha256-yrQ8osMD+vDLGFX7pcwsY/Qr5PUd6OmDMYJZzZi0+zc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "19cbff58383a4ae384dea4d1d0c823d72b49d614", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_7": { + "locked": { + "lastModified": 1701336116, + "narHash": "sha256-kEmpezCR/FpITc6yMbAh4WrOCiT2zg5pSjnKrq51h5Y=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "f5c27c6136db4d76c30e533c20517df6864c46ee", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "disko": "disko", @@ -175,7 +382,8 @@ "hyprland": "hyprland", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_2", - "sops-nix": "sops-nix" + "sops-nix": "sops-nix", + "xremap": "xremap" } }, "sops-nix": { @@ -212,6 +420,36 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_3": { + "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": { @@ -231,6 +469,25 @@ "type": "gitlab" } }, + "wlroots_2": { + "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": [ @@ -259,6 +516,79 @@ "repo": "xdg-desktop-portal-hyprland", "type": "github" } + }, + "xdph_2": { + "inputs": { + "hyprland-protocols": [ + "xremap", + "hyprland", + "hyprland-protocols" + ], + "nixpkgs": [ + "xremap", + "hyprland", + "nixpkgs" + ], + "systems": [ + "xremap", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1700508250, + "narHash": "sha256-X4o/mifI7Nhu0UKYlxx53wIC+gYDo3pVM9L2u3PE2bE=", + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "rev": "eb120ff25265ecacd0fc13d7dab12131b60d0f47", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "type": "github" + } + }, + "xremap": { + "inputs": { + "crane": "crane", + "devshell": "devshell", + "flake-parts": "flake-parts", + "home-manager": "home-manager_2", + "hyprland": "hyprland_2", + "nixpkgs": "nixpkgs_7", + "xremap": "xremap_2" + }, + "locked": { + "lastModified": 1701816620, + "narHash": "sha256-axgWrKpoV1T7KVbbT+3H/Q6mcBdUKylIz6ClFCMRxlA=", + "owner": "xremap", + "repo": "nix-flake", + "rev": "5b264392686e6caee50c9b12cb290b7d0f23cf93", + "type": "github" + }, + "original": { + "owner": "xremap", + "repo": "nix-flake", + "type": "github" + } + }, + "xremap_2": { + "flake": false, + "locked": { + "lastModified": 1701234505, + "narHash": "sha256-7k6GsKDUBvhKL9JU/QkWO+IHvhaty1udOYP8fXKr9QY=", + "owner": "k0kubun", + "repo": "xremap", + "rev": "97268d1d92d94609daddff1230c4ca77d54a84dd", + "type": "github" + }, + "original": { + "owner": "k0kubun", + "ref": "v0.8.12", + "repo": "xremap", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 46582d5..971f511 100644 --- a/flake.nix +++ b/flake.nix @@ -4,7 +4,8 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; nixos-hardware.url = "github:NixOS/nixos-hardware/master"; - sops-nix.url = github:Mic92/sops-nix; + sops-nix.url = "github:Mic92/sops-nix"; + xremap.url = "github:xremap/nix-flake"; hyprland.url = "github:hyprwm/Hyprland"; home-manager = { url = "github:nix-community/home-manager/release-23.05"; @@ -16,7 +17,7 @@ }; }; - outputs = { self, home-manager, nixos-hardware, disko, nixpkgs, sops-nix, hyprland, ... }@inputs: + outputs = { self, home-manager, nixos-hardware, disko, nixpkgs, sops-nix, hyprland, xremap, ... }@inputs: let system = "x86_64-linux"; pkgs = import nixpkgs { @@ -33,6 +34,8 @@ modules = [ #Secrets management sops-nix.nixosModules.sops + #Keybinding + xremap.nixosModules.default #Machine config configurationNix defaultNixOptions @@ -64,6 +67,7 @@ ./modules/system/desktop-environments/tuigreet.nix ./modules/system/desktop-environments/hyprland.nix ./hosts/katana/default.nix + ./hosts/katana/bluetooth.nix ./hosts/katana/networkd.nix ./hosts/katana/system-pkgs.nix ./modules/system/services/docker.nix diff --git a/hosts/katana/bluetooth.nix b/hosts/katana/bluetooth.nix index b3e68ad..90e4717 100644 --- a/hosts/katana/bluetooth.nix +++ b/hosts/katana/bluetooth.nix @@ -1,13 +1,13 @@ -{config, pkgs, }: -{ - hardware.bluetooth = { - enable = true; # enables support for Bluetooth - powerOnBoot = true; # powers up the default Bluetooth controller on boot - settings = { - General = { - Enable = "Source,Sink,Media,Socket"; - }; - }; - }; - services.blueman.enable = true; +{config, pkgs, ... }: +{ + hardware.bluetooth = { + enable = true; # enables support for Bluetooth + powerOnBoot = true; # powers up the default Bluetooth controller on boot + settings = { + General = { + Enable = "Source,Sink,Media,Socket"; + }; + }; + }; + services.blueman.enable = true; } \ No newline at end of file diff --git a/hosts/katana/system-pkgs.nix b/hosts/katana/system-pkgs.nix index ac0bf4f..81a0a91 100644 --- a/hosts/katana/system-pkgs.nix +++ b/hosts/katana/system-pkgs.nix @@ -35,5 +35,6 @@ rofi prismlauncher parallel + skate ]; } \ No newline at end of file diff --git a/modules/home-manager/hyprland.nix b/modules/home-manager/hyprland.nix index 369a851..14f7cc2 100644 --- a/modules/home-manager/hyprland.nix +++ b/modules/home-manager/hyprland.nix @@ -34,6 +34,8 @@ bind = $mainMod SHIFT, 9, movetoworkspace, 9 bind = $mainMod SHIFT, 0, movetoworkspace, 10 + bind = $mainMod, Print, exec, grim -o /home/speccon18/Pictures/$(date +'%s_grim.png') -g "$(slurp)" -t png + # Startup Runners exec-once=systemctl --user start waybar.service exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP diff --git a/modules/system/desktop-environments/hyprland.nix b/modules/system/desktop-environments/hyprland.nix index 4c4789b..6fe87a0 100644 --- a/modules/system/desktop-environments/hyprland.nix +++ b/modules/system/desktop-environments/hyprland.nix @@ -27,6 +27,10 @@ in { hyprland font-awesome brightnessctl + grim + slurp + imagemagick + wl-clipboard ]; sessionVariables = { #Enable Wayland diff --git a/users/speccon18/default.nix b/users/speccon18/default.nix index 767bd70..3a954eb 100644 --- a/users/speccon18/default.nix +++ b/users/speccon18/default.nix @@ -14,4 +14,18 @@ "docker" ]; }; + services.xremap = { + withWlroots = true; + userName = "speccon18"; + config = { + keymap = [ + { + name = "Global"; + remap = { + "CapsLock" = "Esc"; + }; + } + ]; + }; + }; } \ No newline at end of file diff --git a/users/speccon18/home.nix b/users/speccon18/home.nix index 2d241a5..dcec4a2 100644 --- a/users/speccon18/home.nix +++ b/users/speccon18/home.nix @@ -29,6 +29,7 @@ vlc remmina bacon + skate ]; }; }