From 7a4e46e04fa838d64d6508e93a70ad978d0960f5 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Wed, 10 Jul 2024 17:03:31 +0200 Subject: [PATCH] modularize config --- nix/base/base_packages.nix | 36 +++---- nix/base/big_g.nix | 1 - nix/base/common_hardware.nix | 18 ++-- nix/base/env.nix | 4 +- nix/base/login_manager.nix | 4 +- nix/base/xkb_layout.nix | 4 +- nix/flake.nix | 10 +- nix/hardware/marmo/base_config.nix | 2 +- nix/hardware/marmo/configuration.nix | 21 ++-- nix/hardware/overheating/base_config.nix | 10 +- nix/hardware/overheating/configuration.nix | 16 +-- nix/hardware/overheating/overheating.nix | 2 +- nix/hardware/spaceship/base_config.nix | 8 +- nix/hardware/spaceship/configuration.nix | 30 +++--- nix/hardware/streamdeck.nix | 6 -- nix/modules/boot_params.nix | 11 -- nix/modules/conf.nix | 106 ++++++++++++++++++++ nix/modules/default.nix | 2 +- nix/modules/gamemode.nix | 11 -- nix/modules/ironbar_config.nix | 25 ----- nix/programs/coding.nix | 3 +- nix/programs/common.nix | 9 +- nix/programs/default.nix | 3 +- nix/programs/gaming/default.nix | 10 +- nix/programs/hyprland/config.nix | 7 +- nix/programs/hyprland/hyprlock.nix | 4 +- nix/programs/hyprland/ironbar.nix | 10 +- nix/programs/individual_configs/firefox.nix | 4 +- nix/programs/individual_configs/fish.nix | 4 +- nix/programs/nvim/lua/plugins/lsp.lua | 5 +- nix/programs/oxi/oxinoti.nix | 4 +- nix/programs/themes/qt.nix | 3 +- nix/secrets/secrets.yaml | 5 +- 33 files changed, 230 insertions(+), 168 deletions(-) delete mode 100644 nix/hardware/streamdeck.nix delete mode 100644 nix/modules/boot_params.nix create mode 100644 nix/modules/conf.nix delete mode 100644 nix/modules/gamemode.nix delete mode 100644 nix/modules/ironbar_config.nix diff --git a/nix/base/base_packages.nix b/nix/base/base_packages.nix index 83e16b8..7367597 100644 --- a/nix/base/base_packages.nix +++ b/nix/base/base_packages.nix @@ -1,5 +1,10 @@ -{ pkgs, ... }: +{ pkgs, config, ... }: { + imports = [ + # is wrapped in if statement to enable when needed + ../programs/gaming/default.nix + ]; + environment.systemPackages = with pkgs; [ openssl dbus @@ -23,6 +28,9 @@ kdePackages.breeze-icons seahorse upower + (lib.mkIf config.conf.streamdeck.enable (callPackage + ../override/streamdeck.nix + { })) ]; gtk.iconCache.enable = false; @@ -32,19 +40,9 @@ ]; nix.settings.experimental-features = "nix-command flakes"; - programs.fish.enable = true; - programs.fish.promptInit = '' - ${pkgs.any-nix-shell}/bin/any-nix-shell fish --info-right | source - ''; - programs.nix-ld.enable = true; - programs.nix-ld.libraries = with pkgs; [ - jdk - zlib - ]; virtualisation.docker.enable = true; - programs.dconf.enable = true; services.upower.enable = true; services.printing.enable = true; services.dbus.enable = true; @@ -56,13 +54,17 @@ nssmdns4 = true; openFirewall = true; }; - # services.xserver.desktopManager.gnome.extraGSettingsOverrides = '' - # [org.gnome.desktop.interface] - # gtk-theme='adw-gtk3' - # cursor-theme='Bibata-Modern-Classsic' - # cursor-size=24 - # ''; + programs.fish.enable = true; + programs.fish.promptInit = '' + ${pkgs.any-nix-shell}/bin/any-nix-shell fish --info-right | source + ''; + programs.nix-ld.enable = true; + programs.nix-ld.libraries = with pkgs; [ + jdk + zlib + ]; + programs.dconf.enable = true; programs.direnv = { package = pkgs.direnv; silent = false; diff --git a/nix/base/big_g.nix b/nix/base/big_g.nix index f5cc767..0b1fe1d 100644 --- a/nix/base/big_g.nix +++ b/nix/base/big_g.nix @@ -7,7 +7,6 @@ ]; gnome.gnome-keyring.enable = true; - gvfs.enable = true; }; } diff --git a/nix/base/common_hardware.nix b/nix/base/common_hardware.nix index 389af63..3ca1b2c 100644 --- a/nix/base/common_hardware.nix +++ b/nix/base/common_hardware.nix @@ -1,4 +1,7 @@ -{ pkgs, config, username, ... }: +{ pkgs, config, ... }: +let + username = config.conf.username; +in { # Bootloader. boot.loader.systemd-boot.enable = true; @@ -54,6 +57,14 @@ username ]; + boot.kernelPackages = config.conf.kernel; + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.kernelParams = [ + "resume=\"PARTLABEL=SWAP\"" + ] ++ config.conf.boot_params; + + networking.hostName = config.conf.hostname; + # allows user change later on users.mutableUsers = true; users.users.${username} = { @@ -70,7 +81,6 @@ }; system.stateVersion = "unstable"; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; fileSystems."/" = { @@ -103,8 +113,4 @@ swapDevices = [{ device = "/dev/disk/by-label/SWAP"; }]; - - boot.kernelParams = [ - "resume=\"PARTLABEL=SWAP\"" - ] ++ config.programs.boot.boot_params; } diff --git a/nix/base/env.nix b/nix/base/env.nix index 2235673..0591a20 100644 --- a/nix/base/env.nix +++ b/nix/base/env.nix @@ -1,5 +1,5 @@ { pkgs -, username +, config , ... }: { environment.variables = { @@ -13,7 +13,7 @@ environment.sessionVariables = { NIXOS_OZONE_WL = "1"; GOPATH = "$HOME/.go"; - FLAKE = "home/${username}/gits/dotFiles/nix"; + FLAKE = "home/${config.conf.username}/gits/dotFiles/nix"; # don't ask... marksman somehow requires this DOTNET_SYSTEM_GLOBALIZATION_INVARIANT = 1; }; diff --git a/nix/base/login_manager.nix b/nix/base/login_manager.nix index 5c35483..6d7ab14 100644 --- a/nix/base/login_manager.nix +++ b/nix/base/login_manager.nix @@ -1,10 +1,10 @@ { lib , config , pkgs -, username , ... }: let + username = config.conf.username; session = { command = "${lib.getExe pkgs.hyprland} --config /etc/greetd/hyprgreet.conf"; user = username; @@ -38,7 +38,7 @@ in environment.etc."greetd/hyprgreet.conf".text = '' exec-once=gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' - monitor=${config.programs.ironbar.monitor},3440x1440@180,0x0,${config.programs.ironbar.scale} + monitor=${config.conf.monitor},3440x1440@180,0x0,${config.conf.scale} monitor=_,disable input { diff --git a/nix/base/xkb_layout.nix b/nix/base/xkb_layout.nix index 0370e17..8238484 100644 --- a/nix/base/xkb_layout.nix +++ b/nix/base/xkb_layout.nix @@ -1,6 +1,6 @@ { pkgs, ... }: let - dashie = pkgs.writeText "dashie" '' + layout = pkgs.writeText "dashie" '' xkb_symbols "dashie" { include "us(basic)" @@ -16,7 +16,7 @@ in services.xserver.xkb.extraLayouts.dashie = { description = "US layout with 'umlaut'"; languages = [ "eng" ]; - symbolsFile = "${dashie}"; + symbolsFile = "${layout}"; }; } diff --git a/nix/flake.nix b/nix/flake.nix index b97c93a..310295b 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -55,22 +55,20 @@ ./base/default.nix ./programs ]; - username = "dashie"; in { nixosConfigurations."marmo" = inputs.nixpkgs.lib.nixosSystem { specialArgs = { - inherit inputs pkgs username; + inherit inputs pkgs; mod = ./hardware/marmo/base_config.nix; }; modules = [ ./hardware/marmo/default.nix - ./programs/gaming/default.nix ] ++ base_imports; }; nixosConfigurations."overheating" = inputs.nixpkgs.lib.nixosSystem { specialArgs = { - inherit inputs pkgs username; + inherit inputs pkgs; mod = ./hardware/overheating/base_config.nix; }; modules = [ @@ -79,13 +77,11 @@ }; nixosConfigurations."spaceship" = inputs.nixpkgs.lib.nixosSystem { specialArgs = { - inherit inputs pkgs username; + inherit inputs pkgs; mod = ./hardware/spaceship/base_config.nix; }; modules = [ ./hardware/spaceship/default.nix - ./hardware/streamdeck.nix - ./programs/gaming/default.nix ] ++ base_imports; }; }; diff --git a/nix/hardware/marmo/base_config.nix b/nix/hardware/marmo/base_config.nix index 2276588..a410c1e 100644 --- a/nix/hardware/marmo/base_config.nix +++ b/nix/hardware/marmo/base_config.nix @@ -8,5 +8,5 @@ # all others ",highrr,auto,1" ]; - programs.ironbar.monitor = "DP-1"; + conf.monitor = "DP-1"; } diff --git a/nix/hardware/marmo/configuration.nix b/nix/hardware/marmo/configuration.nix index 9a0ac5b..d10bf51 100644 --- a/nix/hardware/marmo/configuration.nix +++ b/nix/hardware/marmo/configuration.nix @@ -1,17 +1,14 @@ -{ pkgs, ... }: { imports = [ - ../../modules/gamemode.nix - ../../modules/boot_params.nix - ../../modules/ironbar_config.nix + ../../modules/conf.nix ]; - boot.kernelPackages = pkgs.linuxPackages_zen; - programs.boot.boot_params = [ - "amdgpu.ppfeaturemask=0xffffffff" - ]; - networking.hostName = "marmo"; - programs.ironbar.monitor = "DP-1"; - programs.gamemode = { - device = 1; + # variables for system + conf = { + monitor = "DP-1"; + gaming = { + enable = true; + device = 1; + }; + hostname = "marmo"; }; } diff --git a/nix/hardware/overheating/base_config.nix b/nix/hardware/overheating/base_config.nix index 15d5330..f291f3b 100644 --- a/nix/hardware/overheating/base_config.nix +++ b/nix/hardware/overheating/base_config.nix @@ -9,9 +9,11 @@ # all others ",highres,auto,1" ]; - programs.ironbar.monitor = "eDP-1"; - programs.ironbar.battery = [ - { type = "upower"; class = "memory-usage"; } - ]; + conf = { + monitor = "eDP-1"; + battery = [ + { type = "upower"; class = "memory-usage"; } + ]; + }; programs.hyprland.extra_autostart = [ "hyprdock --server" ]; } diff --git a/nix/hardware/overheating/configuration.nix b/nix/hardware/overheating/configuration.nix index becdaa5..ca0b2b4 100644 --- a/nix/hardware/overheating/configuration.nix +++ b/nix/hardware/overheating/configuration.nix @@ -1,16 +1,16 @@ -{ pkgs, ... }: { imports = [ - ../../modules/ironbar_config.nix - ../../modules/boot_params.nix + ../../modules/conf.nix ./dsdt.nix ./firmware.nix ]; - boot.kernelPackages = pkgs.linuxPackages_latest; - networking.hostName = "overheating"; - programs.ironbar.monitor = "eDP-1"; - programs.ironbar.scale = "2.0"; - programs.boot.boot_params = [ "rtc_cmos.use_acpi_alarm=1" ]; + conf = { + monitor = "eDP-1"; + scale = "2.0"; + hostname = "overheating"; + boot_params = [ "rtc_cmos.use_acpi_alarm=1" ]; + }; + hardware.bluetooth.enable = true; hardware.bluetooth.powerOnBoot = true; diff --git a/nix/hardware/overheating/overheating.nix b/nix/hardware/overheating/overheating.nix index cc8e470..e30f979 100644 --- a/nix/hardware/overheating/overheating.nix +++ b/nix/hardware/overheating/overheating.nix @@ -1,4 +1,4 @@ -{ pkgs, config, lib, modulesPath, ... }: +{ config, lib, modulesPath, ... }: { imports = [ diff --git a/nix/hardware/spaceship/base_config.nix b/nix/hardware/spaceship/base_config.nix index ab1b6b7..145448c 100644 --- a/nix/hardware/spaceship/base_config.nix +++ b/nix/hardware/spaceship/base_config.nix @@ -1,4 +1,8 @@ -{ username, ... }: { +{ config, ... }: +let + username = config.conf.username; +in +{ imports = [ ../../modules ]; @@ -30,7 +34,7 @@ # monitor right "3,monitor:HDMI-A-1, default:true" ]; - programs.ironbar.monitor = "DP-1"; + conf.monitor = "DP-1"; programs.hyprland.hyprpaper = '' #load preload = /home/${username}/Pictures/backgrounds/shinobu_2k.jpg diff --git a/nix/hardware/spaceship/configuration.nix b/nix/hardware/spaceship/configuration.nix index 012145d..32efe02 100644 --- a/nix/hardware/spaceship/configuration.nix +++ b/nix/hardware/spaceship/configuration.nix @@ -1,19 +1,19 @@ { pkgs, lib, ... }: { imports = [ - ../../modules/gamemode.nix - ../../modules/boot_params.nix - ../../modules/ironbar_config.nix + ../../modules/conf.nix ]; - boot.kernelPackages = pkgs.linuxPackages_xanmod_latest; - programs.boot.boot_params = [ - "amdgpu.ppfeaturemask=0xffffffff" - ]; - networking.hostName = "spaceship"; - programs.gamemode = { - device = 0; + # config variables + conf = { + monitor = "DP-1"; + gaming = { + enable = true; + }; + streamdeck.enable = true; + hostname = "spaceship"; }; + virtualisation.virtualbox.host.enable = true; # enable hardware acceleration and rocm @@ -28,6 +28,12 @@ enable = true; enable32Bit = lib.mkDefault true; }; - boot.initrd.kernelModules = [ "amdgpu" ]; - programs.ironbar.monitor = "DP-1"; + networking.firewall = { + allowedTCPPortRanges = [ + { from = 1714; to = 1764; } # KDE Connect + ]; + allowedUDPPortRanges = [ + { from = 1714; to = 1764; } # KDE Connect + ]; + }; } diff --git a/nix/hardware/streamdeck.nix b/nix/hardware/streamdeck.nix deleted file mode 100644 index c8a082f..0000000 --- a/nix/hardware/streamdeck.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - #programs.streamdeck-ui = { - # enable = true; - # autoStart = false; # optional - #}; -} diff --git a/nix/modules/boot_params.nix b/nix/modules/boot_params.nix deleted file mode 100644 index 6df3ee5..0000000 --- a/nix/modules/boot_params.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ lib, ... }: { - options.programs.boot = { - boot_params = lib.mkOption { - default = [ ]; - example = [ "resume=something" ]; - description = '' - Boot params - ''; - }; - }; -} diff --git a/nix/modules/conf.nix b/nix/modules/conf.nix new file mode 100644 index 0000000..40463dd --- /dev/null +++ b/nix/modules/conf.nix @@ -0,0 +1,106 @@ +{ lib, config, pkgs, ... }: { + options.conf = { + monitor = lib.mkOption { + default = ""; + example = "eDP-1"; + type = lib.types.str; + description = '' + main monitor + ''; + }; + scale = lib.mkOption { + default = "1.0"; + example = "1.0"; + type = lib.types.str; + description = '' + Scale for the monitor + ''; + }; + battery = lib.mkOption { + default = [ ]; + example = [ ]; + }; + + amdGpu = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = '' + Enables drivers, optimizations and kernel parameters for AMD gpus. + ''; + }; + + boot_params = lib.mkOption { + default = [ ]; + example = [ "resume=something" ]; + description = '' + Boot params + ''; + }; + + gaming = { + enable = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = '' + Install gaming related programs such as steam, gamemode, and more + ''; + }; + + device = lib.mkOption { + default = 0; + example = 0; + description = '' + GPU device number + ''; + }; + }; + + streamdeck = { + enable = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = '' + Install streamdeck configuration program. + ''; + }; + }; + + kernel = lib.mkOption { + default = pkgs.linuxPackages_latest; + example = pkgs.linuxPackages_xanmod_latest; + # type = lib.types.package; + description = '' + kernel to be used + ''; + }; + + hostname = lib.mkOption { + default = "nixos"; + example = "spaceship"; + type = lib.types.str; + description = '' + The name of the system + ''; + }; + + username = lib.mkOption { + default = "dashie"; + example = "pingpang"; + type = lib.types.str; + description = '' + The username. + ''; + }; + }; + + config = { + conf.boot_params = lib.mkIf config.conf.amdGpu [ + "amdgpu.ppfeaturemask=0xffffffff" + ]; + + conf.kernel = lib.mkIf config.conf.gaming.enable pkgs.linuxPackages_xanmod_latest; + }; +} diff --git a/nix/modules/default.nix b/nix/modules/default.nix index 8c9ce42..5ca55d0 100644 --- a/nix/modules/default.nix +++ b/nix/modules/default.nix @@ -1,6 +1,6 @@ { imports = [ - ./ironbar_config.nix ./hyprpaper_config.nix + ./conf.nix ]; } diff --git a/nix/modules/gamemode.nix b/nix/modules/gamemode.nix deleted file mode 100644 index 220dcef..0000000 --- a/nix/modules/gamemode.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ lib, ... }: { - options.programs.gamemode = { - device = lib.mkOption { - default = 0; - example = 0; - description = '' - GPU device number - ''; - }; - }; -} diff --git a/nix/modules/ironbar_config.nix b/nix/modules/ironbar_config.nix deleted file mode 100644 index 3ea7d1c..0000000 --- a/nix/modules/ironbar_config.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ lib, ... }: { - options.programs.ironbar = { - monitor = lib.mkOption { - default = ""; - example = "eDP-1"; - type = lib.types.str; - description = '' - main monitor - ''; - }; - scale = lib.mkOption { - default = "1.0"; - example = "1.0"; - type = lib.types.str; - description = '' - Scale for the monitor - ''; - }; - - battery = lib.mkOption { - default = [ ]; - example = [ ]; - }; - }; -} diff --git a/nix/programs/coding.nix b/nix/programs/coding.nix index d50c219..ff39ce6 100644 --- a/nix/programs/coding.nix +++ b/nix/programs/coding.nix @@ -91,8 +91,7 @@ #typst typst - typst-lsp - typstfmt + tinymist ltex-ls #java diff --git a/nix/programs/common.nix b/nix/programs/common.nix index 29099a0..522479e 100644 --- a/nix/programs/common.nix +++ b/nix/programs/common.nix @@ -1,10 +1,12 @@ { pkgs , inputs , lib -, username +, config , ... }: -let callPackage = lib.callPackageWith (pkgs); +let + callPackage = lib.callPackageWith (pkgs); + username = config.conf.username; in { manual = { @@ -53,9 +55,6 @@ in flake-checker ffmpeg system-config-printer - (callPackage - ../override/streamdeck.nix - { }) (callPackage ../override/cambalache.nix { }) diff --git a/nix/programs/default.nix b/nix/programs/default.nix index 2926153..20faa02 100644 --- a/nix/programs/default.nix +++ b/nix/programs/default.nix @@ -1,4 +1,4 @@ -{ inputs, pkgs, mod, username, ... }: +{ inputs, pkgs, mod, config, ... }: let base_imports = [ inputs.anyrun.homeManagerModules.default @@ -14,6 +14,7 @@ let inputs.nix-flatpak.homeManagerModules.nix-flatpak inputs.sops-nix.homeManagerModules.sops ]; + username = config.conf.username; in { xdg.portal.config.common.default = "*"; diff --git a/nix/programs/gaming/default.nix b/nix/programs/gaming/default.nix index 5216390..fa34c60 100644 --- a/nix/programs/gaming/default.nix +++ b/nix/programs/gaming/default.nix @@ -1,12 +1,8 @@ { pkgs +, lib , config , ... -}: { - imports = [ - # ./anyrun.nix - # ./config.nix - ]; - +}: lib.mkIf config.conf.gaming.enable { environment.systemPackages = with pkgs; [ gamemode steam @@ -25,7 +21,7 @@ }; gpu = { apply_gpu_optimisations = "accept-responsibility"; - gpu_device = config.programs.gamemode.device; + gpu_device = config.conf.gaming.device; amd_performance_level = "high"; }; custom = { diff --git a/nix/programs/hyprland/config.nix b/nix/programs/hyprland/config.nix index 7fc48f0..cb4990a 100644 --- a/nix/programs/hyprland/config.nix +++ b/nix/programs/hyprland/config.nix @@ -1,14 +1,11 @@ -{ pkgs -, inputs -, username -, config +{ config , ... }: { wayland.windowManager.hyprland.enable = true; wayland.windowManager.hyprland.settings = { "$mod" = "SUPER"; - "source" = "/home/${username}/.config/reset/keyboard.conf"; + "source" = "/home/${config.conf.username}/.config/reset/keyboard.conf"; bindm = [ "$mod, mouse:272, movewindow" diff --git a/nix/programs/hyprland/hyprlock.nix b/nix/programs/hyprland/hyprlock.nix index 1153adf..70e01b7 100644 --- a/nix/programs/hyprland/hyprlock.nix +++ b/nix/programs/hyprland/hyprlock.nix @@ -15,7 +15,7 @@ input-field = [ { - monitor = "${config.programs.ironbar.monitor}"; + monitor = "${config.conf.monitor}"; placeholder_text = "password or something"; } @@ -23,7 +23,7 @@ label = [ { - monitor = "${config.programs.ironbar.monitor}"; + monitor = "${config.conf.monitor}"; text = "$TIME"; font_size = 50; position = "0, 200"; diff --git a/nix/programs/hyprland/ironbar.nix b/nix/programs/hyprland/ironbar.nix index c4c5438..0c9673c 100644 --- a/nix/programs/hyprland/ironbar.nix +++ b/nix/programs/hyprland/ironbar.nix @@ -1,4 +1,8 @@ -{ config, username, ... }: { +{ config, ... }: +let + username = config.conf.username; +in +{ programs.ironbar = { @@ -141,8 +145,8 @@ #"another_feature" ]; config = { - monitors."${config.programs.ironbar.monitor}" = { - end = config.programs.ironbar.battery ++ [ + monitors."${config.conf.monitor}" = { + end = config.conf.battery ++ [ { type = "sys_info"; format = [ diff --git a/nix/programs/individual_configs/firefox.nix b/nix/programs/individual_configs/firefox.nix index 7bfa8e7..6457c05 100644 --- a/nix/programs/individual_configs/firefox.nix +++ b/nix/programs/individual_configs/firefox.nix @@ -1,4 +1,4 @@ -{ pkgs, username, ... }: { +{ pkgs, config, ... }: { programs.firefox = { enable = true; @@ -13,7 +13,7 @@ DisplayBookmarksToolbar = "never"; DisplayMenuBar = "default-off"; }; - profiles.${username} = { + profiles.${config.conf.username} = { extensions = with pkgs.nur.repos.rycee.firefox-addons; [ ublock-origin darkreader diff --git a/nix/programs/individual_configs/fish.nix b/nix/programs/individual_configs/fish.nix index 0463d8d..2c955e7 100644 --- a/nix/programs/individual_configs/fish.nix +++ b/nix/programs/individual_configs/fish.nix @@ -1,4 +1,4 @@ -{ username, ... }: { +{ config, ... }: { xdg.configFile."fish/config.fish" = { text = '' @@ -15,7 +15,7 @@ set EDITOR "neovide --no-fork" - alias rebuild='sudo nixos-rebuild switch --flake /home/${username}/gits/dotFiles/nix/.' + alias rebuild='sudo nixos-rebuild switch --flake /home/${config.conf.username}/gits/dotFiles/nix/.' abbr --add ls 'lsd' abbr --add :q 'exit' abbr --add gh 'git push origin' diff --git a/nix/programs/nvim/lua/plugins/lsp.lua b/nix/programs/nvim/lua/plugins/lsp.lua index 025637c..a4b277f 100644 --- a/nix/programs/nvim/lua/plugins/lsp.lua +++ b/nix/programs/nvim/lua/plugins/lsp.lua @@ -114,9 +114,9 @@ return { "Sdk:IncludePrereleases=true", }, }, - typst_lsp = { + tinymist = { settings = { - experimentalFormatterMode = "on", + formatterMode = "typstyle", exportPdf = "onSave", }, mason = false, @@ -225,7 +225,6 @@ return { }, }, formatters_by_ft = { - typst = { "typstfmt" }, nix = { "nixpkgs-fmt" }, lua = { "stylua" }, sh = { "shfmt" }, diff --git a/nix/programs/oxi/oxinoti.nix b/nix/programs/oxi/oxinoti.nix index b1fe112..f6b91b9 100644 --- a/nix/programs/oxi/oxinoti.nix +++ b/nix/programs/oxi/oxinoti.nix @@ -1,8 +1,8 @@ -{ username, ... }: { +{ config, ... }: { xdg.configFile."oxinoti/style.css" = { text = /*css*/ '' - @import url("/home/${username}/.config/gtk-3.0/gtk.css"); + @import url("/home/${config.conf.username}/.config/gtk-3.0/gtk.css"); #MainWindow { background-color: transparent; diff --git a/nix/programs/themes/qt.nix b/nix/programs/themes/qt.nix index 007337d..5a36969 100644 --- a/nix/programs/themes/qt.nix +++ b/nix/programs/themes/qt.nix @@ -1,5 +1,6 @@ -{ username, ... }: +{ config, ... }: let + username = config.conf.username; color = '' [ColorScheme] active_colors=#ffc0caf5, #ff1a1b26, #ff373949, #ff2b2c3b, #ff1a1b26, #ff2b2c3b, #ffc0caf5, #ffc0caf5, #ffc0caf5, #ff1a1b26, #ff1a1b26, #19000000, #ff2b2c3b, #ffc0caf5, #ff3584e4, #ff1b6acb, #ff1a1b26, #ff242530, #ff1a1b26, #ffc0caf5, #ffc0caf5 diff --git a/nix/secrets/secrets.yaml b/nix/secrets/secrets.yaml index 7cdb58d..6be4816 100644 --- a/nix/secrets/secrets.yaml +++ b/nix/secrets/secrets.yaml @@ -4,14 +4,15 @@ dashie: ENC[AES256_GCM,data:P/+ZEelpLFrcsk8hx7CF999Wlv5OWiybjPVT1ULogCECpBAxYJgl hub_pub: ENC[AES256_GCM,data:6vIAQWFMIR+HnERg+A4jKu/MW+e7eLQplmdJyBeuBL9tvxH1idT8C6zvMEyIPhelU6+ZYQghAlvuC4MtktI/Te0f40XvdK3Gq/DmfBrLRUgLdSjUvMeGuuKnpRX0mjCaw77YW5ES4ptZ,iv:PC9hELA0234JCk2rx6FJhMlKKaKO8WrIezJ2Q2nv6EE=,tag:R8oPaH3Sbr23oRX++OP/qg==,type:str] lab_pub: ENC[AES256_GCM,data:rlHCiqGnoaPiQBaZQRT+bEjfNF7jNO4CGPoCOKJ1o7nv7i2jPy6Bq9OMBHXsMHI9oGfEhyKCDHdpJ65aI07KJC/fMoMoAyiNmalwNOn26jbgj84mfENS3IYbfKxQVXAUCJHE5m1cFsm7,iv:8SLdHLYq2tlfHBjdeDoByEzGuu3TURj4+KJvQfPuaWA=,tag:mmGXlRwQ0UoVIAJE6d1OUQ==,type:str] dashie_pub: ENC[AES256_GCM,data:k6JIJOKDJcGSW47Z8y0EYxNl/vaPRVbIn35CSA57snEzYnk5GpU+1NfPDniWoAGRkpIwicgN6kpzssRlKOmVudvwMejSLv4VkLRBjrsApVFECwoIBLUNGUSDaMcIwC/BYu4jfjGaozBj,iv:0EZ0rptLdmcuTU1BGOILaaDTrc7aZGJCCxgjUESqi0M=,tag:dlQs/ugBGxnSrNj/bRSJSw==,type:str] +server_pub: ENC[AES256_GCM,data:87nTYzA8CykOPjfZS2As8+JB/ysJvHXFYbPIBA8Nus8Y3nI3Tl2F/f7mUVFBT+4mmOFTTwxghEnkpgTg/vzUm6W4wb19rIcv11eM7HYaGl5oI44a44rBJn2+PKlfIgXVgaY=,iv:O7I7kkZ44McXzCt3wH1cM3MJCShxu2O+0U0+Y6rwePo=,tag:q5D5AGMmFyiNhQNR8dRB+g==,type:str] sops: kms: [] gcp_kms: [] azure_kv: [] hc_vault: [] age: [] - lastmodified: "2024-05-14T18:34:33Z" - mac: ENC[AES256_GCM,data:ZOmH7VOtapecA3wr0p4M8SfC5zKybsXZdI67rE8SHFyeHDq+6In0ekPs4uTun1lBT4ly4ijjK2XWsRdrkTI76P4yKD5o850Mi7RDHTZzzP3AmlIrMgFbKTZkxuY1wnLJvcuHnbzq4e7s5ZJYPRx/lDd5dnYB+Xa5yyv4zCXXwqg=,iv:cqSPKZp/SNYnKU1QT2eOmKPe0oFTgVI6r8UMTYModnk=,tag:bHUhfnlHq8UGG8Z50cCQcw==,type:str] + lastmodified: "2024-07-08T18:00:49Z" + mac: ENC[AES256_GCM,data:66P0uEUhQit+EjBEhAoQP3yVAt988eYwwxnOPGahPfKDw5ud+b8atc9mT6vGK3TfQFoZfjwhRxEOmc/Wx/PA+L01S7gAFctKrnbADAfRn7HJmtX3pXunhDxI6hGyJW+CrFNiLhViMJSXHljhj/QfDmxkJ/6TSSi8uMr2iNlLA3I=,iv:AJ4RB0CV0QAumZ6o36loeR51GUxQKnEsUklIGJnn5qI=,tag:or1MamtafGlwBRr/JsL9Eg==,type:str] pgp: - created_at: "2024-05-14T14:35:02Z" enc: |-