diff --git a/flake.lock b/flake.lock index 5e2cd0a..feda459 100644 --- a/flake.lock +++ b/flake.lock @@ -1,18 +1,23 @@ { "nodes": { - "flake-compat": { - "flake": false, + "haumea": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, "locked": { - "lastModified": 1688025799, - "narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=", + "lastModified": 1685133229, + "narHash": "sha256-FePm/Gi9PBSNwiDFq3N+DWdfxFq0UKsVVTJS3cQPn94=", "owner": "nix-community", - "repo": "flake-compat", - "rev": "8bf105319d44f6b9f0d764efa4fdef9f1cc9ba1c", + "repo": "haumea", + "rev": "34dd58385092a23018748b50f9b23de6266dffc2", "type": "github" }, "original": { "owner": "nix-community", - "repo": "flake-compat", + "ref": "v0.2.2", + "repo": "haumea", "type": "github" } }, @@ -37,40 +42,7 @@ "type": "github" } }, - "nixos-cosmic": { - "inputs": { - "flake-compat": "flake-compat", - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1715262380, - "narHash": "sha256-jz4zg7xz14PTkrTiH96tVDvCxftpDVp6vRxnO7OVReA=", - "path": "/nix/store/gz6hf4bgagrqvkl7p7gxpznnlqgvyyjy-source", - "rev": "1914ef3d3bbbf79892b48e9162b47f64ff99bcd5", - "type": "path" - }, - "original": { - "id": "nixos-cosmic", - "type": "indirect" - } - }, "nixpkgs": { - "locked": { - "lastModified": 1715266358, - "narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "f1010e0469db743d14519a1efd37e23f8513d714", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { "locked": { "lastModified": 1715087517, "narHash": "sha256-CLU5Tsg24Ke4+7sH8azHWXKd0CFd4mhLWfhYgUiDBpQ=", @@ -111,9 +83,9 @@ }, "root": { "inputs": { + "haumea": "haumea", "home-manager": "home-manager", - "nixos-cosmic": "nixos-cosmic", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "plasma-manager": "plasma-manager" } } diff --git a/flake.nix b/flake.nix index 917a03d..a55dad9 100644 --- a/flake.nix +++ b/flake.nix @@ -17,9 +17,15 @@ inputs.nixpkgs.follows = "nixpkgs"; inputs.home-manager.follows = "home-manager"; }; + + # Haumea (map directory structure into an attribute set) + haumea = { + url = "github:nix-community/haumea/v0.2.2"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { self, nixpkgs, home-manager, plasma-manager, nixos-cosmic, ... } @inputs: + outputs = { self, nixpkgs, home-manager, plasma-manager, haumea, ... } @inputs: let inherit (self) outputs; @@ -35,11 +41,20 @@ # My custom packages packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system}); + # External resources (wallpapers, icons, dotfiles) + resources = import ./resources; + # My reusable modules for nixos - nixosModules = import ./modules/nixos; + nixosModules = haumea.lib.load { + src = ./modules/nixos; + inputs = { inherit inputs outputs; pkgs = nixpkgs.legacyPackages.x86_64-linux; }; + }; # My reusable modules for home-manager - homeManagerModules = import ./modules/home-manager; + homeManagerModules = haumea.lib.load { + src = ./modules/home-manager; + inputs = { inherit inputs outputs; pkgs = nixpkgs.legacyPackages.x86_64-linux; }; + }; # NixOS configuration entrypoint # Available through 'nixos-rebuild --flake .#your-hostname' diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix deleted file mode 100644 index 95c7830..0000000 --- a/modules/home-manager/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -# Collection of reusable home-manager modules (https://nixos.wiki/wiki/Module) -# These shouldn't include personal configurations, but much rather stuff that can be shared across multiple configurations -{ - # List your module files here - # my-module = import ./my-module.nix; -} diff --git a/modules/home-manager/themes/gruvbox/plasma.nix b/modules/home-manager/themes/gruvbox/plasma.nix new file mode 100644 index 0000000..2cf3838 --- /dev/null +++ b/modules/home-manager/themes/gruvbox/plasma.nix @@ -0,0 +1,15 @@ +{ + pkgs, + outputs +}: { + home.packages = with pkgs; [ + tela-icon-theme + outputs.packages.x86_64-linux.themes.kde-gruvbox-colors + ]; + + programs.plasma.workspace = { + iconTheme = "Tela-green-dark"; + colorScheme = "GruvboxColors"; + wallpaper = "${outputs.resources.wallpapers}/gruvbox/green_pokemon_guy.png"; + }; +} \ No newline at end of file diff --git a/modules/home-manager/themes/qt_catppuccin-macchiato.nix b/modules/home-manager/themes/qt_catppuccin-macchiato.nix deleted file mode 100644 index 8d1c8b6..0000000 --- a/modules/home-manager/themes/qt_catppuccin-macchiato.nix +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix deleted file mode 100644 index 6c8d644..0000000 --- a/modules/nixos/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -# Collection of reusable nixos modules (https://nixos.wiki/wiki/Module) -# These shouldn't include personal configurations, but much rather stuff that can be shared across multiple configurations -{ - # List your module files here - # my-module = import ./my-module.nix; - desktop = import ./desktop; -} diff --git a/modules/nixos/desktop/default.nix b/modules/nixos/desktop/default.nix deleted file mode 100644 index de1d485..0000000 --- a/modules/nixos/desktop/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - kde = import ./kde.nix; - gnome = import ./gnome.nix; - cosmic = import ./cosmic.nix; -} diff --git a/pkgs/default.nix b/pkgs/default.nix index 3d9e23c..0c5e483 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -2,4 +2,7 @@ # You can build them using 'nix build .#example' pkgs: { # example = pkgs.callPackage ./example { }; + themes = { + kde-gruvbox-colors = pkgs.callPackage ./themes/kde-gruvbox-colors.nix { }; + }; } diff --git a/pkgs/themes/kde-gruvbox-colors.nix b/pkgs/themes/kde-gruvbox-colors.nix new file mode 100644 index 0000000..72c805e --- /dev/null +++ b/pkgs/themes/kde-gruvbox-colors.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + pname = "kde-gruvbox-colors"; + version = "1.0.0"; + + src = fetchFromGitHub { + owner = "jokiller230"; + repo = pname; + rev = "438a23c571e22c1bf416c229afac78ad64e81f17"; + sha256 = "sha256-5iRfWqqtv+ImDN96PuWaS3nuK8AHjfa4DGc8vCkLi4U="; + }; + + installPhase = '' + runHook preInstall + + mkdir -p $out/share + cp -R color-schemes konsole $out/share + + runHook postInstall + ''; +} \ No newline at end of file diff --git a/resources/default.nix b/resources/default.nix new file mode 100644 index 0000000..fe27d76 --- /dev/null +++ b/resources/default.nix @@ -0,0 +1,3 @@ +{ + wallpapers = ./wallpapers; +} \ No newline at end of file diff --git a/resources/wallpapers/gruvbox/green_pokemon_guy.png b/resources/wallpapers/gruvbox/green_pokemon_guy.png new file mode 100644 index 0000000..df57eb7 Binary files /dev/null and b/resources/wallpapers/gruvbox/green_pokemon_guy.png differ diff --git a/users/jo_puzzlevision/desktop/kde.nix b/users/jo_puzzlevision/desktop/kde.nix new file mode 100644 index 0000000..85aa0e8 --- /dev/null +++ b/users/jo_puzzlevision/desktop/kde.nix @@ -0,0 +1,27 @@ +{ + inputs, + lib, + config, + pkgs, + outputs, + ... +}: { + imports = [ + inputs.plasma-manager.homeManagerModules.plasma-manager + outputs.homeManagerModules.themes.gruvbox.plasma + ]; + + home.packages = with pkgs; [ + kdePackages.sierra-breeze-enhanced + kde-rounded-corners + ]; + + # Plasma configuration + programs.plasma = { + enable = true; + + workspace = { + clickItemTo = "select"; + }; + }; +} \ No newline at end of file diff --git a/users/jo_puzzlevision/home.nix b/users/jo_puzzlevision/home.nix index 9562c34..0b72d83 100644 --- a/users/jo_puzzlevision/home.nix +++ b/users/jo_puzzlevision/home.nix @@ -3,17 +3,15 @@ lib, config, pkgs, + outputs, ... }: { # You can import other home-manager modules here imports = [ - inputs.plasma-manager.homeManagerModules.plasma-manager + ./desktop/kde.nix ]; nixpkgs = { - overlays = []; - - # Configuring nixpkgs instance config = { allowUnfree = true; @@ -28,18 +26,8 @@ homeDirectory = "/home/jo"; }; - # Plasma configuration - programs.plasma = { - enable = true; - - workspace = { - clickItemTo = "select"; - iconTheme = "Tela-blue-dark"; - }; - }; - + # General packages home.packages = with pkgs; [ - kdePackages.sierra-breeze-enhanced spotify qflipper wineWowPackages.waylandFull @@ -50,7 +38,6 @@ teams-for-linux enpass thunderbird - kde-rounded-corners ]; # home.file.".config/gtk-4.0/gtk.css".source = "${orchis}/share/themes/Orchis-Green-Dark-Compact/gtk-4.0/gtk.css";