dotnix/flake.nix

74 lines
1.8 KiB
Nix
Raw Normal View History

2023-06-28 20:48:01 +00:00
{
description = "jolheiser's nixos config";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nur.url = "github:nix-community/nur";
jolheiser-nur.url = "git+https://git.jojodev.com/jolheiser/nur";
2023-06-28 20:48:01 +00:00
};
nixConfig = {warn-dirty = false;};
2023-06-28 20:48:01 +00:00
outputs = {
self,
nixpkgs,
home-manager,
jolheiser-nur,
...
} @ inputs: let
overlays = final: prev: {
nur = import inputs.nur {
nurpkgs = prev;
pkgs = prev;
repoOverrides = {
jolheiser = import jolheiser-nur {pkgs = prev;};
2023-06-28 20:48:01 +00:00
};
};
};
commonConfig = {username}: ({
config,
pkgs,
...
}: {
config = {
nixpkgs.overlays = [overlays];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.${username}.imports = [./apps];
extraSpecialArgs = {
flakePath = "/home/${username}/.config/nixpkgs";
};
2023-06-28 20:48:01 +00:00
};
};
});
in {
nixosConfigurations = {
"chai" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
home-manager.nixosModules.home-manager
./machines/common
./machines/chai
(commonConfig {username = "jolheiser";})
({pkgs, ...}: {
home-manager.users.jolheiser.programs.git.package = pkgs.gitSVN;
})
];
};
"matcha" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
home-manager.nixosModules.home-manager
./machines/common
./machines/matcha
(commonConfig {username = "jolheiser";})
];
};
2023-06-28 20:48:01 +00:00
};
};
2023-06-28 20:48:01 +00:00
}