summary refs log tree commit diff stats
path: root/compiler/vmops.nim
Commit message (Expand)AuthorAgeFilesLines
* compiler API: final cleanups; improve security by diabling 'gorge' and friendsAndreas Rumpf2018-05-291-11/+12
* more modules compile againAndreas Rumpf2018-05-121-9/+7
* introduce nkTupleConstr AST node for unary tuple construction; breaking changeAndreas Rumpf2018-04-131-2/+2
* Added a few useful os calls to VM (#7440)genotrance2018-04-121-19/+29
* getEnv now supports a 'default' parameter; refs #6019Andreas Rumpf2017-10-301-1/+6
* Fixes #6336 (#6337)Yuriy Glukhov2017-09-061-2/+10
* added system.gorgeEx that includes the exitCode; refs #4874; fixes #1994Araq2017-01-071-0/+6
* stdlib and compiler don't use .immediate anymoreAndreas Rumpf2016-07-291-8/+8
* Add ``readFile`` implementation for nimvmAnatoly Galiulin2016-04-131-31/+37
* os.walkDir is available at compile timeAraq2015-11-101-1/+9
* VM produces objects.Yuriy Glukhov2015-09-051-1/+1
* system.locals is now a plugin for educationAraq2015-04-241-1/+1
* Happy new year!Guillaume Gelin2015-01-061-1/+1
* fixes #1473Araq2014-11-121-0/+5
* system.writeFile works at compile-timeAraq2014-10-021-0/+9
* VM supports math and a few os procsAraq2014-08-301-0/+66
cludes/common.nix?id=921200a6490cc87af4e5e1ad955ef3cce75fa3d3'>921200a ^
e94febc ^



a434298 ^
1b2afd4 ^


6e26ca0 ^



a434298 ^
c3cdf61 ^
a434298 ^
55f6449 ^
a434298 ^
a434298 ^

a6ebfc0 ^
a434298 ^
a3574e7 ^
a434298 ^
de38da5 ^
a434298 ^



8919b21 ^
de38da5 ^
6e26ca0 ^
a434298 ^

de38da5 ^
a434298 ^
c3cdf61 ^
a434298 ^
9d2676b ^
a434298 ^
c3cdf61 ^

461bfa6 ^
10cfeb3 ^
fff37a6 ^
921200a ^
a434298 ^


921200a ^
97d6fc0 ^
a434298 ^
f65bef6 ^
a901cda ^
a434298 ^
de38da5 ^
6bc9ad7 ^
a434298 ^
c7b4a93 ^
6bc9ad7 ^
c948d00 ^
1e899de ^
a434298 ^

5bb688d ^


ae0681a ^
5bb688d ^







95bc01f ^
a8545ba ^
95bc01f ^

5bb688d ^


a901cda ^














831de5f ^
a434298 ^
6869016 ^




1fcff74 ^



1fcff74 ^
27615ba ^
1fcff74 ^



59dbe88 ^


1fcff74 ^
b21c058 ^













1fcff74 ^











c835ffa ^







2980c42 ^
c835ffa ^
95bc01f ^



c835ffa ^





b21c058 ^


c835ffa ^













b21c058 ^

c835ffa ^
95bc01f ^











c835ffa ^







55f6449 ^



95bc01f ^
55f6449 ^

95bc01f ^

55f6449 ^

95bc01f ^
55f6449 ^






95bc01f ^
b21c058 ^

55f6449 ^




95bc01f ^



55f6449 ^




95bc01f ^





55f6449 ^


95bc01f ^


55f6449 ^
55f6449 ^



13c65cb ^
95bc01f ^


55f6449 ^

























a434298 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328





         
   

                                                                                      
                                   





                                            
 

                                                                      
 









                                     

                                                               



                                       



                                             



                            
                              


       



                            
          
         
        
                 
              

           
      
          
        
      
        



          
        
             
          

         
                
            
       
        
             
            

                       
                  
       
        
        


           
        
              
            
               
        
         
       
         
       
        
 
                             
                  

    


                                           
             







                          
                    
                            

                              


      














                                 
 
                             




                                  



                    
                         
                                                    



                                                  


                                                    
       













                                                          











                          







                                 
                
       



                                               





                               


                              













                                

                                          
        











                                     







                                           



                              
                                                                                   

                  

                                                                                            

                         
                                                                                                     






                                                                                
                                                                                      

                                                                 




                                                        



                          




                               





                                                              


                       


                                             
        



                       
                                  


                         

























                                                       
 
{
  config,
  lib,
  pkgs,
  ...
}:
let
  hcr = pkgs.callPackage ./scripts/hm-changes-report.nix { inherit config pkgs; };
  scr = pkgs.callPackage ./scripts/system-changes-report.nix { inherit config pkgs; };
  unstable = import <unstable> { };
in
{
  imports = [
    ./zsh.nix
    <sops-nix/modules/home-manager/sops.nix>
  ];

  nixpkgs.config.allowUnfreePredicate =
    pkg: builtins.elem (lib.getName pkg) [ "aspell-dict-en-science" ];

  nix = {
    package = pkgs.nix;
    settings = {
      extra-experimental-features = [
        "nix-command"
        "flakes"
      ];
    };
  };

  sops = {
    age.keyFile = "${config.xdg.configHome}/sops/age/keys.txt";
    defaultSopsFile = builtins.path {
      path = ./../../secrets/home.yaml;
      name = "home-secrets.yaml";
    };
    secrets."ssh_config/oci" = { };
    secrets."git_email_config/default" = { };
  };

  home.sessionVariables = {
    LSP_USE_PLISTS = "true";
  };

  home.packages = with pkgs; [
    hcr
    scr

    aspell
    aspellDicts.en
    aspellDicts.en-computers
    aspellDicts.en-science
    bottom
    broot
    curl
    diff-so-fancy
    difftastic
    duf
    du-dust
    ea
    elinks
    entr
    fd
    file
    fzf
    git
    gnupg
    gopass
    htop
    inetutils
    ispell
    isync
    jq
    libqalculate
    lscolors
    lsd
    lynx
    mercurial
    nix-info
    nix-prefetch-git
    nix-prefetch-github
    nixpkgs-review
    nvd
    pass
    rage
    ripgrep
    rlwrap
    sd
    sops
    ssh-to-age
    tealdeer
    tre-command
    tree
    ugrep
    uni
    unzip
    w3m
    zstd

    unstable.nixfmt-rfc-style
    unstable.wcurl
  ];

  programs.bat = {
    enable = true;
    extraPackages = with pkgs.bat-extras; [
      batdiff
      batgrep
      batman
      batwatch
      batpipe
    ];
    config = {
      style = "full";
      pager = "less -RXF";
      map-syntax = [
        ".ignore:Git Ignore"
        "*.jenkinsfile:Groovy"
      ];
    };
  };

  programs.eza = {
    enable = true;
    git = true;
    icons = true;
    extraOptions = [
      "--colour=auto"
      "--long"
      "--group-directories-first"
      "--classify"
      "--no-user"
      "--no-time"
      "--no-filesize"
      "--no-permissions"
    ];
  };

  programs.gpg.enable = true;
  programs.nix-index = {
    enable = true;
    enableZshIntegration = false;
    enableBashIntegration = false;
  };

  programs.vim = {
    enable = true;
    extraConfig = ''
      colorscheme molokai
      " highlight doesn't work properly without this
      syntax enable
      highlight Normal ctermfg=white ctermbg=black
      set hlsearch
      set showmatch
      set pastetoggle=<F2>
      nmap <silent> <F3> :silent nohlsearch<CR>
      imap <silent> <F3> <C-o>:silent nohlsearch<CR>
    '';
    plugins = [
      pkgs.vimPlugins.sensible
      pkgs.vimPlugins.auto-pairs
      pkgs.vimPlugins.ctrlp
      pkgs.vimPlugins.editorconfig-vim
      pkgs.vimPlugins.inkpot
      pkgs.vimPlugins.molokai
      pkgs.vimPlugins.surround
      pkgs.vimPlugins.vim-lastplace
      pkgs.vimPlugins.vim-nix
      pkgs.vimPlugins.vim-pasta
      pkgs.vimPlugins.vim-repeat
      pkgs.vimPlugins.vim-sexp-mappings-for-regular-people
      pkgs.vimPlugins.vim-sleuth
    ];
    settings = {
      background = "dark";
      copyindent = true;
      expandtab = true;
      ignorecase = true;
      number = true;
      shiftwidth = 4;
      smartcase = true;
      tabstop = 4;
    };
  };

  programs.ssh = {
    enable = true;
    extraConfig = ''
      Host *
        AddKeysToAgent yes
        IgnoreUnknown UseKeychain
        UseKeychain yes
        User djm
    '';
    includes = [
      "~/.ssh/config_local"
      config.sops.secrets."ssh_config/oci".path
    ];
    matchBlocks = {
      "djm.ovh" = {
        hostname = "v.djm.ovh";
        port = 2222;
      };
      "devio" = {
        hostname = "devio.us";
        user = "deejayem";
        port = 2222;
      };
      "sdf" = {
        hostname = "sdf.org";
        user = "deejayem";
      };
      "sdfeu" = {
        hostname = "sdf-eu.org";
        user = "deejayem";
      };
      "grex" = {
        hostname = "grex.org";
        user = "deejayem";
      };
      "blinkenshell" = {
        hostname = "ssh.blinkenshell.org";
        port = 2222;
      };
      "hashbang" = {
        hostname = "de1.hashbang.sh";
      };
      "tilde.institute" = {
        hostname = "tilde.institute";
      };
      "tilde.team" = {
        hostname = "tilde.team";
      };
      "ctrl-c.club" = {
        hostname = "ctrl-c.club";
      };
      "github.com" = {
        hostname = "github.com";
        user = "git";
        identityFile = "~/.ssh/id_ed25519";
        identitiesOnly = true;
      };
    };
  };

  programs.git = {
    enable = true;
    userName = "David Morgan";
    includes = [ { path = config.sops.secrets."git_email_config/default".path; } ];
    aliases = {
      # difftastic
      logt = "!sh -c 'GIT_EXTERNAL_DIFF=\"difft --background=dark\" git log -p --ext-diff'";
      showt = "!show() { GIT_EXTERNAL_DIFF=difft git show \${1} --ext-diff; }; show";
      difft = "difftool";
      # "raw" output
      rlog = "!git -c delta.raw=true -c core.pager=${pkgs.less}/bin/less log"; # usually used with -p
      rshow = "!git -c delta.raw=true -c core.pager=${pkgs.less}/bin/less show";
      rdiff = "!git -c delta.raw=true -c core.pager=${pkgs.less}/bin/less diff";
      #  copiable output (without line numbers or +/- indicators)
      clog = "!git -c delta.line-numbers=false log"; # usually used with -p
      cshow = "!git -c delta.line-numbers=false show";
      cdiff = "!git -c delta.line-numbers=false diff";
      # diff-so-fancy
      flog = ''!git -c core.pager="diff-so-fancy | less" log''; # usually used with -p
      fshow = ''!git -c core.pager="diff-so-fancy | less" show'';
      fdiff = ''!git -c core.pager="diff-so-fancy | less" diff'';

      upstream = "!git push -u origin HEAD";
      update-master = "!git fetch origin master:master";
      update-main = "!git fetch origin main:main";
    };
    attributes = [
      "*.el diff=elisp"
      "*.clj diff=clojure"
    ];
    extraConfig = {
      core.editor = "vim";
      diff = {
        tool = "difftastic";
        colorMoved = "default";
        elisp = {
          xfuncname = "^\\((((def\\S+)|use-package)\\s+\\S+)";
        };
        clojure = {
          xfuncname = "^\\((def\\S+\\s+\\S+)";
        };
      };
      difftool = {
        prompt = false;
        difftastic = {
          cmd = ''difft "$LOCAL" "$REMOTE"'';
        };
      };
      pull = {
        ff = "only";
        rebase = false;
      };
      push.autoSetupRemote = true;
      rebase = {
        autostash = true;
      };
    };
    delta = {
      enable = true;
      options = {
        line-numbers = true;
        navigate = true;
        light = false;
        file-style = "bold yellow ul";
        hunk-header-line-number-style = "brightyellow";
      };
    };
    ignores = [
      ".lein-repl-history"
      ".lsp"
      ".rebel_readline_history"
      ".cider-repl-history"
      "nohup.out"
      "*.elc"
      "*.eln"
      "*~"
    ];
    signing = {
      key = "9B436B1477A879C26CDB6604C171251002C200F2";
      signByDefault = true;
    };
  };
}