all repos — dotfiles @ 47f5f08a4718cc63f638a3d2601fd5f4acb976f8

my *nix dotfiles

nix/flake.nix (view raw)

  1{
  2  description = "icy's nixos config";
  3
  4  inputs = {
  5    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
  6
  7    nixos-hardware.url = "github:nixos/nixos-hardware";
  8
  9    home-manager = {
 10      url = "github:nix-community/home-manager";
 11      inputs.nixpkgs.follows = "nixpkgs";
 12    };
 13
 14    neovim.url = "github:nix-community/neovim-nightly-overlay";
 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
 27  outputs =
 28    { self
 29    , nixpkgs
 30    , nixos-hardware
 31    , home-manager
 32    , neovim
 33    , prompt
 34    , darwin
 35    , ...
 36    } @ inputs: {
 37
 38      overlays = {
 39        nvim-nightly = neovim.overlay;
 40        prompt = prompt.overlay;
 41        plan9patched = (self: super: {
 42          plan9patched = super.plan9port.overrideAttrs (old: {
 43            patches = (old.patches or [ ]) ++ [
 44              ./patches/acme.patch
 45            ];
 46          });
 47        });
 48      };
 49
 50      darwinConfigurations = {
 51        syl = darwin.lib.darwinSystem {
 52          system = "x86_64-darwin";
 53          modules = [
 54            {
 55              imports = [ ./hosts/syl/configuration.nix ];
 56              _module.args.self = self;
 57            }
 58            home-manager.darwinModules.home-manager
 59            {
 60              home-manager.useGlobalPkgs = true;
 61              home-manager.useUserPackages = true;
 62              home-manager.users.icy = {
 63                imports = [ ./darwin/home.nix ];
 64                _module.args.self = self;
 65                _module.args.host = "syl";
 66                _module.args.inputs = inputs;
 67              };
 68            }
 69          ];
 70        };
 71
 72        kvothe = darwin.lib.darwinSystem {
 73          system = "aarch64-darwin";
 74          modules = [
 75            {
 76              imports = [ ./hosts/kvothe/configuration.nix ];
 77              _module.args.self = self;
 78            }
 79            home-manager.darwinModules.home-manager
 80            {
 81              home-manager.useGlobalPkgs = true;
 82              home-manager.useUserPackages = true;
 83              home-manager.users.icy = {
 84                imports = [ ./darwin/home.nix ];
 85                _module.args.self = self;
 86                _module.args.host = "kvothe";
 87                _module.args.inputs = inputs;
 88              };
 89            }
 90          ];
 91        };
 92      };
 93
 94      nixosConfigurations = {
 95        wyndle = nixpkgs.lib.nixosSystem {
 96          system = "x86_64-linux";
 97          modules = [
 98            {
 99              imports = [ ./hosts/wyndle/configuration.nix ];
100              _module.args.self = self;
101            }
102            home-manager.nixosModules.home-manager
103            {
104              home-manager.useGlobalPkgs = true;
105              home-manager.useUserPackages = true;
106              home-manager.users.icy = {
107                imports = [ ./home.nix ];
108                _module.args.self = self;
109                _module.args.host = "wyndle";
110                _module.args.inputs = inputs;
111              };
112            }
113          ];
114        };
115      };
116    };
117
118}