Move shared Home Manager configuration
This commit is contained in:
parent
1aa18760f9
commit
f28ccbf45d
3 changed files with 14 additions and 37 deletions
|
@ -30,18 +30,6 @@ let
|
||||||
|
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
|
|
||||||
shared-config = import "${self}/lib/shared/home-manager.nix" {
|
|
||||||
inherit
|
|
||||||
config
|
|
||||||
hostname
|
|
||||||
inputs
|
|
||||||
lib
|
|
||||||
pkgs
|
|
||||||
self
|
|
||||||
username
|
|
||||||
;
|
|
||||||
};
|
|
||||||
|
|
||||||
shared-packages = import "${self}/lib/shared/home-manager-packages.nix" {
|
shared-packages = import "${self}/lib/shared/home-manager-packages.nix" {
|
||||||
inherit
|
inherit
|
||||||
headless
|
headless
|
||||||
|
@ -55,7 +43,7 @@ in
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
../common
|
../common
|
||||||
shared-config
|
./home.nix
|
||||||
./modules
|
./modules
|
||||||
]
|
]
|
||||||
++ pkgs.lib.optionals (!headless) [
|
++ pkgs.lib.optionals (!headless) [
|
||||||
|
|
13
home/opdavies/home.nix
Normal file
13
home/opdavies/home.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{ config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.username = "opdavies";
|
||||||
|
home.homeDirectory = "/home/${config.home.username}";
|
||||||
|
|
||||||
|
home.stateVersion = "22.05";
|
||||||
|
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
# Nicely reload system units when changing configs.
|
||||||
|
systemd.user.startServices = "sd-switch";
|
||||||
|
}
|
|
@ -1,24 +0,0 @@
|
||||||
{ username, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
home.username = "${username}";
|
|
||||||
home.homeDirectory = "/home/${username}";
|
|
||||||
|
|
||||||
# Nicely reload system units when changing configs.
|
|
||||||
systemd.user.startServices = "sd-switch";
|
|
||||||
|
|
||||||
# See https://github.com/nix-community/home-manager/issues/2064#issuecomment-2259307514.
|
|
||||||
# This is a workaround for the following errors that appeared when switching back to unstable:
|
|
||||||
# - 1: Failed to start unit flameshot.service
|
|
||||||
# - 2: org.freedesktop.systemd1.NoSuchUnit: Unit tray.target not found.
|
|
||||||
systemd.user.targets.tray = {
|
|
||||||
Unit = {
|
|
||||||
Description = "Home Manager System Tray";
|
|
||||||
Requires = [ "graphical-session-pre.target" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
home.stateVersion = "22.05";
|
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue