From b07db5670dcbfc7dc7e6b2716494111a17583788 Mon Sep 17 00:00:00 2001 From: Nick Date: Thu, 16 Jan 2025 16:14:09 -0600 Subject: [PATCH] feat: fuck alejandra --- .pre-commit-config_old.yaml | 1 + .../themes/elements/background0/default.nix | 95 ++++++++-------- flake.nix | 19 +--- nixos/default.nix | 107 ++++-------------- nixos/modules/nh.nix | 1 + parts/config/devshells.nix | 23 +--- parts/config/pre-commit.nix | 10 +- 7 files changed, 88 insertions(+), 168 deletions(-) create mode 120000 .pre-commit-config_old.yaml create mode 100755 nixos/modules/nh.nix diff --git a/.pre-commit-config_old.yaml b/.pre-commit-config_old.yaml new file mode 120000 index 0000000..d6b7197 --- /dev/null +++ b/.pre-commit-config_old.yaml @@ -0,0 +1 @@ +/nix/store/rxlbrr44rzapz6sm807awg3ac0z6f4d6-pre-commit-config.json \ No newline at end of file diff --git a/config/themes/elements/background0/default.nix b/config/themes/elements/background0/default.nix index 8eb7f81..9917340 100755 --- a/config/themes/elements/background0/default.nix +++ b/config/themes/elements/background0/default.nix @@ -1,49 +1,48 @@ -{mapColour, ...}: { - # background0 = - # mapColour "editor_bg" # ayu dark - # "editor_bg" # ayu light - # "editor_bg" # ayu mirage - # "crust" # catppuccin-frappe - # "crust" # catppuccin-latte - # "crust" # catppuccin-macchiato - # "crust" # catppuccin-mocha - # "background" # dracula - # "" # gruvbox dark - # "" # gruvbox light - # "" # houston - # "" # kanagawa dragon - # "" # kanagawa lotus - # "" # kanagawa wave - # "" # laserwave - # "" # lunar - # "" # material darker - # "" # material deep ocean - # "" # material forest - # "" # material lighter - # "" # material oceanic - # "" # material palenight - # "" # material sandy beach - # "" # material sky blue - # "" # material space - # "" # material volcano - # "" # monokai - # "" # night owl - # "" # nord - # "" # ocean next - # "" # one dark - # "" # plastic - # "" # poimandres base - # "" # poimandres storm - # "highlight0" # rosepine base - # "highlight0" # rosepine dawn - # "highlight0" # rosepine moon - # "" # solarized dark - # "" # solarized light - # "" # synthwave 84 - # "" # tokyo night day - # "" # tokyo night night - # "" # tokyo night storm - # "" # vesper - # "" # wasp dark - # ""; # wasp light +{ mapColour, ... }: { + background0 = mapColour "editor_bg" # ayu dark + "editor_bg" # ayu light + "editor_bg" # ayu mirage + "crust" # catppuccin-frappe + "crust" # catppuccin-latte + "crust" # catppuccin-macchiato + "crust" # catppuccin-mocha + "background" # dracula + "" # gruvbox dark + "" # gruvbox light + "" # houston + "" # kanagawa dragon + "" # kanagawa lotus + "" # kanagawa wave + "" # laserwave + "" # lunar + "" # material darker + "" # material deep ocean + "" # material forest + "" # material lighter + "" # material oceanic + "" # material palenight + "" # material sandy beach + "" # material sky blue + "" # material space + "" # material volcano + "" # monokai + "" # night owl + "" # nord + "" # ocean next + "" # one dark + "" # plastic + "" # poimandres base + "" # poimandres storm + "highlight0" # rosepine base + "highlight0" # rosepine dawn + "highlight0" # rosepine moon + "" # solarized dark + "" # solarized light + "" # synthwave 84 + "" # tokyo night day + "" # tokyo night night + "" # tokyo night storm + "" # vesper + "" # wasp dark + ""; # wasp light } diff --git a/flake.nix b/flake.nix index 1a44437..25c2172 100755 --- a/flake.nix +++ b/flake.nix @@ -4,7 +4,8 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; lix-module = { - url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1-2.tar.gz"; + url = + "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1-2.tar.gz"; inputs.nixpkgs.follows = "nixpkgs"; }; flake-parts = { @@ -15,9 +16,7 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; - ghostty = { - url = "github:ghostty-org/ghostty"; - }; + ghostty = { url = "github:ghostty-org/ghostty"; }; nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic"; edgedb = { url = "github:edgedb/packages-nix"; @@ -74,15 +73,9 @@ }; outputs = inputs: - inputs.flake-parts.lib.mkFlake - { - inherit - inputs - ; - } - { + inputs.flake-parts.lib.mkFlake { inherit inputs; } { imports = [ - # inputs.pre-commit-hooks-nix.flakeModule + inputs.pre-commit-hooks-nix.flakeModule ./home ./lib ./nixos @@ -90,7 +83,7 @@ ./config ]; - flake = {config, ...}: { + flake = { config, ... }: { nixosConfigurations = { desktop = inputs.self.lib.mkLinuxSystem [ ./systems/desktop diff --git a/nixos/default.nix b/nixos/default.nix index 94b991c..c2a6ac6 100755 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -1,110 +1,51 @@ let modulesPath = ./modules; moduleImport = path: nameTransform: - builtins.listToAttrs ( - map - (name: { - name = nameTransform name; + builtins.listToAttrs (map (name: { + name = nameTransform name; + value = import (path + "/${name}"); + }) (builtins.filter (name: + (builtins.readDir path).${name} == "regular" + && builtins.match ".*\\.nix$" name != null) + (builtins.attrNames (builtins.readDir path)))); + modules = moduleImport modulesPath + (name: builtins.replaceStrings [ ".nix" ] [ "" ] name) // (path: + builtins.listToAttrs (map (name: { + name = name; value = import (path + "/${name}"); - }) - ( - builtins.filter - (name: (builtins.readDir path).${name} == "regular" && builtins.match ".*\\.nix$" name != null) - (builtins.attrNames (builtins.readDir path)) - ) - ); - modules = - moduleImport modulesPath (name: - builtins.replaceStrings [ - ".nix" - ] [ - "" - ] - name) - // (path: - builtins.listToAttrs ( - map - (name: { - name = name; - value = import (path + "/${name}"); - }) - ( - builtins.filter - (name: (builtins.readDir path).${name} == "directory") - (builtins.attrNames (builtins.readDir path)) - ) - )) - modulesPath; + }) (builtins.filter (name: (builtins.readDir path).${name} == "directory") + (builtins.attrNames (builtins.readDir path))))) modulesPath; in { flake.nixosModules = { personal = { imports = builtins.attrValues { - inherit - (modules) - android - audio - bluetooth - corectrl - dconf - disks - firejail - flatpak - fonts - printing - steam - sysstat - virtualization - ; + inherit (modules) + android audio bluetooth corectrl dconf disks firejail flatpak fonts + printing steam sysstat virtualization; }; }; desktop = { imports = builtins.attrValues { - inherit - (modules) - syncthing - ollama + inherit (modules) + syncthing ollama # plasma # sddm - ; + ; }; }; hyprland = { - imports = builtins.attrValues { - inherit - (modules) - hyprland - ; - }; + imports = builtins.attrValues { inherit (modules) hyprland; }; }; - server = { - imports = builtins.attrValues { - inherit - (modules) - services - ; - }; - }; + server = { imports = builtins.attrValues { inherit (modules) services; }; }; shared = { imports = builtins.attrValues { - inherit - (modules) - accounts - doas - environment - gvfs - home-manager - locale - nix - rsyncd - sops - ssh - system - xserver - ; + inherit (modules) + accounts doas environment gvfs home-manager locale nh nix rsyncd sops + ssh system xserver; }; }; }; diff --git a/nixos/modules/nh.nix b/nixos/modules/nh.nix new file mode 100755 index 0000000..0097845 --- /dev/null +++ b/nixos/modules/nh.nix @@ -0,0 +1 @@ +{ programs.nh = { enable = true; }; } diff --git a/parts/config/devshells.nix b/parts/config/devshells.nix index 8154fd6..e0d0f03 100755 --- a/parts/config/devshells.nix +++ b/parts/config/devshells.nix @@ -1,26 +1,11 @@ -{ - pkgs, - config, - ... -}: { +{ pkgs, config, ... }: { devShells = { default = pkgs.mkShell { packages = builtins.attrValues { - inherit - (pkgs) - age - just - nil - nixd - sops - ssh-to-age - ; - inherit - (pkgs.haskellPackages) - nixfmt - ; + inherit (pkgs) age just nil nixd sops ssh-to-age; + inherit (pkgs.haskellPackages) nixfmt; }; - # shellHook = "${config.pre-commit.installationScript}"; + shellHook = "${config.pre-commit.installationScript}"; }; }; } diff --git a/parts/config/pre-commit.nix b/parts/config/pre-commit.nix index 94446ee..723b60e 100755 --- a/parts/config/pre-commit.nix +++ b/parts/config/pre-commit.nix @@ -1,7 +1,7 @@ { - # pre-commit.settings.hooks = { - # nixfmt.enable = true; - # commitizen.enable = true; - # # statix.enable = true; - # }; + pre-commit.settings.hooks = { + nixfmt-rfc-style.enable = true; + commitizen.enable = true; + # statix.enable = true; + }; }