Compare commits
10 commits
c81213a02b
...
81f128265c
| Author | SHA1 | Date | |
|---|---|---|---|
| 81f128265c | |||
| d8dd32193d | |||
| 7ec36e8a2b | |||
| 67fcb2c7bc | |||
| b9bfb81907 | |||
| 2e6f7e41c1 | |||
| d722be4d55 | |||
| eb444b55a1 | |||
| e997971190 | |||
| 689a0cdfa8 |
17 changed files with 327 additions and 112 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
.pre-commit-config.yaml
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{lib, ...}:
|
{ lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = lib.fileset.toList (lib.fileset.fileFilter (f: f.hasExt "nix") ./modules);
|
imports = lib.fileset.toList (lib.fileset.fileFilter (f: f.hasExt "nix") ./modules);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
100
flake.lock
generated
100
flake.lock
generated
|
|
@ -1,24 +1,114 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1767039857,
|
||||||
|
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"git-hooks": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"gitignore": "gitignore",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1772024342,
|
||||||
|
"narHash": "sha256-+eXlIc4/7dE6EcPs9a2DaSY3fTA9AE526hGqkNID3Wg=",
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "git-hooks.nix",
|
||||||
|
"rev": "6e34e97ed9788b17796ee43ccdbaf871a5c2b476",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "git-hooks.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"gitignore": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"git-hooks",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1709087332,
|
||||||
|
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1771848320,
|
"lastModified": 1770073757,
|
||||||
"narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=",
|
"narHash": "sha256-Vy+G+F+3E/Tl+GMNgiHl9Pah2DgShmIUBJXmbiQPHbI=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "47472570b1e607482890801aeaf29bfb749884f6",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1772047000,
|
||||||
|
"narHash": "sha256-7DaQVv4R97cii/Qdfy4tmDZMB2xxtyIvNGSwXBBhSmo=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "2fc6539b481e1d2569f25f8799236694180c0993",
|
"rev": "1267bb4920d0fc06ea916734c11b0bf004bbe17e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"ref": "nixos-unstable",
|
"ref": "nixos-25.11",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs"
|
"git-hooks": "git-hooks",
|
||||||
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"systems": "systems"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
58
flake.nix
58
flake.nix
|
|
@ -1,16 +1,56 @@
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-25.11";
|
||||||
|
systems.url = "github:nix-systems/default";
|
||||||
|
git-hooks.url = "github:cachix/git-hooks.nix";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs }: {
|
outputs =
|
||||||
# hydraJobs = nixpkgs.lib.mapAttrs (_: value: value.config.system.build.toplevel) self.nixosConfigurations;
|
{
|
||||||
nixosConfigurations = {
|
self,
|
||||||
vm = nixpkgs.lib.nixosSystem {
|
systems,
|
||||||
modules = [
|
nixpkgs,
|
||||||
./systems/vm/configuration.nix
|
...
|
||||||
];
|
}@inputs:
|
||||||
|
let
|
||||||
|
forEachSystem = inputs.nixpkgs.lib.genAttrs (import systems);
|
||||||
|
in
|
||||||
|
{
|
||||||
|
formatter = forEachSystem (
|
||||||
|
system:
|
||||||
|
let
|
||||||
|
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||||
|
in
|
||||||
|
pkgs.treefmt
|
||||||
|
);
|
||||||
|
|
||||||
|
checks = forEachSystem (system: {
|
||||||
|
pre-commit-check = inputs.git-hooks.lib.${system}.run {
|
||||||
|
src = ./.;
|
||||||
|
hooks = {
|
||||||
|
treefmt.enable = true;
|
||||||
|
treefmt.settings.formatters = [ inputs.nixpkgs.legacyPackages.${system}.nixfmt ];
|
||||||
|
statix.enable = true;
|
||||||
|
deadnix.enable = true;
|
||||||
|
nil.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
devShells = forEachSystem (system: {
|
||||||
|
default =
|
||||||
|
let
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
inherit (self.checks.${system}.pre-commit-check) shellHook enabledPackages;
|
||||||
|
in
|
||||||
|
pkgs.mkShell {
|
||||||
|
inherit shellHook;
|
||||||
|
buildInputs = enabledPackages;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
nixosConfigurations = {
|
||||||
|
vm = nixpkgs.lib.nixosSystem { modules = [ ./systems/vm/configuration.nix ]; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
{config, pkgs, ...}:
|
_:
|
||||||
|
|
||||||
{
|
{
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.grub = {
|
||||||
boot.loader.grub.device = "/dev/vda";
|
enable = true;
|
||||||
boot.loader.grub.useOSProber = true;
|
device = "/dev/vda";
|
||||||
}
|
useOSProber = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{config, pkgs, ...}:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
programs = {
|
programs = {
|
||||||
|
|
@ -10,4 +10,4 @@
|
||||||
acpi
|
acpi
|
||||||
wget
|
wget
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,32 +1,35 @@
|
||||||
{config, pkgs, lib, ...}:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.modules.graphical;
|
cfg = config.modules.graphical;
|
||||||
quickshell-packages = lib.mkIf cfg.quickshell (with pkgs; [quickshell]);
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
modules.graphical = {
|
modules.graphical = {
|
||||||
enable = lib.mkEnableOption "Enable the GUI";
|
enable = lib.mkEnableOption "Enable the GUI";
|
||||||
|
|
||||||
waybar = lib.mkEnableOption "Enable waybar";
|
waybar = lib.mkEnableOption "Enable waybar";
|
||||||
|
|
||||||
quickshell = lib.mkEnableOption "Enable quickshell";
|
quickshell = lib.mkEnableOption "Enable quickshell";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
programs.niri.enable = true;
|
programs.niri.enable = true;
|
||||||
services.displayManager.ly.enable = true;
|
services.displayManager.ly.enable = true;
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages =
|
||||||
alacritty
|
with pkgs;
|
||||||
wl-clipboard
|
[
|
||||||
|
alacritty
|
||||||
]
|
wl-clipboard
|
||||||
++ quickshell-packages;
|
]
|
||||||
|
++ lib.optional cfg.quickshell quickshell;
|
||||||
|
|
||||||
programs.waybar.enable = lib.mkIf cfg.waybar true;
|
programs.waybar.enable = lib.mkIf cfg.waybar true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{config, pkgs, lib, ...}:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.modules.k3s;
|
cfg = config.modules.k3s;
|
||||||
|
|
@ -7,7 +7,5 @@ in
|
||||||
{
|
{
|
||||||
options.modules.k3s.enable = lib.mkEnableOption "Enable the k3s service";
|
options.modules.k3s.enable = lib.mkEnableOption "Enable the k3s service";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable { services.k3s.enable = true; };
|
||||||
services.k3s.enable = true;
|
}
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,16 @@
|
||||||
{config, pkgs, lib, ...}:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.modules.kubernetes;
|
cfg = config.modules.kubernetes;
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
options.modules.kubernetes.enable = lib.mkEnableOption "Enable MiniKube and Kubectl";
|
options.modules.kubernetes.enable = lib.mkEnableOption "Enable MiniKube and Kubectl";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
|
@ -13,4 +18,4 @@ in
|
||||||
kubectl
|
kubectl
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
_:
|
_: {
|
||||||
{
|
|
||||||
services.automatic-timezoned.enable = true;
|
services.automatic-timezoned.enable = true;
|
||||||
i18n.defaultLocale = "en_GB.UTF-8";
|
i18n.defaultLocale = "en_GB.UTF-8";
|
||||||
i18n.extraLocaleSettings = {
|
i18n.extraLocaleSettings = {
|
||||||
|
|
@ -13,5 +12,5 @@ _:
|
||||||
LC_TELEPHONE = "en_GB.UTF-8";
|
LC_TELEPHONE = "en_GB.UTF-8";
|
||||||
LC_TIME = "en_GB.UTF-8";
|
LC_TIME = "en_GB.UTF-8";
|
||||||
};
|
};
|
||||||
console.keyMap = "uk";
|
console.keyMap = "uk";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1 @@
|
||||||
{config, pkgs, ...}:
|
_: { networking.networkmanager.enable = true; }
|
||||||
|
|
||||||
{
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
{config, pkgs, lib, ...}:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.modules.prismLauncher;
|
cfg = config.modules.prismLauncher;
|
||||||
|
|
@ -6,9 +11,5 @@ in
|
||||||
{
|
{
|
||||||
options.modules.prismLauncher.enable = lib.mkEnableOption "Enables the prism minecraft launcher";
|
options.modules.prismLauncher.enable = lib.mkEnableOption "Enables the prism minecraft launcher";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable { environment.systemPackages = with pkgs; [ prismlauncher ]; };
|
||||||
environment.systemPackages = with pkgs; [
|
}
|
||||||
prismlauncher
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,26 @@
|
||||||
{config, pkgs, lib, ...}:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.modules.yazi;
|
cfg = config.modules.yazi;
|
||||||
optional-packages = lib.mkIf cfg.optional-programs (with pkgs; [
|
in
|
||||||
|
{
|
||||||
|
options.modules.yazi = {
|
||||||
|
enable = lib.mkEnableOption "Enable Yazi file manager";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
programs = {
|
||||||
|
yazi.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
fonts.packages = builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts);
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
ffmpeg_7
|
ffmpeg_7
|
||||||
p7zip
|
p7zip
|
||||||
jq
|
jq
|
||||||
|
|
@ -13,22 +31,6 @@ let
|
||||||
zoxide
|
zoxide
|
||||||
resvg
|
resvg
|
||||||
imagemagick
|
imagemagick
|
||||||
]);
|
];
|
||||||
in
|
|
||||||
{
|
|
||||||
options.modules.yazi = {
|
|
||||||
enable = lib.mkEnableOption "Enable Yazi file manager";
|
|
||||||
optional-programs = lib.mkEnableOption "Enable optional extra packages";
|
|
||||||
};
|
};
|
||||||
|
}
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
programs = {
|
|
||||||
yazi.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
nerd-fonts.ubuntu
|
|
||||||
nerd-fonts.ubuntu-mono
|
|
||||||
] ++ optional-packages;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
|
||||||
11
shell.nix
Normal file
11
shell.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
pkgs ? import <nixpkgs> { },
|
||||||
|
}:
|
||||||
|
pkgs.mkShell {
|
||||||
|
nativeBuildInputs = with pkgs.buildPackages; [
|
||||||
|
deadnix
|
||||||
|
statix
|
||||||
|
treefmt
|
||||||
|
nixfmt-rfc-style
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -1,27 +1,25 @@
|
||||||
{ config, pkgs, ...}:
|
_:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../all-modules.nix
|
../../all-modules.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
users.users.riley = {
|
users.users.riley = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = ["wheel"];
|
extraGroups = [ "wheel" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.hostName = "vm";
|
networking.hostName = "vm";
|
||||||
|
|
||||||
modules.graphical = {
|
modules.graphical = {
|
||||||
enable = true;
|
enable = true;
|
||||||
waybar = true;
|
waybar = true;
|
||||||
|
quickshell = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
modules.yazi = {
|
modules.yazi.enable = true;
|
||||||
enable = true;
|
|
||||||
optional-programs = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
system.stateVersion = "25.11";
|
system.stateVersion = "25.11";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,27 @@
|
||||||
{ config, lib, pkgs, modulesPath, ...}:
|
{ lib, modulesPath, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
|
boot = {
|
||||||
boot.initrd.kernelModules = [];
|
initrd = {
|
||||||
boot.extraModulePackages = [];
|
availableKernelModules = [
|
||||||
|
"ahci"
|
||||||
|
"xhci_pci"
|
||||||
|
"virtio_pci"
|
||||||
|
"sr_mod"
|
||||||
|
"virtio_blk"
|
||||||
|
];
|
||||||
|
kernelModules = [ ];
|
||||||
|
};
|
||||||
|
extraModulePackages = [ ];
|
||||||
|
};
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-uuid/ed56e12e-55cc-42e0-b94f-9a6d6bb2bdad";
|
device = "/dev/disk/by-uuid/ed56e12e-55cc-42e0-b94f-9a6d6bb2bdad";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [];
|
swapDevices = [ ];
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
61
treefmt.toml
Normal file
61
treefmt.toml
Normal file
|
|
@ -0,0 +1,61 @@
|
||||||
|
# One CLI to format the code tree - https://github.com/numtide/treefmt
|
||||||
|
|
||||||
|
# Do not exit with error if a configured formatter is missing
|
||||||
|
# Env $TREEFMT_ALLOW_MISSING_FORMATTER
|
||||||
|
# allow-missing-formatter = true
|
||||||
|
|
||||||
|
# The file into which a cpu profile will be written
|
||||||
|
# Env $TREEFMT_CPU_PROFILE
|
||||||
|
# cpu-profile = ./cpu.pprof
|
||||||
|
|
||||||
|
# Exclude files or directories matching the specified globs
|
||||||
|
# Env $TREEFMT_EXCLUDES
|
||||||
|
# excludes = ["*.md", "*.gif"]
|
||||||
|
|
||||||
|
# Exit with error if any changes were made during execution
|
||||||
|
# Useful for CI
|
||||||
|
# Env $TREEFMT_FAIL_ON_CHANGE
|
||||||
|
# fail-on-change = true
|
||||||
|
|
||||||
|
# A list of formatters to apply
|
||||||
|
# Defaults to all configured formatters
|
||||||
|
# Env $TREEFMT_FORMATTERS
|
||||||
|
# formatters = ["gofmt", "prettier"]
|
||||||
|
|
||||||
|
# Log paths that did not match any formatters at the specified log level
|
||||||
|
# Possible values are <debug|info|warn|error|fatal>
|
||||||
|
# Env $TREEFMT_ON_UNMATCHED
|
||||||
|
# on-unmatched = "info"
|
||||||
|
|
||||||
|
# The root directory from which treefmt will start walking the filesystem
|
||||||
|
# Defaults to the directory containing the config file
|
||||||
|
# Env $TREEFMT_TREE_ROOT
|
||||||
|
# tree-root = "/tmp/foo"
|
||||||
|
|
||||||
|
# File to search for to find the tree root (if tree-root is not set)
|
||||||
|
# Env $TREEFMT_TREE_ROOT_FILE
|
||||||
|
# tree-root-file = ".git/config"
|
||||||
|
|
||||||
|
# Set the verbosity of logs
|
||||||
|
# 0 = warn, 1 = info, 2 = debug
|
||||||
|
# Env $TREEFMT_VERBOSE
|
||||||
|
# verbose = 2
|
||||||
|
|
||||||
|
# The method used to traverse the files within the tree root
|
||||||
|
# Currently, we support 'auto', 'git' or 'filesystem'
|
||||||
|
# Env $TREEFMT_WALK
|
||||||
|
# walk = "filesystem"
|
||||||
|
|
||||||
|
[formatter.nixfmt]
|
||||||
|
# Command to execute
|
||||||
|
command = "nixfmt"
|
||||||
|
# Command-line arguments for the command
|
||||||
|
options = ["-s", "-v", "-w150"]
|
||||||
|
# Glob pattern of files to include
|
||||||
|
includes = ["*.nix"]
|
||||||
|
# Glob patterns of files to exclude
|
||||||
|
excludes = []
|
||||||
|
# Controls the order of application when multiple formatters match the same file
|
||||||
|
# Lower the number, the higher the precedence
|
||||||
|
# Default is 0
|
||||||
|
priority = 0
|
||||||
Loading…
Add table
Add a link
Reference in a new issue