git.fiddlerwoaroof.com
Browse code

feat(nix): add nix config for my personal laptop

Edward Langley authored on 27/03/2022 03:26:19
Showing 2 changed files
... ...
@@ -1,4 +1,4 @@
1 1
 import (builtins.fetchTarball {
2 2
     url = https://github.com/fwoar-greenhouse/emacs-overlay/archive/master.tar.gz;
3
-    sha256 = "0s0mnqff56wdk6daxldkmcih9wfhv5v19723vfk2if9kq74bqv8r";
3
+    sha256 = "0s3im2pav1shhbjjlzy27vbkyjfr2ckgc2ap91xvw20p9h9fwd6v";
4 4
 })
5 5
new file mode 100644
... ...
@@ -0,0 +1,72 @@
1
+{
2
+  config,
3
+  pkgs,
4
+  ...
5
+}: let
6
+  libpng =
7
+    pkgs.libpng.overrideAttrs (_: {meta.outputsToInstall = _.outputs;});
8
+  username = "edwlan";
9
+  homeDirectory = "/Users/${username}";
10
+  dotfileDirectory = "${homeDirectory}/git_repos/dotfiles";
11
+
12
+  alejandra =
13
+    (import (builtins.fetchTarball {
14
+      url = "https://github.com/kamadorueda/alejandra/tarball/1.1.0";
15
+      sha256 = "0r8d4pllz3rar5b8xlk332mm395nj6w1zh6dnpbz7156fii4lhdy";
16
+    }))
17
+    # Pick one from: aarch64-darwin, aarch64-linux, i686-linux, x86_64-darwin, x86_64-linux
18
+    .aarch64-darwin;
19
+
20
+  # zsh = pkgs.zsh.overrideAttrs ({postInstall}: {postInstall = ''
21
+  #   make install.info install.html
22
+  #   '' + postInstall})
23
+
24
+  common_home =
25
+    import "${dotfileDirectory}/nix/common.nix" {inherit homeDirectory pkgs;};
26
+in {
27
+  nixpkgs.overlays = common_home.overlays;
28
+
29
+  ## Doesn't work???
30
+  #xdg.configFile."nixpkgs/overlays".source = ./elangley-overlay;
31
+
32
+  home.packages =
33
+    common_home.packages
34
+    ++ [
35
+      libpng
36
+      pkgs.libssh2
37
+      pkgs.openssl
38
+      pkgs.pandoc
39
+      alejandra
40
+      (pkgs.emacsGit.override {nativeComp = true;})
41
+    ];
42
+
43
+  programs = {
44
+    tmux = {
45
+      enable = true;
46
+      terminal = "screen-256color";
47
+      escapeTime = 0;
48
+      clock24 = true;
49
+      newSession = true;
50
+      keyMode = "vi";
51
+      extraConfig = builtins.readFile (dotfileDirectory + "/tmux.conf");
52
+    };
53
+  };
54
+
55
+  # Home Manager needs a bit of information about you and the
56
+  # paths it should manage.
57
+  home.username = username;
58
+  home.homeDirectory = homeDirectory;
59
+
60
+  # This value determines the Home Manager release that your
61
+  # configuration is compatible with. This helps avoid breakage
62
+  # when a new Home Manager release introduces backwards
63
+  # incompatible changes.
64
+  #
65
+  # You can update Home Manager without changing this value. See
66
+  # the Home Manager release notes for a list of state version
67
+  # changes in each release.
68
+  home.stateVersion = "22.05";
69
+
70
+  # Let Home Manager install and manage itself.
71
+  programs.home-manager.enable = true;
72
+}