feat: add lsp - nil, add iso/qcow2 generator

This commit is contained in:
ryan4yin
2023-05-21 19:35:36 +08:00
parent 14f4ef912a
commit 4959da0b7e
4 changed files with 180 additions and 6 deletions

145
flake.lock generated
View File

@@ -151,6 +151,24 @@
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
@@ -259,7 +277,7 @@
},
"lib-aggregate": {
"inputs": {
"flake-utils": "flake-utils_2",
"flake-utils": "flake-utils_3",
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
@@ -292,6 +310,27 @@
"type": "github"
}
},
"nil": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_4",
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1683653883,
"narHash": "sha256-Xg3Cux5wQDatXRvQWsVD0YPfmxfijjG8+gxYqgoT6JE=",
"owner": "oxalica",
"repo": "nil",
"rev": "18de045d7788df2343aec58df7b85c10d1f5d5dd",
"type": "github"
},
"original": {
"owner": "oxalica",
"ref": "2023-05-09",
"repo": "nil",
"type": "github"
}
},
"nix": {
"inputs": {
"lowdown-src": "lowdown-src",
@@ -319,7 +358,7 @@
"nix-eval-jobs": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs_5"
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1682480188,
@@ -335,6 +374,42 @@
"type": "github"
}
},
"nixlib": {
"locked": {
"lastModified": 1681001314,
"narHash": "sha256-5sDnCLdrKZqxLPK4KA8+f4A3YKO/u6ElpMILvX0g72c=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "367c0e1086a4eb4502b24d872cea2c7acdd557f4",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixos-generators": {
"inputs": {
"nixlib": "nixlib",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1683530131,
"narHash": "sha256-R0RSqj6JdZfru2x/cM19KJMHsU52OjtyxI5cccd+uFc=",
"owner": "nix-community",
"repo": "nixos-generators",
"rev": "10079333313ff62446e6f2b0e7c5231c7431d269",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixos-generators",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1684570954,
@@ -419,7 +494,7 @@
"flake-compat": "flake-compat_2",
"lib-aggregate": "lib-aggregate",
"nix-eval-jobs": "nix-eval-jobs",
"nixpkgs": "nixpkgs_6"
"nixpkgs": "nixpkgs_7"
},
"locked": {
"lastModified": 1684592015,
@@ -468,6 +543,22 @@
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1682929865,
"narHash": "sha256-jxVrgnf5QNjO+XoxDxUWtN2G5xyJSGZ5SWDQFxMuHxc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "f2e9a130461950270f87630b11132323706b4d91",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1684570954,
"narHash": "sha256-FX5y4Sm87RWwfu9PI71XFvuRpZLowh00FQpIJ1WfXqE=",
@@ -483,7 +574,7 @@
"type": "github"
}
},
"nixpkgs_5": {
"nixpkgs_6": {
"locked": {
"lastModified": 1681347147,
"narHash": "sha256-B+hTioRc3Jdf4SJyeCiO0fW5ShIznJk2OTiW2vOV+mc=",
@@ -499,7 +590,7 @@
"type": "github"
}
},
"nixpkgs_6": {
"nixpkgs_7": {
"locked": {
"lastModified": 1684570954,
"narHash": "sha256-FX5y4Sm87RWwfu9PI71XFvuRpZLowh00FQpIJ1WfXqE=",
@@ -564,12 +655,39 @@
"devenv": "devenv",
"home-manager": "home-manager_2",
"hyprland": "hyprland",
"nixpkgs": "nixpkgs_4",
"nil": "nil",
"nixos-generators": "nixos-generators",
"nixpkgs": "nixpkgs_5",
"nixpkgs-stable": "nixpkgs-stable_2",
"nixpkgs-wayland": "nixpkgs-wayland",
"nur": "nur"
}
},
"rust-overlay": {
"inputs": {
"flake-utils": [
"nil",
"flake-utils"
],
"nixpkgs": [
"nil",
"nixpkgs"
]
},
"locked": {
"lastModified": 1682907601,
"narHash": "sha256-FfUAYvRJ+6s9WWjXNPdRzuuvAeu2VHIXIbUkPJr4t14=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "5eaff055dd57128c53ae373dc96af944f5849daa",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
@@ -585,6 +703,21 @@
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"wlroots": {
"flake": false,
"locked": {

View File

@@ -52,11 +52,20 @@
# community wayland nixpkgs
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
# generate iso/qcow2/docker/... image from nixos configuration
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
# use devenv to manage my development environment
devenv.url = "github:cachix/devenv/v0.6.2";
# secrets management, lock with git commit at 2023/5/15
agenix.url = "github:ryantm/agenix/db5637d10f797bb251b94ef9040b237f4702cde3";
# nix language server, used by vscode & neovim
nil.url = "github:oxalica/nil/2023-05-09";
};
# outputs 的参数都是 inputs 中定义的依赖项,可以通过它们的名称来引用。
@@ -111,5 +120,31 @@
];
};
};
# generate qcow2 & iso image from nixos configuration
# https://github.com/nix-community/nixos-generators
# packages.x86_64-linux = {
# qcow2 = nixos-generators.nixosGenerate {
# system = "x86_64-linux";
# modules = [
# # you can include your own nixos configuration here, i.e.
# # ./configuration.nix
# ];
# format = "qcow";
# # you can also define your own custom formats
# # customFormats = { "myFormat" = <myFormatModule>; ... };
# # format = "myFormat";
# };
# iso = nixos-generators.nixosGenerate {
# system = "x86_64-linux";
# modules = [
# # you can include your own nixos configuration here, i.e.
# # ./configuration.nix
# ];
# format = "iso";
# };
# };
};
}

View File

@@ -2,6 +2,7 @@
pkgs,
nixpkgs-stable,
config,
nil,
...
}: let
pkgs-stable = import nixpkgs-stable {
@@ -12,6 +13,8 @@
home.packages = with pkgs-stable; [
firefox-wayland # firefox with wayland support
# firefox
nil.packages."${pkgs.system}".default # nix language server
];

View File

@@ -27,6 +27,9 @@
nixpkgs.overlays = import ../../overlays args;
# Enable binfmt emulation of aarch64-linux, this is required for cross compilation.
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
# Bootloader.
boot.loader = {
efi = {