add diskp

This commit is contained in:
thek4n 2026-08-11 11:42:41 +03:00
parent f184cf20c6
commit 9c30f0519f
2 changed files with 41 additions and 2 deletions

View File

@ -9,11 +9,15 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.11"; nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-26.05";
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { self, nixpkgs, home-manager, ... }@inputs: outputs = { self, nixpkgs, home-manager, disko ... }@inputs:
let let
system = "x86_64-linux"; system = "x86_64-linux";
@ -32,6 +36,11 @@
# Системные модули # Системные модули
./hosts/default/configuration.nix ./hosts/default/configuration.nix
./hosts/${hostname}/configuration.nix ./hosts/${hostname}/configuration.nix
disko.nixosModules.disko
{
disko.devices = import ./hosts/${hostname}/disko.nix;
}
# Home Manager модуль # Home Manager модуль
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager

30
hosts/thek4n/disko.nix Normal file
View File

@ -0,0 +1,30 @@
{
disk = {
main = {
type = "disk";
device = "/dev/sda";
content = {
type = "gpt";
partitions = {
boot = {
size = "1G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
}