Compare commits
No commits in common. "98dfde251a7446e557ac79a0281daf8fefc1c3e9" and "3a6699a6562bf67482a3f2aa7379525a0cae3579" have entirely different histories.
98dfde251a
...
3a6699a656
5 changed files with 27 additions and 87 deletions
|
@ -1,21 +1,18 @@
|
||||||
# TODO: switch to "%{buffer_name}" when this feature makes it to Helix release
|
|
||||||
|
|
||||||
[[language]]
|
[[language]]
|
||||||
name = "nix"
|
|
||||||
formatter = { command = "treefmt", args = ["--stdin", ".nix", "--quiet"] }
|
|
||||||
auto-format = true
|
auto-format = true
|
||||||
|
name = "nix"
|
||||||
|
formatter = { command = "nixfmt" }
|
||||||
|
|
||||||
[[language]]
|
[[language]]
|
||||||
name = "toml"
|
name = "toml"
|
||||||
formatter = { command = "treefmt", args = ["--stdin", ".nix", "--quiet"] }
|
formatter = { command = "taplo", args = ["format", "-"] }
|
||||||
auto-format = true
|
auto-format = true
|
||||||
|
|
||||||
[[language]]
|
[[language]]
|
||||||
name = "yaml"
|
name = "yaml"
|
||||||
formatter = { command = "treefmt", args = ["--stdin", ".nix", "--quiet"] }
|
formatter = { command = 'prettier', args = ["--parser", "yaml"] }
|
||||||
auto-format = true
|
auto-format = true
|
||||||
|
|
||||||
[[language]]
|
[[language]]
|
||||||
name = "markdown"
|
name = "markdown"
|
||||||
formatter = { command = "treefmt", args = ["--stdin", ".nix", "--quiet"] }
|
formatter = { command = 'prettier', args = ["--parser", "markdown"] }
|
||||||
auto-format = true
|
|
||||||
|
|
37
flake.lock
generated
37
flake.lock
generated
|
@ -178,22 +178,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1747958103,
|
|
||||||
"narHash": "sha256-qmmFCrfBwSHoWw7cVK4Aj+fns+c54EBP8cGqp/yK410=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "fe51d34885f7b5e3e7b59572796e1bcb427eccb1",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixpkgs-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nur": {
|
"nur": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
|
@ -221,8 +205,7 @@
|
||||||
"nixgl": "nixgl",
|
"nixgl": "nixgl",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"sops-nix": "sops-nix",
|
"sops-nix": "sops-nix"
|
||||||
"treefmt-nix": "treefmt-nix_2"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sops-nix": {
|
"sops-nix": {
|
||||||
|
@ -280,24 +263,6 @@
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"treefmt-nix_2": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": "nixpkgs_3"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1750931469,
|
|
||||||
"narHash": "sha256-0IEdQB1nS+uViQw4k3VGUXntjkDp7aAlqcxdewb/hAc=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "treefmt-nix",
|
|
||||||
"rev": "ac8e6f32e11e9c7f153823abc3ab007f2a65d3e1",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "treefmt-nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|
44
flake.nix
44
flake.nix
|
@ -1,38 +1,34 @@
|
||||||
# TODO: Add flake-utils, flake-parts, git-pre-hook
|
|
||||||
{
|
{
|
||||||
description = "My Home Manager configuration";
|
description = "My Home Manager configuration";
|
||||||
inputs = {
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/master";
|
url = "github:nix-community/home-manager/master";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
nur.url = "github:nix-community/NUR";
|
||||||
|
nixgl = {
|
||||||
|
url = "github:nix-community/nixGL";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
lix-module = {
|
lix-module = {
|
||||||
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.1.tar.gz";
|
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.1.tar.gz";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
nixgl = {
|
|
||||||
url = "github:nix-community/nixGL";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
||||||
nur.url = "github:nix-community/NUR";
|
|
||||||
sops-nix = {
|
sops-nix = {
|
||||||
url = "github:Mic92/sops-nix";
|
url = "github:Mic92/sops-nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
treefmt-nix.url = "github:numtide/treefmt-nix";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{
|
{
|
||||||
self,
|
|
||||||
home-manager,
|
|
||||||
lix-module,
|
|
||||||
nixgl,
|
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
|
home-manager,
|
||||||
nur,
|
nur,
|
||||||
|
nixgl,
|
||||||
|
lix-module,
|
||||||
sops-nix,
|
sops-nix,
|
||||||
treefmt-nix,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
@ -44,13 +40,14 @@
|
||||||
nixgl.overlays.default
|
nixgl.overlays.default
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
treefmtEval = treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
sudoer777 = home-manager.lib.homeManagerConfiguration {
|
sudoer777 = home-manager.lib.homeManagerConfiguration {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
extraSpecialArgs = { inherit nixgl; };
|
extraSpecialArgs = {
|
||||||
|
inherit nixgl;
|
||||||
|
};
|
||||||
modules = [
|
modules = [
|
||||||
./home.nix
|
./home.nix
|
||||||
lix-module.nixosModules.default
|
lix-module.nixosModules.default
|
||||||
|
@ -67,21 +64,18 @@
|
||||||
devShells.${system}.default = pkgs.mkShell {
|
devShells.${system}.default = pkgs.mkShell {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
pkgs.age
|
pkgs.age
|
||||||
pkgs.forgejo-cli
|
|
||||||
pkgs.helix
|
|
||||||
pkgs.just
|
|
||||||
pkgs.marksman
|
|
||||||
pkgs.nil
|
|
||||||
pkgs.sops
|
pkgs.sops
|
||||||
|
pkgs.just
|
||||||
|
pkgs.forgejo-cli
|
||||||
|
pkgs.nil
|
||||||
|
pkgs.nixfmt-rfc-style
|
||||||
pkgs.taplo
|
pkgs.taplo
|
||||||
|
pkgs.marksman
|
||||||
|
pkgs.helix
|
||||||
pkgs.uutils-coreutils
|
pkgs.uutils-coreutils
|
||||||
|
pkgs.prettier
|
||||||
pkgs.yaml-language-server
|
pkgs.yaml-language-server
|
||||||
treefmtEval.config.build.wrapper
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
formatter.${system} = treefmtEval.config.build.wrapper;
|
|
||||||
checks.${system} = {
|
|
||||||
formatting = treefmtEval.config.build.check self;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
4
home.nix
4
home.nix
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
nixgl,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
|
nixgl,
|
||||||
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
|
16
treefmt.nix
16
treefmt.nix
|
@ -1,16 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
projectRootFile = "flake.nix";
|
|
||||||
programs = {
|
|
||||||
nixfmt = {
|
|
||||||
enable = true;
|
|
||||||
strict = true;
|
|
||||||
};
|
|
||||||
prettier = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
taplo = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Add table
Reference in a new issue