diff --git a/flake.lock b/flake.lock index 611a09ca..3a76ecf7 100644 --- a/flake.lock +++ b/flake.lock @@ -21,6 +21,24 @@ "type": "github" } }, + "base16": { + "inputs": { + "fromYaml": "fromYaml" + }, + "locked": { + "lastModified": 1689633990, + "narHash": "sha256-iwvQg2Vx0IIDWZaKo8Xmzxlv1YPHg+Kp/QSv8dRv0RY=", + "owner": "SenchoPens", + "repo": "base16.nix", + "rev": "dddf2e1c04845d43c89a8e9e37d574519649a404", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "base16.nix", + "type": "github" + } + }, "catppuccin-alacritty": { "flake": false, "locked": { @@ -37,6 +55,22 @@ "type": "github" } }, + "catppuccin-base16": { + "flake": false, + "locked": { + "lastModified": 1665586920, + "narHash": "sha256-fZDsmJ+xFjOJDoI+bPki9W7PEI5lT5aGoCYtkatcZ8A=", + "owner": "catppuccin", + "repo": "base16", + "rev": "ca74b4070d6ead4213e92da1273fcc1853de7af8", + "type": "github" + }, + "original": { + "owner": "catppuccin", + "repo": "base16", + "type": "github" + } + }, "catppuccin-bat": { "flake": false, "locked": { @@ -197,6 +231,22 @@ "type": "github" } }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -218,6 +268,22 @@ "type": "github" } }, + "fromYaml": { + "flake": false, + "locked": { + "lastModified": 1689549921, + "narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=", + "owner": "SenchoPens", + "repo": "fromYaml", + "rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "fromYaml", + "type": "github" + } + }, "gitui": { "flake": false, "locked": { @@ -254,52 +320,24 @@ "type": "github" } }, - "hyprland": { - "inputs": { - "hyprland-protocols": "hyprland-protocols", - "nixpkgs": [ - "nixpkgs" - ], - "systems": "systems", - "wlroots": "wlroots", - "xdph": "xdph" - }, - "locked": { - "lastModified": 1694441683, - "narHash": "sha256-aP+N3ubkvgZ4htsVKJsv8u9co4CAlstzb3CJvBj3cLE=", - "owner": "hyprwm", - "repo": "Hyprland", - "rev": "df51c45d7f9e4e280b959f790f7cde6c88b9b451", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "Hyprland", - "type": "github" - } - }, - "hyprland-protocols": { + "home-manager_2": { "inputs": { "nixpkgs": [ - "hyprland", + "stylix", "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" ] }, "locked": { - "lastModified": 1691753796, - "narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=", - "owner": "hyprwm", - "repo": "hyprland-protocols", - "rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03", + "lastModified": 1691882297, + "narHash": "sha256-e1/LAQSGLnBywfA1TfMl0Vj3tvYka73XOZ/D2/CJowE=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "c3ab5ea047e6dc73df530948f7367455749d8906", "type": "github" }, "original": { - "owner": "hyprwm", - "repo": "hyprland-protocols", + "owner": "nix-community", + "repo": "home-manager", "type": "github" } }, @@ -323,6 +361,7 @@ "inputs": { "anyrun": "anyrun", "catppuccin-alacritty": "catppuccin-alacritty", + "catppuccin-base16": "catppuccin-base16", "catppuccin-bat": "catppuccin-bat", "catppuccin-fish": "catppuccin-fish", "catppuccin-gitui": "catppuccin-gitui", @@ -335,70 +374,30 @@ "doom-emacs": "doom-emacs", "gitui": "gitui", "home-manager": "home-manager", - "hyprland": "hyprland", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "stylix": "stylix" } }, - "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": 1694302348, - "narHash": "sha256-S9NOc88L/1jpNKJqBu2Hihvn0V1HHCK2hXE4bNBAStg=", - "owner": "wlroots", - "repo": "wlroots", - "rev": "65bbbbbf0c3d6844cee3c4e294d0ba07e1f82211", - "type": "gitlab" - }, - "original": { - "host": "gitlab.freedesktop.org", - "owner": "wlroots", - "repo": "wlroots", - "rev": "65bbbbbf0c3d6844cee3c4e294d0ba07e1f82211", - "type": "gitlab" - } - }, - "xdph": { + "stylix": { "inputs": { - "hyprland-protocols": [ - "hyprland", - "hyprland-protocols" - ], + "base16": "base16", + "flake-compat": "flake-compat", + "home-manager": "home-manager_2", "nixpkgs": [ - "hyprland", "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" ] }, "locked": { - "lastModified": 1694025408, - "narHash": "sha256-oJNhGfZH8Z2w3ztXdzsYVg32//cWEcPVDM3+tp/ZVfU=", - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "rev": "022469529c8bc95acf222dc5a62389b04c8b1205", + "lastModified": 1694375893, + "narHash": "sha256-oJGESNjJ/6o6tfuUavBZ7go4Oun7g9YKv7OqaQaY/80=", + "owner": "danth", + "repo": "stylix", + "rev": "c3c9f4784b4f08f6676340126858d936edbce1fa", "type": "github" }, "original": { - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", + "owner": "danth", + "repo": "stylix", "type": "github" } } diff --git a/flake.nix b/flake.nix index 87acd040..64519e00 100644 --- a/flake.nix +++ b/flake.nix @@ -7,8 +7,8 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; - hyprland = { - url = "github:hyprwm/Hyprland"; + stylix = { + url = "github:danth/stylix"; inputs.nixpkgs.follows = "nixpkgs"; }; anyrun = { @@ -25,6 +25,10 @@ url = "github:extrawurst/gitui"; flake = false; }; + catppuccin-base16 = { + url = "github:catppuccin/base16"; + flake = false; + }; catppuccin-alacritty = { url = "github:catppuccin/alacritty"; flake = false; @@ -67,10 +71,9 @@ }; }; - outputs = { self, nixpkgs, home-manager, ... }@inputs: + outputs = { self, nixpkgs, home-manager, stylix, anyrun, ... }@inputs: let flakeURL = "git+https://git.xenia.me.uk/xenia/nixos.git?ref=main"; - wallpapers = { default = ./wallpapers/waves/cat-waves.png; }; catppuccin-themes = with inputs; { alacritty = "${catppuccin-alacritty}/catppuccin-macchiato.yml"; bat = "${catppuccin-bat}/Catppuccin-macchiato.tmTheme"; @@ -104,15 +107,18 @@ , homeModules ? default.homeModules, stateVersion ? default.stateVersion }: let - specialArgs = { - inherit hostName user group; - inherit (inputs) hyprland; - }; + specialArgs = { inherit hostName user group anyrun; }; extraSpecialArgs = specialArgs // { - inherit wallpapers catppuccin-themes; - inherit (inputs) doom-emacs gitui anyrun; + inherit catppuccin-themes; + inherit (inputs) doom-emacs gitui; }; commonModule = { lib, pkgs, ... }: { + stylix = { + autoEnable = false; + image = ./wallpapers/waves/cat-waves.png; + base16Scheme = + "${inputs.catppuccin-base16}/base16/macchiato.yaml"; + }; nix = { settings = { experimental-features = [ "nix-command" "flakes" ]; @@ -226,6 +232,7 @@ ./hosts/${hostName}/configuration.nix ./hosts/${hostName}/hardware-configuration.nix home-manager.nixosModules.home-manager + stylix.nixosModules.stylix commonModule ] ++ systemModules ++ serviceModules; }; diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix index fe33586c..56368bfa 100644 --- a/home/hyprland/default.nix +++ b/home/hyprland/default.nix @@ -1,8 +1,7 @@ -{ config, lib, pkgs, hyprland, wallpapers, catppuccin-themes, ... }: +{ config, lib, pkgs, catppuccin-themes, ... }: { imports = [ - hyprland.homeManagerModules.default ./wlogout/default.nix ./waybar/default.nix ./swaync/default.nix @@ -35,10 +34,11 @@ enable = true; systemdTarget = "hyprland-session.target"; }; + stylix.targets.hyprland.enable = true; wayland.windowManager.hyprland = { enable = true; - package = null; # Use package from nixpkgs xwayland.enable = true; + systemdIntegration = true; extraConfig = import ./config.nix { inherit config pkgs; theme = catppuccin-themes.hyprland; @@ -47,8 +47,8 @@ xdg = { configFile = { "hypr/hyprpaper.conf".text = '' - preload = ${wallpapers.default} - wallpaper = ,${wallpapers.default} + preload = ${config.stylix.image} + wallpaper = ,${config.stylix.image} ''; "hypr/macchiato.conf".source = ./macchiato.conf; "hypr/extra.conf" = lib.mkDefault { text = ""; }; diff --git a/home/hyprland/swaylock.nix b/home/hyprland/swaylock.nix index 217c85f7..af8e1746 100644 --- a/home/hyprland/swaylock.nix +++ b/home/hyprland/swaylock.nix @@ -1,4 +1,5 @@ { pkgs, ... }: { + stylix.targets.swaylock.enable = true; programs.swaylock = { enable = true; package = pkgs.swaylock-effects; @@ -10,10 +11,10 @@ indicator-thickness = 7; effect-blur = "7x5"; effect-vignette = "0.5:0.5"; - ring-color = "24273a"; # Catppuccin base - key-hl-color = "b7bdf8"; # Catppuccin lavender - line-color = "24273a"; # Catppuccin base - separator-color = "8bd5ca"; # Catppuccin teal + # ring-color = "24273a"; # Catppuccin base + # key-hl-color = "b7bdf8"; # Catppuccin lavender + # line-color = "24273a"; # Catppuccin base + # separator-color = "8bd5ca"; # Catppuccin teal grace = 2; fade-in = 0.2; }; diff --git a/system/hyprland.nix b/system/hyprland.nix index d082bdb0..5a619bd6 100644 --- a/system/hyprland.nix +++ b/system/hyprland.nix @@ -1,5 +1,7 @@ -{ pkgs, user ? "xenia", hyprland, ... }: { - imports = [ ./desktop.nix hyprland.nixosModules.default ]; +{ pkgs, user ? "xenia", ... }: + +{ + imports = [ ./desktop.nix ]; nixpkgs.overlays = [ (final: prev: { waybar = prev.waybar.overrideAttrs (oldAttrs: { @@ -29,10 +31,7 @@ blueman.enable = true; gvfs.enable = true; tumbler.enable = true; - xserver.displayManager = { - sessionPackages = [ hyprland.packages.${pkgs.system}.hyprland ]; - defaultSession = "hyprland"; - }; + xserver.displayManager.defaultSession = "hyprland"; }; fonts = { packages = with pkgs; [ @@ -70,7 +69,6 @@ programs = { hyprland = { enable = true; - package = hyprland.packages.${pkgs.system}.hyprland; xwayland.enable = true; }; thunar = {