home.nix (4981B)
1 { 2 config, 3 pkgs, 4 user, 5 homedir, 6 dotdir, 7 ... 8 }: 9 10 { 11 # Home Manager needs a bit of information about you and the paths it should 12 # manage. 13 home.username = user; 14 home.homeDirectory = homedir; 15 16 programs.git = { 17 enable = true; 18 userName = "Anders Hedman"; 19 userEmail = "anders.hedman01gmail.com"; 20 extraConfig = { 21 init = { 22 defaultBranch = "main"; 23 }; 24 }; 25 }; 26 27 # This value determines the Home Manager release that your configuration is 28 # compatible with. This helps avoid breakage when a new Home Manager release 29 # introduces backwards incompatible changes. 30 # 31 # You should not change this value, even if you update Home Manager. If you do 32 # want to update the value, then make sure to first check the Home Manager 33 # release notes. 34 home.stateVersion = "24.05"; # Please read the comment before changing. 35 36 # The home.packages option allows you to install Nix packages into your 37 # environment. 38 home.packages = with pkgs; [ 39 # # Adds the 'hello' command to your environment. It prints a friendly 40 # # "Hello, world!" when run. 41 # pkgs.hello 42 43 # # It is sometimes useful to fine-tune packages, for example, by applying 44 # # overrides. You can do that directly here, just don't forget the 45 # # parentheses. Maybe you want to install Nerd Fonts with a limited number of 46 # # fonts? 47 # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; }) 48 49 # # You can also create simple shell scripts directly inside your 50 # # configuration. For example, this adds a command 'my-hello' to your 51 # # environment: 52 # (pkgs.writeShellScriptBin "my-hello" '' 53 # echo "Hello, ${config.home.username}!" 54 # '') 55 nh 56 nixfmt-rfc-style 57 nixd 58 # nil 59 ]; 60 61 # Home Manager is pretty good at managing dotfiles. The primary way to manage 62 # plain files is through 'home.file'. 63 home.file = { 64 # # Building this configuration will create a copy of 'dotfiles/screenrc' in 65 # # the Nix store. Activating the configuration will then make '~/.screenrc' a 66 # # symlink to the Nix store copy. 67 # ".screenrc".source = dotfiles/screenrc; 68 69 # # You can also set the file content immediately. 70 # ".gradle/gradle.properties".text = '' 71 # org.gradle.console=verbose 72 # org.gradle.daemon.idletimeout=3600000 73 # ''; 74 ".doom.d".source = "${dotdir}/.doom.d"; 75 }; 76 77 # Home Manager can also manage your environment variables through 78 # 'home.sessionVariables'. These will be explicitly sourced when using a 79 # shell provided by Home Manager. If you don't want to manage your shell 80 # through Home Manager then you have to manually source 'hm-session-vars.sh' 81 # located at either 82 # 83 # ~/.nix-profile/etc/profile.d/hm-session-vars.sh 84 # 85 # or 86 # 87 # ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh 88 # 89 # or 90 # 91 # /etc/profiles/per-user/anders/etc/profile.d/hm-session-vars.sh 92 # 93 home.sessionVariables = { 94 # EDITOR = "emacs"; 95 }; 96 97 dconf.settings = { 98 "org/gnome/desktop/interface" = { 99 clock-show-weekday = true; 100 color-scheme = "prefer-dark"; 101 }; 102 "org/gnome/desktop/input-sources" = { 103 xkb-options = [ "caps:escape" ]; 104 }; 105 "org/gnome/desktop/wm/keybindings" = { 106 activate-window-menu = [ "Menu" ]; 107 switch-applications = [ "<Super>Tab" ]; 108 switch-applications-backward = [ "<Shift><Super>Tab" ]; 109 close = [ "<Super>w" ]; 110 minimize = [ "<Shift><Alt>h" ]; 111 move-to-workspace-1 = [ 112 "<Shift><Super>h" 113 "<Shift><Super>Home" 114 ]; 115 move-to-workspace-last = [ 116 "<Shift><Super>l" 117 "<Shift><Super>End" 118 ]; 119 move-to-workspace-left = [ 120 "<Shift><Super>j" 121 "<Shift><Super>Page_Up" 122 ]; 123 move-to-workspace-right = [ 124 "<Shift><Super>k" 125 "<Shift><Super>Page_Down" 126 ]; 127 switch-to-workspace-1 = [ 128 "<Super>h" 129 "<Super>Home" 130 ]; 131 switch-to-workspace-last = [ 132 "<Super>l" 133 "<Super>End" 134 ]; 135 switch-to-workspace-left = [ 136 "<Super>j" 137 "<Super>Page_Up" 138 ]; 139 switch-to-workspace-right = [ 140 "<Super>k" 141 "<Super>Page_Down" 142 ]; 143 switch-windows = [ "<Alt>Tab" ]; 144 switch-windows-backward = [ "<Shift><Alt>Tab" ]; 145 }; 146 "org/gnome/desktop/wm/preferences" = { 147 button-layout = "appmenu:minimize,maximize,close"; 148 #focus-mode = "click"; 149 #focus-new-window = "smart"; 150 }; 151 "org/gnome/settings-daemon/plugins/media-keys" = { 152 screensaver = [ "<Shift><Alt>l" ]; 153 custom-keybindings = [ 154 "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/" 155 "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/" 156 ]; 157 }; 158 "org/gnome/shell/window-switcher" = { 159 current-workspace-only = false; 160 }; 161 }; 162 163 # Let Home Manager install and manage itself. 164 programs.home-manager.enable = true; 165 }