Home: Refactor a bit.
This commit is contained in:
parent
fb297297f4
commit
12707eae34
|
@ -45,7 +45,7 @@ in {
|
|||
|
||||
# Chromium config.
|
||||
environment.etc = let
|
||||
chromium = import <home/config/chromium> args;
|
||||
chromium = import <home/file/chromium> args;
|
||||
in {
|
||||
"chromium/initial_preferences".source = lib.mkForce chromium.preferences;
|
||||
"chromium/policies/managed/extra.json".source = lib.mkForce chromium.policy;
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
} @args: let
|
||||
cfg = config.home.android;
|
||||
android = import ./android args;
|
||||
env = import ./env args;
|
||||
file = import ./file args;
|
||||
package = import <package> args;
|
||||
programs = import ./program args;
|
||||
stylix = import <system/Stylix.nix> args;
|
||||
|
@ -35,9 +37,9 @@ in {
|
|||
inputs.stylix.homeManagerModules.stylix
|
||||
];
|
||||
home = {
|
||||
file = import ./config args;
|
||||
sessionVariables = import ./variable args;
|
||||
stateVersion = const.droidStateVersion;
|
||||
inherit (env) sessionVariables;
|
||||
inherit file;
|
||||
stateVersion = const.droidStateVersion;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
...
|
||||
} @args: let
|
||||
cfg = config.home.nixos;
|
||||
env = import ./env args;
|
||||
file = import ./file args;
|
||||
programs = import ./program args;
|
||||
in {
|
||||
imports = (util.ls <user>);
|
||||
|
@ -29,16 +31,16 @@ in {
|
|||
${user.username} = {
|
||||
home = {
|
||||
inherit (const) stateVersion;
|
||||
inherit (env) sessionVariables;
|
||||
inherit (user) username homeDirectory;
|
||||
file = import ./config args;
|
||||
sessionVariables = import ./variable args;
|
||||
inherit file;
|
||||
|
||||
# ISSUE: https://github.com/nix-community/home-manager/issues/5589
|
||||
extraActivationPath = with pkgs; [ openssh ];
|
||||
};
|
||||
xdg = import ./xdg { inherit (user) homeDirectory; };
|
||||
programs = with programs; core // desktop;
|
||||
dconf.settings = util.catSet (util.ls ./config/dconf) args;
|
||||
dconf.settings = util.catSet (util.ls ./file/dconf) args;
|
||||
};
|
||||
}
|
||||
) { } cfg.users;
|
||||
|
|
14
home/env/Variable.nix
vendored
Normal file
14
home/env/Variable.nix
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
EDITOR = "nvim"; # Default text editor.
|
||||
GTK_CSD = 0; # GTK apps compat.
|
||||
MANGOHUD = "1"; # Enable Mangohud by default.
|
||||
MANPAGER = "nvim +Man!"; # App to use for man pages.
|
||||
MOZ_LEGACY_PROFILES = "1"; # Disable Firefox profile switching on rebuild.
|
||||
NIXPKGS_ALLOW_UNFREE = "1"; # Allow unfree packages in shell.
|
||||
NIX_CURRENT_SYSTEM = "${pkgs.stdenv.system}"; # Current system architecture.
|
||||
TERM = "xterm-256color"; # Terminal settings.
|
||||
WINEFSYNC = "1"; # Use fsync for Wine.
|
||||
}
|
6
home/env/default.nix
vendored
Normal file
6
home/env/default.nix
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
pkgs,
|
||||
...
|
||||
} @args: {
|
||||
sessionVariables = import ./Variable.nix args;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue