Add treefmt with config, reformat nix files for nixfmt updates
This commit is contained in:
parent
1d535dc147
commit
1733e39552
37
flake.lock
37
flake.lock
|
@ -207,12 +207,29 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1733097829,
|
||||||
|
"narHash": "sha256-9hbb1rqGelllb4kVUCZ307G2k3/UhmA8PPGBoyuWaSw=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "2c15aa59df0017ca140d9ba302412298ab4bf22a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"iosevka-custom": "iosevka-custom",
|
"iosevka-custom": "iosevka-custom",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"stylix": "stylix"
|
"stylix": "stylix",
|
||||||
|
"treefmt-nix": "treefmt-nix"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"stylix": {
|
"stylix": {
|
||||||
|
@ -314,6 +331,24 @@
|
||||||
"repo": "tinted-tmux",
|
"repo": "tinted-tmux",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"treefmt-nix": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs_3"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1733761991,
|
||||||
|
"narHash": "sha256-s4DalCDepD22jtKL5Nw6f4LP5UwoMcPzPZgHWjAfqbQ=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "treefmt-nix",
|
||||||
|
"rev": "0ce9d149d99bc383d1f2d85f31f6ebd146e46085",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "treefmt-nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|
13
flake.nix
13
flake.nix
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
|
||||||
|
treefmt-nix.url = "github:numtide/treefmt-nix";
|
||||||
iosevka-custom.url = "git+https://git.xenia.me.uk/pixelifytica/iosevka.git";
|
iosevka-custom.url = "git+https://git.xenia.me.uk/pixelifytica/iosevka.git";
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-24.11";
|
url = "github:nix-community/home-manager/release-24.11";
|
||||||
|
@ -23,8 +24,18 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
inputs@{ nixpkgs, ... }:
|
inputs@{
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
treefmt-nix,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
treefmt = treefmt-nix.lib.evalModule nixpkgs.legacyPackages.x86_64-linux ./treefmt.nix;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
|
formatter.x86_64-linux = treefmt.config.build.wrapper;
|
||||||
|
checks.x86_64-linux.formatting = treefmt.config.build.check self;
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
## Server
|
## Server
|
||||||
Legion = nixpkgs.lib.nixosSystem {
|
Legion = nixpkgs.lib.nixosSystem {
|
||||||
|
|
|
@ -31,7 +31,8 @@
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.luks.devices."luks-bf1eab3a-6d92-430d-a282-8dd4c9efe2c7".device = "/dev/disk/by-uuid/bf1eab3a-6d92-430d-a282-8dd4c9efe2c7";
|
boot.initrd.luks.devices."luks-bf1eab3a-6d92-430d-a282-8dd4c9efe2c7".device =
|
||||||
|
"/dev/disk/by-uuid/bf1eab3a-6d92-430d-a282-8dd4c9efe2c7";
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
fileSystems."/boot" = {
|
||||||
device = "/dev/disk/by-uuid/85D5-B6EC";
|
device = "/dev/disk/by-uuid/85D5-B6EC";
|
||||||
|
|
|
@ -26,7 +26,8 @@
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.luks.devices."luks-d1062931-ee58-4848-adf9-09452daeb6eb".device = "/dev/disk/by-uuid/d1062931-ee58-4848-adf9-09452daeb6eb";
|
boot.initrd.luks.devices."luks-d1062931-ee58-4848-adf9-09452daeb6eb".device =
|
||||||
|
"/dev/disk/by-uuid/d1062931-ee58-4848-adf9-09452daeb6eb";
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
fileSystems."/boot" = {
|
||||||
device = "/dev/disk/by-uuid/ABE3-88E7";
|
device = "/dev/disk/by-uuid/ABE3-88E7";
|
||||||
|
|
|
@ -28,7 +28,8 @@
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.luks.devices."luks-08822b9c-e9d6-424c-bc75-373f8667526d".device = "/dev/disk/by-uuid/08822b9c-e9d6-424c-bc75-373f8667526d";
|
boot.initrd.luks.devices."luks-08822b9c-e9d6-424c-bc75-373f8667526d".device =
|
||||||
|
"/dev/disk/by-uuid/08822b9c-e9d6-424c-bc75-373f8667526d";
|
||||||
|
|
||||||
fileSystems."/boot/efi" = {
|
fileSystems."/boot/efi" = {
|
||||||
device = "/dev/disk/by-uuid/6009-89FC";
|
device = "/dev/disk/by-uuid/6009-89FC";
|
||||||
|
|
|
@ -29,7 +29,8 @@
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.luks.devices."luks-0d50df5f-9456-4296-9156-f5b818e11552".device = "/dev/disk/by-uuid/0d50df5f-9456-4296-9156-f5b818e11552";
|
boot.initrd.luks.devices."luks-0d50df5f-9456-4296-9156-f5b818e11552".device =
|
||||||
|
"/dev/disk/by-uuid/0d50df5f-9456-4296-9156-f5b818e11552";
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
fileSystems."/boot" = {
|
||||||
device = "/dev/disk/by-uuid/3297-A70D";
|
device = "/dev/disk/by-uuid/3297-A70D";
|
||||||
|
|
|
@ -32,5 +32,6 @@
|
||||||
# }
|
# }
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
services.caddy.virtualHosts."grafana.xenia.me.uk".extraConfig = "reverse_proxy http://localhost:3000";
|
services.caddy.virtualHosts."grafana.xenia.me.uk".extraConfig =
|
||||||
|
"reverse_proxy http://localhost:3000";
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,5 +6,6 @@
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
secretKeyFile = "/root/nix-serve.key";
|
secretKeyFile = "/root/nix-serve.key";
|
||||||
};
|
};
|
||||||
services.caddy.virtualHosts."nix.xenia.me.uk".extraConfig = "reverse_proxy http://localhost:${toString config.services.nix-serve.port}";
|
services.caddy.virtualHosts."nix.xenia.me.uk".extraConfig =
|
||||||
|
"reverse_proxy http://localhost:${toString config.services.nix-serve.port}";
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,5 +6,6 @@
|
||||||
port = 9090;
|
port = 9090;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
};
|
};
|
||||||
services.caddy.virtualHosts."stream.xenia.me.uk".extraConfig = "reverse_proxy http://localhost:${config.services.owncast.port}";
|
services.caddy.virtualHosts."stream.xenia.me.uk".extraConfig =
|
||||||
|
"reverse_proxy http://localhost:${config.services.owncast.port}";
|
||||||
}
|
}
|
||||||
|
|
5
treefmt.nix
Normal file
5
treefmt.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
projectRootFile = "flake.nix";
|
||||||
|
programs.nixfmt.enable = true;
|
||||||
|
}
|
Loading…
Reference in a new issue