From 9c30f0519f5d5c950ba2da21676b6e2d48aed45a Mon Sep 17 00:00:00 2001 From: thek4n Date: Tue, 11 Aug 2026 11:42:41 +0300 Subject: [PATCH] add diskp --- flake.nix | 13 +++++++++++-- hosts/thek4n/disko.nix | 30 ++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 hosts/thek4n/disko.nix diff --git a/flake.nix b/flake.nix index 24844fb..4f14582 100644 --- a/flake.nix +++ b/flake.nix @@ -9,11 +9,15 @@ 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 system = "x86_64-linux"; @@ -32,6 +36,11 @@ # Системные модули ./hosts/default/configuration.nix ./hosts/${hostname}/configuration.nix + disko.nixosModules.disko + + { + disko.devices = import ./hosts/${hostname}/disko.nix; + } # Home Manager модуль home-manager.nixosModules.home-manager diff --git a/hosts/thek4n/disko.nix b/hosts/thek4n/disko.nix new file mode 100644 index 0000000..6d8619f --- /dev/null +++ b/hosts/thek4n/disko.nix @@ -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 = "/"; + }; + }; + }; + }; + }; + }; +}