]> gitweb.ps.run Git - flake_thinkpad/blob - home-ps.nix
update
[flake_thinkpad] / home-ps.nix
1 { config, pkgs, lib, wallpaper, ... }:
2
3 let
4   theme = pkgs.qogir-theme.override { tweaks = [ "square" ]; };
5   markdownStyleHeader = pkgs.writeText "style.html" ''
6     <style type="text/css">
7     html{
8       margin:40px auto;
9       max-width:650px;
10       line-height:1.6;
11       font-size:18px;
12       color:#444;
13       background-color:#EEE;
14       padding:0 10px
15     }
16     @media (prefers-color-scheme: dark) {
17     html{
18       color:#CCC;
19       background-color:#333;
20     }
21     }
22     h1,h2,h3{line-height:1.2}
23     </style>
24   '';
25   markdownCaddyfile = pkgs.writeText "Caddyfile" ''
26     :8123
27
28     encode zstd gzip
29     templates
30     file_server browse {
31             root "/"
32             hide ".*"
33     }
34
35     @md <<CEL
36       {file}.endsWith(".md")
37       || {file}.endsWith(".MD")
38       CEL
39
40     header @md Content-Type "text/html; charset=UTF-8"
41     respond @md <<HTML
42             <!DOCTYPE html>
43             <html>
44                     <head>
45                             <title>{{ "{file.base}" }}</title>
46                             <link rel="stylesheet" href="https://sindresorhus.com/github-markdown-css/github-markdown.css">
47                             <style>
48                             .markdown-body {
49                                         box-sizing: border-box;
50                                         min-width: 200px;
51                                         max-width: 980px;
52                                         margin: 0 auto;
53                                         padding: 45px;
54                                 }
55                             </style>
56                     </head>
57                     <body class="markdown-body">
58                     {{
59                     markdown (include "{path}")
60                     }}
61                     </body>
62             </html>
63             HTML 200
64   '';
65 in
66 {
67   # Home Manager needs a bit of information about you and the paths it should
68   # manage.
69   home.username = "ps";
70   home.homeDirectory = "/home/ps";
71
72   services.xcape = {
73     enable = true;
74     mapExpression = {
75       Caps_Lock = "Escape";
76     };
77   };
78
79   systemd.user.services.markdownCaddy = {
80     Unit = {
81       Description = "Run a web server serving Markdown files.";
82       Wants = [ "network-online.target" ];
83       After = [ "network-online.target" ];
84     };
85     Install = {
86       WantedBy = [ "default.target" ];
87     };
88     Service = {
89       WorkingDirectory = "/";
90       ExecStart = "${pkgs.writeShellScript "markdown-caddy" ''
91         ${pkgs.caddy}/bin/caddy run --config ${markdownCaddyfile} --adapter caddyfile
92       ''}";
93     };
94   };
95   
96   xsession.windowManager.i3 = {
97     enable = true;
98     config = {
99       bars = [];
100       modifier = "Mod4";
101       terminal = "${pkgs.kitty}/bin/kitty";
102       gaps = { inner = 0; outer = 0; };
103       keybindings =
104         let
105           mod = config.xsession.windowManager.i3.config.modifier;
106           i3-next = pkgs.writers.writePython3 "i3-next" {} ''
107             import json
108             from subprocess import check_output
109
110             workspaces = json.loads(check_output(
111               ["${pkgs.i3}/bin/i3-msg",
112                "-t", "get_workspaces"]))
113
114             outputs = {}
115             activeOutput = ""
116             activeWorkspace = -1
117
118             for w in workspaces:
119                 output = w["output"]
120                 workspace = int(w["num"])
121                 if output not in outputs:
122                     outputs[output] = set()
123                 outputs[output].add(workspace)
124                 if w["focused"]:
125                     activeOutput = output
126                     activeWorkspace = workspace
127
128             workspacesSorted = sorted(outputs[activeOutput])
129             activeWorkspaceIndex = workspacesSorted.index(activeWorkspace)
130
131             if activeWorkspaceIndex < len(workspacesSorted) - 1:
132                 print(workspacesSorted[activeWorkspaceIndex + 1])
133             else:
134                 allWorkspaces = set()
135                 for o in outputs.values():
136                     allWorkspaces = allWorkspaces.union(o)
137                 allWorkspacesSorted = sorted(allWorkspaces)
138                 print(allWorkspacesSorted[-1]+1)
139           '';
140   
141           i3-empty = pkgs.writers.writePython3 "i3-empty" {} ''
142             import json
143             from subprocess import check_output
144
145             workspaces = json.loads(check_output(
146               ["${pkgs.i3}/bin/i3-msg",
147                "-t", "get_workspaces"]))
148
149             nextWorkspace = 1
150       
151             for w in workspaces:
152                 wNum = int(w["num"])
153                 if wNum >= nextWorkspace:
154                     nextWorkspace = wNum + 1
155
156             print(nextWorkspace)
157           '';
158           
159           i3-max = pkgs.writers.writePython3 "i3-max" {} ''
160             import json
161             from subprocess import check_output
162
163             workspaces = json.loads(check_output(
164               ["${pkgs.i3}/bin/i3-msg",
165                "-t", "get_workspaces"]))
166
167             result = "MAX"
168       
169             for w in workspaces:
170                 wName = w["name"]
171                 wFocused = w["focused"]
172                 if wName == "MAX" and wFocused:
173                     result = "back_and_forth"
174                     break
175
176             print(f"move window to workspace {result}; workspace {result}")
177           '';
178           i3-move-max = pkgs.writers.writePython3 "i3-move-max" {} ''
179             import json
180             from subprocess import check_output
181
182             workspaces = json.loads(check_output(
183               ["${pkgs.i3}/bin/i3-msg",
184                "-t", "get_workspaces"]))
185
186             result = "MAX"
187       
188             for w in workspaces:
189                 wName = w["name"]
190                 wFocused = w["focused"]
191                 if wName == "MAX" and wFocused:
192                     result = "back_and_forth"
193                     break
194
195             print(f"workspace {result}")
196           '';
197         in lib.mkOptionDefault
198           {
199             # "${mod}+d" = "exec --no-startup-id krunner";
200             # "${mod}+Shift+p" = "exec --no-startup-id set-wallpaper";
201             "${mod}+Shift+Return" = "exec --no-startup-id ${pkgs.kitty}/bin/kitty -d $(${pkgs.xcwd}/bin/xcwd)";
202             "${mod}+BackSpace" = "kill";
203             "${mod}+Prior" = "workspace prev_on_output";
204             "${mod}+Next" = "exec --no-startup-id i3-msg workspace number $(${i3-next})";
205             "${mod}+End" = "exec --no-startup-id i3-msg workspace $(${i3-empty})";
206             "${mod}+Shift+Prior" = "move container to workspace prev_on_output";
207             "${mod}+Shift+Next" = "exec --no-startup-id i3-msg move container to workspace number $(${i3-next})";
208             "${mod}+Shift+End" = "exec --no-startup-id i3-msg move container to workspace $(${i3-empty})";
209             "${mod}+Ctrl+Left" = "move workspace to output left";
210             "${mod}+Ctrl+Right" = "move workspace to output right";
211             "${mod}+y" = "exec --no-startup-id mirror-phone";
212             "${mod}+n" = "exec ${pkgs.kitty}/bin/kitty -d ~/sync/txt nvim -c 'autocmd VimEnter * ++once Telescope find_files'";
213             "${mod}+m" = "exec --no-startup-id i3-msg $(${i3-max})";
214             "${mod}+b" = "split toggle; layout tabbed";
215             "${mod}+Shift+m" = "exec --no-startup-id i3-msg $(${i3-move-max})";
216             "${mod}+Shift+p" = "exec --no-startup-id ${pkgs.autorandr}/bin/autorandr --match-edid -c -f";
217           };
218     };
219     extraConfig = ''
220       for_window [window_role="pop-up"] floating enable
221       for_window [window_role="task_dialog"] floating enable
222       for_window [workspace="9"] floating enable
223
224       for_window [class="kitty-popup"] floating enable
225       for_window [class="Xfce4-appfinder"] floating enable
226       for_window [class="yakuake"] floating enable
227       for_window [class="systemsettings"] floating enable
228       for_window [title="win7"] floating enable; border none
229       for_window [title="Arbeitsfläche.*"] kill, floating enable, border none
230
231       # class                 border  backgr. text    indicator child_border
232       client.focused          #000000bf #000000bf #e6ebef #000000bf   #000000bf
233       client.focused_inactive #00000080 #00000080 #e6ebef #00000080   #00000080
234       client.unfocused        #00000040 #00000040 #e6ebef #00000040   #00000040
235       client.urgent           #2f343a #900000 #e6ebef #900000   #2f343a
236       client.placeholder      #000000 #0c0c0c #e6ebef #000000   #0c0c0c
237
238       focus_follows_mouse no
239       mouse_warping none
240       popup_during_fullscreen all
241     '';
242   };
243
244   services.picom = {
245     enable = true;
246     vSync = true;
247     opacityRules = [
248       "0:_NET_WM_STATE@[*]:a = '_NET_WM_STATE_HIDDEN'"
249     ];
250   };
251
252   programs.git = {
253     userName = "patrick-scho";
254     userEmail = "patrick.schoenberger@posteo.de";
255     includes = [{ contents = {
256         user = {
257           email = "patrick.schoenberger@posteo.de";
258           name = "psch";
259         };
260     };}];
261   };
262
263   programs.bash = {
264     enable = true;
265     historySize = -1;
266     historyFileSize = -1;
267     shellAliases = {  
268       snrs = "sudo nixos-rebuild switch --flake /etc/nixos#default";
269       snrt = "sudo nixos-rebuild test --flake /etc/nixos#default";
270       snrb = "sudo nixos-rebuild boot --flake /etc/nixos#default";
271       senc = "sudo $EDITOR /etc/nixos/configuration.nix";
272       senh = "sudo $EDITOR /etc/nixos/home-ps.nix";
273       senhc = "sudo $EDITOR /etc/nixos/home-common.nix";
274       senf = "sudo $EDITOR /etc/nixos/flake.nix";
275       flakerun = "nix run --override-input nixpkgs nixpkgs";
276       n = "nvim";
277     };
278   };
279
280   programs.fzf = {
281     enable = true;
282     enableBashIntegration = true;
283   };
284
285   programs.readline = {
286     enable = true;
287     bindings = {
288       "\\e[A" = "history-search-backward";
289       "\\e[B" = "history-search-forward";
290     };
291   };
292
293   programs.kitty = {
294     enable = true;
295     themeFile = "Adapta_Nokto_Maia";
296     settings = {
297       # hide_window_decorations = "yes";
298       background_opacity = "0.98";
299       background_blur = "1";
300       confirm_os_window_close = "0";
301       enable_audio_bell = "no";
302       scrollback_pager_history_size = "1024";
303     };
304   };
305
306   home.file.".config/zls.json".text = ''
307     {
308       "enable_build_on_save": true,
309       "build_on_save_step": "check"
310     }
311   '';
312   
313   home.file.".config/vis/plugins/vis-lspc" = {
314     source = builtins.fetchGit {
315       url = "https://gitlab.com/muhq/vis-lspc.git";
316       rev = "e184eb6c971abfcd0dc7f836f402aae6c33a8d13";
317     };
318     recursive = true;
319   };
320   home.file.".config/vis/plugins/vis-commentary" = {
321     source = builtins.fetchGit {
322       url = "https://github.com/lutobler/vis-commentary.git";
323       rev = "0e06ed8212c12c6651cb078b822390094b396f08";
324     };
325     recursive = true;
326   };
327   home.file.".config/vis/visrc.lua".text = ''
328       require('vis')
329       require('plugins/vis-commentary')
330       lspc = require('plugins/vis-lspc')
331
332       lspc.menu_cmd = 'vis-menu'
333       lspc.fallback_dirname_as_root = true
334       lspc.ls_map.zig = {name='zls',cmd='zls',roots={'build.zig'}}
335     
336       vis.events.subscribe(vis.events.INIT, function()
337         -- Your global configuration options
338       end)
339
340       vis.events.subscribe(vis.events.WIN_OPEN, function(win) -- luacheck: no unused args
341         -- Your per window configuration options e.g.
342         vis:command('set number on')
343         vis:command('set autoindent')
344         vis:command('set tabwidth 4')
345         vis:command('set expandtab on')
346       end)
347     '';
348
349   programs.emacs = {
350     enable = true;
351     extraConfig = ''
352       (menu-bar-mode 1)
353       (tool-bar-mode 0)
354       (scroll-bar-mode 0)
355       (global-display-line-numbers-mode)
356       (setq-default
357         display-line-numbers-type 'relative
358         make-backup-files nil
359         inhibit-startup-screen t)
360       (load-theme 'tango-dark t)
361     '';
362     extraPackages = epkgs: [
363       epkgs.zig-mode
364       epkgs.lsp-mode
365     ];
366   };
367
368   programs.tmux = {
369     enable = true;
370     escapeTime = 0;
371     extraConfig = ''
372       set-option -g default-terminal screen-256color
373       set -g history-limit 10000
374       set -g base-index 1
375       set-option -g renumber-windows on
376       bind-key -n M-n new-window -c "#{pane_current_path}"
377       bind-key -n M-1 select-window -t :1
378       bind-key -n M-2 select-window -t :2
379       bind-key -n M-3 select-window -t :3
380       bind-key -n M-4 select-window -t :4
381       bind-key -n M-5 select-window -t :5
382       bind-key -n M-6 select-window -t :6
383       bind-key -n M-7 select-window -t :7
384       bind-key -n M-8 select-window -t :8
385       bind-key -n M-9 select-window -t :9
386       bind-key -n M-0 select-window -t :0
387       bind-key -n M-. select-window -n
388       bind-key -n M-, select-window -p
389       bind-key -n M-S-. swap-window -t +1
390       bind-key -n M-S-, swap-window -t -1
391       bind-key -n M-X confirm-before "kill-window"
392       bind-key -n M-v split-window -h -c "#{pane_current_path}"
393       bind-key -n M-b split-window -v -c "#{pane_current_path}"
394       bind-key -n M-R command-prompt -I "" "rename-window '%%'"
395       bind-key -n M-f resize-pane -Z
396       bind-key -n M-h select-pane -L
397       bind-key -n M-l select-pane -R
398       bind-key -n M-k select-pane -U
399       bind-key -n M-j select-pane -D
400       bind-key -n M-Left select-pane -L
401       bind-key -n M-Right select-pane -R
402       bind-key -n M-Up select-pane -U
403       bind-key -n M-Down select-pane -D
404       bind-key -n "M-H" run-shell 'old=`tmux display -p "#{pane_index}"`; tmux select-pane -L; tmux swap-pane -t $old'
405       bind-key -n "M-J" run-shell 'old=`tmux display -p "#{pane_index}"`; tmux select-pane -D; tmux swap-pane -t $old'
406       bind-key -n "M-K" run-shell 'old=`tmux display -p "#{pane_index}"`; tmux select-pane -U; tmux swap-pane -t $old'
407       bind-key -n "M-L" run-shell 'old=`tmux display -p "#{pane_index}"`; tmux select-pane -R; tmux swap-pane -t $old'
408       bind-key -n "M-S-Left" run-shell 'old=`tmux display -p "#{pane_index}"`; tmux select-pane -L; tmux swap-pane -t $old'
409       bind-key -n "M-S-Down" run-shell 'old=`tmux display -p "#{pane_index}"`; tmux select-pane -D; tmux swap-pane -t $old'
410       bind-key -n "M-S-Up" run-shell 'old=`tmux display -p "#{pane_index}"`; tmux select-pane -U; tmux swap-pane -t $old'
411       bind-key -n "M-S-Right" run-shell 'old=`tmux display -p "#{pane_index}"`; tmux select-pane -R; tmux swap-pane -t $old'
412       bind-key -n M-x confirm-before "kill-pane"
413       bind-key -n M-/ copy-mode
414
415       # Linux system clipboard
416       bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
417       bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "xclip -in -selection clipboard"
418
419       set -g mouse on
420       # set-option -g status-keys vi
421       # set-option -g set-titles on
422       # set-option -g set-titles-string 'tmux - #W'
423       # set -g bell-action any
424       # set-option -g visual-bell off
425       # set-option -g set-clipboard off
426       # setw -g mode-keys vi
427       # setw -g monitor-activity on
428       # set -g visual-activity on
429       # set -g status-style fg=colour15
430       # set -g status-justify centre
431       # set -g status-left ""
432       # set -g status-right ""
433       # set -g status-interval 1
434       # set -g message-style fg=colour0,bg=colour3
435       # setw -g window-status-bell-style fg=colour1
436       # setw -g window-status-current-style fg=yellow,bold
437       # setw -g window-status-style fg=colour250
438       # setw -g window-status-current-format ' #{?#{==:#W,#{b:SHELL}},#{b:pane_current_path},#W} '
439       # setw -g window-status-format ' #{?#{==:#W,#{b:SHELL}},#{b:pane_current_path},#W} '
440       # # For older tmux:
441       # #setw -g window-status-format ' #W '
442       # #setw -g window-status-current-format ' #W '
443     '';
444   };
445
446   programs.nushell = {
447     enable = true;
448     # for editing directly to config.nu 
449     extraConfig = ''
450       $env.config = {
451         show_banner: false,
452         completions: {
453           case_sensitive: false # case-sensitive completions
454           quick: true           # set to false to prevent auto-selecting completions
455           partial: true         # set to false to prevent partial filling of the prompt
456           algorithm: "fuzzy"    # prefix or fuzzy
457         }
458         hooks: {
459           command_not_found: { |cmd| (command-not-found $cmd | str trim)  }
460         }
461       } 
462     '';
463     #  shellAliases = {
464     #  vi = "hx";
465     #  vim = "hx";
466     #  nano = "hx";
467     # };
468   };  
469   # programs.carapace = {
470   #   enable = true;
471   #   enableNushellIntegration = true;
472   # };
473
474   # programs.starship = {
475   #   enable = true;
476   #   settings = {
477   #     add_newline = false;
478   #     character = { 
479   #       success_symbol = "[➜](bold green)";
480   #       error_symbol = "[➜](bold red)";
481   #     };
482   #   };
483   # };
484
485   programs.firefox = {
486     enable = true;
487     profiles = {
488       default = {
489         settings = {
490           "toolkit.legacyUserProfileCustomizations.stylesheets" = true;
491           "browser.fullscreen.autohide" = false;
492           "browser.toolbars.bookmarks.visibility" = "never";
493           "browser.tabs.inTitlebar" = 0;
494           "browser.compactmode.show" = true;
495           "browser.uidensity" = 1;
496         };
497         userChrome = ''
498         #TabsToolbar {
499           visibility: collapse !important;
500         }
501         '';
502       };
503       appmode = {
504         id = 1;
505         settings = {
506           "toolkit.legacyUserProfileCustomizations.stylesheets" = true;
507           "browser.fullscreen.autohide" = false;
508           "browser.toolbars.bookmarks.visibility" = "never";
509           "browser.tabs.inTitlebar" = 0;
510           "browser.compactmode.show" = true;
511           "browser.uidensity" = 1;
512         };
513         userChrome = ''
514         #TabsToolbar {
515           visibility: collapse !important;
516         }
517         #nav-bar {
518           visibility: collapse !important;
519         }
520         #navigator-toolbox {
521           border-bottom: none !important;
522         }
523         '';        
524       };
525     };
526   };
527
528   gtk.enable = true;
529   gtk.theme = {
530     package = theme;
531     name = "Qogir-Dark";
532   };
533   # programs.gnome-shell.theme = {
534   #   package = theme;
535   #   name = "Qogir-Dark";
536   # };
537   # gtk.iconTheme = {
538   #   package = pkgs.vimix-icon-theme;
539   #   name = "vimix-doder-dark";
540   # };
541   home.pointerCursor = {
542     gtk.enable = true;
543     x11.enable = true;
544
545     name = "volantes_light_cursors";
546     size = 24;
547     package = pkgs.volantes-cursors;
548   };
549
550   # This value determines the Home Manager release that your configuration is
551   # compatible with. This helps avoid breakage when a new Home Manager release
552   # introduces backwards incompatible changes.
553   #
554   # You should not change this value, even if you update Home Manager. If you do
555   # want to update the value, then make sure to first check the Home Manager
556   # release notes.
557   home.stateVersion = "24.05"; # Please read the comment before changing.
558
559   # The home.packages option allows you to install Nix packages into your
560   # environment.
561   home.packages = with pkgs; [
562     nixos-icons
563     spotify-player
564     prismlauncher
565     pandoc
566     ghidra
567     gnome-firmware
568     fzf bat delta silver-searcher ripgrep perl universal-ctags
569     rofi
570     # bintools
571     htop
572     unzip
573     rr wrk
574     clang-tools bear
575     linuxPackages_latest.perf
576     texliveFull
577     asciidoctor-with-extensions
578     emscripten
579     caddy
580     python3
581     qogir-icon-theme
582     volantes-cursors
583     xorg.xkill
584     lf nnn yazi
585     feh
586     xarchiver
587     tig lazygit gitui
588     thunderbird
589     aerc
590     libreoffice
591     gimp
592     guvcview
593     arandr
594     vial
595     ncdu
596     gnumake gcc
597     linux-wifi-hotspot
598     #esptool
599     picocom
600     wireshark
601     nil
602     bc
603     ffmpeg-full
604     sc-im visidata
605     localsend
606     vis
607     wineWowPackages.unstableFull winetricks
608     signal-desktop
609
610     # # It is sometimes useful to fine-tune packages, for example, by applying
611     # # overrides. You can do that directly here, just don't forget the
612     # # parentheses. Maybe you want to install Nerd Fonts with a limited number of
613     # # fonts?
614     # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
615
616     # # You can also create simple shell scripts directly inside your
617     # # configuration. For example, this adds a command 'my-hello' to your
618     # # environment:
619     # (pkgs.writeShellScriptBin "my-hello" ''
620     #   echo "Hello, ${config.home.username}!"
621     # '')
622     # $@ - Liste aller Parameter
623     # $* - String aller Parameter
624     # $# - Anzahl aller Parameter
625     # &> - stdout und stderr pipen
626     # '' - Literal
627     # "" - Expanded
628     # 
629     (pkgs.writeShellScriptBin "app" ''
630       ${pkgs.firefox}/bin/firefox -p appmode --new-window "$@"
631     '')
632     (pkgs.writeShellScriptBin "md" ''
633       file=$(mktemp --suffix=.html) && \
634       echo $file && \
635       ${pkgs.pandoc}/bin/pandoc -o $file $1 -s -H ${markdownStyleHeader} && \
636       app $file && \
637       rm $file
638     '')
639     (pkgs.writeShellScriptBin "run" ''
640       (nohup "$@" &>/dev/null &); sleep 0
641     '')
642     (pkgs.writeShellScriptBin "popup" ''
643       ${pkgs.kitty}/bin/kitty -o hide_window_decorations=yes -o background_opacity=0.5 \
644         --class kitty-popup -o remember_window_size=no \
645         -o initial_window_width=120c -o initial_window_height=40c \
646         "$@"
647     '')
648     (pkgs.writeShellScriptBin "fzfdir" ''
649       find "$1" -name "$2" | ${pkgs.fzf}/bin/fzf --layout=reverse
650     '')
651     (pkgs.writeShellScriptBin "file-app" ''
652       app localhost:8123
653     '')
654     (pkgs.writeShellScriptBin "run-popup" ''
655       popup bash -c 'file=$(compgen -c | grep -v fzf | sort -u | fzf --layout=reverse --print-query | tail -n 1) && run $file'
656     '')
657     (pkgs.writeShellScriptBin "set-wallpaper" ''
658       ${pkgs.feh}/bin/feh --bg-fill --no-fehbg ${wallpaper}
659     '')
660     (pkgs.writeShellScriptBin "mirror-phone" "IP=$(select-ip) && sudo scrcpy --tcpip=$IP --no-audio -K --kill-adb-on-close")
661     (pkgs.writeShellScriptBin "select-ip" ''
662       FILE=$HOME/.cache/select-ip.txt
663       IP=$( ${pkgs.rofi}/bin/rofi -dmenu -input $FILE -p IP ) || exit 1
664       echo $IP >> $FILE
665       gawk -i inplace 'FNR==1{delete a} !a[$0]++' $FILE
666       echo $IP
667     '')
668     (pkgs.writeShellScriptBin "create-repo" ''
669       ssh psch.dev sudo -u git git init --bare /srv/git/$1
670     '')
671   ];
672
673   # Home Manager is pretty good at managing dotfiles. The primary way to manage
674   # plain files is through 'home.file'.
675   home.file = {
676     # # Building this configuration will create a copy of 'dotfiles/screenrc' in
677     # # the Nix store. Activating the configuration will then make '~/.screenrc' a
678     # # symlink to the Nix store copy.
679     # ".screenrc".source = dotfiles/screenrc;
680
681     # # You can also set the file content immediately.
682     # ".gradle/gradle.properties".text = ''
683     #   org.gradle.console=verbose
684     #   org.gradle.daemon.idletimeout=3600000
685     # '';
686     ".background-image".source = wallpaper;
687   };
688
689   # Home Manager can also manage your environment variables through
690   # 'home.sessionVariables'. These will be explicitly sourced when using a
691   # shell provided by Home Manager. If you don't want to manage your shell
692   # through Home Manager then you have to manually source 'hm-session-vars.sh'
693   # located at either
694   #
695   #  ~/.nix-profile/etc/profile.d/hm-session-vars.sh
696   #
697   # or
698   #
699   #  ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
700   #
701   # or
702   #
703   #  /etc/profiles/per-user/ps/etc/profile.d/hm-session-vars.sh
704   #
705   home.sessionVariables = {
706     # EDITOR = "emacs";
707   };
708
709   # Let Home Manager install and manage itself.
710   programs.home-manager.enable = true;
711 }