2023-07-25 22:00:36 -05:00
|
|
|
# Welcome to my nix config! I'm just getting started with flakes, so please
|
|
|
|
# forgive the mess.
|
|
|
|
|
|
|
|
# TODO: declarative disks with https://github.com/nix-community/disko
|
|
|
|
# TODO: home-manager?
|
|
|
|
|
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
|
2023-07-28 02:11:09 -05:00
|
|
|
|
2023-07-28 13:24:11 -05:00
|
|
|
# TODO: this could be a release tarball? fully recompiling this on every change suuuucks
|
2023-07-28 01:30:11 -05:00
|
|
|
api-lyte-dev.url = "git+ssh://gitea@git.lyte.dev/lytedev/api.lyte.dev.git";
|
2023-07-25 22:00:36 -05:00
|
|
|
|
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager/release-23.05";
|
|
|
|
|
|
|
|
# use the version of nixpkgs we specified above rather than the one HM would ordinarily use
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-07-27 12:16:47 -05:00
|
|
|
|
2023-08-02 13:53:09 -05:00
|
|
|
disko = {
|
|
|
|
url = "github:nix-community/disko/master"; # NOTE: lock update!
|
|
|
|
|
|
|
|
# use the version of nixpkgs we specified above rather than the one HM would ordinarily use
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
2023-07-27 12:16:47 -05:00
|
|
|
sops-nix = {
|
|
|
|
url = "github:Mic92/sops-nix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2023-07-27 12:51:48 -05:00
|
|
|
};
|
2023-07-25 22:00:36 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = inputs: {
|
|
|
|
nixosConfigurations = {
|
|
|
|
beefcake = inputs.nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
2023-07-28 00:56:43 -05:00
|
|
|
specialArgs = { inherit inputs; };
|
2023-07-28 01:06:35 -05:00
|
|
|
modules = let
|
2023-07-28 01:30:11 -05:00
|
|
|
ald = inputs.api-lyte-dev;
|
2023-07-28 01:12:17 -05:00
|
|
|
nomod = builtins.trace "hey" ald.nixosModules;
|
2023-07-28 01:06:35 -05:00
|
|
|
in [
|
2023-07-25 22:00:36 -05:00
|
|
|
./machines/beefcake.nix
|
|
|
|
inputs.home-manager.nixosModules.home-manager
|
2023-07-27 12:51:48 -05:00
|
|
|
inputs.sops-nix.nixosModules.sops
|
2023-07-28 01:30:11 -05:00
|
|
|
nomod.x86_64-linux.api-lyte-dev
|
2023-07-25 22:00:36 -05:00
|
|
|
{
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2023-08-02 13:34:14 -05:00
|
|
|
|
|
|
|
thinker = inputs.nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
specialArgs = { inherit inputs; };
|
|
|
|
modules = [
|
2023-08-02 13:53:09 -05:00
|
|
|
inputs.disko.nixosModules.disko
|
|
|
|
./machines/thinker-disks.nix
|
|
|
|
{ _module.args.disks = [ "/dev/nvme0n1" ]; }
|
2023-08-02 13:34:14 -05:00
|
|
|
./machines/thinker.nix
|
|
|
|
inputs.home-manager.nixosModules.home-manager
|
|
|
|
inputs.sops-nix.nixosModules.sops
|
|
|
|
{
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
home-manager.users.daniel = import ./daniel.nix;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2023-07-25 22:00:36 -05:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|