From 7b0cc62e30444a3a677bd013a9e09c89290e5577 Mon Sep 17 00:00:00 2001 From: Fern Garden Date: Wed, 16 Jul 2025 14:32:12 +0800 Subject: [PATCH] Formatting. --- helpers.nix | 52 +++++++++++++---------------------------------- hosts/weebill.nix | 1 + overlay.nix | 43 +++++++++++++++++++++++++++++++++++++++ suites/common.nix | 11 +++++++--- 4 files changed, 66 insertions(+), 41 deletions(-) create mode 100644 overlay.nix diff --git a/helpers.nix b/helpers.nix index 50a8fda..be8aa40 100644 --- a/helpers.nix +++ b/helpers.nix @@ -11,44 +11,21 @@ with inputs.nixpkgs.lib; { user ? "fern", extraModules ? [], }: let - system = platform; - - secrets = builtins.toString inputs.secrets; - - pkgs = import nixpkgs { - inherit system; - config = { - allowUnfree = true; - permittedInsecurePackages = [ - "dotnet-sdk-6.0.428" - "dotnet-runtime-6.0.36" - ]; - }; - }; - - pkgs-deploy-rs = import nixpkgs { - inherit system; - overlays = [ - deploy-rs.overlays.default - (self: super: { - deploy-rs = { - inherit (pkgs) deploy-rs; - lib = super.deploy-rs.lib; - }; - }) - ]; - }; - - userPackages = { - fluffychat = (import nixpkgs-pr-fluffychat {inherit system;}).fluffychat; - feishin = (import nixpkgs-pr-feishin {inherit system;}).feishin; - webone = pkgs.callPackage ./packages/webone {}; - yazi-flavour-gruvbox-dark = pkgs.callPackage ./packages/yazi-flavour-gruvbox {}; - }; in { nixosConfigurations.${hostname} = nixosSystem { - inherit system pkgs; + system = platform; + pkgs = import nixpkgs { + inherit system; + config = { + allowUnfree = true; + permittedInsecurePackages = [ + "dotnet-sdk-6.0.428" + "dotnet-runtime-6.0.36" + ]; + }; + overlays = [(import ./overlay.nix inputs)]; + }; specialArgs = { inherit @@ -57,9 +34,8 @@ with inputs.nixpkgs.lib; { platform suite user - secrets - userPackages ; # Inherit variables. + secrets = builtins.toString inputs.secrets; }; modules = @@ -79,7 +55,7 @@ with inputs.nixpkgs.lib; { profiles.system = { user = "root"; sshUser = user; - path = pkgs-deploy-rs.deploy-rs.lib.activate.nixos self.nixosConfigurations.${hostname}; + path = pkgs.deploy-rs.deploy-rs.lib.activate.nixos self.nixosConfigurations.${hostname}; }; }; }; diff --git a/hosts/weebill.nix b/hosts/weebill.nix index 0e32e56..1f29ef0 100644 --- a/hosts/weebill.nix +++ b/hosts/weebill.nix @@ -42,6 +42,7 @@ }; }; }; + # Open ports for services. networking.firewall = { allowedUDPPorts = [ diff --git a/overlay.nix b/overlay.nix new file mode 100644 index 0000000..1d29e14 --- /dev/null +++ b/overlay.nix @@ -0,0 +1,43 @@ +inputs: +with inputs; (super: self: { + webone = super.pkgs.callPackage ./packages/webone {}; + yazi-flavour-gruvbox-dark = super.pkgs.callPackage ./packages/yazi-flavour-gruvbox {}; + pr.fluffychat = import nixpikgs-pr-fluffychat {inherit system;}; + + pr.feishin = import nixpkgs-pr-feishin { + inherit system; + overlays = [ + (self: super: { + feishin = super.feishin.overrideAttrs (old: rec { + pname = "feishin"; + version = "0.18.0"; + + src = super.fetchFromGitHub { + owner = "jeffvli"; + repo = "feishin"; + rev = "v${version}"; + hash = "sha256-4gcS7Vd7LSpEByO2Hlk6nb8V2adBPh5XwWGCu2lwOA4="; + }; + + pnpmDeps = super.pnpm_10.fetchDeps { + inherit pname version src; + hash = "sha256-1MGxrUcfvazxAubaYAsQuulUKm05opWOIC7oaLzjr7o="; + }; + }); + }) + ]; + }; + + deploy-rs = import nixpkgs { + inherit system; + overlays = [ + deploy-rs.overlays.default + (self: super: { + deploy-rs = { + inherit (pkgs) deploy-rs; + lib = super.deploy-rs.lib; + }; + }) + ]; + }; +}) diff --git a/suites/common.nix b/suites/common.nix index 56cce29..f724de2 100644 --- a/suites/common.nix +++ b/suites/common.nix @@ -114,12 +114,16 @@ with lib; { keymaps = [ { - key = "tt"; + key = "t"; action = " ToggleTerm direction=float "; } { - key = "xx"; - action = " Trouble diagnostics toggle focus=false"; + key = "x"; + action = " Trouble diagnostics toggle focus=false "; + } + { + key = "y"; + action = " Yazi "; } ]; @@ -151,6 +155,7 @@ with lib; { toggleterm.enable = true; trouble.enable = true; web-devicons.enable = true; + yazi.enable = true; lualine = { enable = true;