apply prettier to source tree
All checks were successful
build / test (pull_request) Successful in 29s

This commit is contained in:
Jörg Thalheim 2023-08-24 14:12:17 +02:00
parent dbc0ae08c0
commit 4d183fff58
9 changed files with 24 additions and 40 deletions

View File

@ -13,6 +13,7 @@ clan.url = "git+https://git.clan.lol/clan/clan-core";
```
and inside the mkFlake:
```
imports = [
inputs.clan.flakeModules.clan-config
@ -20,12 +21,14 @@ imports = [
```
Add an empty config file and add it to git
```command
echo "{}" > ./clan-settings.json
git add ./clan-settings.json
```
Import the clan-config module into your nixos configuration:
```nix
{
imports = [
@ -39,6 +42,7 @@ Import the clan-config module into your nixos configuration:
```
Make sure your nixos configuration is set a default
```nix
{self, ...}: {
flake.nixosConfigurations.default = self.nixosConfigurations.my-machine;

View File

@ -14,6 +14,10 @@
treefmt.programs.prettier.settings.plugins = [
"${self'.packages.prettier-plugin-tailwindcss}/lib/node_modules/prettier-plugin-tailwindcss/dist/index.mjs"
];
treefmt.settings.formatter.prettier.excludes = [
"secrets.yaml"
"key.json"
];
treefmt.programs.mypy.enable = true;
treefmt.programs.mypy.directories = {

View File

@ -2,10 +2,7 @@
"name": "John Doe",
"age": 42,
"isAdmin": false,
"kernelModules": [
"usbhid",
"usb_storage"
],
"kernelModules": ["usbhid", "usb_storage"],
"userIds": {
"mic92": 1,
"lassulus": 2,

View File

@ -21,11 +21,7 @@
"items": {
"type": "string"
},
"default": [
"nvme",
"xhci_pci",
"ahci"
],
"default": ["nvme", "xhci_pci", "ahci"],
"description": "A list of enabled kernel modules"
},
"userIds": {

View File

@ -8,9 +8,7 @@
"text": "42"
},
"description": "The age of the user",
"loc": [
"age"
],
"loc": ["age"],
"readOnly": false,
"type": "signed integer"
},
@ -23,9 +21,7 @@
"text": "false"
},
"description": "Is the user an admin?",
"loc": [
"isAdmin"
],
"loc": ["isAdmin"],
"readOnly": false,
"type": "boolean"
},
@ -38,9 +34,7 @@
"text": "[\n \"nvme\"\n \"xhci_pci\"\n \"ahci\"\n]"
},
"description": "A list of enabled kernel modules",
"loc": [
"kernelModules"
],
"loc": ["kernelModules"],
"readOnly": false,
"type": "list of string"
},
@ -53,9 +47,7 @@
"text": "\"John Doe\""
},
"description": "The name of the user",
"loc": [
"name"
],
"loc": ["name"],
"readOnly": false,
"type": "string"
},
@ -64,9 +56,7 @@
"/home/grmpf/synced/projects/clan/clan-core/lib/jsonschema/example-interface.nix"
],
"description": null,
"loc": [
"services"
],
"loc": ["services"],
"readOnly": false,
"type": "submodule"
},
@ -79,10 +69,7 @@
"text": "\"foo\""
},
"description": "A submodule option",
"loc": [
"services",
"opt"
],
"loc": ["services", "opt"],
"readOnly": false,
"type": "string"
},
@ -95,9 +82,7 @@
"text": "{\n albrecht = 3;\n horst = 1;\n peter = 2;\n}"
},
"description": "Some attributes",
"loc": [
"userIds"
],
"loc": ["userIds"],
"readOnly": false,
"type": "attribute set of signed integer"
}

View File

@ -140,7 +140,7 @@ function CrudSpeedDial(props: { selected: string | undefined }) {
function editDial() {
if (isSomethingSelected) {
return (
<Link href="/nodes/edit" style={{marginTop: 7.5}}>
<Link href="/nodes/edit" style={{ marginTop: 7.5 }}>
<EditIcon color="action" />
</Link>
);
@ -173,7 +173,7 @@ function CrudSpeedDial(props: { selected: string | undefined }) {
<SpeedDialAction
key="Add"
icon={
<Link href="/nodes/add" style={{marginTop: 7.5}}>
<Link href="/nodes/add" style={{ marginTop: 7.5 }}>
<AddIcon color="action" />
</Link>
}

View File

@ -8,8 +8,8 @@ import { StrictMode } from "react";
export default function Page() {
return (
<StrictMode>
<StrictMode>
<NodeList tableData={tableData} />
</StrictMode>
</StrictMode>
);
}

View File

@ -9,9 +9,9 @@ export const NodeStatus = {
Online: "Online",
Offline: "Offline",
Pending: "Pending",
}
};
export type NodeStatusKeys = typeof NodeStatus[keyof typeof NodeStatus];
export type NodeStatusKeys = (typeof NodeStatus)[keyof typeof NodeStatus];
function createData(
name: string,

View File

@ -1,3 +1 @@
[
"x86_64-linux"
]
["x86_64-linux"]