Comments (4)
My nix-darwin and home-manager configs are in separate files as well.
Type hints in comment is a planned feature.
from nixd.
users.jenya = import ./home;
Looks like you are using HM attributes in an nested import
. It's generally hard to check this dataflow. (i.e. nixd cannot know import
ed file will be used as a part of NixOS modules, or HM modules, or nested in some attribute paths.
Maybe you could write standalone HM options and follow nixd examples in this repo.
from nixd.
My nix-darwin and home-manager configs are in separate files as well.
They're both rather big, so having them in separate files makes it a bit easier to update etc.
It'd be cool if you could supply some sort of hint similar to JSDoc import types or Deno's @deno-types.
I have no idea if this makes any sense, but maybe it would look something like this in home.nix
.
{ pkgs, ... }:
# type = (import "github:nix-community/home-manager").home-manager.users.<name>
{
home = {
stateVersion = "23.11";
};
programs = {
bash.enable = true;
git = {
enable = true;
delta.enable = true;
lfs.enable = true;
};
};
}
from nixd.
users.jenya = import ./home;
Looks like you are using HM attributes in an nested
import
. It's generally hard to check this dataflow. (i.e. nixd cannot knowimport
ed file will be used as a part of NixOS modules, or HM modules, or nested in some attribute paths.Maybe you could write standalone HM options and follow nixd examples in this repo.
Excuse me. I forgot to answer. I did as you said and wrote standalone HM options.
This work:
{
description = "Jenya NixOS Flake Configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { nixpkgs, home-manager, ... }@inputs:
let
system = "x86_64-linux";
username = "jenya";
in
{
nixosConfigurations."pc" = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs username; };
modules = [ ./nixos ];
};
homeConfigurations.${username} = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.${system};
modules = [ ./home ];
extraSpecialArgs = {
inherit inputs system username;
};
};
};
}
Thank you!
from nixd.
Related Issues (20)
- Autocomplete breaks in NixOS module with explicit config section HOT 1
- No completion available in flakes HOT 6
- suggestion to use `inherit` HOT 10
- Regression testing `nixpkgs-fmt`. Instead, a script that outputs specific content should replace it, simply verifying that nixd passed the correct arguments to nixpkgs-fmt.
- dedicated vscode extension
- Syntax highlighting for multi-line strings HOT 2
- rework semantic tokens
- remove dead libnixt entries
- unicode
- disable `sema-escaping-with`
- Giving libnixf the `nativeCheckInputs` that should be used for nixd, which are not actually needed for libnixf.
- Crash on NeoVim, code 0, signal 6 HOT 9
- complete `builtins` HOT 1
- Implementing LSP Features for devenv.sh HOT 1
- Command ~/.flox/run/aarch64-darwin.default/bin/nixd not found in $PATH (but it's there) HOT 1
- False positive of sema-unused-def-lambda-noarg-formal HOT 2
- Add support for completing nixosModules.default.options
- nixd crashes repeatedly with SIGPIPE HOT 1
- config sample needs markdown support for nvim-treesitter
- A flake example for a nix-on-droid configuration should be added
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nixd.