@adrifer/winix 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -14
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -39,10 +39,10 @@ const shell = feature("shell", () =>
|
|
|
39
39
|
shellAliases: {
|
|
40
40
|
g: "lazygit",
|
|
41
41
|
...(platforms.nixos.isActive && {
|
|
42
|
-
i: "
|
|
42
|
+
i: "cd ~/dotfiles/winix && npx @adrifer/winix switch",
|
|
43
43
|
}),
|
|
44
44
|
...(platforms.darwin.isActive && {
|
|
45
|
-
i: "
|
|
45
|
+
i: "cd ~/dotfiles/winix && npx @adrifer/winix switch --host macbook",
|
|
46
46
|
}),
|
|
47
47
|
},
|
|
48
48
|
})
|
|
@@ -76,31 +76,56 @@ export default workspace({
|
|
|
76
76
|
|
|
77
77
|
> Winix is early software. The core pipeline works end-to-end, but the public API is still evolving.
|
|
78
78
|
|
|
79
|
-
## Install
|
|
79
|
+
## Install and create a config
|
|
80
80
|
|
|
81
81
|
```bash
|
|
82
|
-
|
|
82
|
+
mkdir my-winix-config
|
|
83
|
+
cd my-winix-config
|
|
84
|
+
npx @adrifer/winix@latest init
|
|
85
|
+
npm install
|
|
83
86
|
```
|
|
84
87
|
|
|
85
88
|
Winix expects Node.js with native TypeScript stripping support for `winix.config.ts` files. Node 22+ is recommended.
|
|
86
89
|
|
|
87
|
-
|
|
90
|
+
If you prefer to set up files yourself instead of using `init`, add the package to your own `package.json`:
|
|
88
91
|
|
|
89
92
|
```bash
|
|
90
|
-
|
|
91
|
-
|
|
93
|
+
npm install @adrifer/winix
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The `init` command creates a starter `winix.config.ts`, `tsconfig.json`, `.gitignore`, and package scripts. After `npm install`, the `winix` binary comes from your local `node_modules`, so commands are reproducible through `package-lock.json`.
|
|
97
|
+
|
|
98
|
+
You can also install it globally, but local project installs are recommended:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
npm install -g @adrifer/winix
|
|
92
102
|
```
|
|
93
103
|
|
|
94
104
|
## CLI
|
|
95
105
|
|
|
106
|
+
From a Winix project:
|
|
107
|
+
|
|
96
108
|
```bash
|
|
97
|
-
winix check # validate winix.config.ts
|
|
98
|
-
winix apply # generate .winix/out/
|
|
99
|
-
winix apply --dry # print generated Nix without writing files
|
|
100
|
-
winix apply --diff # show changes against current .winix/out/
|
|
101
|
-
winix switch --host my-host # generate and run nixos-rebuild/darwin-rebuild
|
|
102
|
-
winix update # update generated flake.lock and copy it back
|
|
103
|
-
winix inspect # inspect host composition and fragments
|
|
109
|
+
npx @adrifer/winix check # validate winix.config.ts
|
|
110
|
+
npx @adrifer/winix apply # generate .winix/out/
|
|
111
|
+
npx @adrifer/winix apply --dry # print generated Nix without writing files
|
|
112
|
+
npx @adrifer/winix apply --diff # show changes against current .winix/out/
|
|
113
|
+
npx @adrifer/winix switch --host my-host # generate and run nixos-rebuild/darwin-rebuild
|
|
114
|
+
npx @adrifer/winix update # update generated flake.lock and copy it back
|
|
115
|
+
npx @adrifer/winix inspect # inspect host composition and fragments
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
If you add scripts to your `package.json`, you can use shorter commands:
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"scripts": {
|
|
123
|
+
"check": "winix check",
|
|
124
|
+
"apply": "winix apply",
|
|
125
|
+
"dry": "winix apply --dry",
|
|
126
|
+
"switch": "winix switch"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
104
129
|
```
|
|
105
130
|
|
|
106
131
|
Generated output lives under:
|
|
@@ -277,6 +302,8 @@ Winix is currently best suited for personal configurations and experimentation.
|
|
|
277
302
|
|
|
278
303
|
## Development
|
|
279
304
|
|
|
305
|
+
Only clone this repository if you want to work on Winix itself. For normal configuration usage, install `@adrifer/winix` from npm as shown above.
|
|
306
|
+
|
|
280
307
|
```bash
|
|
281
308
|
git clone https://github.com/adrifer/winix.git
|
|
282
309
|
cd winix
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adrifer/winix",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "TypeScript-first system configuration for NixOS, nix-darwin, and Home Manager",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Adrian Fernandez",
|
|
@@ -56,6 +56,8 @@
|
|
|
56
56
|
"lint": "eslint src/",
|
|
57
57
|
"check": "tsc --noEmit",
|
|
58
58
|
"prepack": "npm run build",
|
|
59
|
+
"release:stable": "node scripts/release.mjs stable",
|
|
60
|
+
"release:preview": "node scripts/release.mjs preview",
|
|
59
61
|
"generate:types": "npx tsx scripts/generate-types.ts",
|
|
60
62
|
"generate:types:nixos": "npx tsx scripts/generate-types.ts nixos",
|
|
61
63
|
"generate:types:hm": "npx tsx scripts/generate-types.ts home-manager",
|