From 946995c3f630da7be83f78044b08a58cf645ddb2 Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Sun, 6 Aug 2023 08:55:10 +0300 Subject: [PATCH] nixd should work now --- .nixd.json | 18 ++++++++++++++++++ default.nix | 10 ++++++++++ flake.nix | 5 +++++ 3 files changed, 33 insertions(+) create mode 100644 .nixd.json create mode 100644 default.nix diff --git a/.nixd.json b/.nixd.json new file mode 100644 index 00000000..013bf35b --- /dev/null +++ b/.nixd.json @@ -0,0 +1,18 @@ +{ + "eval": { + "target": { + "args": ["-f", "default.nix"], + "installable": "nixosConfigurations.sakotop.config.system.build.toplevel" + } + }, + "formatting": { + "command": "nixpkgs-fmt" + }, + "options": { + "enable": true, + "target": { + "args": [], + "installable": ".#nixosConfigurations.sakotop.options" + } + } +} diff --git a/default.nix b/default.nix new file mode 100644 index 00000000..2cccff28 --- /dev/null +++ b/default.nix @@ -0,0 +1,10 @@ +(import + ( + let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in + fetchTarball { + url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; + sha256 = lock.nodes.flake-compat.locked.narHash; + } + ) + { src = ./.; } +).defaultNix diff --git a/flake.nix b/flake.nix index 04a9fd1e..d1a77950 100644 --- a/flake.nix +++ b/flake.nix @@ -9,6 +9,11 @@ nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; home-manager.url = "github:nix-community/home-manager/release-23.05"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; + # flake-compat for nixd + flake-compat = { + url = "github:edolstra/flake-compat"; + flake = false; + }; # TODO(sako):: add agenix or sops-nix # https://github.com/ryantm/agenix#install-via-flakes # https://github.com/Mic92/sops-nix