Compare commits

..

2 Commits

3 changed files with 21 additions and 40 deletions

View File

@@ -44,6 +44,7 @@
"${hostname}" = nixpkgs.lib.nixosSystem { "${hostname}" = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ modules = [
home-manager.nixosModules.home-manager
nur.modules.nixos.default nur.modules.nixos.default
./system/common.nix ./system/common.nix
@@ -53,43 +54,28 @@
{ {
system.stateVersion = stateVersion; system.stateVersion = stateVersion;
networking.hostName = hostname; networking.hostName = hostname;
}
];
};
};
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
makeHome = hostname: home-manager.users.${username} = {
let imports = [
extractModules = map
(module:
let hm = module.homeManagerModules;
in hm.${lib.head (lib.attrNames hm)});
in
{
"${username}@${hostname}" = home-manager.lib.homeManagerConfiguration
{
extraSpecialArgs = { inherit inputs; };
pkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [ nur.overlays.default ];
};
modules = (extractModules [
nixvim
nethack
plasma-manager
]) ++ [
nur.modules.homeManager.default
./home/${hostname}.nix ./home/${hostname}.nix
./home/common.nix ./home/common.nix
] ++ (map
(module:
let hm = module.homeManagerModules;
in hm.${lib.head (lib.attrNames hm)})
[ nixvim nethack plasma-manager ]);
home = {
username = username;
homeDirectory = "/home/${username}";
stateVersion = stateVersion;
};
{
news.display = "show"; news.display = "show";
home.username = username; };
home.homeDirectory = "/home/${username}";
home.stateVersion = stateVersion;
} }
]; ];
}; };
@@ -98,6 +84,5 @@
forEachHost = fn: lib.mergeAttrsList (map fn hostnames); forEachHost = fn: lib.mergeAttrsList (map fn hostnames);
in { in {
nixosConfigurations = forEachHost makeSystem; nixosConfigurations = forEachHost makeSystem;
homeConfigurations = forEachHost makeHome;
}; };
} }

View File

@@ -48,8 +48,6 @@
}; };
}; };
nixpkgs.config.allowUnfree = true;
home = { home = {
packages = with pkgs; let packages = with pkgs; let
sent' = sent.overrideAttrs (oldAttrs: { sent' = sent.overrideAttrs (oldAttrs: {
@@ -88,9 +86,5 @@
sessionVariables = { sessionVariables = {
ANI_CLI_PLAYER = "mpv"; ANI_CLI_PLAYER = "mpv";
}; };
file = {
".config/nixpkgs/config.nix".text = "{ allowUnfree = true; }";
};
}; };
} }

View File

@@ -148,4 +148,6 @@
}; };
}; };
}; };
gtk.gtk2.force = true;
} }