diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f1d8977..0612bb7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,6 +27,30 @@ jobs: authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' skipPush: true + - name: Prepare /usr/share/wallpaper and update flake.lock hash/timestamp + run: | + sudo mkdir -p /usr/share/wallpaper + echo "dummy" | sudo tee /usr/share/wallpaper/dummy.jpg + HASH=$(nix hash path /usr/share/wallpaper) + NOW=$(stat -c %Y /usr/share/wallpaper) + echo "Updating wallpapers block: lastModified=$NOW, narHash=$HASH" + + # Extract wallpapers block + sed -n '/"wallpapers": {/,/^ },$/p' flake.lock > wallpapers_block.tmp + + # Update hash and timestamp + sed -i '0,/"lastModified": [0-9]\+,/{s|"lastModified": [0-9]\+,|"lastModified": '"$NOW"',|}' wallpapers_block.tmp + sed -i 's|"narHash": "[^"]*"|"narHash": "'"$HASH"'"|' wallpapers_block.tmp + + # Replace the block in flake.lock + START=$(grep -n '"wallpapers": {' flake.lock | cut -d: -f1) + END=$(awk -v start="$START" 'NR > start && /^ },/ {print NR; exit}' flake.lock) + head -n $((START-1)) flake.lock > flake.lock.new + cat wallpapers_block.tmp >> flake.lock.new + tail -n +$((END+1)) flake.lock >> flake.lock.new + mv flake.lock.new flake.lock + rm wallpapers_block.tmp + - name: Check flake run: nix flake check --verbose @@ -54,6 +78,30 @@ jobs: authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' skipPush: true + - name: Prepare /usr/share/wallpaper and update flake.lock hash/timestamp + run: | + sudo mkdir -p /usr/share/wallpaper + echo "dummy" | sudo tee /usr/share/wallpaper/dummy.jpg + HASH=$(nix hash path /usr/share/wallpaper) + NOW=$(stat -c %Y /usr/share/wallpaper) + echo "Updating wallpapers block: lastModified=$NOW, narHash=$HASH" + + # Extract wallpapers block + sed -n '/"wallpapers": {/,/^ },$/p' flake.lock > wallpapers_block.tmp + + # Update hash and timestamp + sed -i '0,/"lastModified": [0-9]\+,/{s|"lastModified": [0-9]\+,|"lastModified": '"$NOW"',|}' wallpapers_block.tmp + sed -i 's|"narHash": "[^"]*"|"narHash": "'"$HASH"'"|' wallpapers_block.tmp + + # Replace the block in flake.lock + START=$(grep -n '"wallpapers": {' flake.lock | cut -d: -f1) + END=$(awk -v start="$START" 'NR > start && /^ },/ {print NR; exit}' flake.lock) + head -n $((START-1)) flake.lock > flake.lock.new + cat wallpapers_block.tmp >> flake.lock.new + tail -n +$((END+1)) flake.lock >> flake.lock.new + mv flake.lock.new flake.lock + rm wallpapers_block.tmp + - name: Evaluate NixOS configuration for ${{ matrix.host }} run: | echo "� Evaluating NixOS configuration..." diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 742eeaf..e120a38 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,6 +20,29 @@ jobs: experimental-features = nix-command flakes access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} + - name: Prepare /usr/share/wallpaper and update flake.lock hash/timestamp + run: | + sudo mkdir -p /usr/share/wallpaper + echo "dummy" | sudo tee /usr/share/wallpaper/dummy.jpg + HASH=$(nix hash path /usr/share/wallpaper) + NOW=$(stat -c %Y /usr/share/wallpaper) + echo "Updating wallpapers block: lastModified=$NOW, narHash=$HASH" + + # Extract wallpapers block + sed -n '/"wallpapers": {/,/^ },$/p' flake.lock > wallpapers_block.tmp + + # Update hash and timestamp + sed -i '0,/"lastModified": [0-9]\+,/{s|"lastModified": [0-9]\+,|"lastModified": '"$NOW"',|}' wallpapers_block.tmp + sed -i 's|"narHash": "[^"]*"|"narHash": "'"$HASH"'"|' wallpapers_block.tmp + + # Replace the block in flake.lock + START=$(grep -n '"wallpapers": {' flake.lock | cut -d: -f1) + END=$(awk -v start="$START" 'NR > start && /^ },/ {print NR; exit}' flake.lock) + head -n $((START-1)) flake.lock > flake.lock.new + cat wallpapers_block.tmp >> flake.lock.new + tail -n +$((END+1)) flake.lock >> flake.lock.new + mv flake.lock.new flake.lock + rm wallpapers_block.tmp - name: Check flake syntax run: nix flake check --verbose @@ -56,6 +79,30 @@ jobs: experimental-features = nix-command flakes access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} + - name: Prepare /usr/share/wallpaper and update flake.lock hash/timestamp + run: | + sudo mkdir -p /usr/share/wallpaper + echo "dummy" | sudo tee /usr/share/wallpaper/dummy.jpg + HASH=$(nix hash path /usr/share/wallpaper) + NOW=$(stat -c %Y /usr/share/wallpaper) + echo "Updating wallpapers block: lastModified=$NOW, narHash=$HASH" + + # Extract wallpapers block + sed -n '/"wallpapers": {/,/^ },$/p' flake.lock > wallpapers_block.tmp + + # Update hash and timestamp + sed -i '0,/"lastModified": [0-9]\+,/{s|"lastModified": [0-9]\+,|"lastModified": '"$NOW"',|}' wallpapers_block.tmp + sed -i 's|"narHash": "[^"]*"|"narHash": "'"$HASH"'"|' wallpapers_block.tmp + + # Replace the block in flake.lock + START=$(grep -n '"wallpapers": {' flake.lock | cut -d: -f1) + END=$(awk -v start="$START" 'NR > start && /^ },/ {print NR; exit}' flake.lock) + head -n $((START-1)) flake.lock > flake.lock.new + cat wallpapers_block.tmp >> flake.lock.new + tail -n +$((END+1)) flake.lock >> flake.lock.new + mv flake.lock.new flake.lock + rm wallpapers_block.tmp + - name: Dry build NixOS configuration run: | nix build .#nixosConfigurations.centaur.config.system.build.toplevel \ diff --git a/README.md b/README.md index e389ae9..5a7e30b 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ This repository contains a complete NixOS configuration featuring: ### Prerequisites - NixOS installed with flakes enabled - Git for cloning this repository +- Ensure `/usr/share/wallpaper/` exists and contains all wallpapers you want to use for theming ### Installation @@ -37,6 +38,9 @@ chmod +x deploy.sh ./deploy.sh -up ``` +### Changing Theme +To change the active theme, edit `flake.nix` and set `activeTheme` to your desired theme (e.g., `themes.mytheme`). + ## Architecture ### Flake Structure @@ -127,6 +131,23 @@ sudo nix-store --optimize ## Customization +### Adding New Designs (Themes) + +To add a new theme: +1. Add your color scheme YAML file to `modules/nixos/themes/` (e.g., `mytheme.yaml`). +2. Add your wallpaper image to `/usr/share/wallpaper/` (e.g., `mytheme.jpg`). +3. Edit `modules/nixos/themes/defaults.nix` to include your new theme: + ```nix + mytheme = { + colorScheme = ./mytheme.yaml; + wallpaper = "mytheme.jpg"; + }; + ``` + +### Changing Theme + +To change the active theme, edit `flake.nix` and set `activeTheme` to your desired theme (e.g., `themes.mytheme`). + ### Adding New Modules 1. Create module file in appropriate directory: diff --git a/flake.lock b/flake.lock index f8e3dc7..2688a29 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1750974272, - "narHash": "sha256-VaeQzSzekMvP+/OhwNZP4kzs4paWk5+20N0MFLTn+cs=", + "lastModified": 1752743471, + "narHash": "sha256-4izhj1j7J4mE8LgljCXSIUDculqOsxxhdoC81VhqizM=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "dd921421391e75793d0cc674dc15eca16b46a089", + "rev": "e31b575d19e7cf8a8f4398e2f9cffe27a1332506", "type": "github" }, "original": { @@ -108,11 +108,11 @@ }, "locked": { "dir": "pkgs/firefox-addons", - "lastModified": 1751429002, - "narHash": "sha256-ihzv16jv0mx4yW64wXuJBnTKigRVsR+aY9i/5WvS+tA=", + "lastModified": 1752984247, + "narHash": "sha256-JIsQY8kDY/uicS4UqYmVM2UP7qa8YeQI7XMkX6EBYJM=", "owner": "rycee", "repo": "nur-expressions", - "rev": "08812a6d58b96f717f9d4a8c3e5aa9db0554eb6f", + "rev": "8633d2c796c8cb8ec3a206728d9a9278af51947f", "type": "gitlab" }, "original": { @@ -154,21 +154,6 @@ "type": "github" } }, - "flake-compat_2": { - "locked": { - "lastModified": 1747046372, - "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -177,11 +162,11 @@ ] }, "locked": { - "lastModified": 1743550720, - "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", + "lastModified": 1751413152, + "narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "c621e8422220273271f52058f618c94e405bb0f5", + "rev": "77826244401ea9de6e3bac47c2db46005e1f30b5", "type": "github" }, "original": { @@ -206,32 +191,6 @@ "type": "github" } }, - "git-hooks": { - "inputs": { - "flake-compat": [ - "stylix", - "flake-compat" - ], - "gitignore": "gitignore_2", - "nixpkgs": [ - "stylix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1747372754, - "narHash": "sha256-2Y53NGIX2vxfie1rOW0Qb86vjRZ7ngizoo+bnXU9D9k=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, "gitignore": { "inputs": { "nixpkgs": [ @@ -254,28 +213,6 @@ "type": "github" } }, - "gitignore_2": { - "inputs": { - "nixpkgs": [ - "stylix", - "git-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, "gnome-shell": { "flake": false, "locked": { @@ -300,32 +237,11 @@ ] }, "locked": { - "lastModified": 1751500614, - "narHash": "sha256-mYiYNsTJkbQouC5YHOTgqVpjpELoNf9f4z5ZeY4NfPg=", + "lastModified": 1752814804, + "narHash": "sha256-irfg7lnfEpJY+3Cffkluzp2MTVw1Uq9QGxFp6qadcXI=", "owner": "nix-community", "repo": "home-manager", - "rev": "a5b56720841121d2189c011e445c4be4c943bab5", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "home-manager_2": { - "inputs": { - "nixpkgs": [ - "stylix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1751146119, - "narHash": "sha256-gvjG95TCnUVJkvQvLMlnC4NqiqFyBdJk3o8/RwuHeaU=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "76d0c31fce2aa0c71409de953e2f9113acd5b656", + "rev": "d0300c8808e41da81d6edfc202f3d3833c157daf", "type": "github" }, "original": { @@ -379,11 +295,11 @@ ] }, "locked": { - "lastModified": 1750621377, - "narHash": "sha256-8u6b5oAdX0rCuoR8wFenajBRmI+mzbpNig6hSCuWUzE=", + "lastModified": 1752149140, + "narHash": "sha256-gbh1HL98Fdqu0jJIWN4OJQN7Kkth7+rbkFpSZLm/62A=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "b3d628d01693fb9bb0a6690cd4e7b80abda04310", + "rev": "340494a38b5ec453dfc542c6226481f736cc8a9a", "type": "github" }, "original": { @@ -408,11 +324,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1751404714, - "narHash": "sha256-VcaGnoW8p7PrtSCHBMJbiuSQoYGq6tTx5VhvDAdojgc=", + "lastModified": 1752936500, + "narHash": "sha256-StLLgYbL3U2iDezMbfr/QjUtd2a0Mb+pScDSQxFElTg=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "90c8609cbb5ae7b488d7b14b4dfb3ec9585ed2b7", + "rev": "91d8a629ebfffaa46290331a74a54e249dec64fe", "type": "github" }, "original": { @@ -438,11 +354,11 @@ ] }, "locked": { - "lastModified": 1751468208, - "narHash": "sha256-uiXSAUGGspLHo+EcQ50ozZIlBONx0Vzvv4KwbJ/wQ7w=", + "lastModified": 1752875239, + "narHash": "sha256-fyMI4mWt29sEdTSFJKhIdVQrrewycFWLmrOX/HRf4Ig=", "owner": "hyprwm", "repo": "Hyprland-Plugins", - "rev": "109c734f47c0a2c1d619001937a6c1d4ad806f2e", + "rev": "d4bf99e72243e035b15f34db8572d62d73b9a68c", "type": "github" }, "original": { @@ -585,11 +501,11 @@ ] }, "locked": { - "lastModified": 1751061882, - "narHash": "sha256-g9n8Vrbx+2JYM170P9BbvGHN39Wlkr4U+V2WLHQsXL8=", + "lastModified": 1752252310, + "narHash": "sha256-06i1pIh6wb+sDeDmWlzuPwIdaFMxLlj1J9I5B9XqSeo=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "4737241eaf8a1e51671a2a088518071f9a265cf4", + "rev": "bcabcbada90ed2aacb435dc09b91001819a6dc82", "type": "github" }, "original": { @@ -610,11 +526,11 @@ ] }, "locked": { - "lastModified": 1750371869, - "narHash": "sha256-lGk4gLjgZQ/rndUkzmPYcgbHr8gKU5u71vyrjnwfpB4=", + "lastModified": 1751897909, + "narHash": "sha256-FnhBENxihITZldThvbO7883PdXC/2dzW4eiNvtoV5Ao=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "aa38edd6e3e277ae6a97ea83a69261a5c3aab9fd", + "rev": "fcca0c61f988a9d092cbb33e906775014c61579d", "type": "github" }, "original": { @@ -625,11 +541,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1751011381, - "narHash": "sha256-krGXKxvkBhnrSC/kGBmg5MyupUUT5R6IBCLEzx9jhMM=", + "lastModified": 1752687322, + "narHash": "sha256-RKwfXA4OZROjBTQAl9WOZQFm7L8Bo93FQwSJpAiSRvo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "30e2e2857ba47844aa71991daa6ed1fc678bcbb7", + "rev": "6e987485eb2c77e5dcc5af4e3c70843711ef9251", "type": "github" }, "original": { @@ -641,11 +557,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1751271578, - "narHash": "sha256-P/SQmKDu06x8yv7i0s8bvnnuJYkxVGBWLWHaU+tt4YY=", + "lastModified": 1752950548, + "narHash": "sha256-NS6BLD0lxOrnCiEOcvQCDVPXafX1/ek1dfJHX1nUIzc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3016b4b15d13f3089db8a41ef937b13a9e33a8df", + "rev": "c87b95e25065c028d31a94f06a62927d18763fdf", "type": "github" }, "original": { @@ -657,11 +573,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1748460289, - "narHash": "sha256-7doLyJBzCllvqX4gszYtmZUToxKvMUrg45EUWaUYmBg=", + "lastModified": 1751792365, + "narHash": "sha256-J1kI6oAj25IG4EdVlg2hQz8NZTBNYvIS0l4wpr9KcUo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "96ec055edbe5ee227f28cdbc3f1ddf1df5965102", + "rev": "1fd8bada0b6117e6c7eb54aad5813023eed37ccb", "type": "github" }, "original": { @@ -680,15 +596,14 @@ "nixpkgs": [ "stylix", "nixpkgs" - ], - "treefmt-nix": "treefmt-nix" + ] }, "locked": { - "lastModified": 1748730660, - "narHash": "sha256-5LKmRYKdPuhm8j5GFe3AfrJL8dd8o57BQ34AGjJl1R0=", + "lastModified": 1751906969, + "narHash": "sha256-BSQAOdPnzdpOuCdAGSJmefSDlqmStFNScEnrWzSqKPw=", "owner": "nix-community", "repo": "NUR", - "rev": "2c0bc52fe14681e9ef60e3553888c4f086e46ecb", + "rev": "ddb679f4131e819efe3bbc6457ba19d7ad116f25", "type": "github" }, "original": { @@ -727,7 +642,8 @@ "hyprland": "hyprland", "hyprland-plugins": "hyprland-plugins", "nixpkgs": "nixpkgs_2", - "stylix": "stylix" + "stylix": "stylix", + "wallpapers": "wallpapers" } }, "stylix": { @@ -737,11 +653,8 @@ "base16-helix": "base16-helix", "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", - "flake-compat": "flake-compat_2", "flake-parts": "flake-parts", - "git-hooks": "git-hooks", "gnome-shell": "gnome-shell", - "home-manager": "home-manager_2", "nixpkgs": "nixpkgs_3", "nur": "nur", "systems": "systems_2", @@ -752,11 +665,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1751498047, - "narHash": "sha256-2T/VKbqqp4KTz3szFl58AaI+LBg9ctLjnP1IQA8sPg8=", + "lastModified": 1752965417, + "narHash": "sha256-FDec+RoFgSrk3YPedcjNiBK+acaHO4Vt0YDTMdKdw1w=", "owner": "danth", "repo": "stylix", - "rev": "d21cfb364a78ad72935625e79b8c5d497f0b7616", + "rev": "f826d3214b8a9be3f158d5cc7514c4130674324b", "type": "github" }, "original": { @@ -831,11 +744,11 @@ "tinted-schemes": { "flake": false, "locked": { - "lastModified": 1748180480, - "narHash": "sha256-7n0XiZiEHl2zRhDwZd/g+p38xwEoWtT0/aESwTMXWG4=", + "lastModified": 1750770351, + "narHash": "sha256-LI+BnRoFNRa2ffbe3dcuIRYAUcGklBx0+EcFxlHj0SY=", "owner": "tinted-theming", "repo": "schemes", - "rev": "87d652edd26f5c0c99deda5ae13dfb8ece2ffe31", + "rev": "5a775c6ffd6e6125947b393872cde95867d85a2a", "type": "github" }, "original": { @@ -847,11 +760,11 @@ "tinted-tmux": { "flake": false, "locked": { - "lastModified": 1748740859, - "narHash": "sha256-OEM12bg7F4N5WjZOcV7FHJbqRI6jtCqL6u8FtPrlZz4=", + "lastModified": 1751159871, + "narHash": "sha256-UOHBN1fgHIEzvPmdNMHaDvdRMgLmEJh2hNmDrp3d3LE=", "owner": "tinted-theming", "repo": "tinted-tmux", - "rev": "57d5f9683ff9a3b590643beeaf0364da819aedda", + "rev": "bded5e24407cec9d01bd47a317d15b9223a1546c", "type": "github" }, "original": { @@ -863,11 +776,11 @@ "tinted-zed": { "flake": false, "locked": { - "lastModified": 1725758778, - "narHash": "sha256-8P1b6mJWyYcu36WRlSVbuj575QWIFZALZMTg5ID/sM4=", + "lastModified": 1751158968, + "narHash": "sha256-ksOyv7D3SRRtebpXxgpG4TK8gZSKFc4TIZpR+C98jX8=", "owner": "tinted-theming", "repo": "base16-zed", - "rev": "122c9e5c0e6f27211361a04fae92df97940eccf9", + "rev": "86a470d94204f7652b906ab0d378e4231a5b3384", "type": "github" }, "original": { @@ -876,26 +789,17 @@ "type": "github" } }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "stylix", - "nur", - "nixpkgs" - ] - }, + "wallpapers": { + "flake": false, "locked": { - "lastModified": 1733222881, - "narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "49717b5af6f80172275d47a418c9719a31a78b53", - "type": "github" + "lastModified": 1753205958, + "narHash": "sha256-COH3R0ZYkCM0OLj8lG4uo/YUQh7oHz9etmHgJDOPLNU=", + "path": "/usr/share/wallpaper", + "type": "path" }, "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" + "path": "/usr/share/wallpaper", + "type": "path" } }, "xdph": { @@ -926,11 +830,11 @@ ] }, "locked": { - "lastModified": 1750372504, - "narHash": "sha256-VBeZb1oqZM1cqCAZnFz/WyYhO8aF/ImagI7WWg/Z3Og=", + "lastModified": 1751300244, + "narHash": "sha256-PFuv1TZVYvQhha0ac53E3YgdtmLShrN0t4T6xqHl0jE=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "400308fc4f9d12e0a93e483c2e7a649e12af1a92", + "rev": "6115f3fdcb2c1a57b4a80a69f3c797e47607b90a", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index aaf855d..75c146b 100644 --- a/flake.nix +++ b/flake.nix @@ -21,13 +21,26 @@ url = "github:hyprwm/Hyprland-Plugins"; inputs.hyprland.follows = "hyprland"; }; + wallpapers = { + url = "path:/usr/share/wallpaper"; # Path to wallpapers directory + flake = false; + }; }; outputs = { self, nixpkgs, ... - } @ inputs: { + } @ inputs: let + themes = import ./modules/nixos/themes/defaults.nix; + activeTheme = themes.dracula; # Change this to switch themes + wallpaperPath = "${inputs.wallpapers}/${activeTheme.wallpaper}"; + in { + theme = builtins.path { + path = activeTheme.colorScheme; + name = "base16-theme"; + }; + wallpaperPath = wallpaperPath; nixosConfigurations.centaur = nixpkgs.lib.nixosSystem { specialArgs = {inherit inputs;}; modules = [ @@ -36,7 +49,6 @@ inputs.stylix.nixosModules.stylix ]; }; - formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra; }; } diff --git a/modules/home-manager/cli-tools.nix b/modules/home-manager/cli-tools.nix index b1442f4..1e53e5e 100644 --- a/modules/home-manager/cli-tools.nix +++ b/modules/home-manager/cli-tools.nix @@ -12,6 +12,7 @@ traceroute wget docker + dysk ]; programs.git = { diff --git a/modules/home-manager/jetbrains.nix b/modules/home-manager/jetbrains.nix index cd7f53f..ab82787 100644 --- a/modules/home-manager/jetbrains.nix +++ b/modules/home-manager/jetbrains.nix @@ -1,19 +1,31 @@ -{pkgs, ...}: { +{pkgs, ...}: let + jetbrainsToolboxWithDesktop = pkgs.symlinkJoin { + name = "jetbrains-toolbox-with-desktop"; + paths = [pkgs.jetbrains-toolbox]; + nativeBuildInputs = [pkgs.makeWrapper]; + postBuild = '' + mkdir -p $out/share/applications + cat > $out/share/applications/jetbrains-toolbox.desktop <▁" - "" - "" - "" + "" + "" + "" + "" "" "" "" @@ -213,10 +213,10 @@ bar_delimiter = 0; bars = 18; format-icons = [ - "" - "" - "" - "" + "" + "" + "" + "" "" "" "" diff --git a/modules/nixos/stylix-config.nix b/modules/nixos/stylix-config.nix index fdb92ad..e8423b3 100644 --- a/modules/nixos/stylix-config.nix +++ b/modules/nixos/stylix-config.nix @@ -1,8 +1,12 @@ -{pkgs, ...}: { +{ + pkgs, + inputs, + ... +}: { stylix = { enable = true; - base16Scheme = "${pkgs.base16-schemes}/share/themes/dracula.yaml"; - #image = ./../../none-nix/wallpapers/203038.jpg; + base16Scheme = inputs.self.theme; + image = inputs.self.wallpaperPath; polarity = "dark"; fonts = { monospace = { diff --git a/modules/nixos/themes/defaults.nix b/modules/nixos/themes/defaults.nix new file mode 100644 index 0000000..368b9d1 --- /dev/null +++ b/modules/nixos/themes/defaults.nix @@ -0,0 +1,10 @@ +{ + valua = { + colorScheme = ./valua.yaml; + wallpaper = "681136.jpg"; + }; + dracula = { + colorScheme = ./dracula.yaml; + wallpaper = "wallpaper.png"; + }; +} diff --git a/modules/nixos/themes/dracula.yaml b/modules/nixos/themes/dracula.yaml new file mode 100644 index 0000000..2037012 --- /dev/null +++ b/modules/nixos/themes/dracula.yaml @@ -0,0 +1,21 @@ +system: "base16" +name: "Dracula" +author: "Jamy Golden (http://github.com/JamyGolden), based on Dracula Theme (http://github.com/dracula)" +variant: "dark" +palette: + base00: "#282a36" + base01: "#363447" + base02: "#44475a" + base03: "#6272a4" + base04: "#9ea8c7" + base05: "#f8f8f2" + base06: "#f0f1f4" + base07: "#ffffff" + base08: "#ff5555" + base09: "#ffb86c" + base0A: "#f1fa8c" + base0B: "#50fa7b" + base0C: "#8be9fd" + base0D: "#80bfff" + base0E: "#ff79c6" + base0F: "#bd93f9" diff --git a/modules/nixos/themes/valua.yaml b/modules/nixos/themes/valua.yaml new file mode 100644 index 0000000..288fcae --- /dev/null +++ b/modules/nixos/themes/valua.yaml @@ -0,0 +1,21 @@ +system: "base16" +name: "Valua" # Based on +author: "Nonetrix (https://github.com/nonetrix)" # Original author +variant: "dark" +palette: + base00: "#0a1418" # Default background + base01: "#0D403B" # Lighter background (status bars, panels) + base02: "#2A593E" # Selection background + base03: "#60A672" # Comments, invisibles, line highlighting + base04: "#EAF27B" # Dark foreground (used for status bars) + base05: "#FFFFFF" # Default foreground, text + base06: "#EAF27B" # Light foreground (not often used) + base07: "#FFFFFF" # Light background (not often used) + base08: "#ff3366" # Red (errors, deletions) + base09: "#ffb347" # Orange (warnings, annotations) + base0A: "#ffff66" # Yellow (constants, classes) + base0B: "#33ff99" # Green (strings, additions) + base0C: "#76dbd2" # Cyan (special, regex) + base0D: "#33ccff" # Blue (keywords, functions) + base0E: "#b366ff" # Purple (types, attributes) + base0F: "#c05a8f" # Pink (special, variables)