add: nixos config

This commit is contained in:
Léana 江 2023-12-23 12:45:46 +01:00 committed by Léana 江
parent 58c63bd4d2
commit 0a1b435192
5 changed files with 343 additions and 0 deletions

40
nix/flake.nix Normal file
View file

@ -0,0 +1,40 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
nixunstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager/release-23.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = {
nixpkgs,
nixunstable,
home-manager,
...
} @ inputs: let
inherit (nixpkgs.lib) nixosSystem;
in {
nixosConfigurations = {
thinkpad = let
system = "aarch64-linux";
unstable = import nixunstable {inherit system;};
in
nixosSystem {
specialArgs = {inherit system;};
modules = [
./hosts/thinkpad/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.leana = import ./hosts/thinkpad/home.nix;
extraSpecialArgs = {inherit unstable;};
};
}
];
};
};
};
}