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, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let keys = import ../../keys.nix;
|
let keys = import ../../keys.nix;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
users.users.qenya = {
|
users.users.qenya = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
home = "/home/qenya";
|
home = "/home/qenya";
|
||||||
|
@ -19,12 +18,8 @@ in
|
||||||
home-manager.users.qenya = { config, lib, pkgs, osConfig, ... }: {
|
home-manager.users.qenya = { config, lib, pkgs, osConfig, ... }: {
|
||||||
home.homeDirectory = osConfig.users.users.qenya.home;
|
home.homeDirectory = osConfig.users.users.qenya.home;
|
||||||
|
|
||||||
programs.git = {
|
imports = [
|
||||||
enable = true;
|
../../home
|
||||||
userName = "Katherina Walshe-Grey";
|
];
|
||||||
userEmail = "git@qenya.tel";
|
|
||||||
};
|
|
||||||
|
|
||||||
home.stateVersion = "23.11";
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
let inherit (lib) mkIf;
|
||||||
|
in {
|
||||||
dconf = {
|
dconf = {
|
||||||
enable = true;
|
|
||||||
settings =
|
settings =
|
||||||
let
|
let
|
||||||
backgroundOptions = {
|
backgroundOptions = {
|
||||||
|
@ -21,5 +21,7 @@
|
||||||
"org/gnome/desktop/interface".color-scheme = "prefer-dark";
|
"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 = {
|
dconf = {
|
||||||
enable = true;
|
|
||||||
settings = {
|
settings = {
|
||||||
"org/gnome/desktop/wm/keybindings" = {
|
"org/gnome/desktop/wm/keybindings" = {
|
||||||
# These are largely useless on most normal systems
|
# 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 = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
userName = "Katherina Walshe-Grey";
|
||||||
|
userEmail = "git@qenya.tel";
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
init = {
|
init = {
|
||||||
defaultBranch = "main";
|
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 = {
|
programs.vscode = {
|
||||||
enable = true;
|
|
||||||
enableExtensionUpdateCheck = false;
|
enableExtensionUpdateCheck = false;
|
||||||
enableUpdateCheck = false;
|
enableUpdateCheck = false;
|
||||||
package = pkgs.vscodium;
|
package = pkgs.vscodium;
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./home.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
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, ... }: {
|
home-manager.users.qenya = { pkgs, ... }: {
|
||||||
imports = [
|
qenya.dconf.enable = true;
|
||||||
../../home/cli.nix
|
|
||||||
../../home/firefox.nix
|
programs = {
|
||||||
../../home/git.nix
|
firefox.enable = true; # TODO: config is not yet nix-ified
|
||||||
../../home/gnome
|
vscode.enable = true;
|
||||||
../../home/vscode.nix
|
};
|
||||||
../../home/zsh.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
home.packages = (with pkgs; [
|
home.packages = (with pkgs; [
|
||||||
bitwarden
|
bitwarden
|
||||||
|
@ -31,7 +29,5 @@
|
||||||
nur.repos.qenya.digital-a-love-story
|
nur.repos.qenya.digital-a-love-story
|
||||||
nur.repos.qenya.dont-take-it-personally-babe
|
nur.repos.qenya.dont-take-it-personally-babe
|
||||||
]);
|
]);
|
||||||
|
|
||||||
home.stateVersion = "23.11";
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./home.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
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