[general] further improve immutability of KDE config

feat: add resources directory
feat: update KDE config
refactor: remove unused files
This commit is contained in:
Jo 2024-05-14 01:34:04 +02:00
parent bbe6ab62c4
commit cff1ca5701
13 changed files with 105 additions and 80 deletions

View file

@ -1,18 +1,23 @@
{ {
"nodes": { "nodes": {
"flake-compat": { "haumea": {
"flake": false, "inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": { "locked": {
"lastModified": 1688025799, "lastModified": 1685133229,
"narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=", "narHash": "sha256-FePm/Gi9PBSNwiDFq3N+DWdfxFq0UKsVVTJS3cQPn94=",
"owner": "nix-community", "owner": "nix-community",
"repo": "flake-compat", "repo": "haumea",
"rev": "8bf105319d44f6b9f0d764efa4fdef9f1cc9ba1c", "rev": "34dd58385092a23018748b50f9b23de6266dffc2",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"repo": "flake-compat", "ref": "v0.2.2",
"repo": "haumea",
"type": "github" "type": "github"
} }
}, },
@ -37,40 +42,7 @@
"type": "github" "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": { "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": { "locked": {
"lastModified": 1715087517, "lastModified": 1715087517,
"narHash": "sha256-CLU5Tsg24Ke4+7sH8azHWXKd0CFd4mhLWfhYgUiDBpQ=", "narHash": "sha256-CLU5Tsg24Ke4+7sH8azHWXKd0CFd4mhLWfhYgUiDBpQ=",
@ -111,9 +83,9 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"haumea": "haumea",
"home-manager": "home-manager", "home-manager": "home-manager",
"nixos-cosmic": "nixos-cosmic", "nixpkgs": "nixpkgs",
"nixpkgs": "nixpkgs_2",
"plasma-manager": "plasma-manager" "plasma-manager": "plasma-manager"
} }
} }

View file

@ -17,9 +17,15 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager"; 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 let
inherit (self) outputs; inherit (self) outputs;
@ -35,11 +41,20 @@
# My custom packages # My custom packages
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system}); packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
# External resources (wallpapers, icons, dotfiles)
resources = import ./resources;
# My reusable modules for nixos # 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 # 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 # NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname' # Available through 'nixos-rebuild --flake .#your-hostname'

View file

@ -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;
}

View file

@ -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";
};
}

View file

@ -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;
}

View file

@ -1,5 +0,0 @@
{
kde = import ./kde.nix;
gnome = import ./gnome.nix;
cosmic = import ./cosmic.nix;
}

View file

@ -2,4 +2,7 @@
# You can build them using 'nix build .#example' # You can build them using 'nix build .#example'
pkgs: { pkgs: {
# example = pkgs.callPackage ./example { }; # example = pkgs.callPackage ./example { };
themes = {
kde-gruvbox-colors = pkgs.callPackage ./themes/kde-gruvbox-colors.nix { };
};
} }

View file

@ -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
'';
}

3
resources/default.nix Normal file
View file

@ -0,0 +1,3 @@
{
wallpapers = ./wallpapers;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 KiB

View file

@ -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";
};
};
}

View file

@ -3,17 +3,15 @@
lib, lib,
config, config,
pkgs, pkgs,
outputs,
... ...
}: { }: {
# You can import other home-manager modules here # You can import other home-manager modules here
imports = [ imports = [
inputs.plasma-manager.homeManagerModules.plasma-manager ./desktop/kde.nix
]; ];
nixpkgs = { nixpkgs = {
overlays = [];
# Configuring nixpkgs instance
config = { config = {
allowUnfree = true; allowUnfree = true;
@ -28,18 +26,8 @@
homeDirectory = "/home/jo"; homeDirectory = "/home/jo";
}; };
# Plasma configuration # General packages
programs.plasma = {
enable = true;
workspace = {
clickItemTo = "select";
iconTheme = "Tela-blue-dark";
};
};
home.packages = with pkgs; [ home.packages = with pkgs; [
kdePackages.sierra-breeze-enhanced
spotify spotify
qflipper qflipper
wineWowPackages.waylandFull wineWowPackages.waylandFull
@ -50,7 +38,6 @@
teams-for-linux teams-for-linux
enpass enpass
thunderbird 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"; # home.file.".config/gtk-4.0/gtk.css".source = "${orchis}/share/themes/Orchis-Green-Dark-Compact/gtk-4.0/gtk.css";