dotfiles

andersuno dotfiles
git clone git://git.andersuno.nu/dotfiles.git
Log | Files | Refs | README

commit f538e5b2f7775910de1c0b5ff09268323d272549
parent d9f24f185e06e040c3f573834c3c23147651ae42
Author: Anders Hedman <anders.hedman01gmail.com>
Date:   Mon, 21 Oct 2024 21:29:52 +0200

hm: Home-manager initial commit

Diffstat:
A.config/home-manager/home.nix | 130+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 130 insertions(+), 0 deletions(-)

diff --git a/.config/home-manager/home.nix b/.config/home-manager/home.nix @@ -0,0 +1,130 @@ +{ config, pkgs, ... }: + +{ + # Home Manager needs a bit of information about you and the paths it should + # manage. + home.username = "anders"; + home.homeDirectory = "/home/anders"; + + programs.git = { + enable = true; + userName = "Anders Hedman"; + userEmail = "anders.hedman01gmail.com"; + }; + + # This value determines the Home Manager release that your configuration is + # compatible with. This helps avoid breakage when a new Home Manager release + # introduces backwards incompatible changes. + # + # You should not change this value, even if you update Home Manager. If you do + # want to update the value, then make sure to first check the Home Manager + # release notes. + home.stateVersion = "24.05"; # Please read the comment before changing. + + # The home.packages option allows you to install Nix packages into your + # environment. + home.packages = [ + # # Adds the 'hello' command to your environment. It prints a friendly + # # "Hello, world!" when run. + # pkgs.hello + + # # It is sometimes useful to fine-tune packages, for example, by applying + # # overrides. You can do that directly here, just don't forget the + # # parentheses. Maybe you want to install Nerd Fonts with a limited number of + # # fonts? + # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; }) + + # # You can also create simple shell scripts directly inside your + # # configuration. For example, this adds a command 'my-hello' to your + # # environment: + # (pkgs.writeShellScriptBin "my-hello" '' + # echo "Hello, ${config.home.username}!" + # '') + ]; + + # Home Manager is pretty good at managing dotfiles. The primary way to manage + # plain files is through 'home.file'. + home.file = { + # # Building this configuration will create a copy of 'dotfiles/screenrc' in + # # the Nix store. Activating the configuration will then make '~/.screenrc' a + # # symlink to the Nix store copy. + # ".screenrc".source = dotfiles/screenrc; + + # # You can also set the file content immediately. + # ".gradle/gradle.properties".text = '' + # org.gradle.console=verbose + # org.gradle.daemon.idletimeout=3600000 + # ''; + ".doom.d".source = ~/Repos/dotfiles/.doom.d; + }; + + # Home Manager can also manage your environment variables through + # 'home.sessionVariables'. These will be explicitly sourced when using a + # shell provided by Home Manager. If you don't want to manage your shell + # through Home Manager then you have to manually source 'hm-session-vars.sh' + # located at either + # + # ~/.nix-profile/etc/profile.d/hm-session-vars.sh + # + # or + # + # ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh + # + # or + # + # /etc/profiles/per-user/anders/etc/profile.d/hm-session-vars.sh + # + home.sessionVariables = { + # EDITOR = "emacs"; + }; + + dconf.settings = { + "org/gnome/desktop/interface" = { + clock-show-weekday = true; + color-scheme = "prefer-dark"; + }; + "org/gnome/desktop/input-sources" = { + xkb-options = ["caps:escape"]; + }; + "org/gnome/desktop/wm/keybindings" = { + activate-window-menu = ["Menu"]; + switch-applications = ["<Super>Tab"]; + switch-applications-backward = ["<Shift><Super>Tab"]; + close = ["<Super>w"]; + minimize = ["<Shift><Alt>h"]; + move-to-workspace-1 = ["<Shift><Super>h" "<Shift><Super>Home"]; + move-to-workspace-last = ["<Shift><Super>l" "<Shift><Super>End"]; + move-to-workspace-left = ["<Shift><Super>j" "<Shift><Super>Page_Up"]; + move-to-workspace-right = ["<Shift><Super>k" "<Shift><Super>Page_Down"]; + switch-to-workspace-1 = ["<Super>h" "<Super>Home"]; + switch-to-workspace-last = ["<Super>l" "<Super>End"]; + switch-to-workspace-left = ["<Super>j" "<Super>Page_Up"]; + switch-to-workspace-right = ["<Super>k" "<Super>Page_Down"]; + switch-windows = ["<Alt>Tab"]; + switch-windows-backward = ["<Shift><Alt>Tab"]; + }; + "org/gnome/desktop/wm/preferences" = { + button-layout = "appmenu:minimize,maximize,close"; + #focus-mode = "click"; + #focus-new-window = "smart"; + }; + "org/gnome/settings-daemon/plugins/media-keys" = { + screensaver = ["<Shift><Alt>l"]; + custom-keybindings = [ + "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/" + "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/" + ]; + }; + "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = { + binding = "<Super>Return"; + command = "kgx"; + name = "Launch Terminal"; + }; + "org/gnome/shell/window-switcher" = { + current-workspace-only = false; + }; + }; + + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; +}