all repos — dotfiles @ f10f8118e8c11667a089ed8374788fe4ef5b3cb1

my *nix dotfiles

flake.nix (view raw)

  1{
  2  description = "icy's nixos config";
  3
  4  inputs = {
  5    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
  6    nixpkgs-master.url = "github:NixOS/nixpkgs/master";
  7
  8    nixos-hardware.url = "github:nixos/nixos-hardware";
  9
 10    home-manager = {
 11      url = "github:nix-community/home-manager";
 12      inputs.nixpkgs.follows = "nixpkgs";
 13    };
 14
 15
 16    darwin = {
 17      url = "github:lnl7/nix-darwin/master";
 18      inputs.nixpkgs.follows = "nixpkgs";
 19    };
 20
 21    prompt = {
 22      url = "git+https://git.peppe.rs/cli/prompt";
 23      inputs.nixpkgs.follows = "nixpkgs";
 24    };
 25
 26    nix-snapshotter = {
 27      url = "github:pdtpartners/nix-snapshotter";
 28      inputs.nixpkgs.follows = "nixpkgs";
 29    };
 30
 31    nix-your-shell = {
 32      url = "github:MercuryTechnologies/nix-your-shell";
 33      inputs.nixpkgs.follows = "nixpkgs";
 34    };
 35  };
 36
 37  outputs =
 38    { self
 39    , nixpkgs
 40    , nixpkgs-master
 41    , nixos-hardware
 42    , nix-snapshotter
 43    , nix-your-shell
 44    , home-manager
 45    , prompt
 46    , darwin
 47    , ...
 48    } @ inputs: {
 49
 50      overlays = {
 51        prompt = prompt.overlay;
 52        customPkgs = final: prev: {
 53          zed-editor = inputs.nixpkgs-master.legacyPackages.${prev.system}.zed-editor;
 54        };
 55      };
 56
 57      darwinConfigurations = {
 58        kvothe = darwin.lib.darwinSystem {
 59          system = "aarch64-darwin";
 60          modules = [
 61            {
 62              imports = [ ./hosts/kvothe/configuration.nix ];
 63              _module.args.self = self;
 64              nixpkgs.overlays = [ nix-your-shell.overlays.default ];
 65            }
 66            home-manager.darwinModules.home-manager
 67            {
 68              home-manager.useGlobalPkgs = true;
 69              home-manager.useUserPackages = true;
 70              home-manager.users.icy = {
 71                imports = [ ./darwin/home.nix ];
 72                _module.args.self = self;
 73                _module.args.host = "kvothe";
 74                _module.args.inputs = inputs;
 75              };
 76            }
 77          ];
 78        };
 79      };
 80
 81      nixosConfigurations = {
 82        wyndle = nixpkgs.lib.nixosSystem {
 83          system = "x86_64-linux";
 84          modules = [
 85            {
 86              imports = [ ./hosts/wyndle/configuration.nix ];
 87              _module.args.self = self;
 88              nixpkgs.overlays = [ nix-your-shell.overlays.default ];
 89            }
 90            home-manager.nixosModules.home-manager
 91            {
 92              home-manager.useGlobalPkgs = true;
 93              home-manager.useUserPackages = true;
 94              home-manager.users.icy = {
 95                imports = [ ./home.nix ];
 96                _module.args.self = self;
 97                _module.args.host = "wyndle";
 98                _module.args.inputs = inputs;
 99              };
100            }
101          ];
102        };
103      };
104
105      nixosConfigurations = {
106        sini = nixpkgs.lib.nixosSystem {
107          system = "x86_64-linux";
108          modules = [
109            ({ config = { nix.registry.nixpkgs.flake = nixpkgs; }; })
110            ({ config, pkgs, ... }: {
111              services.pixelfed.package = nixpkgs-master.legacyPackages."x86_64-linux".pixelfed;
112              services.pixelfed.phpPackage = nixpkgs-master.legacyPackages."x86_64-linux".php82;
113            })
114            # ({ pkgs, ... }: {
115            #   imports = [ nix-snapshotter.nixosModules.default ];
116            #   nixpkgs.overlays = [ nix-snapshotter.overlays.default ];
117            # })
118            {
119              imports = [ ./hosts/sini/configuration.nix ];
120              _module.args.self = self;
121            }
122          ];
123        };
124      };
125
126      nixosConfigurations = {
127        denna = nixpkgs.lib.nixosSystem {
128          system = "x86_64-linux";
129          modules = [
130            ({ config = { nix.registry.nixpkgs.flake = nixpkgs; }; })
131            {
132              imports = [ ./hosts/denna/configuration.nix ];
133              _module.args.self = self;
134            }
135          ];
136        };
137      };
138
139      nixosConfigurations = {
140        iso = nixpkgs.lib.nixosSystem {
141          system = "x86_64-linux";
142          modules = [
143            ({ config = { nix.registry.nixpkgs.flake = nixpkgs; }; })
144            {
145              imports = [ ./hosts/iso/configuration.nix ];
146              _module.args.self = self;
147            }
148          ];
149        };
150      };
151    };
152}