diff options
author | Mark Nipper <nipsy@bitgnome.net> | 2024-04-11 01:37:43 -0700 |
---|---|---|
committer | Mark Nipper <nipsy@bitgnome.net> | 2024-04-11 01:37:43 -0700 |
commit | 3a44b124561f544c229c0042cd0b91d055a33409 (patch) | |
tree | f466af390e895799192268a45f2516517487d672 /flake.nix | |
parent | 40d73be8797434f7a6e124ce64ae38cd28a06fd0 (diff) | |
download | nix-3a44b124561f544c229c0042cd0b91d055a33409.tar nix-3a44b124561f544c229c0042cd0b91d055a33409.tar.gz nix-3a44b124561f544c229c0042cd0b91d055a33409.tar.bz2 nix-3a44b124561f544c229c0042cd0b91d055a33409.tar.lz nix-3a44b124561f544c229c0042cd0b91d055a33409.tar.xz nix-3a44b124561f544c229c0042cd0b91d055a33409.tar.zst nix-3a44b124561f544c229c0042cd0b91d055a33409.zip |
Add work VM and redo entire flake layout
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 99 |
1 files changed, 45 insertions, 54 deletions
@@ -2,69 +2,60 @@ description = "nipsy's NixOS configuration"; inputs = { + disko.url = "github:nix-community/disko"; + disko.inputs.nixpkgs.follows = "nixpkgs-unstable"; + hardware.url = "github:nixos/nixos-hardware"; - home-manager = { + home-manager-stable = { + url = "github:nix-community/home-manager/release-23.11"; + inputs.nixpkgs.follows = "nixpkgs-stable"; + }; + + home-manager-unstable = { url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "nixpkgs"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; }; - nixpkgs.url = "github:NixOS/nixpkgs/release-23.11"; - nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs-stable.url = "github:nixos/nixpkgs/release-23.11"; + nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; }; - outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, ... } @ inputs: - let - inherit (self) outputs; - lib = nixpkgs.lib // home-manager.lib; - systems = [ - "x86_64-linux" - # "aarch64-linux" - # "x86_64-darwin" - #"aarch64-darwin" - # "i686-linux" - ]; - forEachSystem = f: lib.genAttrs systems (system: f pkgsFor.${system}); - pkgsFor = lib.genAttrs systems (system: import nixpkgs { - inherit system; - config.allowUnfree = true; - }); - in - { - inherit lib; - - # Custom modules to enable special functionality for nixos or home-manager oriented configs. - nixosModules = import ./modules/nixos; - homeManagerModules = import ./modules/home-manager; - - # Custom modifications/overrides to upstream packages. - overlays = import ./overlays { inherit inputs outputs; }; - - # Your custom packages meant to be shared or upstreamed. - # Accessible through 'nix build', 'nix shell', etc - packages = forEachSystem (pkgs: import ./pkgs { inherit pkgs; }); - - # nixos-rebuild switch --flake .#hostname' - nixosConfigurations = { - ginaz = nixpkgs-unstable.lib.nixosSystem rec { - system = "x86_64-linux"; - modules = [ - { - nixpkgs.config.pkgs = import nixpkgs-unstable { inherit system; }; - } - ./hosts/ginaz - ]; - specialArgs = { inherit inputs outputs; }; - }; + outputs = inputs@{ home-manager-stable, home-manager-unstable, nixpkgs-stable, nixpkgs-unstable, ... }: rec { + nixosConfigurations = { + ginaz = nixpkgs-unstable.lib.nixosSystem { + pkgs = pkgs-unstable; + system = "x86_64-linux"; + modules = [ + ./hosts/ginaz + home-manager-unstable.nixosModules.home-manager { + home-manager.users.nipsy = import ./home/nipsy/ginaz.nix; + } + ]; }; - # home-manager switch --flake .#primary-username@hostname' - homeConfigurations = { - "nipsy@ginaz" = lib.homeManagerConfiguration { - modules = [ ./home/nipsy/ginaz.nix ]; - pkgs = pkgsFor.x86_64-linux; - extraSpecialArgs = { inherit inputs outputs; }; - }; + richese = nixpkgs-unstable.lib.nixosSystem { + pkgs = pkgs-unstable; + system = "x86_64-linux"; + modules = [ + ./hosts/richese + home-manager-unstable.nixosModules.home-manager { + home-manager.users.nipsy = import ./home/nipsy/richese.nix; + } + ]; }; }; + + pkgs-stable = import nixpkgs-stable { + system = "x86_64-linux"; + config.allowUnfree = true; + overlays = [(import ./pkgs)]; + }; + + pkgs-unstable = import nixpkgs-unstable { + system = "x86_64-linux"; + config.allowUnfree = true; + overlays = [(import ./pkgs)]; + }; + }; } |