diff --git a/default.nix b/default.nix index acaa09cc..1d0c6fbe 100644 --- a/default.nix +++ b/default.nix @@ -1,12 +1,12 @@ # Common configuration across systems. This should be required by # configuration.$HOSTNAME.nix files. -{ config, pkgs, options, ... }: +{ pkgs, options, config, ... }: { imports = [ - + ./settings.nix ]; nix = { @@ -76,7 +76,7 @@ shell = pkgs.zsh; }; - home-manager.users.hlissner = { + home = { xdg.enable = true; home.file."bin" = { source = ./bin; recursive = true; }; }; diff --git a/modules/desktop/bspwm.nix b/modules/desktop/bspwm.nix index 561a7152..07a8c9d9 100644 --- a/modules/desktop/bspwm.nix +++ b/modules/desktop/bspwm.nix @@ -95,7 +95,7 @@ }; }; - home-manager.users.hlissner.xdg.configFile = { + home.xdg.configFile = { "sxhkd".source = ; # link recursively so other modules can link files in their folders diff --git a/modules/desktop/rofi.nix b/modules/desktop/rofi.nix index c4bbc3d7..650a6312 100644 --- a/modules/desktop/rofi.nix +++ b/modules/desktop/rofi.nix @@ -50,7 +50,7 @@ ]; }; - home-manager.users.hlissner.xdg.configFile = { + home.xdg.configFile = { # link recursively so other modules can link files in its folder "rofi" = { source = ; diff --git a/modules/dev/rust.nix b/modules/dev/rust.nix index 794c0643..7b37ba0b 100644 --- a/modules/dev/rust.nix +++ b/modules/dev/rust.nix @@ -6,7 +6,7 @@ rls ]; - home-manager.users.hlissner.xdg.configFile = { + home.xdg.configFile = { "zsh/rc.d/aliases.rust.zsh".source = ; "zsh/rc.d/env.rust.zsh".source = ; }; diff --git a/modules/editors/emacs.nix b/modules/editors/emacs.nix index 3c89ebc3..97b60c3e 100644 --- a/modules/editors/emacs.nix +++ b/modules/editors/emacs.nix @@ -17,7 +17,7 @@ fonts.fonts = [ pkgs.emacs-all-the-icons-fonts ]; - home-manager.users.hlissner.xdg.configFile = { + home.xdg.configFile = { "zsh/rc.d/aliases.emacs.zsh".source = ; "zsh/rc.d/env.emacs.zsh".source = ; }; diff --git a/modules/shell/git.nix b/modules/shell/git.nix index f33d9e04..ac4a9f67 100644 --- a/modules/shell/git.nix +++ b/modules/shell/git.nix @@ -6,7 +6,7 @@ gitAndTools.diff-so-fancy ]; - home-manager.users.hlissner.xdg.configFile = { + home.xdg.configFile = { "git/config".source = ; "git/ignore".source = ; "zsh/rc.d/aliases.git.zsh".source = ; diff --git a/modules/shell/ncmpcpp.nix b/modules/shell/ncmpcpp.nix index aaf392cd..20c811e1 100644 --- a/modules/shell/ncmpcpp.nix +++ b/modules/shell/ncmpcpp.nix @@ -5,7 +5,7 @@ (ncmpcpp.override { visualizerSupport = true; }) ]; - home-manager.users.hlissner.xdg.configFile = { + home.xdg.configFile = { "zsh/rc.d/aliases.ncmpcpp.zsh".source = ; "zsh/rc.d/env.ncmpcpp.zsh".source = ; "ncmpcpp/config".source = ; diff --git a/modules/shell/zsh.nix b/modules/shell/zsh.nix index f6dec10b..fa3b3d90 100644 --- a/modules/shell/zsh.nix +++ b/modules/shell/zsh.nix @@ -28,7 +28,7 @@ promptInit = ""; }; - home-manager.users.hlissner.xdg.configFile = { + home.xdg.configFile = { # link recursively so other modules can link files in this folder, # particularly in zsh/rc.d/*.zsh "zsh" = { diff --git a/settings.nix b/settings.nix new file mode 100644 index 00000000..a1ce6be5 --- /dev/null +++ b/settings.nix @@ -0,0 +1,45 @@ +{ config, options, lib, utils, pkgs, ... }: + +with lib; +{ + imports = [ + + ]; + + options = { + username = mkOption { + type = types.str; + default = "hlissner"; + description = "My username"; + }; + + home = mkOption { + type = options.home-manager.users.type.functor.wrapped; + default = {}; + description = "Home-manager configuration for my user"; + }; + + # TODO + # paths = mkOption { + # type = types.listOf types.path; + # default = []; + # description = "Custom PATH entries"; + # }; + + my = mkOption { + type = types.listOf types.functor; + default = []; + description = "Nix config helpers"; + }; + }; + + config = { + home-manager.users = { + ${config.username} = mkAliasDefinitions options.home; + }; + + # environment.extraInit = '' + # export PATH="${lib.concatStringsSep ":" (map builtins.toString config.paths)}:$PATH" + # ''; + }; +} diff --git a/themes/aquanaut/default.nix b/themes/aquanaut/default.nix index 5d432fc5..401c54cd 100644 --- a/themes/aquanaut/default.nix +++ b/themes/aquanaut/default.nix @@ -49,7 +49,7 @@ ''; }; - home-manager.users.hlissner = { + home = { home.file.".background-image".source = ./wallpaper.jpg; xdg.configFile = { diff --git a/themes/pianocat/default.nix b/themes/pianocat/default.nix index b023d049..eed74e8b 100644 --- a/themes/pianocat/default.nix +++ b/themes/pianocat/default.nix @@ -5,7 +5,7 @@ environment.systemPackages = with pkgs; [ arc-theme ]; - home-manager.users.hlissner = { + home = { home.file.".background-image".source = ./wallpaper.jpg; xdg.configFile = {