Use back disko for fenixbook fs

This commit is contained in:
2025-09-01 14:42:04 +03:00
parent 2197a6bc18
commit ba29dec8a3
2 changed files with 63 additions and 46 deletions

View File

@@ -12,10 +12,10 @@
url = "github:derfenix/photocatalog"; url = "github:derfenix/photocatalog";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
# disko = { disko = {
# url = "github:nix-community/disko/latest"; url = "github:nix-community/disko/latest";
# inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
# }; };
}; };
outputs = outputs =
@@ -23,6 +23,7 @@
self, self,
nixpkgs, nixpkgs,
nixpkgs-stable, nixpkgs-stable,
disko,
... ...
}@inputs: }@inputs:
let let
@@ -82,6 +83,7 @@
) )
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
inputs.photocatalog.nixosModules.photocatalog inputs.photocatalog.nixosModules.photocatalog
disko.nixosModules.disko
./options.nix ./options.nix
./nix.nix ./nix.nix
] ]

View File

@@ -41,49 +41,64 @@
]; ];
}; };
fileSystems = { disko.devices.disk.main = {
"/boot" = { type = "disk";
device = "/dev/disk/by-uuid/71AB-29E0"; device = "/dev/nvme0n1";
fsType = "vfat"; content = {
options = [ type = "gpt";
"fmask=0022" partitions = {
"dmask=0022" ESP = {
]; size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
}; };
"/" = { };
device = "/dev/disk/by-uuid/57df3204-a8c7-4842-957c-9752f996bc0f"; luks = {
fsType = "btrfs"; size = "100%";
options = [ content = {
type = "luks";
name = "cryptedroot";
passwordFile = "/tmp/secret.key";
settings.allowDiscards = true;
content = {
type = "btrfs";
extraArgs = [ "-f" ];
subvolumes = {
"/root" = {
mountpoint = "/";
mountOptions = [
"compress=zstd" "compress=zstd"
"subvol=/root"
"noatime" "noatime"
]; ];
}; };
"/home" = { "/home" = {
device = "/dev/disk/by-uuid/57df3204-a8c7-4842-957c-9752f996bc0f"; mountpoint = "/home";
fsType = "btrfs"; mountOptions = [
options = [
"compress=zstd" "compress=zstd"
"subvol=/home"
"noatime" "noatime"
]; ];
}; };
"/nix" = { "/nix" = {
device = "/dev/disk/by-uuid/57df3204-a8c7-4842-957c-9752f996bc0f"; mountpoint = "/nix";
fsType = "btrfs"; mountOptions = [
options = [
"compress=zstd" "compress=zstd"
"subvol=/nix"
"noatime" "noatime"
]; ];
}; };
"/swap" = {
mountpoint = "/.swapvol";
swap.swapfile.size = "16G";
};
};
};
};
};
};
};
}; };
swapDevices = [
{
device = "/dev/disk/by-uuid/56ad966f-3268-4b59-999a-48a082bb8052";
priority = 100;
}
];
} }