consolidate home-manager config to a module with one entrypoint
This commit is contained in:
parent
230e93bbe7
commit
31bf48154c
|
@ -1,8 +1,7 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let keys = import ../../keys.nix;
|
||||
in
|
||||
{
|
||||
in {
|
||||
users.users.qenya = {
|
||||
isNormalUser = true;
|
||||
home = "/home/qenya";
|
||||
|
@ -19,12 +18,8 @@ in
|
|||
home-manager.users.qenya = { config, lib, pkgs, osConfig, ... }: {
|
||||
home.homeDirectory = osConfig.users.users.qenya.home;
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Katherina Walshe-Grey";
|
||||
userEmail = "git@qenya.tel";
|
||||
};
|
||||
|
||||
home.stateVersion = "23.11";
|
||||
imports = [
|
||||
../../home
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
let inherit (lib) mkIf;
|
||||
in {
|
||||
dconf = {
|
||||
enable = true;
|
||||
settings =
|
||||
let
|
||||
backgroundOptions = {
|
||||
|
@ -21,5 +21,7 @@
|
|||
"org/gnome/desktop/interface".color-scheme = "prefer-dark";
|
||||
};
|
||||
};
|
||||
home.file.".background-image".source = ./background-image.jpg;
|
||||
home.file.".background-image" = mkIf config.dconf.enable {
|
||||
source = ./background-image.jpg;
|
||||
};
|
||||
}
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
30
home/dconf/default.nix
Normal file
30
home/dconf/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
# dconf is the configuration manager for GNOME.
|
||||
|
||||
# home-manager, in its infinite wisdom, sets `dconf.enable` to true by default.
|
||||
# This is a problem because we don't want it to attempt to apply our settings on
|
||||
# a system that doesn't actually have GNOME installed.
|
||||
|
||||
# To work around it, we create our own option `qenya.dconf.enable`, which
|
||||
# defaults to false, and pass it to `dconf.enable`.
|
||||
|
||||
let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.qenya.dconf;
|
||||
in
|
||||
{
|
||||
options.qenya.dconf = {
|
||||
enable = mkEnableOption "dconf";
|
||||
};
|
||||
|
||||
config = {
|
||||
dconf.enable = config.qenya.dconf.enable;
|
||||
};
|
||||
|
||||
imports = [
|
||||
# TODO: nix-ify other parts of GNOME config
|
||||
./appearance.nix
|
||||
./keyboard.nix
|
||||
];
|
||||
}
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
{
|
||||
dconf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"org/gnome/desktop/wm/keybindings" = {
|
||||
# These are largely useless on most normal systems
|
12
home/default.nix
Normal file
12
home/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
imports = [
|
||||
./dconf
|
||||
./cli.nix
|
||||
./git.nix
|
||||
./tmux.nix
|
||||
./vscode.nix
|
||||
./zsh.nix
|
||||
];
|
||||
|
||||
home.stateVersion = "23.11";
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# TODO: nix-ify Firefox config
|
||||
programs.firefox.enable = true;
|
||||
}
|
|
@ -3,6 +3,8 @@
|
|||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Katherina Walshe-Grey";
|
||||
userEmail = "git@qenya.tel";
|
||||
extraConfig = {
|
||||
init = {
|
||||
defaultBranch = "main";
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
# TODO: nix-ify other parts of GNOME config
|
||||
./appearance.nix
|
||||
./keyboard.nix
|
||||
];
|
||||
}
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
{
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
enableExtensionUpdateCheck = false;
|
||||
enableUpdateCheck = false;
|
||||
package = pkgs.vscodium;
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./home.nix
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.qenya = { pkgs, ... }: {
|
||||
imports = [
|
||||
../../home/cli.nix
|
||||
../../home/git.nix
|
||||
../../home/zsh.nix
|
||||
];
|
||||
|
||||
home.stateVersion = "23.11";
|
||||
};
|
||||
}
|
|
@ -2,14 +2,12 @@
|
|||
|
||||
{
|
||||
home-manager.users.qenya = { pkgs, ... }: {
|
||||
imports = [
|
||||
../../home/cli.nix
|
||||
../../home/firefox.nix
|
||||
../../home/git.nix
|
||||
../../home/gnome
|
||||
../../home/vscode.nix
|
||||
../../home/zsh.nix
|
||||
];
|
||||
qenya.dconf.enable = true;
|
||||
|
||||
programs = {
|
||||
firefox.enable = true; # TODO: config is not yet nix-ified
|
||||
vscode.enable = true;
|
||||
};
|
||||
|
||||
home.packages = (with pkgs; [
|
||||
bitwarden
|
||||
|
@ -31,7 +29,5 @@
|
|||
nur.repos.qenya.digital-a-love-story
|
||||
nur.repos.qenya.dont-take-it-personally-babe
|
||||
]);
|
||||
|
||||
home.stateVersion = "23.11";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./home.nix
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.qenya = { pkgs, ... }: {
|
||||
imports = [
|
||||
../../home/cli.nix
|
||||
../../home/git.nix
|
||||
../../home/tmux.nix
|
||||
../../home/zsh.nix
|
||||
];
|
||||
|
||||
home.stateVersion = "23.11";
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue