Lepsza iomplementacja flake - NOT TESTED
This commit is contained in:
parent
790f28b1dc
commit
d845e14b37
1 changed files with 23 additions and 5 deletions
28
flake.nix
28
flake.nix
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
description = "Arch-like NixOS Config";
|
||||
description = "Konfiguracja wielu maszyn na raz";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; # Bleeding edge!
|
||||
|
|
@ -9,16 +9,34 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, ... }: {
|
||||
nixosConfigurations.nix-latitude = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
outputs = { self, nixpkgs, home-manager, ... }:
|
||||
let # pomocnicza funkcja
|
||||
mk_system = system: hostname: modules: nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
./configuration.nix
|
||||
{ networking.hostName = hostname; }
|
||||
/etc/nixos/configuration.nix
|
||||
./common.nix
|
||||
# home manager
|
||||
home-manager.nixosModules.home-manager {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.sasza = import ./home.nix;
|
||||
}
|
||||
] ++ modules;
|
||||
};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
nix-latitude = mkSystem "x86_64-linux" "nix-latitude" [
|
||||
./modules/network.nix
|
||||
./modules/office.nix
|
||||
];
|
||||
|
||||
nix-gaming = mkSystem "x86_64-linux" "nix-gaming" [
|
||||
./modules/gaming.nix
|
||||
./modules/network.nix
|
||||
./modules/office.nix
|
||||
./modules/3dprint.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue