From 6ddb5d9e6b96ebda8d3672ac79acf9b5723ab428 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Thu, 18 Apr 2024 18:08:46 +0200 Subject: [PATCH] chore: oxi programs to be compiled --- nix/base/base_packages.nix | 1 + nix/base/common_hardware.nix | 74 +++++++++++++++++++++ nix/base/default.nix | 1 + nix/fix/default.nix | 4 ++ nix/fix/ncspot.nix | 77 ++++++++++++++++++++++ nix/fix/oxicalc.nix | 46 +++++++++++++ nix/fix/oxidash.nix | 52 +++++++++++++++ nix/fix/oxinoti.nix | 51 ++++++++++++++ nix/fix/oxipaste.nix | 42 ++++++++++++ nix/fix/oxishut.nix | 41 ++++++++++++ nix/flake.nix | 26 ++++---- nix/hardware/marmo/base_config.nix | 1 + nix/hardware/marmo/marmo.nix | 2 +- nix/hardware/overheating/configuration.nix | 73 -------------------- nix/hardware/spaceship/configuration.nix | 74 --------------------- nix/programs/common.nix | 21 ++++++ nix/programs/default.nix | 1 + nix/programs/hyprland/default.nix | 1 + nix/programs/individual_configs/ncspot.nix | 74 ++++++++++----------- nix/programs/media.nix | 2 +- nix/programs/themes/qt.nix | 21 +++--- 21 files changed, 477 insertions(+), 208 deletions(-) create mode 100644 nix/base/common_hardware.nix create mode 100644 nix/fix/default.nix create mode 100644 nix/fix/ncspot.nix create mode 100644 nix/fix/oxicalc.nix create mode 100644 nix/fix/oxidash.nix create mode 100644 nix/fix/oxinoti.nix create mode 100644 nix/fix/oxipaste.nix create mode 100644 nix/fix/oxishut.nix create mode 100644 nix/hardware/marmo/base_config.nix diff --git a/nix/base/base_packages.nix b/nix/base/base_packages.nix index 643cffe..301f15c 100644 --- a/nix/base/base_packages.nix +++ b/nix/base/base_packages.nix @@ -16,6 +16,7 @@ gnome.adwaita-icon-theme bibata-cursors xorg.xkbutils + libxkbcommon ]; fonts.packages = with pkgs; [ diff --git a/nix/base/common_hardware.nix b/nix/base/common_hardware.nix new file mode 100644 index 0000000..e86ab4a --- /dev/null +++ b/nix/base/common_hardware.nix @@ -0,0 +1,74 @@ +{ pkgs, ... }: +{ + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + # Enable networking + networking.networkmanager.enable = true; + services.flatpak.enable = true; + + # Set your time zone. + time.timeZone = "Europe/Zurich"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + + # Enable the X11 windowing system. + services.xserver.enable = true; + + # Configure keymap in X11 + services.xserver = { + xkb.layout = "us"; + xkb.variant = ""; + }; + + # Enable CUPS to print documents. + services.printing.enable = true; + + # Enable sound with pipewire. + sound.enable = true; + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + + environment.variables = { + XDG_CACHE_HOME = "$HOME/.cache"; + DIRENV_LOG_FORMAT = ""; + }; + + # allows user change later on + users.mutableUsers = true; + users.users.dashie = { + isNormalUser = true; + description = "dashie"; + extraGroups = [ "networkmanager" "wheel" "gamemode" ]; + packages = with pkgs; [ + home-manager + xdg-desktop-portal-gtk + xdg-desktop-portal-hyprland + ]; + # this password will only last for the first login + # e.g. login, then change to whatever else, this also ensures no public hash is available + password = "firstlogin"; + }; + + nix.settings = { + builders-use-substitutes = true; + # substituters to use + substituters = [ + "https://anyrun.cachix.org" + ]; + + trusted-public-keys = [ + "anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s=" + ]; + }; + + system.stateVersion = "unstable"; +} diff --git a/nix/base/default.nix b/nix/base/default.nix index 8822b3c..406e4ee 100644 --- a/nix/base/default.nix +++ b/nix/base/default.nix @@ -5,5 +5,6 @@ ./env.nix ./xkb_layout.nix ./base_packages.nix + ./common_hardware.nix ]; } diff --git a/nix/fix/default.nix b/nix/fix/default.nix new file mode 100644 index 0000000..9afa919 --- /dev/null +++ b/nix/fix/default.nix @@ -0,0 +1,4 @@ +#{pkgs, ...}:{ +# hello = pkgs.callPackage ./ncspot.nix; +#} + {} diff --git a/nix/fix/ncspot.nix b/nix/fix/ncspot.nix new file mode 100644 index 0000000..837a7ed --- /dev/null +++ b/nix/fix/ncspot.nix @@ -0,0 +1,77 @@ +{ 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/fix/oxicalc.nix b/nix/fix/oxicalc.nix new file mode 100644 index 0000000..0c24498 --- /dev/null +++ b/nix/fix/oxicalc.nix @@ -0,0 +1,46 @@ +{ pkgs +, lib +, fetchFromGitHub +}: +let + toolchain = pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.minimal); + rustPlatform = pkgs.makeRustPlatform { + cargo = toolchain; + rustc = toolchain; + }; +in +rustPlatform.buildRustPackage rec { + pname = "oxicalc"; + version = "0.2.4"; + + src = fetchFromGitHub { + owner = "DashieTM"; + repo = "OxiCalc"; + rev = "${version}"; + hash = "sha256-7qrnA0jnLg2mckpxCe66+axU3jE6nOBu7HefmP8I2Xc="; + }; + + cargoHash = "sha256-nxLXT9SVorsgj7qzwX8Ipx8SDvyTYMAcpepTg62QL7o="; + + nativeBuildInputs = with pkgs;[ pkg-config ]; + + buildInputs = with pkgs;[ + gtk4 + libadwaita + ]; + + + postInstall = '' + install -D --mode=444 $src/${pname}.desktop $out/share/applications/${pname}.desktop + install -D --mode=444 $src/${pname}.svg $out/share/pixmaps/${pname}.svg + ''; + + meta = with lib; { + description = "A small, simple calculator written in rust/gtk4"; + homepage = "https://github.com/DashieTM/OxiCalc"; + changelog = "https://github.com/DashieTM/OxiCalc/releases/tag/${version}"; + license = licenses.gpl3; + maintainers = with maintainers; [ DashieTM ]; + mainProgram = "oxicalc"; + }; +} diff --git a/nix/fix/oxidash.nix b/nix/fix/oxidash.nix new file mode 100644 index 0000000..fe02897 --- /dev/null +++ b/nix/fix/oxidash.nix @@ -0,0 +1,52 @@ +{ pkgs +, lib +, fetchFromGitHub +}: +let + toolchain = pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.minimal); + rustPlatform = pkgs.makeRustPlatform { + cargo = toolchain; + rustc = toolchain; + }; +in +rustPlatform.buildRustPackage rec { + pname = "oxidash"; + version = "1.0"; + + src = fetchFromGitHub { + owner = "DashieTM"; + repo = "OxiDash"; + rev = "${version}"; + hash = "sha256-GVkmqwn3mHriMHUfEej4LW0MaYURqtsftC5L+Cox+5E="; + }; + + cargoHash = "sha256-seFHiBht0vc+iqQw5bd22qVvdhCMqDthWuth3NTm8OY="; + + nativeBuildInputs = with pkgs;[ pkg-config glib ]; + + buildInputs = with pkgs;[ + dbus + gtk4 + gtk4-layer-shell + libadwaita + ]; + + #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 = oxinoti; }; + #}; + + meta = with lib; { + description = "A work in progress notification daemon made with rust and gtk."; + homepage = "https://github.com/DashieTM/OxiDash"; + changelog = "https://github.com/DashieTM/OxiDash/releases/tag/${version}"; + license = licenses.gpl3; + maintainers = with maintainers; [ DashieTM ]; + mainProgram = "oxidash"; + }; +} diff --git a/nix/fix/oxinoti.nix b/nix/fix/oxinoti.nix new file mode 100644 index 0000000..fa5da92 --- /dev/null +++ b/nix/fix/oxinoti.nix @@ -0,0 +1,51 @@ +{ pkgs +, lib +, fetchFromGitHub +}: +let + toolchain = pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.minimal); + rustPlatform = pkgs.makeRustPlatform { + cargo = toolchain; + rustc = toolchain; + }; +in +rustPlatform.buildRustPackage rec { + pname = "oxinoti"; + version = "1.0"; + + src = fetchFromGitHub { + owner = "DashieTM"; + repo = "OxiNoti"; + rev = "${version}"; + hash = "sha256-XZMfJ2kUTd8+XiDgZFbG1sOPt37e4M+1rgp4Bdlej7s="; + }; + + cargoHash = "sha256-jIdev6K5MQ8jASDo1KWU89rSLd9UhI2MhTT4l7pP+tA="; + + nativeBuildInputs = with pkgs;[ pkg-config ]; + + buildInputs = with pkgs;[ + dbus + gtk3 + gtk-layer-shell + ]; + + #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 = oxinoti; }; + #}; + + meta = with lib; { + description = "A work in progress notification daemon made with rust and gtk."; + homepage = "https://github.com/DashieTM/OxiNoti"; + changelog = "https://github.com/DashieTM/OxiNoti/releases/tag/${version}"; + license = licenses.gpl3; + maintainers = with maintainers; [ DashieTM ]; + mainProgram = "oxinoti"; + }; +} diff --git a/nix/fix/oxipaste.nix b/nix/fix/oxipaste.nix new file mode 100644 index 0000000..1366563 --- /dev/null +++ b/nix/fix/oxipaste.nix @@ -0,0 +1,42 @@ +{ pkgs +, lib +, fetchFromGitHub +}: +let + toolchain = pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.minimal); + rustPlatform = pkgs.makeRustPlatform { + cargo = toolchain; + rustc = toolchain; + }; +in +rustPlatform.buildRustPackage rec { + pname = "oxipaste"; + version = "1.0"; + + src = fetchFromGitHub { + owner = "DashieTM"; + repo = "OxiPaste"; + rev = "${version}"; + hash = "sha256-2copt808b4cpmE8HO2H960xLs7OegvOUYYS/6z7fNMk="; + }; + + cargoHash = "sha256-RXaL5y0hohP9VJ7IJCEfdJjyxwY2l555xSwRa9ZiNKc="; + + nativeBuildInputs = with pkgs;[ pkg-config ]; + + buildInputs = with pkgs;[ + dbus + gtk4 + libadwaita + gtk4-layer-shell + ]; + + meta = with lib; { + description = "A work in progress notification daemon made with rust and gtk."; + homepage = "https://github.com/DashieTM/OxiPaste"; + changelog = "https://github.com/DashieTM/OxiPaste/releases/tag/${version}"; + license = licenses.gpl3; + maintainers = with maintainers; [ DashieTM ]; + mainProgram = "oxipaste"; + }; +} diff --git a/nix/fix/oxishut.nix b/nix/fix/oxishut.nix new file mode 100644 index 0000000..3ff3d46 --- /dev/null +++ b/nix/fix/oxishut.nix @@ -0,0 +1,41 @@ +{ pkgs +, lib +, fetchFromGitHub +}: +let + toolchain = pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.minimal); + rustPlatform = pkgs.makeRustPlatform { + cargo = toolchain; + rustc = toolchain; + }; +in +rustPlatform.buildRustPackage rec { + pname = "oxishut"; + version = "1.0"; + + src = fetchFromGitHub { + owner = "DashieTM"; + repo = "OxiShut"; + rev = "${version}"; + hash = "sha256-aCNnNxmIHq+IjjviWNGSHfdXT55s367GTAeQoaTZ/KA="; + }; + + cargoHash = "sha256-UeoBSHwMGfhkgRT7kmelcG3/omtB03Wh4IZrTy3yf3Y="; + + nativeBuildInputs = with pkgs;[ pkg-config glib ]; + + buildInputs = with pkgs;[ + gtk4 + libadwaita + gtk4-layer-shell + ]; + + meta = with lib; { + description = ""; + homepage = "https://github.com/DashieTM/OxiShut"; + changelog = "https://github.com/DashieTM/OxiShut/releases/tag/${version}"; + license = licenses.gpl3; + maintainers = with maintainers; [ DashieTM ]; + mainProgram = "oxishut"; + }; +} diff --git a/nix/flake.nix b/nix/flake.nix index 6a9ebab..132e882 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -33,23 +33,27 @@ config = { allowUnfree = true; }; + overlays = [ + # because allowing rust nightly is too hard by default.... + (import (fetchTarball { url = "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"; sha256 = "sha256:06al2zlkyf14pz0i0q0ah18ygijra8l5qwd8rnm1bp9l6g8gp5zk"; })) + ]; }; base_imports = [ inputs.home-manager.nixosModules.home-manager ./base/default.nix + ./programs ]; in - #inputs.flake-parts.lib.mkFlake { inherit inputs; } { - #imports = [ - #]; - #homeConfigurations."marmo" = inputs.home-manager.lib.homeManagerConfiguration { - # inherit pkgs; - # modules = [ - # ./hardware/marmo/default.nix - # ./programs - # ]; - #}; + homeConfigurations."marmo" = inputs.home-manager.lib.homeManagerConfiguration { + specialArgs = { + inherit inputs pkgs; + mod = ./hardware/overheating/base_config.nix; + }; + modules = [ + ./hardware/marmo/default.nix + ]; + }; nixosConfigurations."overheating" = inputs.nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs pkgs; @@ -57,7 +61,6 @@ }; modules = [ ./hardware/overheating/default.nix - ./programs ]; }; nixosConfigurations."spaceship" = inputs.nixpkgs.lib.nixosSystem { @@ -69,7 +72,6 @@ ./hardware/spaceship/default.nix ./hardware/streamdeck.nix ./programs/gaming/default.nix - ./programs ] ++ base_imports; }; }; diff --git a/nix/hardware/marmo/base_config.nix b/nix/hardware/marmo/base_config.nix new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/nix/hardware/marmo/base_config.nix @@ -0,0 +1 @@ +{} diff --git a/nix/hardware/marmo/marmo.nix b/nix/hardware/marmo/marmo.nix index f3bcc32..0967ef4 100644 --- a/nix/hardware/marmo/marmo.nix +++ b/nix/hardware/marmo/marmo.nix @@ -1 +1 @@ -{ config, lib, pkgs, modulesPath, ... }: { } +{} diff --git a/nix/hardware/overheating/configuration.nix b/nix/hardware/overheating/configuration.nix index 84e0019..bf150ce 100644 --- a/nix/hardware/overheating/configuration.nix +++ b/nix/hardware/overheating/configuration.nix @@ -1,78 +1,5 @@ { pkgs, ... }: { - # Bootloader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; boot.kernelPackages = pkgs.linuxPackages_latest; - - # WARNING: Simply change this for each config networking.hostName = "overheating"; - - # Enable networking - networking.networkmanager.enable = true; - services.flatpak.enable = true; - - # Set your time zone. - time.timeZone = "Europe/Zurich"; - - # Select internationalisation properties. - i18n.defaultLocale = "en_US.UTF-8"; - - # Enable the X11 windowing system. - services.xserver.enable = true; - - # Configure keymap in X11 - services.xserver = { - xkb.layout = "us"; - xkb.variant = ""; - }; - - # Enable CUPS to print documents. - services.printing.enable = true; - - # Enable sound with pipewire. - sound.enable = true; - hardware.pulseaudio.enable = false; - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - }; - - environment.variables = { - XDG_CACHE_HOME = "$HOME/.cache"; - DIRENV_LOG_FORMAT = ""; - }; - - # allows user change later on - users.mutableUsers = true; - users.users.dashie = { - isNormalUser = true; - description = "dashie"; - extraGroups = [ "networkmanager" "wheel" "gamemode" ]; - packages = with pkgs; [ - home-manager - xdg-desktop-portal-gtk - xdg-desktop-portal-hyprland - ]; - # this password will only last for the first login - # e.g. login, then change to whatever else, this also ensures no public hash is available - password = "firstlogin"; - }; - - nix.settings = { - builders-use-substitutes = true; - # substituters to use - substituters = [ - "https://anyrun.cachix.org" - ]; - - trusted-public-keys = [ - "anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s=" - ]; - }; - - system.stateVersion = "unstable"; } diff --git a/nix/hardware/spaceship/configuration.nix b/nix/hardware/spaceship/configuration.nix index be04364..cba844e 100644 --- a/nix/hardware/spaceship/configuration.nix +++ b/nix/hardware/spaceship/configuration.nix @@ -1,82 +1,8 @@ { pkgs, ... }: { - # Bootloader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; boot.kernelPackages = pkgs.linuxPackages_zen; - # amd doesn't let you set high performance otherwhise ..... boot.kernelParams = [ "amdgpu.ppfeaturemask=0xffffffff" ]; - - # WARNING: Simply change this for each config networking.hostName = "spaceship"; - - # Enable networking - networking.networkmanager.enable = true; - services.flatpak.enable = true; - - # Set your time zone. - time.timeZone = "Europe/Zurich"; - - # Select internationalisation properties. - i18n.defaultLocale = "en_US.UTF-8"; - - # Enable the X11 windowing system. - services.xserver.enable = true; - - # Configure keymap in X11 - services.xserver = { - xkb.layout = "us"; - xkb.variant = ""; - }; - - # Enable CUPS to print documents. - services.printing.enable = true; - - # Enable sound with pipewire. - sound.enable = true; - hardware.pulseaudio.enable = false; - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - }; - - environment.variables = { - XDG_CACHE_HOME = "$HOME/.cache"; - DIRENV_LOG_FORMAT = ""; - }; - - # allows user change later on - users.mutableUsers = true; - users.users.dashie = { - isNormalUser = true; - description = "dashie"; - extraGroups = [ "networkmanager" "wheel" "gamemode" ]; - packages = with pkgs; [ - home-manager - xdg-desktop-portal-gtk - xdg-desktop-portal-hyprland - ]; - # this password will only last for the first login - # e.g. login, then change to whatever else, this also ensures no public hash is available - password = "firstlogin"; - }; - - nix.settings = { - builders-use-substitutes = true; - # substituters to use - substituters = [ - "https://anyrun.cachix.org" - ]; - - trusted-public-keys = [ - "anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s=" - ]; - }; - - system.stateVersion = "unstable"; } diff --git a/nix/programs/common.nix b/nix/programs/common.nix index 550729e..d57b36d 100644 --- a/nix/programs/common.nix +++ b/nix/programs/common.nix @@ -1,6 +1,9 @@ { pkgs +, lib , ... }: +let callPackage = lib.callPackageWith (pkgs); +in { manual = { html.enable = false; @@ -40,6 +43,24 @@ zenith nh amberol + (callPackage + ../fix/ncspot.nix + { }) + (callPackage + ../fix/oxinoti.nix + { }) + (callPackage + ../fix/oxidash.nix + { }) + (callPackage + ../fix/oxicalc.nix + { }) + (callPackage + ../fix/oxipaste.nix + { }) + (callPackage + ../fix/oxishut.nix + { }) ]; home.username = "dashie"; diff --git a/nix/programs/default.nix b/nix/programs/default.nix index d35c6fb..6fcf858 100644 --- a/nix/programs/default.nix +++ b/nix/programs/default.nix @@ -27,6 +27,7 @@ in ]; }; home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; home-manager.users.dashie.imports = [ { _module = { args = { inherit inputs; }; }; diff --git a/nix/programs/hyprland/default.nix b/nix/programs/hyprland/default.nix index f65af21..8b9fcd8 100644 --- a/nix/programs/hyprland/default.nix +++ b/nix/programs/hyprland/default.nix @@ -24,5 +24,6 @@ kooha hyprcursor hyprpaper + hyprpicker ]; } diff --git a/nix/programs/individual_configs/ncspot.nix b/nix/programs/individual_configs/ncspot.nix index 4fa813d..931535b 100644 --- a/nix/programs/individual_configs/ncspot.nix +++ b/nix/programs/individual_configs/ncspot.nix @@ -1,40 +1,38 @@ -{ - xdg.configFile."ncspot/config.toml" = { - text = '' - notify = true - shuffle = true - cover_max_scale = 2 - audio_cache_size = 50000 - initial_screen = "library" - library_tabs = ["playlists"] - [theme] - background = "#1a1b26" - primary = "#c0caf5" - secondary = "#1a1b26" - title = "#e0af68" - playing = "#7dcfff" - playing_selected = "#73daca" - playing_bg = "#1a1b26" - highlight = "#73daca" - highlight_bg = "#1a1b26" - error = "#c0caf5" - error_bg = "#f7768e" - statusbar = "#24283b" - statusbar_progress = "#73daca" - statusbar_bg = "#7dcfff" - - cmdline_bg = "#24283b" - search_match = "#bb9af7" - - [keybindings] - "j" = "move left 1" - "k" = "move down 1" - "l" = "move up 1" - ";" = "move right 1" - - [notification_format] - title = "%artists" - body = "%title" - ''; +{ pkgs, ... }: { + xdg.configFile."ncspot/config.toml".source = (pkgs.formats.toml { }).generate "ncspot" { + notify = true; + shuffle = true; + cover_max_scale = 2; + initial_screen = "library"; + library_tabs = [ "playlists" ]; + theme = { + background = "#1a1b26"; + primary = "#9aa5ce"; + secondary = "#414868"; + title = "#9ece6a"; + playing = "#7aa2f7"; + playing_selected = "#bb9af7"; + playing_bg = "#24283b"; + highlight = "#c0caf5"; + highlight_bg = "#24283b"; + error = "#414868"; + error_bg = "#f7768e"; + statusbar = "#ff9e64"; + statusbar_progress = "#7aa2f7"; + statusbar_bg = "#1a1b26"; + cmdline = "#c0caf5"; + cmdline_bg = "#24283b"; + search_match = "#f7768e"; + }; + keybindings = { + "j" = "move left 1"; + "k" = "move down 1"; + "l" = "move up 1"; + ";" = "move right 1"; + }; + notification_format = { + title = "%artists"; + body = "%title"; + }; }; } diff --git a/nix/programs/media.nix b/nix/programs/media.nix index 58706df..3cd4117 100644 --- a/nix/programs/media.nix +++ b/nix/programs/media.nix @@ -16,7 +16,7 @@ libreoffice-fresh pdftk # spotify - ncspot + #ncspot # video editing kdenlive # image creation diff --git a/nix/programs/themes/qt.nix b/nix/programs/themes/qt.nix index cde2a38..e305cf9 100644 --- a/nix/programs/themes/qt.nix +++ b/nix/programs/themes/qt.nix @@ -5,6 +5,14 @@ let disabled_colors=#ff6d728d, #ff1a1b26, #ff373949, #ff2b2c3b, #ff1a1b26, #ff2b2c3b, #ff6d728d, #ff6d728d, #ff6d728d, #ff1a1b26, #ff1a1b26, #19000000, #ff2b2c3b, #ff6d728d, #ff3584e4, #ff1b6acb, #ff1a1b26, #ff242530, #ff1a1b26, #ff6d728d, #ff6d728d inactive_colors=#ff6d728d, #ff1a1b26, #ff373949, #ff2b2c3b, #ff1a1b26, #ff2b2c3b, #ff6d728d, #ff6d728d, #ff6d728d, #ff1a1b26, #ff1a1b26, #19000000, #ff2b2c3b, #ff6d728d, #ff3584e4, #ff1b6acb, #ff1a1b26, #ff242530, #ff1a1b26, #ff6d728d, #ff6d728d ''; + qss = '' + QTabBar::tab:selected { + color: palette(highlight); + } + QMenuBar, QMenu, QToolBar, QStatusBar, QFrame, QScrollBar { + border: none; + } + ''; in { xdg.configFile."qt5ct/colors/tokyonight.conf" = { @@ -14,15 +22,10 @@ in text = "${color}"; }; xdg.configFile."qt5ct/qss/tab.qss" = { - text = - '' - QTabBar::tab:selected { - color: palette(highlight); - } - QMenuBar, QMenu, QToolBar, QStatusBar, QFrame, QScrollBar { - border: none; - } - ''; + text = "${qss}"; + }; + xdg.configFile."qt6ct/qss/tab.qss" = { + text = "${qss}"; }; xdg.configFile."qt5ct/qt5ct.conf" = { text =