mirror of
https://github.com/srid/nixos-config.git
synced 2026-01-10 02:02:36 +08:00
Generalize
This commit is contained in:
parent
12ff5b0ae4
commit
2f407dd8e5
1 changed files with 23 additions and 18 deletions
41
flake.nix
41
flake.nix
|
|
@ -6,24 +6,29 @@
|
|||
home-manager.url = "github:nix-community/home-manager";
|
||||
};
|
||||
|
||||
outputs = { self, home-manager, nixpkgs }: {
|
||||
nixosConfigurations.p71 = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
# System configuration
|
||||
./p71/configuration.nix
|
||||
./modules/passwordstore.nix
|
||||
./modules/protonmail-bridge.nix
|
||||
./modules/monitor-brightness.nix
|
||||
outputs = { self, home-manager, nixpkgs }:
|
||||
let
|
||||
# Make configuration for any computer I use in my home office.
|
||||
mkHomeMachine = configurationNix: nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
# System configuration
|
||||
configurationNix
|
||||
./modules/passwordstore.nix
|
||||
./modules/protonmail-bridge.nix
|
||||
./modules/monitor-brightness.nix
|
||||
|
||||
# home-manager configuration
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.srid = import ./home.nix;
|
||||
}
|
||||
];
|
||||
# home-manager configuration
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.srid = import ./home.nix;
|
||||
}
|
||||
];
|
||||
};
|
||||
in {
|
||||
nixosConfigurations.p71 = mkHomeMachine ./p71/configuration.nix;
|
||||
nixosConfigurations.x1c7 = mkHomeMachine ./x1c7/configuration.nix;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue