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

62 lines
1.7 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";
nur.url = "github:nix-community/nur";
};
nixConfig = { warn-dirty = false; };
outputs = { self, nixpkgs, home-manager, ... }@inputs:
let
overlays = final: prev: {
nur = import inputs.nur {
nurpkgs = prev;
pkgs = prev;
};
};
commonConfig = { username }:
({ config, pkgs, ... }: {
config = {
nixpkgs.overlays = [ overlays ];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
sharedModules = [
# inputs.jolheiser-nur.homeManagerModules.default
];
users.${username}.imports = [ ./apps ];
extraSpecialArgs = {
flakePath = "/home/${username}/.config/nixpkgs";
};
};
};
});
in {
nixosConfigurations = {
"chai" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
home-manager.nixosModules.home-manager
./machines/common
./machines/chai
(commonConfig { username = "jolheiser"; })
];
};
"matcha" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
home-manager.nixosModules.home-manager
./machines/common
./machines/matcha
(commonConfig { username = "jolheiser"; })
];
};
};
};
}