Skip to content

Instantly share code, notes, and snippets.

@bashfulrobot
Last active April 22, 2024 02:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bashfulrobot/8c0c8ae6a2fe1038d56d3a161eead403 to your computer and use it in GitHub Desktop.
Save bashfulrobot/8c0c8ae6a2fe1038d56d3a161eead403 to your computer and use it in GitHub Desktop.
nix samples
{ ... }:
let
username = if builtins.getEnv "SUDO_USER" != "" then
builtins.getEnv "SUDO_USER"
else
builtins.getEnv "USER";
in {
home-manager.users."${username}".programs.autojump = {
enable = true;
enableFishIntegration = true;
};
}
# { lib, config, inputs, pkgs, ... }:
{ pkgs, ... }:
let
# Used in my home manager code at the bottom of the file.
username = if builtins.getEnv "SUDO_USER" != "" then
builtins.getEnv "SUDO_USER"
else
builtins.getEnv "USER";
in {
services.xserver.enable = true;
# Enable the GNOME Desktop Environment.
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
### Other gnome settings snipped ###
##### Home Manager Config options #####
home-manager.users."${username}" = { lib, ... }: {
home.file.".face" = {
source = ./.face;
target = ".face";
};
dconf.settings = with lib.hm.gvariant; {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
enable-animations = true;
font-antialiasing = "rgba";
font-hinting = "full";
locate-pointer = true;
gtk-enable-primary-paste = true;
};
### Other dconf settings snipped ###
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment