summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/default.nix6
-rw-r--r--util/host.nix79
-rw-r--r--util/user.nix19
3 files changed, 51 insertions, 53 deletions
diff --git a/util/default.nix b/util/default.nix
index 7846328..2d42909 100644
--- a/util/default.nix
+++ b/util/default.nix
@@ -1,4 +1,4 @@
-{ home-manager, ... }: {
- host = import ./host.nix { inherit home-manager; };
- user = import ./user.nix { inherit home-manager; };
+{home-manager, ...}: {
+ host = import ./host.nix {inherit home-manager;};
+ user = import ./user.nix {inherit home-manager;};
}
diff --git a/util/host.nix b/util/host.nix
index baedf73..786e460 100644
--- a/util/host.nix
+++ b/util/host.nix
@@ -1,44 +1,43 @@
-{ home-manager, ... }: {
- mkHost =
- { name
- , modules
- , system ? "x86_64-linux"
- , specialArgs ? { }
- , version ? "22.11"
- , pkgs
- ,
- }: {
- ${name} = with pkgs.lib;
- nixosSystem {
- inherit system specialArgs;
- modules =
- [
- ../hosts/common
- ../hosts/${name}
+{home-manager, ...}: {
+ mkHost = {
+ name,
+ modules,
+ system ? "x86_64-linux",
+ specialArgs ? {},
+ version ? "22.11",
+ pkgs,
+ }: {
+ ${name} = with pkgs.lib;
+ nixosSystem {
+ inherit system specialArgs;
+ modules =
+ [
+ ../hosts/common
+ ../hosts/${name}
- ({ pkgs, ... }: {
- system.stateVersion = version;
- networking.hostName = mkDefault name;
- # enable non-free packages
- nixpkgs.config.allowUnfree = true;
+ ({pkgs, ...}: {
+ system.stateVersion = version;
+ networking.hostName = mkDefault name;
+ # enable non-free packages
+ nixpkgs.config.allowUnfree = true;
- # Enable nix flakes
- nix = {
- package = pkgs.nixFlakes;
- settings.experimental-features = [ "nix-command" "flakes" ];
- };
- })
+ # Enable nix flakes
+ nix = {
+ package = pkgs.nixFlakes;
+ settings.experimental-features = ["nix-command" "flakes"];
+ };
+ })
- home-manager.nixosModules.home-manager
- {
- home-manager = {
- useGlobalPkgs = true;
- useUserPackages = true;
- extraSpecialArgs = specialArgs;
- };
- }
- ]
- ++ modules;
- };
- };
+ home-manager.nixosModules.home-manager
+ {
+ home-manager = {
+ useGlobalPkgs = true;
+ useUserPackages = true;
+ extraSpecialArgs = specialArgs;
+ };
+ }
+ ]
+ ++ modules;
+ };
+ };
}
diff --git a/util/user.nix b/util/user.nix
index f392eb1..21cbd4e 100644
--- a/util/user.nix
+++ b/util/user.nix
@@ -1,12 +1,11 @@
-{ home-manager, ... }: {
- mkHMUser =
- { username
- , stateVersion ? "22.11"
- , system ? "x86_64-linux"
- , channel
- , modules ? [ ]
- ,
- }:
+{home-manager, ...}: {
+ mkHMUser = {
+ username,
+ stateVersion ? "22.11",
+ system ? "x86_64-linux",
+ channel,
+ modules ? [],
+ }:
home-manager.lib.homeManagerConfiguration {
pkgs = channel.legacyPackages.${system};
modules =
@@ -17,7 +16,7 @@
nix = {
package = channel.legacyPackages.${system}.nixFlakes;
- settings.experimental-features = [ "nix-command" "flakes" ];
+ settings.experimental-features = ["nix-command" "flakes"];
};
systemd.user.startServices = true;