Comments (5)
I am not 100% sure I get your intention but you can build parts of your nixos system like this:
$ nix repl
Welcome to Nix 2.10.3. Type :? for he
nix-repl> :lf github:Mic92/dotfiles
nix-repl> :b nixosConfigurations.<PRESS_TAB> ...
nix-repl> :b nixosConfigurations.turingmachine.config.system.build.vm
# same as
$ nix build github:Mic92/dotfiles#nixosConfigurations.turingmachine.config.system.build.vm
This assumes that whatever is part of your nixos system is also exposed as an option.
If you want to build tsp-create
from your nixos configuration you might need to expose it through a nixos module option:
{
options.myoption = mkOption {
type = types.str;
default = tsp-create;
};
}
$ nix build github:Mic92/dotfiles#nixosConfigurations.turingmachine.config.myoption
However it seems far easier to just expose it through a packages flake output and than just use.
nix run github:Mic92/dotfiles#tsp-create
Notice that when you use pkgs.callPackage
you can reuse your partitioning script in both your nixos configuration and in packages
.
I am going to close this issue, since it is not disko related. But you can continue to ask questions.
from disko.
Thank you so much for your help, I'll definitely try your suggestion when I get access to my pc.
However it seems far easier to just expose it through a packages flake output and than just use.
Definitely, the problem is that I have three hosts and I wouldnt want to have to expose three different new outputs for each of their disko configurations. Do you know of any way to abstract this?
from disko.
@Mic92 Right now Im trying to follow your option recommendation. This is it (currently a WIP) in case anyone wants to take a look in the future for documentation purposes. (Baitinq/nixos-config#2)
from disko.
@Mic92 Im done with my implementation, maybe we should consider adding some documentation on how this would be achieved? @Lassulus (As it seems like it would be one of the main use cases for disko) For reference (https://github.com/Baitinq/nixos-config/blob/master/hosts/luna/disks.nix) (nix run .#nixosConfigurations.luna.config.disko-create) (nix run .#nixosConfigurations.luna.config.disko-mount)
from disko.
Yeah, looks a nice example.
from disko.
Related Issues (20)
- Alignment HOT 3
- ZFS module not loaded in diskoLib.makeDiskImages HOT 2
- Differences between the `datasets` properties in zfs HOT 1
- Disko doesn't consider Advanced Format sectors when aligning disks
- Documentation Examples Confusion Due to Disk Name "vdb" HOT 2
- [Discussion] Disko Use with PXE Deployments HOT 7
- Need Help partitioning HOT 5
- zfs support regression: cannot unmount X: not currently mounted HOT 6
- Q: Setup with encrypted nix-store+swap, unencrypted boot and impermenance? HOT 4
- How to setup LUKS with FIDO2? HOT 3
- LUKS BTRFS swap subvolume ignoring mountOptions HOT 3
- Fail to build disko image when minimal profile imported HOT 1
- Hardcoded 2048-sector alignment is excessive for 4Kn disks HOT 9
- "Inappropriate ioctl for device" running zpool create
- An error occurs when there are no mountable datasets in the zpool. HOT 2
- Bcachefs multi disk support HOT 2
- label use partlabel instead of label HOT 4
- Disko bcachefs install error HOT 2
- btrfs creating snapshot of root beetween _create and _mount HOT 2
- Questions: ZFS encyption / swap size automation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from disko.