NixOS and Home Manager config
1{ 2 description = "Cyclamen: Nel's NixOS and Home Manager nix flake"; 3 4 inputs = { 5 nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; 6 home-manager = { 7 url = "github:nix-community/home-manager/master"; 8 inputs.nixpkgs.follows = "nixpkgs"; 9 }; 10 wrappers.url = "github:lassulus/wrappers"; 11 }; 12 13 outputs = { 14 nixpkgs, 15 home-manager, 16 ... 17 } @ inputs: let 18 lib = nixpkgs.lib; 19 forAllSystems = function: 20 lib.genAttrs lib.systems.flakeExposed ( 21 system: (function system nixpkgs.legacyPackages.${system}) 22 ); 23 in { 24 homeConfigurations."nel" = home-manager.lib.homeManagerConfiguration { 25 pkgs = nixpkgs.legacyPackages."x86_64-linux"; 26 extraSpecialArgs = { inherit inputs; }; 27 modules = [ ./homes/nel/default.nix ]; 28 }; 29 30 nixosConfigurations."nel-desktop" = nixpkgs.lib.nixosSystem { 31 specialArgs = { inherit inputs; }; 32 modules = [ ./systems/nel-desktop/configuration.nix ]; 33 }; 34 35 devShells = forAllSystems (system: pkgs: { 36 rust = (pkgs.callPackage ./templates/rust/shell.nix { }); 37 }); 38 39 templates = { 40 rust = { 41 path = ./templates/rust; 42 description = "Basic rust project with nix"; 43 }; 44 }; 45 }; 46}