mirror of
https://codeberg.org/jopejoe1/nix-conf.git
synced 2025-01-04 08:36:33 +01:00
Hope this fixes home manager
This commit is contained in:
parent
f5514728a9
commit
441028f65b
4 changed files with 277 additions and 271 deletions
|
@ -10,6 +10,7 @@ in
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
imports = [ ./home.nix ];
|
||||
users.users.jopejoe1 = {
|
||||
isNormalUser = true;
|
||||
description = "jopejoe1 🚫";
|
||||
|
@ -25,7 +26,5 @@ in
|
|||
ark
|
||||
];
|
||||
};
|
||||
|
||||
home-manager.users.jopejoe1 = import ./home.nix;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let cfg = config.home-manager.users.jopejoe1;
|
||||
in
|
||||
{
|
||||
home-manager.users.jopejoe1 = {
|
||||
home = {
|
||||
# Basic information for home-manager
|
||||
username = "jopejoe1";
|
||||
homeDirectory = "/home/${config.home.username}";
|
||||
homeDirectory = "/home/${cfg.home.username}";
|
||||
|
||||
# Enviroment variables
|
||||
sessionVariables = {
|
||||
XCOMPOSECACHE = "${config.xdg.cacheHome}/X11/xcompos";
|
||||
XCOMPOSECACHE = "${cfg.xdg.cacheHome}/X11/xcompos";
|
||||
XAUTHORITY = "$XDG_RUNTIME_DIR/Xauthority";
|
||||
};
|
||||
|
||||
|
@ -29,28 +32,28 @@
|
|||
xdg = {
|
||||
enable = true;
|
||||
mime.enable = true;
|
||||
cacheHome = "${config.home.homeDirectory}/.cache";
|
||||
configHome = "${config.home.homeDirectory}/.config";
|
||||
dataHome = "${config.home.homeDirectory}/.local/share";
|
||||
stateHome = "${config.home.homeDirectory}/.local/state";
|
||||
cacheHome = "${cfg.home.homeDirectory}/.cache";
|
||||
configHome = "${cfg.home.homeDirectory}/.config";
|
||||
dataHome = "${cfg.home.homeDirectory}/.local/share";
|
||||
stateHome = "${cfg.home.homeDirectory}/.local/state";
|
||||
userDirs = {
|
||||
enable = true;
|
||||
createDirectories = false;
|
||||
desktop = "${config.home.homeDirectory}/Desktop";
|
||||
documents = "${config.home.homeDirectory}/Documents";
|
||||
download = "${config.home.homeDirectory}/Downloads";
|
||||
music = "${config.home.homeDirectory}/Music";
|
||||
pictures = "${config.home.homeDirectory}/Pictures";
|
||||
publicShare = "${config.home.homeDirectory}/Public";
|
||||
templates = "${config.home.homeDirectory}/Templates";
|
||||
videos = "${config.home.homeDirectory}/Videos";
|
||||
desktop = "${cfg.home.homeDirectory}/Desktop";
|
||||
documents = "${cfg.home.homeDirectory}/Documents";
|
||||
download = "${cfg.home.homeDirectory}/Downloads";
|
||||
music = "${cfg.home.homeDirectory}/Music";
|
||||
pictures = "${cfg.home.homeDirectory}/Pictures";
|
||||
publicShare = "${cfg.home.homeDirectory}/Public";
|
||||
templates = "${cfg.home.homeDirectory}/Templates";
|
||||
videos = "${cfg.home.homeDirectory}/Videos";
|
||||
};
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
gtk2 = {
|
||||
configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||
configLocation = "${cfg.xdg.configHome}/gtk-2.0/gtkrc";
|
||||
};
|
||||
gtk3 = {
|
||||
extraConfig = {
|
||||
|
@ -103,7 +106,7 @@
|
|||
};
|
||||
bash = {
|
||||
enable = true;
|
||||
historyFile = "${config.xdg.stateHome}/bash/history";
|
||||
historyFile = "${cfg.xdg.stateHome}/bash/history";
|
||||
shellAliases = {
|
||||
gc = "sudo nix store gc";
|
||||
rb = "sudo git -C /etc/nixos pull && sudo nix flake update /etc/nixos/ && sudo nixos-rebuild switch && sudo git -C /etc/nixos add . && sudo git -C /etc/nixos commit -m 'Updated flake.lock' && sudo git -C /etc/nixos push";
|
||||
|
@ -111,14 +114,14 @@
|
|||
};
|
||||
zsh = {
|
||||
enable = true;
|
||||
shellAliases = config.programs.bash.shellAliases;
|
||||
shellAliases = cfg.programs.bash.shellAliases;
|
||||
enableAutosuggestions = true;
|
||||
enableCompletion = true;
|
||||
enableSyntaxHighlighting = true;
|
||||
enableVteIntegration = true;
|
||||
dotDir = ".config/zsh";
|
||||
};
|
||||
fish.shellAbbrs = config.programs.bash.shellAliases;
|
||||
fish.shellAbbrs = cfg.programs.bash.shellAliases;
|
||||
thunderbird = {
|
||||
enable = false;
|
||||
profiles = {
|
||||
|
@ -140,7 +143,7 @@
|
|||
DisableTelemetry = true;
|
||||
DisableFirefoxAccounts = true;
|
||||
DisableFormHistory = true;
|
||||
DefaultDownloadDirectory = "${config.xdg.userDirs.download}";
|
||||
DefaultDownloadDirectory = "${cfg.xdg.userDirs.download}";
|
||||
DontCheckDefaultBrowser = true;
|
||||
ExtensionUpdate = false;
|
||||
NoDefaultBookmarks = true;
|
||||
|
@ -217,7 +220,7 @@
|
|||
};
|
||||
"NixOS Wiki" = {
|
||||
urls = [{ template = "https://nixos.wiki/index.php?search={searchTerms}"; }];
|
||||
icon = "${config.programs.firefox.profiles.default.search.engines."Nix Packages".icon}";
|
||||
icon = "${cfg.programs.firefox.profiles.default.search.engines."Nix Packages".icon}";
|
||||
definedAliases = [ "@nw" ];
|
||||
};
|
||||
"Bing".metaData.hidden = true;
|
||||
|
@ -244,4 +247,5 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -10,7 +10,6 @@ in
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
home-manager.users.root = import ./home.nix;
|
||||
imports = [ ./home.nix ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let cfg = config.home-manager.users.root;
|
||||
in
|
||||
{
|
||||
home-manager.users.root = {
|
||||
home = {
|
||||
# Basic information for home-manager
|
||||
username = "root";
|
||||
homeDirectory = "/${config.home.username}";
|
||||
homeDirectory = "/${cfg.home.username}";
|
||||
|
||||
# Enviroment variables
|
||||
sessionVariables = {
|
||||
XCOMPOSECACHE = "${config.xdg.cacheHome}/X11/xcompos";
|
||||
XCOMPOSECACHE = "${cfg.xdg.cacheHome}/X11/xcompos";
|
||||
XAUTHORITY = "$XDG_RUNTIME_DIR/Xauthority";
|
||||
};
|
||||
|
||||
|
@ -18,21 +21,21 @@
|
|||
xdg = {
|
||||
enable = true;
|
||||
mime.enable = true;
|
||||
cacheHome = "${config.home.homeDirectory}/.cache";
|
||||
configHome = "${config.home.homeDirectory}/.config";
|
||||
dataHome = "${config.home.homeDirectory}/.local/share";
|
||||
stateHome = "${config.home.homeDirectory}/.local/state";
|
||||
cacheHome = "${cfg.home.homeDirectory}/.cache";
|
||||
configHome = "${cfg.home.homeDirectory}/.config";
|
||||
dataHome = "${cfg.home.homeDirectory}/.local/share";
|
||||
stateHome = "${cfg.home.homeDirectory}/.local/state";
|
||||
userDirs = {
|
||||
enable = true;
|
||||
createDirectories = false;
|
||||
desktop = "${config.home.homeDirectory}/Desktop";
|
||||
documents = "${config.home.homeDirectory}/Documents";
|
||||
download = "${config.home.homeDirectory}/Downloads";
|
||||
music = "${config.home.homeDirectory}/Music";
|
||||
pictures = "${config.home.homeDirectory}/Pictures";
|
||||
publicShare = "${config.home.homeDirectory}/Public";
|
||||
templates = "${config.home.homeDirectory}/Templates";
|
||||
videos = "${config.home.homeDirectory}/Videos";
|
||||
desktop = "${cfg.home.homeDirectory}/Desktop";
|
||||
documents = "${cfg.home.homeDirectory}/Documents";
|
||||
download = "${cfg.home.homeDirectory}/Downloads";
|
||||
music = "${cfg.home.homeDirectory}/Music";
|
||||
pictures = "${cfg.home.homeDirectory}/Pictures";
|
||||
publicShare = "${cfg.home.homeDirectory}/Public";
|
||||
templates = "${cfg.home.homeDirectory}/Templates";
|
||||
videos = "${cfg.home.homeDirectory}/Videos";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -46,13 +49,14 @@
|
|||
};
|
||||
bash = {
|
||||
enable = true;
|
||||
historyFile = "${config.xdg.stateHome}/bash/history";
|
||||
historyFile = "${cfg.xdg.stateHome}/bash/history";
|
||||
shellAliases = {
|
||||
gc = "sudo nix store gc";
|
||||
rb = "sudo nix flake update /etc/nixos/ && sudo nixos-rebuild switch";
|
||||
};
|
||||
};
|
||||
zsh.shellAliases = config.programs.bash.shellAliases;
|
||||
fish.shellAbbrs = config.programs.bash.shellAliases;
|
||||
zsh.shellAliases = cfg.programs.bash.shellAliases;
|
||||
fish.shellAbbrs = cfg.programs.bash.shellAliases;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue