Alias home-manager.users.hlissner to home

And add settings.nix.
This commit is contained in:
Henrik Lissner 2020-01-03 23:00:01 -05:00
parent 21d1570706
commit 3e823d3b44
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
11 changed files with 57 additions and 12 deletions

View file

@ -1,12 +1,12 @@
# Common configuration across systems. This should be required by # Common configuration across systems. This should be required by
# configuration.$HOSTNAME.nix files. # configuration.$HOSTNAME.nix files.
{ config, pkgs, options, ... }: { pkgs, options, config, ... }:
{ {
imports = [ imports = [
<nixpkgs/nixos/modules/installer/scan/not-detected.nix> <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
<home-manager/nixos> ./settings.nix
]; ];
nix = { nix = {
@ -76,7 +76,7 @@
shell = pkgs.zsh; shell = pkgs.zsh;
}; };
home-manager.users.hlissner = { home = {
xdg.enable = true; xdg.enable = true;
home.file."bin" = { source = ./bin; recursive = true; }; home.file."bin" = { source = ./bin; recursive = true; };
}; };

View file

@ -95,7 +95,7 @@
}; };
}; };
home-manager.users.hlissner.xdg.configFile = { home.xdg.configFile = {
"sxhkd".source = <config/sxhkd>; "sxhkd".source = <config/sxhkd>;
# link recursively so other modules can link files in their folders # link recursively so other modules can link files in their folders

View file

@ -50,7 +50,7 @@
]; ];
}; };
home-manager.users.hlissner.xdg.configFile = { home.xdg.configFile = {
# link recursively so other modules can link files in its folder # link recursively so other modules can link files in its folder
"rofi" = { "rofi" = {
source = <config/rofi>; source = <config/rofi>;

View file

@ -6,7 +6,7 @@
rls rls
]; ];
home-manager.users.hlissner.xdg.configFile = { home.xdg.configFile = {
"zsh/rc.d/aliases.rust.zsh".source = <config/rust/aliases.zsh>; "zsh/rc.d/aliases.rust.zsh".source = <config/rust/aliases.zsh>;
"zsh/rc.d/env.rust.zsh".source = <config/rust/env.zsh>; "zsh/rc.d/env.rust.zsh".source = <config/rust/env.zsh>;
}; };

View file

@ -17,7 +17,7 @@
fonts.fonts = [ pkgs.emacs-all-the-icons-fonts ]; fonts.fonts = [ pkgs.emacs-all-the-icons-fonts ];
home-manager.users.hlissner.xdg.configFile = { home.xdg.configFile = {
"zsh/rc.d/aliases.emacs.zsh".source = <config/emacs/aliases.zsh>; "zsh/rc.d/aliases.emacs.zsh".source = <config/emacs/aliases.zsh>;
"zsh/rc.d/env.emacs.zsh".source = <config/emacs/env.zsh>; "zsh/rc.d/env.emacs.zsh".source = <config/emacs/env.zsh>;
}; };

View file

@ -6,7 +6,7 @@
gitAndTools.diff-so-fancy gitAndTools.diff-so-fancy
]; ];
home-manager.users.hlissner.xdg.configFile = { home.xdg.configFile = {
"git/config".source = <config/git/config>; "git/config".source = <config/git/config>;
"git/ignore".source = <config/git/ignore>; "git/ignore".source = <config/git/ignore>;
"zsh/rc.d/aliases.git.zsh".source = <config/git/aliases.zsh>; "zsh/rc.d/aliases.git.zsh".source = <config/git/aliases.zsh>;

View file

@ -5,7 +5,7 @@
(ncmpcpp.override { visualizerSupport = true; }) (ncmpcpp.override { visualizerSupport = true; })
]; ];
home-manager.users.hlissner.xdg.configFile = { home.xdg.configFile = {
"zsh/rc.d/aliases.ncmpcpp.zsh".source = <config/ncmpcpp/aliases.zsh>; "zsh/rc.d/aliases.ncmpcpp.zsh".source = <config/ncmpcpp/aliases.zsh>;
"zsh/rc.d/env.ncmpcpp.zsh".source = <config/ncmpcpp/env.zsh>; "zsh/rc.d/env.ncmpcpp.zsh".source = <config/ncmpcpp/env.zsh>;
"ncmpcpp/config".source = <config/ncmpcpp/config>; "ncmpcpp/config".source = <config/ncmpcpp/config>;

View file

@ -28,7 +28,7 @@
promptInit = ""; promptInit = "";
}; };
home-manager.users.hlissner.xdg.configFile = { home.xdg.configFile = {
# link recursively so other modules can link files in this folder, # link recursively so other modules can link files in this folder,
# particularly in zsh/rc.d/*.zsh # particularly in zsh/rc.d/*.zsh
"zsh" = { "zsh" = {

45
settings.nix Normal file
View file

@ -0,0 +1,45 @@
{ config, options, lib, utils, pkgs, ... }:
with lib;
{
imports = [
<home-manager/nixos>
];
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"
# '';
};
}

View file

@ -49,7 +49,7 @@
''; '';
}; };
home-manager.users.hlissner = { home = {
home.file.".background-image".source = ./wallpaper.jpg; home.file.".background-image".source = ./wallpaper.jpg;
xdg.configFile = { xdg.configFile = {

View file

@ -5,7 +5,7 @@
environment.systemPackages = with pkgs; [ arc-theme ]; environment.systemPackages = with pkgs; [ arc-theme ];
home-manager.users.hlissner = { home = {
home.file.".background-image".source = ./wallpaper.jpg; home.file.".background-image".source = ./wallpaper.jpg;
xdg.configFile = { xdg.configFile = {