fix: Formatting
Working:
- The daemon
- Mutable config — well, kinda. I'm not yet sure how it will interact with
`emacsWithPackagesFromUsePackage`.
- Packages via Nixpkgs
This commit is contained in:
@@ -13,6 +13,7 @@ let users = builtins.readDir ../users;
|
|||||||
# Directory name should always match username.
|
# Directory name should always match username.
|
||||||
({ ... }: { home.username = username; })
|
({ ... }: { home.username = username; })
|
||||||
|
|
||||||
|
# TODO: Move to default module.
|
||||||
({ lib, ... }: {
|
({ lib, ... }: {
|
||||||
nix = {
|
nix = {
|
||||||
settings.experimental-features =
|
settings.experimental-features =
|
||||||
|
|||||||
@@ -18,42 +18,44 @@ let
|
|||||||
(builtins.readDir ../users)));
|
(builtins.readDir ../users)));
|
||||||
};
|
};
|
||||||
|
|
||||||
mkHost = hostName: nixpkgs.lib.nixosSystem {
|
mkHost = hostName:
|
||||||
specialArgs = inputs;
|
let system = import ../hosts/${hostName}/system.nix;
|
||||||
system = import ../hosts/${hostName}/system.nix;
|
in nixpkgs.lib.nixosSystem {
|
||||||
# TODO: This is very ad-hoc, and I don't like it. Organise this better.
|
specialArgs = inputs;
|
||||||
modules = [
|
inherit system;
|
||||||
../hosts/${hostName}/configuration.nix
|
modules = [
|
||||||
|
../hosts/${hostName}/configuration.nix
|
||||||
|
|
||||||
inputs.self.nixosModules.default
|
inputs.self.nixosModules.default
|
||||||
|
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
inputs.impermanence.nixosModules.impermanence
|
inputs.impermanence.nixosModules.impermanence
|
||||||
|
|
||||||
# Directory name should always match host name.
|
# Directory name should always match host name.
|
||||||
({ ... }: { networking.hostName = hostName; })
|
({ ... }: { networking.hostName = hostName; })
|
||||||
|
|
||||||
(mkHostUsers hostName)
|
(mkHostUsers hostName)
|
||||||
|
|
||||||
# home-manager configuration.
|
# home-manager configuration.
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
({ config, lib, self, ... }: {
|
({ config, lib, self, ... }: {
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
|
|
||||||
home-manager.users =
|
home-manager.users =
|
||||||
lib.filterAttrs
|
lib.filterAttrs
|
||||||
(username: _: builtins.elem username config.sydnix.users.users)
|
(username: _: builtins.elem username config.sydnix.users.users)
|
||||||
self.homeConfigurations;
|
self.homeConfigurations;
|
||||||
|
|
||||||
home-manager.extraSpecialArgs = {
|
home-manager.extraSpecialArgs = {
|
||||||
utils = import ../lib/utils.nix {
|
utils = import ../lib/utils.nix {
|
||||||
inherit config lib;
|
inherit config lib;
|
||||||
pkgs = nixpkgs;
|
pkgs = nixpkgs;
|
||||||
|
};
|
||||||
|
inherit inputs system;
|
||||||
};
|
};
|
||||||
};
|
})
|
||||||
})
|
];
|
||||||
];
|
};
|
||||||
};
|
|
||||||
in
|
in
|
||||||
builtins.mapAttrs (dirName: _: mkHost dirName) (builtins.readDir ../hosts)
|
builtins.mapAttrs (dirName: _: mkHost dirName) (builtins.readDir ../hosts)
|
||||||
|
|||||||
Reference in New Issue
Block a user