mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-04-26 00:19:11 +00:00
users/foo-dogsquared: modularize dotfile setup
This commit is contained in:
parent
be6be71144
commit
e27bdc0dc7
@ -1,15 +1,12 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
dotfilesAsStorePath = config.lib.file.mkOutOfStoreSymlink config.home.mutableFile."library/dotfiles".path;
|
||||
getDotfiles = path: "${dotfilesAsStorePath}/${path}";
|
||||
in
|
||||
{
|
||||
imports = [ ./modules ];
|
||||
|
||||
# All of the home-manager-user-specific setup are here.
|
||||
users.foo-dogsquared = {
|
||||
music.enable = true;
|
||||
dotfiles.enable = false;
|
||||
|
||||
programs = {
|
||||
browsers.brave.enable = true;
|
||||
@ -63,10 +60,6 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
home.sessionPath = [
|
||||
"${config.home.mutableFile."library/dotfiles".path}/bin"
|
||||
];
|
||||
|
||||
# Making my favorite terminal multiplexer right now.
|
||||
programs.zellij.settings = {
|
||||
default_layout = "editor";
|
||||
@ -151,25 +144,13 @@ in
|
||||
createDirectories = true;
|
||||
};
|
||||
|
||||
# All of the personal configurations.
|
||||
xdg.configFile = {
|
||||
distrobox.source = ./config/distrobox;
|
||||
doom.source = getDotfiles "emacs";
|
||||
kanidm.source = ./config/kanidm;
|
||||
kitty.source = getDotfiles "kitty";
|
||||
nvim.source = getDotfiles "nvim";
|
||||
nyxt.source = getDotfiles "nyxt";
|
||||
wezterm.source = getDotfiles "wezterm";
|
||||
};
|
||||
|
||||
# Automating some files to be fetched on activation.
|
||||
home.mutableFile = {
|
||||
# Fetching my dotfiles,...
|
||||
"library/dotfiles" = {
|
||||
url = "https://github.com/foo-dogsquared/dotfiles.git";
|
||||
type = "git";
|
||||
};
|
||||
|
||||
# ...my gopass secrets,...
|
||||
".local/share/gopass/stores/personal" = {
|
||||
url = "gitea@code.foodogsquared.one:foodogsquared/gopass-secrets-personal.git";
|
||||
|
@ -2,6 +2,7 @@
|
||||
{
|
||||
imports = [
|
||||
./music-setup.nix
|
||||
./dotfiles.nix
|
||||
|
||||
./programs/browsers.nix
|
||||
./programs/email.nix
|
||||
|
34
users/home-manager/foo-dogsquared/modules/dotfiles.nix
Normal file
34
users/home-manager/foo-dogsquared/modules/dotfiles.nix
Normal file
@ -0,0 +1,34 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
userCfg = config.users.foo-dogsquared;
|
||||
cfg = userCfg.dotfiles;
|
||||
|
||||
dotfiles = config.lib.file.mkOutOfStoreSymlink config.home.mutableFile."library/dotfiles".path;
|
||||
getDotfiles = path: "${dotfiles}/${path}";
|
||||
in
|
||||
{
|
||||
options.users.foo-dogsquared.dotfiles.enable = lib.mkEnableOption "custom outside dotfiles for other programs";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Fetching my dotfiles,...
|
||||
home.mutableFile."library/dotfiles" = {
|
||||
url = "https://github.com/foo-dogsquared/dotfiles.git";
|
||||
type = "git";
|
||||
};
|
||||
|
||||
# Add the custom scripts here.
|
||||
home.sessionPath = [
|
||||
"${config.home.mutableFile."library/dotfiles".path}/bin"
|
||||
];
|
||||
|
||||
# All of the personal configurations.
|
||||
xdg.configFile = {
|
||||
doom.source = getDotfiles "emacs";
|
||||
kitty.source = getDotfiles "kitty";
|
||||
nvim.source = getDotfiles "nvim";
|
||||
nyxt.source = getDotfiles "nyxt";
|
||||
wezterm.source = getDotfiles "wezterm";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user