consolidate home-manager config to a module with one entrypoint
This commit is contained in:
parent
230e93bbe7
commit
31bf48154c
15 changed files with 59 additions and 68 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue