diff --git a/nix/base/common_hardware.nix b/nix/base/common_hardware.nix index e64801b..61d88c6 100644 --- a/nix/base/common_hardware.nix +++ b/nix/base/common_hardware.nix @@ -119,7 +119,7 @@ in swapDevices = [{ device = "/dev/disk/by-label/SWAP"; }]; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + nixpkgs.hostPlatform = lib.mkDefault config.conf.system; hardware.cpu.${config.conf.cpu}.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; services.fstrim.enable = lib.mkDefault true; nix.settings.auto-optimise-store = true; diff --git a/nix/base/login_manager.nix b/nix/base/login_manager.nix index 6d7ab14..1ea4ab6 100644 --- a/nix/base/login_manager.nix +++ b/nix/base/login_manager.nix @@ -1,12 +1,13 @@ { lib , config , pkgs +, inputs , ... }: let username = config.conf.username; session = { - command = "${lib.getExe pkgs.hyprland} --config /etc/greetd/hyprgreet.conf"; + command = "${lib.getExe inputs.hyprland.packages.${config.conf.system}.hyprland} --config /etc/greetd/hyprgreet.conf"; user = username; }; in diff --git a/nix/flake.lock b/nix/flake.lock index 7969627..9356cfb 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -25,11 +25,11 @@ "fromYaml": "fromYaml" }, "locked": { - "lastModified": 1708890466, - "narHash": "sha256-LlrC09LoPi8OPYOGPXegD72v+//VapgAqhbOFS3i8sc=", + "lastModified": 1709025227, + "narHash": "sha256-KXcORItjYJTdEO/BlBd0Uym1Xa3eBu43uvpFiWjJOdY=", "owner": "SenchoPens", "repo": "base16.nix", - "rev": "665b3c6748534eb766c777298721cece9453fdae", + "rev": "4e9b16c8b44958bc6bf46d99c3bb1b59c9c9c764", "type": "github" }, "original": { @@ -134,6 +134,24 @@ "type": "github" } }, + "base16_2": { + "inputs": { + "fromYaml": "fromYaml_2" + }, + "locked": { + "lastModified": 1708890466, + "narHash": "sha256-LlrC09LoPi8OPYOGPXegD72v+//VapgAqhbOFS3i8sc=", + "owner": "SenchoPens", + "repo": "base16.nix", + "rev": "665b3c6748534eb766c777298721cece9453fdae", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "base16.nix", + "type": "github" + } + }, "crane": { "inputs": { "nixpkgs": [ @@ -502,6 +520,22 @@ "type": "github" } }, + "fromYaml_2": { + "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" + } + }, "gnome-shell": { "flake": false, "locked": { @@ -1301,6 +1335,7 @@ "root": { "inputs": { "anyrun": "anyrun", + "base16": "base16", "home-manager": "home-manager", "hyprdock": "hyprdock", "hyprland": "hyprland", @@ -1476,7 +1511,7 @@ }, "stylix": { "inputs": { - "base16": "base16", + "base16": "base16_2", "base16-fish": "base16-fish", "base16-foot": "base16-foot", "base16-helix": "base16-helix", diff --git a/nix/flake.nix b/nix/flake.nix index 9a91ee0..194c042 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -29,6 +29,7 @@ }; stylix.url = "github:danth/stylix"; + base16.url = "github:SenchoPens/base16.nix"; anyrun.url = "github:Kirottu/anyrun"; oxicalc.url = "github:DashieTM/OxiCalc"; @@ -39,6 +40,7 @@ hyprdock.url = "github:DashieTM/hyprdock"; reset.url = "github:Xetibo/ReSet"; reset-plugins.url = "github:Xetibo/ReSet-Plugins"; + }; outputs = { ... }@inputs: @@ -47,41 +49,15 @@ system = "x86_64-linux"; overlays = [ inputs.nur.overlay - # DUDE FOR FUCK SAKE - # https://github.com/NixOS/nixpkgs/pull/325825 .... - # fucking fun - # TODO: https://github.com/NixOS/nixpkgs/pull/325825 .... - (_: prev: { - python312 = prev.python312.override { packageOverrides = _: pysuper: { nose = pysuper.pynose; }; }; - }) ]; config = { allowUnfree = true; }; }; + dashielib = import ./lib { inherit inputs pkgs; }; in { - nixosConfigurations = (builtins.listToAttrs (map - (name: { - name = name; - value = - let - mod = ./hardware/${name}/configuration.nix; - in - inputs.nixpkgs.lib.nixosSystem { - specialArgs = { - inherit inputs pkgs mod; - }; - modules = [ - inputs.home-manager.nixosModules.home-manager - inputs.stylix.nixosModules.stylix - ./base/default.nix - ./programs - mod - ] ++ inputs.nixpkgs.lib.optional (builtins.pathExists ./hardware/${name}/${name}.nix) ./hardware/${name}/${name}.nix - ++ inputs.nixpkgs.lib.optional (builtins.pathExists mod) mod; - }; - }) [ "marmo" "overheating" "spaceship" ])); + nixosConfigurations = (dashielib.build_systems [ "marmo" "overheating" "spaceship" ]); }; nixConfig = { diff --git a/nix/hardware/overheating/configuration.nix b/nix/hardware/overheating/configuration.nix index 941b63e..c06e2af 100644 --- a/nix/hardware/overheating/configuration.nix +++ b/nix/hardware/overheating/configuration.nix @@ -20,6 +20,7 @@ ]; extra_autostart = [ "hyprdock --server" ]; }; + colorscheme = "catppuccin-mocha"; }; } diff --git a/nix/lib/default.nix b/nix/lib/default.nix new file mode 100644 index 0000000..91b3acc --- /dev/null +++ b/nix/lib/default.nix @@ -0,0 +1,22 @@ +{ inputs, pkgs, ... }: { + build_systems = systems: builtins.listToAttrs (map (name: { + name = name; + value = + let + mod = ../hardware/${name}/configuration.nix; + in + inputs.nixpkgs.lib.nixosSystem { + specialArgs = { + inherit inputs pkgs mod; + }; + modules = [ + inputs.home-manager.nixosModules.home-manager + inputs.stylix.nixosModules.stylix + ../base + ../programs + mod + ] ++ inputs.nixpkgs.lib.optional (builtins.pathExists ../hardware/${name}/${name}.nix) ../hardware/${name}/${name}.nix + ++ inputs.nixpkgs.lib.optional (builtins.pathExists mod) mod; + }; + } )systems); +} diff --git a/nix/modules/conf.nix b/nix/modules/conf.nix index ded538b..6a59abf 100644 --- a/nix/modules/conf.nix +++ b/nix/modules/conf.nix @@ -1,5 +1,16 @@ { lib, config, pkgs, ... }: { options.conf = { + + system = lib.mkOption { + default = "x86_64-linux"; + # no fisherprice unix support + type = with lib.types; (enum [ "x86_64-linux" "aarch64-linux" "aarch64-linux-android" ]); + example = "aarch64-linux"; + description = '' + System architecture. + ''; + }; + cpu = lib.mkOption { # TODO: how to enable arm? default = "amd"; @@ -160,6 +171,7 @@ colorscheme = lib.mkOption { default = { + # custom tokyo night base00 = "1A1B26"; # base01 = "16161E"; # base01 = "15161e"; @@ -183,10 +195,13 @@ base0E = "BB9AF7"; base0F = "F7768E"; }; - example = { base00 = "FFFFFF"; }; - type = with lib.types; attrs; + example = "catppuccin-mocha"; + type = with lib.types; oneOf [ str attrs path ]; description = '' Base16 colorscheme. + Can be an attribute set with base00 to base0F, + a string that leads to a yaml file in base16-schemes path, + or a path to a custom yaml file. ''; }; }; diff --git a/nix/override/default.nix b/nix/override/default.nix deleted file mode 100644 index b34cd63..0000000 --- a/nix/override/default.nix +++ /dev/null @@ -1,4 +0,0 @@ -#{pkgs, ...}:{ -# hello = pkgs.callPackage ./ncspot.nix; -#} -{ } diff --git a/nix/override/ncspot.nix b/nix/override/ncspot.nix deleted file mode 100644 index 837a7ed..0000000 --- a/nix/override/ncspot.nix +++ /dev/null @@ -1,77 +0,0 @@ -{ pkgs -, stdenv -, lib -, fetchFromGitHub -, rustPlatform -, withALSA ? false -, withClipboard ? true -, withCover ? false -, withPulseAudio ? true -, withPortAudio ? false -, withMPRIS ? true -, withNotify ? true -, withCross ? true -, nix-update-script -, testers -, ncspot -}: - -rustPlatform.buildRustPackage rec { - pname = "ncspot"; - version = "1.1.0"; - - src = fetchFromGitHub { - owner = "hrkfdn"; - repo = "ncspot"; - rev = "v${version}"; - hash = "sha256-RgA3jV/vD6qgIVQCZ0Sm+9CST4SlqN4MUurVM3nIdh0="; - }; - - cargoHash = "sha256-8ZUgm1O4NmZpxgNRKnh1MNhiFNoBWQHo22kyP3hWJwI="; - - nativeBuildInputs = [ pkgs.pkg-config ] - ++ lib.optional withClipboard pkgs.python3; - - buildInputs = [ pkgs.ncurses ] - ++ lib.optional stdenv.isLinux pkgs.openssl - ++ lib.optional withALSA pkgs.alsa-lib - ++ lib.optional withClipboard pkgs.xorg.libxcb - ++ lib.optional withCover pkgs.ueberzug - ++ lib.optional withPulseAudio pkgs.libpulseaudio - ++ lib.optional withPortAudio pkgs.portaudio - ++ lib.optional (withMPRIS || withNotify) pkgs.dbus - ++ lib.optional stdenv.isDarwin pkgs.Cocoa; - - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-DNCURSES_UNCTRL_H_incl"; - - buildNoDefaultFeatures = true; - - buildFeatures = [ "cursive/pancurses-backend" ] - ++ lib.optional withALSA "alsa_backend" - ++ lib.optional withClipboard "share_clipboard" - ++ lib.optional withCover "cover" - ++ lib.optional withPulseAudio "pulseaudio_backend" - ++ lib.optional withPortAudio "portaudio_backend" - ++ lib.optional withMPRIS "mpris" - ++ lib.optional withCross "crossterm_backend" - ++ lib.optional withNotify "notify"; - - postInstall = '' - install -D --mode=444 $src/misc/ncspot.desktop $out/share/applications/${pname}.desktop - install -D --mode=444 $src/images/logo.svg $out/share/icons/hicolor/scalable/apps/${pname}.png - ''; - - passthru = { - updateScript = nix-update-script { }; - tests.version = testers.testVersion { package = ncspot; }; - }; - - meta = with lib; { - description = "Cross-platform ncurses Spotify client written in Rust, inspired by ncmpc and the likes"; - homepage = "https://github.com/hrkfdn/ncspot"; - changelog = "https://github.com/hrkfdn/ncspot/releases/tag/v${version}"; - license = licenses.bsd2; - maintainers = with maintainers; [ marsam liff ]; - mainProgram = "ncspot"; - }; -} diff --git a/nix/programs/individual_configs/default.nix b/nix/programs/individual_configs/default.nix index 1e4e895..f705a7b 100644 --- a/nix/programs/individual_configs/default.nix +++ b/nix/programs/individual_configs/default.nix @@ -3,7 +3,6 @@ ./kitty.nix ./yazi.nix ./fish.nix - ./ncspot.nix ./ssh.nix ./direnv.nix ./git.nix diff --git a/nix/programs/media.nix b/nix/programs/media.nix index 409e0b7..cf205c6 100644 --- a/nix/programs/media.nix +++ b/nix/programs/media.nix @@ -19,7 +19,6 @@ pdfpc polylux2pdfpc # spotify - #ncspot # video editing kdenlive # image creation diff --git a/nix/programs/themes/gtk3.nix b/nix/programs/themes/gtk3.nix deleted file mode 100644 index f19c2d0..0000000 --- a/nix/programs/themes/gtk3.nix +++ /dev/null @@ -1,103 +0,0 @@ -{ - xdg.configFile."gtk-3.0/gtk.css" = { - text = - '' - /* - Generated with Gradience - - Issues caused by theming should be reported to Gradience repository, and not to upstream - - https://github.com/GradienceTeam/Gradience - */ - - @define-color accent_color #a9b1d6; - @define-color accent_bg_color #a9b1d6; - @define-color accent_fg_color rgba(0, 0, 0, 0.87); - @define-color destructive_color #F28B82; - @define-color destructive_bg_color #F28B82; - @define-color destructive_fg_color rgba(0, 0, 0, 0.87); - @define-color success_color #81C995; - @define-color success_bg_color #81C995; - @define-color success_fg_color rgba(0, 0, 0, 0.87); - @define-color warning_color #FDD633; - @define-color warning_bg_color #FDD633; - @define-color warning_fg_color rgba(0, 0, 0, 0.87); - @define-color error_color #F28B82; - @define-color error_bg_color #F28B82; - @define-color error_fg_color rgba(0, 0, 0, 0.87); - @define-color window_bg_color #1a1b26; - @define-color window_fg_color #c0caf5; - @define-color view_bg_color #1a1b26; - @define-color view_fg_color #c0caf5; - @define-color headerbar_bg_color #1a1b26; - @define-color headerbar_fg_color #c0caf5; - @define-color headerbar_border_color rgba(192, 202, 245, 0.12); - @define-color headerbar_backdrop_color @window_bg_color; - @define-color headerbar_shade_color rgba(0, 0, 0, 0.36); - @define-color card_bg_color #1a1b26; - @define-color card_fg_color #c0caf5; - @define-color card_shade_color rgba(0, 0, 0, 0.36); - @define-color dialog_bg_color #1a1b26; - @define-color dialog_fg_color #c0caf5; - @define-color popover_bg_color #1a1b26; - @define-color popover_fg_color #c0caf5; - @define-color shade_color rgba(0, 0, 0, 0.36); - @define-color scrollbar_outline_color rgba(0, 0, 0, 0.5); - @define-color secondary_sidebar_backdrop_color #1a1b26; - @define-color secondary_sidebar_shade_color rgba(0,0,0,0.5); - @define-color sidebar_backdrop_color #1a1b26; - @define-color sidebar_shade_color rgba(0,0,0,0.5); - @define-color sidebar_bg_color #1a1b26; - @define-color sidebar_fg_color #c0caf5; - @define-color secondary_sidebar_bg_color #1a1b26; - @define-color secondary_sidebar_fg_color #c0caf5; - @define-color thumbnail_bg_color #1a1b26; - @define-color thumbnail_fg_color #c0caf5; - @define-color blue_1 #99c1f1; - @define-color blue_2 #62a0ea; - @define-color blue_3 #3584e4; - @define-color blue_4 #1c71d8; - @define-color blue_5 #1a5fb4; - @define-color green_1 #8ff0a4; - @define-color green_2 #57e389; - @define-color green_3 #33d17a; - @define-color green_4 #2ec27e; - @define-color green_5 #26a269; - @define-color yellow_1 #f9f06b; - @define-color yellow_2 #f8e45c; - @define-color yellow_3 #f6d32d; - @define-color yellow_4 #f5c211; - @define-color yellow_5 #e5a50a; - @define-color orange_1 #ffbe6f; - @define-color orange_2 #ffa348; - @define-color orange_3 #ff7800; - @define-color orange_4 #e66100; - @define-color orange_5 #c64600; - @define-color red_1 #f66151; - @define-color red_2 #ed333b; - @define-color red_3 #e01b24; - @define-color red_4 #c01c28; - @define-color red_5 #a51d2d; - @define-color purple_1 #dc8add; - @define-color purple_2 #c061cb; - @define-color purple_3 #9141ac; - @define-color purple_4 #813d9c; - @define-color purple_5 #613583; - @define-color brown_1 #cdab8f; - @define-color brown_2 #b5835a; - @define-color brown_3 #986a44; - @define-color brown_4 #865e3c; - @define-color brown_5 #63452c; - @define-color light_1 #ffffff; - @define-color light_2 #f6f5f4; - @define-color light_3 #deddda; - @define-color light_4 #c0bfbc; - @define-color light_5 #9a9996; - @define-color dark_1 #77767b; - @define-color dark_2 #5e5c64; - @define-color dark_3 #3d3846; - @define-color dark_4 #241f31; - @define-color dark_5 #000000; - ''; - }; -} diff --git a/nix/programs/themes/gtk4.nix b/nix/programs/themes/gtk4.nix deleted file mode 100644 index e9caa0a..0000000 --- a/nix/programs/themes/gtk4.nix +++ /dev/null @@ -1,109 +0,0 @@ -{ - # TODO: reenable this again - # right now its broken because flatpak... - xdg.configFile."gtk-4.0/gtk.css" = { - text = - '' - /* - Generated with Gradience - - Issues caused by theming should be reported to Gradience repository, and not to upstream - - https://github.com/GradienceTeam/Gradience - */ - - @define-color accent_color #a9b1d6; - @define-color accent_bg_color #a9b1d6; - @define-color accent_fg_color rgba(0, 0, 0, 0.87); - @define-color destructive_color #F28B82; - @define-color destructive_bg_color #F28B82; - @define-color destructive_fg_color rgba(0, 0, 0, 0.87); - @define-color success_color #81C995; - @define-color success_bg_color #81C995; - @define-color success_fg_color rgba(0, 0, 0, 0.87); - @define-color warning_color #FDD633; - @define-color warning_bg_color #FDD633; - @define-color warning_fg_color rgba(0, 0, 0, 0.87); - @define-color error_color #F28B82; - @define-color error_bg_color #F28B82; - @define-color error_fg_color rgba(0, 0, 0, 0.87); - @define-color window_bg_color #1a1b26; - @define-color window_fg_color #c0caf5; - @define-color view_bg_color #1a1b26; - @define-color view_fg_color #c0caf5; - @define-color headerbar_bg_color #1a1b26; - @define-color headerbar_fg_color #c0caf5; - @define-color headerbar_border_color rgba(192, 202, 245, 0.12); - @define-color headerbar_backdrop_color @window_bg_color; - @define-color headerbar_shade_color rgba(0, 0, 0, 0.36); - @define-color card_bg_color #1a1b26; - @define-color card_fg_color #c0caf5; - @define-color card_shade_color rgba(0, 0, 0, 0.36); - @define-color dialog_bg_color #1a1b26; - @define-color dialog_fg_color #c0caf5; - @define-color popover_bg_color #1a1b26; - @define-color popover_fg_color #c0caf5; - @define-color shade_color rgba(0, 0, 0, 0.36); - @define-color scrollbar_outline_color rgba(0, 0, 0, 0.5); - @define-color sidebar_bg_color #1a1b26; - @define-color sidebar_fg_color #c0caf5; - @define-color secondary_sidebar_bg_color #1a1b26; - @define-color secondary_sidebar_fg_color #c0caf5; - @define-color sidebar_shade_color rgba(0, 0, 0, 0.36); - @define-color secondary_sidebar_shade_color rgba(0, 0, 0, 0.36); - @define-color thumbnail_bg_color #1a1b26; - @define-color thumbnail_fg_color #c0caf5; - @define-color sidebar_backdrop_color @sidebar_bg_color; - @define-color secondary_sidebar_backdrop_color @sidebar_bg_color; - @define-color blue_1 #99c1f1; - @define-color blue_2 #62a0ea; - @define-color blue_3 #3584e4; - @define-color blue_4 #1c71d8; - @define-color blue_5 #1a5fb4; - @define-color green_1 #8ff0a4; - @define-color green_2 #57e389; - @define-color green_3 #33d17a; - @define-color green_4 #2ec27e; - @define-color green_5 #26a269; - @define-color yellow_1 #f9f06b; - @define-color yellow_2 #f8e45c; - @define-color yellow_3 #f6d32d; - @define-color yellow_4 #f5c211; - @define-color yellow_5 #e5a50a; - @define-color orange_1 #ffbe6f; - @define-color orange_2 #ffa348; - @define-color orange_3 #ff7800; - @define-color orange_4 #e66100; - @define-color orange_5 #c64600; - @define-color red_1 #f66151; - @define-color red_2 #ed333b; - @define-color red_3 #e01b24; - @define-color red_4 #c01c28; - @define-color red_5 #a51d2d; - @define-color purple_1 #dc8add; - @define-color purple_2 #c061cb; - @define-color purple_3 #9141ac; - @define-color purple_4 #813d9c; - @define-color purple_5 #613583; - @define-color brown_1 #cdab8f; - @define-color brown_2 #b5835a; - @define-color brown_3 #986a44; - @define-color brown_4 #865e3c; - @define-color brown_5 #63452c; - @define-color light_1 #ffffff; - @define-color light_2 #f6f5f4; - @define-color light_3 #deddda; - @define-color light_4 #c0bfbc; - @define-color light_5 #9a9996; - @define-color dark_1 #77767b; - @define-color dark_2 #5e5c64; - @define-color dark_3 #3d3846; - @define-color dark_4 #241f31; - @define-color dark_5 #000000; - - .navigation-sidebar { - background-color: #1a1b26; - } - ''; - }; -} diff --git a/nix/programs/themes/kvantum.nix b/nix/programs/themes/kvantum.nix deleted file mode 100644 index 233def3..0000000 --- a/nix/programs/themes/kvantum.nix +++ /dev/null @@ -1,154 +0,0 @@ -{ - xdg.configFile."kvantum/colors/tokyonight.colors" = { - text = - '' - [ColorEffects:Disabled] - Color=56,56,56 - ColorAmount=0.15000000000000002 - ColorEffect=2 - ContrastAmount=0.8 - ContrastEffect=1 - IntensityAmount=-1 - IntensityEffect=2 - - [ColorEffects:Inactive] - ChangeSelectionColor=true - Color=112,111,110 - ColorAmount=0.025 - ColorEffect=2 - ContrastAmount=0.1 - ContrastEffect=2 - Enable=false - IntensityAmount=0 - IntensityEffect=0 - - [Colors:Button] - BackgroundAlternate=157,221,203 - BackgroundNormal=44,45,55 - DecorationFocus=164,185,239 - DecorationHover=164,185,239 - ForegroundActive=164,185,239 - ForegroundInactive=120,124,153 - ForegroundLink=164,185,239 - ForegroundNegative=226,140,140 - ForegroundNeutral=247,193,150 - ForegroundNormal=215,218,224 - ForegroundPositive=179,225,163 - ForegroundVisited=173,142,230 - - [Colors:Complementary] - BackgroundAlternate=157,221,203 - BackgroundNormal=30,30,41 - DecorationFocus=164,185,239 - DecorationHover=164,185,239 - ForegroundActive=164,185,239 - ForegroundInactive=110,108,124 - ForegroundLink=164,185,239 - ForegroundNegative=226,140,140 - ForegroundNeutral=247,193,150 - ForegroundNormal=215,218,224 - ForegroundPositive=179,225,163 - ForegroundVisited=198,170,232 - - [Colors:Header] - BackgroundAlternate=30,30,41 - BackgroundNormal=30,30,41 - DecorationFocus=164,185,239 - DecorationHover=164,185,239 - ForegroundActive=164,185,239 - ForegroundInactive=110,108,124 - ForegroundLink=164,185,239 - ForegroundNegative=226,140,140 - ForegroundNeutral=247,193,150 - ForegroundNormal=215,218,224 - ForegroundPositive=179,225,163 - ForegroundVisited=198,170,232 - - [Colors:Header][Inactive] - BackgroundAlternate=49,54,59 - BackgroundNormal=22,22,29 - DecorationFocus=61,174,233 - DecorationHover=61,174,233 - ForegroundActive=61,174,233 - ForegroundInactive=161,169,177 - ForegroundLink=29,153,243 - ForegroundNegative=218,68,83 - ForegroundNeutral=246,116,0 - ForegroundNormal=252,252,252 - ForegroundPositive=39,174,96 - ForegroundVisited=155,89,182 - - [Colors:Selection] - BackgroundAlternate=157,221,203 - BackgroundNormal=164,187,239 - DecorationFocus=30,30,41 - DecorationHover=30,30,41 - ForegroundActive=21,18,28 - ForegroundInactive=120,124,153 - ForegroundLink=21,18,28 - ForegroundNegative=225,139,139 - ForegroundNeutral=247,193,150 - ForegroundNormal=20,21,30 - ForegroundPositive=179,225,163 - ForegroundVisited=173,142,230 - - [Colors:Tooltip] - BackgroundAlternate=22,22,29 - BackgroundNormal=26,27,38 - DecorationFocus=164,185,239 - DecorationHover=164,185,239 - ForegroundActive=164,185,239 - ForegroundInactive=120,124,153 - ForegroundLink=164,185,239 - ForegroundNegative=226,140,140 - ForegroundNeutral=247,193,150 - ForegroundNormal=215,218,224 - ForegroundPositive=179,225,163 - ForegroundVisited=173,142,230 - - [Colors:View] - BackgroundAlternate=22,22,29 - BackgroundNormal=26,27,38 - DecorationFocus=164,185,239 - DecorationHover=164,185,239 - ForegroundActive=164,185,239 - ForegroundInactive=120,124,153 - ForegroundLink=164,185,239 - ForegroundNegative=226,140,140 - ForegroundNeutral=247,193,150 - ForegroundNormal=215,218,224 - ForegroundPositive=179,225,163 - ForegroundVisited=173,142,230 - - [Colors:Window] - BackgroundAlternate=22,22,29 - BackgroundNormal=26,27,38 - DecorationFocus=164,185,239 - DecorationHover=164,185,239 - ForegroundActive=164,185,239 - ForegroundInactive=120,124,153 - ForegroundLink=164,185,239 - ForegroundNegative=226,140,140 - ForegroundNeutral=247,193,150 - ForegroundNormal=215,218,224 - ForegroundPositive=179,225,163 - ForegroundVisited=173,142,230 - - [General] - ColorScheme=BreezeDark - Name=Tokyo Night - shadeSortColumn=true - - [KDE] - contrast=4 - - [WM] - activeBackground=26,27,38 - activeBlend=215,218,224 - activeForeground=215,218,224 - inactiveBackground=26,27,38 - inactiveBlend=110,108,124 - inactiveForeground=110,108,124 - ''; - }; -} diff --git a/nix/programs/themes/qt.nix b/nix/programs/themes/qt.nix index 2c394fe..5fb1956 100644 --- a/nix/programs/themes/qt.nix +++ b/nix/programs/themes/qt.nix @@ -1,7 +1,10 @@ -{ config, ... }: +{ config, inputs, pkgs, ... }: let username = config.conf.username; - scheme = config.conf.colorscheme; + # at time of using this here, stylix might not be evaluated yet + # hence ensure it is by using base16 mkSchemeAttrs + base16 = pkgs.callPackage inputs.base16.lib { }; + scheme = (base16.mkSchemeAttrs config.stylix.base16Scheme); # active_colors=#ffc0caf5, #${scheme.base00}, #ff373949, #ff2b2c3b, #ff1a1b26, #ff2b2c3b, #ffc0caf5, #ffc0caf5, #ffc0caf5, #ff1a1b26, #ff1a1b26, #19000000, #ff2b2c3b, #ffc0caf5, #ff3584e4, #ff1b6acb, #ff1a1b26, #ff242530, #ff1a1b26, #ffc0caf5, #ffc0caf5 # disabled_colors=#ff6d728d, #${scheme.base00}, #ff373949, #ff2b2c3b, #ff1a1b26, #ff2b2c3b, #ff6d728d, #ff6d728d, #ff6d728d, #ff1a1b26, #ff1a1b26, #19000000, #ff2b2c3b, #ff6d728d, #ff3584e4, #ff1b6acb, #ff1a1b26, #ff242530, #ff1a1b26, #ff6d728d, #ff6d728d # inactive_colors=#ff6d728d, #${scheme.base00}, #ff373949, #ff2b2c3b, #ff1a1b26, #ff2b2c3b, #ff6d728d, #ff6d728d, #ff6d728d, #ff1a1b26, #ff1a1b26, #19000000, #ff2b2c3b, #ff6d728d, #ff3584e4, #ff1b6acb, #ff1a1b26, #ff242530, #ff1a1b26, #ff6d728d, #ff6d728d diff --git a/nix/programs/themes/stylix.nix b/nix/programs/themes/stylix.nix index 3e2860d..4a210e2 100644 --- a/nix/programs/themes/stylix.nix +++ b/nix/programs/themes/stylix.nix @@ -1,4 +1,5 @@ -{ pkgs, config, ... }: { +{ pkgs, config, ... }: +{ stylix = { enable = true; image = /home/${config.conf.username}/Pictures/backgrounds/shinobu_2k.jpg; @@ -33,6 +34,7 @@ size = 24; }; - base16Scheme = config.conf.colorscheme; + base16Scheme = + (if builtins.isAttrs config.conf.colorscheme then config.conf.colorscheme else "${pkgs.base16-schemes}/share/themes/${config.conf.colorscheme}.yaml"); }; }