mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
tests: Add a test for the home-manager module (#901)
This commit is contained in:
parent
55745158c2
commit
96cdbc8177
5 changed files with 63 additions and 0 deletions
|
@ -1,4 +1,8 @@
|
|||
{
|
||||
inputs,
|
||||
self,
|
||||
...
|
||||
}: {
|
||||
perSystem = {
|
||||
pkgs,
|
||||
config,
|
||||
|
@ -27,6 +31,14 @@
|
|||
inherit pkgs;
|
||||
inherit (pkgs) lib;
|
||||
};
|
||||
|
||||
home-manager =
|
||||
(import ../tests/modules/hm.nix {
|
||||
inherit pkgs;
|
||||
inherit (inputs) home-manager;
|
||||
nixvim = self;
|
||||
})
|
||||
.activationPackage;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
21
flake.lock
generated
21
flake.lock
generated
|
@ -75,6 +75,26 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1704498488,
|
||||
"narHash": "sha256-yINKdShHrtjdiJhov+q0s3Y3B830ujRoSbHduUNyKag=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "51e44a13acea71b36245e8bd8c7db53e0a3e61ee",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1704194953,
|
||||
|
@ -120,6 +140,7 @@
|
|||
"root": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"pre-commit-hooks": "pre-commit-hooks"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
flake-parts = {
|
||||
url = "github:hercules-ci/flake-parts";
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
ignore = ["plugins/lsp/language-servers/rust-analyzer-config.nix"]
|
||||
# Frequent in nix module configurations
|
||||
disabled = ["repeated_keys"]
|
||||
|
|
24
tests/modules/hm.nix
Normal file
24
tests/modules/hm.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
nixvim,
|
||||
pkgs,
|
||||
home-manager,
|
||||
}:
|
||||
home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
|
||||
modules = [
|
||||
{
|
||||
home.username = "nixvim";
|
||||
home.homeDirectory = "/invalid/dir";
|
||||
|
||||
home.stateVersion = "23.05";
|
||||
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
}
|
||||
nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue