aboutsummaryrefslogtreecommitdiffstats
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--flake.nix99
1 files changed, 45 insertions, 54 deletions
diff --git a/flake.nix b/flake.nix
index 719b19a..ba3005f 100644
--- a/flake.nix
+++ b/flake.nix
@@ -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)];
+ };
+ };
}