1
0
Fork 0
This repository has been archived on 2024-01-18. You can view files and clone it, but cannot push or open issues/pull-requests.
dotnix-archive/flake.nix

97 lines
2.5 KiB
Nix

{
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";
ragenix.url = "github:yaxitech/ragenix";
ragenix.inputs.nixpkgs.follows = "nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
nur.url = "github:nix-community/nur";
jolheiser-nur.url = "git+https://git.jojodev.com/jolheiser/nur";
};
nixConfig = {warn-dirty = false;};
outputs = {
self,
nixpkgs,
home-manager,
ragenix,
jolheiser-nur,
...
} @ inputs: let
overlays = final: prev: {
nur = import inputs.nur {
nurpkgs = prev;
pkgs = prev;
repoOverrides = {
jolheiser = import jolheiser-nur {pkgs = prev;};
};
};
};
commonConfig = {username}: ({
config,
pkgs,
...
}: {
config = {
nixpkgs.overlays = [overlays];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.${username}.imports = [./apps];
extraSpecialArgs = {
flakePath = "/home/${username}/.config/nixpkgs";
};
};
age.secrets = {
ssh-config = {
file = ./secrets/shared/ssh-config.age;
owner = "jolheiser";
};
};
};
});
in
{
nixosConfigurations = {
"chai" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
home-manager.nixosModules.home-manager
ragenix.nixosModules.default
./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
ragenix.nixosModules.default
./machines/common
./machines/matcha
(commonConfig {username = "jolheiser";})
];
};
};
}
// inputs.flake-utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
just
ragenix.packages.${system}.ragenix
];
};
});
}