flocon/flake.nix

84 lines
2 KiB
Nix
Raw Normal View History

2024-08-25 19:58:12 +00:00
{
description = "nezia's nixos configuration";
2024-09-24 21:47:40 +00:00
outputs = {
nixpkgs,
home-manager,
nixvim,
sops-nix,
stylix,
...
} @ inputs: let
username = "nezia";
system = "x86_64-linux";
2024-09-24 21:47:40 +00:00
commonModules = hostname: [
./modules
./hosts/common
./hosts/${hostname}
2024-09-24 21:47:40 +00:00
sops-nix.nixosModules.sops
stylix.nixosModules.stylix
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
sharedModules = [
nixvim.homeManagerModules.nixvim
2024-09-06 10:42:22 +00:00
];
2024-09-24 21:47:40 +00:00
extraSpecialArgs = {
inherit inputs system;
};
2024-09-24 21:47:40 +00:00
};
}
{
_module.args = {
inherit hostname username;
};
}
];
2024-08-25 21:53:48 +00:00
2024-09-24 21:47:40 +00:00
configureSystem = hostname: homeConfig:
nixpkgs.lib.nixosSystem {
inherit system;
modules = commonModules hostname ++ [{home-manager.users."${username}" = import homeConfig;}];
specialArgs = {
inherit inputs;
};
2024-08-25 19:58:12 +00:00
};
2024-09-24 21:47:40 +00:00
in {
nixosConfigurations = {
vamos = configureSystem "vamos" ./home/laptop;
solaire = configureSystem "solaire" ./home/desktop;
2024-08-25 19:58:12 +00:00
};
2024-09-24 21:47:40 +00:00
};
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix.url = "github:danth/stylix";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
wezterm = {
url = "github:wez/wezterm/main?dir=nix";
inputs.nixpkgs.follows = "nixpkgs";
};
zen-browser.url = "github:MarceColl/zen-browser-flake";
nvf = {
url = "github:notashelf/nvf";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url = "github:NixOS/nixos-hardware";
};
2024-08-25 19:58:12 +00:00
}