diff options
| author | andromeda <andromeda@lenovo> | 2025-12-30 00:25:06 +0100 |
|---|---|---|
| committer | andromeda <andromeda@lenovo> | 2025-12-30 00:27:14 +0100 |
| commit | a7c4b7dcd1f5d221b976fc65b6f82e501f87738d (patch) | |
| tree | 77006f72d6431bee0e825fc1e62de3286890b53b /flake.nix | |
| parent | 52e547c0a4569c76984423ba118f0c5554b6a012 (diff) | |
| parent | abab971ba65b74ba4928c674c96244da8d9ef92b (diff) | |
works
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 52 |
1 files changed, 48 insertions, 4 deletions
@@ -1,24 +1,68 @@ { inputs = { + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; impermanence.url = "github:nix-community/impermanence"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; noshell = { url = "github:viperML/noshell"; inputs.nixpkgs.follows = "nixpkgs"; }; + nur = { + url = "github:nix-community/NUR"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nvf = { + url = "github:notashelf/nvf"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + stylix = { + url = "github:nix-community/stylix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { + home-manager, impermanence, nixpkgs, noshell, - self, + nur, + nvf, + stylix, ... }: let - system = "x86_64-linux"; + laptop = import ./machines/laptop.nix; in { - nixosConfigurations."nixos" = nixpkgs.lib.nixosSystem { - inherit system; + nixosConfigurations.${laptop.hostname} = nixpkgs.lib.nixosSystem { + system = laptop.system; + specialArgs = {machine = laptop;}; modules = [ + home-manager.nixosModules.home-manager + { + nixpkgs.overlays = [nur.overlays.default]; + home-manager.useGlobalPkgs = true; + home-manager.extraSpecialArgs = { + machine = laptop; + }; + home-manager.users = + builtins.mapAttrs + (name: value: value) + ( + nixpkgs.legacyPackages.${laptop.system}.lib.genAttrs + laptop.usernames + ( + name: { + imports = [ + stylix.homeModules.stylix + nvf.homeManagerModules.default + ./users/${name}/home.nix + ]; + } + ) + ); + } impermanence.nixosModules.impermanence noshell.nixosModules.default ./configuration.nix |
