Giter VIP home page Giter VIP logo

Comments (4)

akirak avatar akirak commented on September 21, 2024

@Anomalocaridid Set disko.devices instead of inputs.disko.devices here:

https://github.com/Anomalocaridid/dotfiles/blob/950e0d713bfbc9cac485a3dd91d6d3000de477ec/flake.nix#L32-L35

from disko.

Anomalocaridid avatar Anomalocaridid commented on September 21, 2024

I did that, but I still get the same error.

Just in case it's important, here's the full error message:

error: attribute 'disko' missing

       at /nix/store/jpjdaylsd0clkzr9cg4n43yg816hccca-disko/share/disko/default.nix:10:49:

            9|       # _file = toString input;
           10|       imports = lib.singleton { disko.devices = cfg.disko.devices; };
             |                                                 ^
           11|       options = {
       Did you mean disk?
(use '--show-trace' to show detailed location information)

from disko.

Lassulus avatar Lassulus commented on September 21, 2024

you need to move the config in disko-config.nix inside a disko.devices = { and then remove the disko.devices from your nixosConfiguration in your flake.nix

here is a diff:

diff --git a/disko-config.nix b/disko-config.nix
index 9b50ce5..806bca1 100644
--- a/disko-config.nix
+++ b/disko-config.nix
@@ -1,4 +1,4 @@
-{ disk, memory, ... }: {
+{ disk, memory, ... }: { disko.devices = {
   disk = {
     vda = {
       type = "disk";
@@ -8,7 +8,6 @@
         format = "gpt";
         partitions = [
           {
-            type = "partition";
             name = "ESP";
             start = "1MiB";
             end = "512MiB";
@@ -23,7 +22,6 @@
             };
           }
           {
-            type = "partition";
             name = "luks";
             start = "512MiB";
             end = "100%";
@@ -47,14 +45,12 @@
         # LVs are created in alphabetic order for some reason
         # Prefixing them with a letter like this ensures desired creation order
         a_swap = {
-          type = "lvm_lv";
           size = memory;
           content = {
             type = "swap";
           };
         };
         z_persist = {
-          type = "lvm_lv";
           size = "100%FREE";
           content = {
             type = "btrfs";
@@ -85,4 +81,4 @@
       ];
     };
   };
-}
+};}
diff --git a/flake.nix b/flake.nix
index b3e1737..8baf1e3 100644
--- a/flake.nix
+++ b/flake.nix
@@ -27,13 +27,12 @@
           inputs.disko.nixosModules.disko
           inputs.home-manager.nixosModules.home-manager
           inputs.impermanence.nixosModules.impermanence
+          # Disko
+          (import ./disko-config.nix {
+            disk = "/dev/vda";
+            memory = "8G";
+          })
           {
-            # Disko
-            disko.devices = import ./disko-config.nix {
-              disk = "/dev/vda";
-              memory = "8G";
-            };
-
             # Home Manager
             home-manager.useGlobalPkgs = true;
             home-manager.useUserPackages = true;

from disko.

Anomalocaridid avatar Anomalocaridid commented on September 21, 2024

It works now! Thank you!

from disko.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.