Comments (11)
Hi, yes the current scripts will just do one partition. Before running the commands however you can swap out the disk-config
with something like mine:
https://github.com/dustinlyons/nixos-config/blob/main/modules/nixos/disk-config.nix
_: {
# This is the disk layout for a dual-boot system with Windows 10.
disko.devices = {
disk = {
nvme0n1 = {
device = "/dev/nvme0n1";
type = "disk";
content = {
type = "gpt";
partitions = {
ESP = {
type = "EF00"; # EFI partition type.
size = "500M";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
start = "901G"; # Start immediately after Windows partition.
size = "100%"; # Takes the remaining half of the disk space.
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
};
}
I had to first install Windows on the drive, then run the NixOS installer. I also had to manually add the place on the drive NixOS should start (901GB for me). Here is some info on that:
https://chat.openai.com/share/80ef0023-f68b-47af-bd6e-824861deca8e
Before running the final 3. Install configuration
step, you'll have to swap out the disk-config in modules
for the one you see above, and custom to your particular drive. Unfortunately I can't support this any further as it's not part of the standard install, but hopefully this info is enough.
- Secrets just mean you can keep sensitive data in your Nix configuration, like keys, certs, etc. So that when you install it, you don't have to manually set that stuff up. It's helpful to have a configuration that just "works out of the box".
from nixos-config.
If you're just starting out I would not worry about secrets for now, just get a config without secrets working first and understand it.
It's not that big of a deal to manually copy over some keys after the install is done.
NixOS uses systemd-boot with UEFI
from nixos-config.
Also
nix run .#build-switch -- what does it do?
So Nix works by building everything as an isolated package on its own volume (the Nix "Store").
So when you build your configuration and switch to it, you're saying to your machine:
- create everything I've defined in my config as a package in the Nix store, referencing its build instructions on how to build it (usually defined in nixpkgs), and then
- switch all my local packagss to a symlink that references the package in the Nix Store, instead of the actual package on my drive somewhere (probably installed by brew or its own installer).
nix flake update -- this updates the system right?
Yes, it says, update all inputs defined in the flake (nix-darwin, nixpkgs, etc) to the latest git hash.
Doesn't build or switch anything, but next time you build you'll grab the latest flake inputs.
editing your system configuration
building the (system closure)
creating and switching to it (i.e creating a new generation)
What do you mean by it?
Basically what I'm discussing above.
from nixos-config.
The README
for this repository outlines a set of steps to use a template for NixOS. Once you've followed those instructions and created your Nix configuration, before running nix run #build-switch
you should swap out the disk-config.nix
located at modules/nixos/disk-config.nix
with the one you created.
from nixos-config.
Hi, yes the current scripts will just do one partition. Before running the commands however you can swap out the
disk-config
with something like mine:https://github.com/dustinlyons/nixos-config/blob/main/modules/nixos/disk-config.nix
_: { # This is the disk layout for a dual-boot system with Windows 10. disko.devices = { disk = { nvme0n1 = { device = "/dev/nvme0n1"; type = "disk"; content = { type = "gpt"; partitions = { ESP = { type = "EF00"; # EFI partition type. size = "500M"; content = { type = "filesystem"; format = "vfat"; mountpoint = "/boot"; }; }; root = { start = "901G"; # Start immediately after Windows partition. size = "100%"; # Takes the remaining half of the disk space. content = { type = "filesystem"; format = "ext4"; mountpoint = "/"; }; }; }; }; }; }; }; }
I had to first install Windows on the drive, then run the NixOS installer. I also had to manually add the place on the drive NixOS should start (901GB for me). Here is some info on that:
https://chat.openai.com/share/80ef0023-f68b-47af-bd6e-824861deca8e
Before running the final
3. Install configuration
step, you'll have to swap out the disk-config inmodules
for the one you see above, and custom to your particular drive. Unfortunately I can't support this any further as it's not part of the standard install, but hopefully this info is enough.2. Secrets just mean you can keep sensitive data in your Nix configuration, like keys, certs, etc. So that when you install it, you don't have to manually set that stuff up. It's helpful to have a configuration that just "works out of the box".
- Gotcha thanks I think I can figure it out.
- so to get that out of the box experience I have to do all the installation steps?
And also what bootloader it uses?
from nixos-config.
Also
nix run .#build-switch -- what does it do?
nix flake update -- this updates the system right?
editing your system configuration
building the (system closure)
creating and switching to it (i.e creating a new generation)
What do you mean by it?
from nixos-config.
Also
nix run .#build-switch -- what does it do?So Nix works by building everything as an isolated package on its own volume (the Nix "Store").
So when you build your configuration and switch to it, you're saying to your machine:
* create everything I've defined in my config as a package in the Nix store, referencing its build instructions on how to build it (usually defined in nixpkgs), and then * switch all my local packagss to a symlink that references the package in the Nix Store, instead of the actual package on my drive somewhere (probably installed by brew or its own installer).
nix flake update -- this updates the system right?
Yes, it says, update all inputs defined in the flake (nix-darwin, nixpkgs, etc) to the latest git hash.
Doesn't build or switch anything, but next time you build you'll grab the latest flake inputs.
editing your system configuration
building the (system closure)
creating and switching to it (i.e creating a new generation)
What do you mean by it?
Basically what I'm discussing above.
Got it thanks
from nixos-config.
Hey @dustinlyons sorry just one last thing I have made the disk configuration now How do I implement it?
from nixos-config.
Here's the disk config I created btw if you can review it for me :)
#Disk configuration for dual-booting NixOS with Windows 10
disko.devices = {
disk = {
nvme0n1 = {
device = "/dev/nvme0n1";
type = "disk";
content = {
type = "gpt";
partitions = {
# Windows partitions (existing)
ESP = {
type = "EF00"; # EFI partition type
size = "100M";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
# NixOS partitions
swap = {
start = "373.766G"; # start point for swap
size = "40G";
content = {
type = "swap";
};
};
root = {
start = "413.766G"; # After swap partition
size = "100%"; # Take all remaining space
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
};
}
from nixos-config.
Look in your modules/nixos
directory. You should see a disk-config.nix
file. Replace it with your configuration above.
from nixos-config.
Look in your
modules/nixos
directory. You should see adisk-config.nix
file. Replace it with your configuration above.
Yes I meant then I have to create another repo then right? & does the disk-config look good?
from nixos-config.
Related Issues (20)
- Issue with Adding Homebrew Tap HOT 5
- dustinlyons/nix-secrets.git dependency HOT 6
- NixOS install `./bin/apply: No such file or directory` HOT 8
- Installation issue on NixOS with xvda boot disk HOT 3
- Installed new NixOS install using this repo, no GUI on reboot HOT 13
- macOS - User does not own "system" or "default" profile HOT 8
- error: selector 'bash' matches no derivations HOT 21
- Purpose of mail and name? HOT 2
- Networking wireless device fails to start HOT 3
- How to upgrade everything installed (Mac OSX Sonoma)? HOT 6
- Add -b backup to `home-manager switch` HOT 2
- error: experimental Nix feature 'nix-command' is disabled HOT 8
- starter config appears to expect secrets repo HOT 3
- Couple of issues found with the latest instructions/code HOT 4
- Homebrew not found HOT 4
- How can I fix this homebrew error? HOT 4
- Add option to choose editor during install
- Permission denied with homebrew HOT 4
- How can I add stylix HOT 1
- [Question] Have you considered adding a dock module to nix-darwin? 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 nixos-config.