clean up code
This commit is contained in:
parent
4a89cd1d17
commit
375ed7d867
1 changed files with 15 additions and 6 deletions
|
|
@ -61,7 +61,7 @@ Now, lets add the package spec:
|
|||
|
||||
```nix
|
||||
...
|
||||
|
||||
{
|
||||
in {
|
||||
# add packages :)
|
||||
packages = eachSystem (pkgs: {
|
||||
|
|
@ -75,6 +75,7 @@ Now, lets add the package spec:
|
|||
|
||||
...
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
Now, when we run `nix build`, everything works as expected, great! But how can we see the outputs of our build? If we run the following command:
|
||||
|
|
@ -98,6 +99,9 @@ At this point, we could add this repo as a input to the flake configuring our se
|
|||
I added the following code to the outputs section of my `flake.nix`.
|
||||
|
||||
```nix
|
||||
{
|
||||
# previous outputs
|
||||
|
||||
nixosModule = {
|
||||
config,
|
||||
lib,
|
||||
|
|
@ -133,6 +137,7 @@ I added the following code to the outputs section of my `flake.nix`.
|
|||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
Woah, that's a lot of code, let's break it down.
|
||||
|
|
@ -148,6 +153,7 @@ Enough code, lets deploy!
|
|||
After adding the repo of my blog project to my server's flake like this:
|
||||
|
||||
```nix
|
||||
{
|
||||
inputs = {
|
||||
... # all our previous definitions
|
||||
|
||||
|
|
@ -163,6 +169,9 @@ After adding the repo of my blog project to my server's flake like this:
|
|||
inputs.blog.nixosModule.default
|
||||
];
|
||||
};
|
||||
|
||||
# other configs
|
||||
}
|
||||
```
|
||||
|
||||
We can add the following to our server's main nixosModule:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue