NixOS and Home Manager config
at main 1.3 kB view raw
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 = { 11 url = "github:lassulus/wrappers"; 12 inputs.nixpkgs.follows = "nixpkgs"; 13 }; 14 }; 15 16 outputs = { 17 nixpkgs, 18 home-manager, 19 ... 20 } @ inputs: let 21 lib = nixpkgs.lib; 22 forAllSystems = function: 23 lib.genAttrs lib.systems.flakeExposed ( 24 system: (function system nixpkgs.legacyPackages.${system}) 25 ); 26 in { 27 homeConfigurations."nel" = home-manager.lib.homeManagerConfiguration { 28 pkgs = nixpkgs.legacyPackages."x86_64-linux"; 29 extraSpecialArgs = { inherit inputs; }; 30 modules = [ ./homes/nel/default.nix ]; 31 }; 32 33 nixosConfigurations."nel-desktop" = nixpkgs.lib.nixosSystem { 34 specialArgs = { inherit inputs; }; 35 modules = [ ./systems/nel-desktop/configuration.nix ]; 36 }; 37 38 devShells = forAllSystems (system: pkgs: { 39 rust = (pkgs.callPackage ./templates/rust/shell.nix { }); 40 }); 41 42 templates = { 43 rust = { 44 path = ./templates/rust; 45 description = "Basic rust project with nix"; 46 }; 47 }; 48 }; 49}