forked from clan/clan-core
apply prettier to source tree
This commit is contained in:
parent
dbc0ae08c0
commit
4d183fff58
@ -13,6 +13,7 @@ clan.url = "git+https://git.clan.lol/clan/clan-core";
|
|||||||
```
|
```
|
||||||
|
|
||||||
and inside the mkFlake:
|
and inside the mkFlake:
|
||||||
|
|
||||||
```
|
```
|
||||||
imports = [
|
imports = [
|
||||||
inputs.clan.flakeModules.clan-config
|
inputs.clan.flakeModules.clan-config
|
||||||
@ -20,12 +21,14 @@ imports = [
|
|||||||
```
|
```
|
||||||
|
|
||||||
Add an empty config file and add it to git
|
Add an empty config file and add it to git
|
||||||
|
|
||||||
```command
|
```command
|
||||||
echo "{}" > ./clan-settings.json
|
echo "{}" > ./clan-settings.json
|
||||||
git add ./clan-settings.json
|
git add ./clan-settings.json
|
||||||
```
|
```
|
||||||
|
|
||||||
Import the clan-config module into your nixos configuration:
|
Import the clan-config module into your nixos configuration:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@ -39,6 +42,7 @@ Import the clan-config module into your nixos configuration:
|
|||||||
```
|
```
|
||||||
|
|
||||||
Make sure your nixos configuration is set a default
|
Make sure your nixos configuration is set a default
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{self, ...}: {
|
{self, ...}: {
|
||||||
flake.nixosConfigurations.default = self.nixosConfigurations.my-machine;
|
flake.nixosConfigurations.default = self.nixosConfigurations.my-machine;
|
||||||
|
@ -14,6 +14,10 @@
|
|||||||
treefmt.programs.prettier.settings.plugins = [
|
treefmt.programs.prettier.settings.plugins = [
|
||||||
"${self'.packages.prettier-plugin-tailwindcss}/lib/node_modules/prettier-plugin-tailwindcss/dist/index.mjs"
|
"${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.enable = true;
|
||||||
treefmt.programs.mypy.directories = {
|
treefmt.programs.mypy.directories = {
|
||||||
|
@ -2,10 +2,7 @@
|
|||||||
"name": "John Doe",
|
"name": "John Doe",
|
||||||
"age": 42,
|
"age": 42,
|
||||||
"isAdmin": false,
|
"isAdmin": false,
|
||||||
"kernelModules": [
|
"kernelModules": ["usbhid", "usb_storage"],
|
||||||
"usbhid",
|
|
||||||
"usb_storage"
|
|
||||||
],
|
|
||||||
"userIds": {
|
"userIds": {
|
||||||
"mic92": 1,
|
"mic92": 1,
|
||||||
"lassulus": 2,
|
"lassulus": 2,
|
||||||
|
@ -21,11 +21,7 @@
|
|||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"default": [
|
"default": ["nvme", "xhci_pci", "ahci"],
|
||||||
"nvme",
|
|
||||||
"xhci_pci",
|
|
||||||
"ahci"
|
|
||||||
],
|
|
||||||
"description": "A list of enabled kernel modules"
|
"description": "A list of enabled kernel modules"
|
||||||
},
|
},
|
||||||
"userIds": {
|
"userIds": {
|
||||||
|
@ -8,9 +8,7 @@
|
|||||||
"text": "42"
|
"text": "42"
|
||||||
},
|
},
|
||||||
"description": "The age of the user",
|
"description": "The age of the user",
|
||||||
"loc": [
|
"loc": ["age"],
|
||||||
"age"
|
|
||||||
],
|
|
||||||
"readOnly": false,
|
"readOnly": false,
|
||||||
"type": "signed integer"
|
"type": "signed integer"
|
||||||
},
|
},
|
||||||
@ -23,9 +21,7 @@
|
|||||||
"text": "false"
|
"text": "false"
|
||||||
},
|
},
|
||||||
"description": "Is the user an admin?",
|
"description": "Is the user an admin?",
|
||||||
"loc": [
|
"loc": ["isAdmin"],
|
||||||
"isAdmin"
|
|
||||||
],
|
|
||||||
"readOnly": false,
|
"readOnly": false,
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
@ -38,9 +34,7 @@
|
|||||||
"text": "[\n \"nvme\"\n \"xhci_pci\"\n \"ahci\"\n]"
|
"text": "[\n \"nvme\"\n \"xhci_pci\"\n \"ahci\"\n]"
|
||||||
},
|
},
|
||||||
"description": "A list of enabled kernel modules",
|
"description": "A list of enabled kernel modules",
|
||||||
"loc": [
|
"loc": ["kernelModules"],
|
||||||
"kernelModules"
|
|
||||||
],
|
|
||||||
"readOnly": false,
|
"readOnly": false,
|
||||||
"type": "list of string"
|
"type": "list of string"
|
||||||
},
|
},
|
||||||
@ -53,9 +47,7 @@
|
|||||||
"text": "\"John Doe\""
|
"text": "\"John Doe\""
|
||||||
},
|
},
|
||||||
"description": "The name of the user",
|
"description": "The name of the user",
|
||||||
"loc": [
|
"loc": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"readOnly": false,
|
"readOnly": false,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -64,9 +56,7 @@
|
|||||||
"/home/grmpf/synced/projects/clan/clan-core/lib/jsonschema/example-interface.nix"
|
"/home/grmpf/synced/projects/clan/clan-core/lib/jsonschema/example-interface.nix"
|
||||||
],
|
],
|
||||||
"description": null,
|
"description": null,
|
||||||
"loc": [
|
"loc": ["services"],
|
||||||
"services"
|
|
||||||
],
|
|
||||||
"readOnly": false,
|
"readOnly": false,
|
||||||
"type": "submodule"
|
"type": "submodule"
|
||||||
},
|
},
|
||||||
@ -79,10 +69,7 @@
|
|||||||
"text": "\"foo\""
|
"text": "\"foo\""
|
||||||
},
|
},
|
||||||
"description": "A submodule option",
|
"description": "A submodule option",
|
||||||
"loc": [
|
"loc": ["services", "opt"],
|
||||||
"services",
|
|
||||||
"opt"
|
|
||||||
],
|
|
||||||
"readOnly": false,
|
"readOnly": false,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -95,9 +82,7 @@
|
|||||||
"text": "{\n albrecht = 3;\n horst = 1;\n peter = 2;\n}"
|
"text": "{\n albrecht = 3;\n horst = 1;\n peter = 2;\n}"
|
||||||
},
|
},
|
||||||
"description": "Some attributes",
|
"description": "Some attributes",
|
||||||
"loc": [
|
"loc": ["userIds"],
|
||||||
"userIds"
|
|
||||||
],
|
|
||||||
"readOnly": false,
|
"readOnly": false,
|
||||||
"type": "attribute set of signed integer"
|
"type": "attribute set of signed integer"
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,7 @@ function CrudSpeedDial(props: { selected: string | undefined }) {
|
|||||||
function editDial() {
|
function editDial() {
|
||||||
if (isSomethingSelected) {
|
if (isSomethingSelected) {
|
||||||
return (
|
return (
|
||||||
<Link href="/nodes/edit" style={{marginTop: 7.5}}>
|
<Link href="/nodes/edit" style={{ marginTop: 7.5 }}>
|
||||||
<EditIcon color="action" />
|
<EditIcon color="action" />
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
@ -173,7 +173,7 @@ function CrudSpeedDial(props: { selected: string | undefined }) {
|
|||||||
<SpeedDialAction
|
<SpeedDialAction
|
||||||
key="Add"
|
key="Add"
|
||||||
icon={
|
icon={
|
||||||
<Link href="/nodes/add" style={{marginTop: 7.5}}>
|
<Link href="/nodes/add" style={{ marginTop: 7.5 }}>
|
||||||
<AddIcon color="action" />
|
<AddIcon color="action" />
|
||||||
</Link>
|
</Link>
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,8 @@ import { StrictMode } from "react";
|
|||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
return (
|
return (
|
||||||
<StrictMode>
|
<StrictMode>
|
||||||
<NodeList tableData={tableData} />
|
<NodeList tableData={tableData} />
|
||||||
</StrictMode>
|
</StrictMode>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -9,9 +9,9 @@ export const NodeStatus = {
|
|||||||
Online: "Online",
|
Online: "Online",
|
||||||
Offline: "Offline",
|
Offline: "Offline",
|
||||||
Pending: "Pending",
|
Pending: "Pending",
|
||||||
}
|
};
|
||||||
|
|
||||||
export type NodeStatusKeys = typeof NodeStatus[keyof typeof NodeStatus];
|
export type NodeStatusKeys = (typeof NodeStatus)[keyof typeof NodeStatus];
|
||||||
|
|
||||||
function createData(
|
function createData(
|
||||||
name: string,
|
name: string,
|
||||||
|
@ -1,3 +1 @@
|
|||||||
[
|
["x86_64-linux"]
|
||||||
"x86_64-linux"
|
|
||||||
]
|
|
||||||
|
Loading…
Reference in New Issue
Block a user