Formatting.

This commit is contained in:
Fern Garden 2025-07-16 14:32:12 +08:00
parent 1237a5c092
commit 7b0cc62e30
4 changed files with 66 additions and 41 deletions

View file

@ -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};
};
};
};

View file

@ -42,6 +42,7 @@
};
};
};
# Open ports for services.
networking.firewall = {
allowedUDPPorts = [

43
overlay.nix Normal file
View file

@ -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;
};
})
];
};
})

View file

@ -114,12 +114,16 @@ with lib; {
keymaps = [
{
key = "<Leader>tt";
key = "<Leader>t";
action = "<cmd> ToggleTerm direction=float <CR>";
}
{
key = "<Leader>xx";
action = "<cmd> Trouble diagnostics toggle focus=false<CR>";
key = "<Leader>x";
action = "<cmd> Trouble diagnostics toggle focus=false <CR>";
}
{
key = "<Leader>y";
action = "<cmd> Yazi <CR>";
}
];
@ -151,6 +155,7 @@ with lib; {
toggleterm.enable = true;
trouble.enable = true;
web-devicons.enable = true;
yazi.enable = true;
lualine = {
enable = true;