| I'm having problems getting disko and impermanence to work after moving some functionality into separate modules. Here is the output of nixos-rebuild boot --flake /persist/nixos#amstrad:
trace: warning: The legacy table is outdated and should not be used. We recommend using the gpt type instead.
Please note that certain features, such as the test framework, may not function properly with the legacy table type.
If you encounter errors similar to:
"error: The option `disko.devices.disk.disk1.content.partitions."[definition 1-entry 1]".content._config` is read-only, but it's set multiple times,"
this is likely due to the use of the legacy table type.
trace: the create output is deprecated, use format instead
trace: warning: The legacy table is outdated and should not be used. We recommend using the gpt type instead.
Please note that certain features, such as the test framework, may not function properly with the legacy table type.
If you encounter errors similar to:
"error: The option `disko.devices.disk.disk1.content.partitions."[definition 1-entry 1]".content._config` is read-only, but it's set multiple times,"
this is likely due to the use of the legacy table type.
trace: warning: The legacy table is outdated and should not be used. We recommend using the gpt type instead.
Please note that certain features, such as the test framework, may not function properly with the legacy table type.
If you encounter errors similar to:
"error: The option `disko.devices.disk.disk1.content.partitions."[definition 1-entry 1]".content._config` is read-only, but it's set multiple times,"
this is likely due to the use of the legacy table type.
error:
… while calling the 'seq' builtin
at /nix/store/370qy3d3wg9zhbn5a3dcv6k1q1iigfh4-source/lib/modules.nix:322:18:
321| options = checked options;
322| config = checked (removeAttrs config [ "_module" ]);
| ^
323| _module = checked (config._module);
… while calling the 'throw' builtin
at /nix/store/370qy3d3wg9zhbn5a3dcv6k1q1iigfh4-source/lib/modules.nix:298:18:
297| ''
298| else throw baseMsg
| ^
299| else null;
(stack trace truncated; use '--show-trace' to show the full trace)
error: attribute 'currentSystem' missing
at /nix/store/370qy3d3wg9zhbn5a3dcv6k1q1iigfh4-source/pkgs/top-level/impure.nix:17:43:
16| # (build, in GNU Autotools parlance) platform.
17| localSystem ? { system = args.system or builtins.currentSystem; }
| ^
18|
This is my disko.nix (located at modules/nixos/system/disko.nix in the nixos config directory:
{
device ? throw "Set this to your disk device, e.g. /dev/sda",
...
}: {
disko.devices = {
disk.main = {
inherit device;
type = "disk";
content = {
type = "gpt";
partitions = {
boot = {
name = "boot";
size = "1M";
type = "EF02";
};
esp = {
name = "ESP";
size = "500M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
swap = {
size = "4G";
content = {
type = "swap";
resumeDevice = true;
};
};
root = {
name = "root";
size = "100%";
content = {
type = "lvm_pv";
vg = "root_vg";
};
};
};
};
};
lvm_vg = {
root_vg = {
type = "lvm_vg";
lvs = {
root = {
size = "100%FREE";
content = {
type = "btrfs";
extraArgs = ["-f"];
subvolumes = {
"/root" = {
mountpoint = "/";
};
"/persist" = {
mountOptions = ["subvol=persist" "noatime"];
mountpoint = "/persist";
};
"/nix" = {
mountOptions = ["subvol=nix" "noatime"];
mountpoint = "/nix";
};
};
};
};
};
};
};
};
}
And this is the flake.nix used for building:
{
description = "Nixos config flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
impermanence = {
url = "github:nix-community/impermanence";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {nixpkgs, ...} @ inputs:
{
homeManagerModules.default = ./modules/home-manager;
nixosConfigurations = {
amstrad = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [
inputs.disko.nixosModules.default
(import ./modules/nixos/system/disko.nix { device = "/dev/sda"; })
./hosts/amstrad/configuration.nix
./modules/nixos
inputs.impermanence.nixosModules.impermanence
inputs.home-manager.nixosModules.default
];
};
};
};
}
Any help would be greatly appreciated, I'm really stumped by this as it was working before I tried to use impermanence as a module.
|