nixd should work now

This commit is contained in:
Sakooooo 2023-08-06 08:55:10 +03:00
parent f2e43bb6ad
commit 946995c3f6
Signed by: sako
GPG key ID: 3FD715D87D7725E0
3 changed files with 33 additions and 0 deletions

18
.nixd.json Normal file
View file

@ -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"
}
}
}

10
default.nix Normal file
View file

@ -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

View file

@ -9,6 +9,11 @@
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager/release-23.05"; home-manager.url = "github:nix-community/home-manager/release-23.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs"; 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 # TODO(sako):: add agenix or sops-nix
# https://github.com/ryantm/agenix#install-via-flakes # https://github.com/ryantm/agenix#install-via-flakes
# https://github.com/Mic92/sops-nix # https://github.com/Mic92/sops-nix