~nerosnm/nixos

ref: 5e8ca05386e71f26b036d39a20147974ca7537d3 nixos/home/soren/default.nix -rw-r--r-- 3.2 KiB
5e8ca053Søren Mortensen Set up gpg-agent and Yubikey on Eltanin too 8 months ago
                                                                                
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
{ config, pkgs, lib, ... }:

{
  imports = [
    <home-manager/nixos>
  ];

  nixpkgs.config.allowUnfree = true;

  # List packages installed in system profile. To search, run:
  # $ nix search wget
  environment.systemPackages = with pkgs; [];

  # Time zone and localization settings
  time.timeZone = "Europe/London";
  i18n.defaultLocale = "en_US.UTF-8";
  console.font = "Lat2-Terminus16";
  console.keyMap = "us";

  # Set up the user
  users.users.soren = {
    isNormalUser = true;
    home = "/home/soren";
    shell = pkgs.fish;
    description = "Søren Mortensen";
    extraGroups = [ "wheel" ];
    openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDGr+SokOk+ummGzTgHPVe+Us6QDMI3Rj3DMDy7N2BTR" ];
  };

  # Set up home-manager user-specific config
  home-manager.users.soren = { pkgs, ... }: {
    imports = [
      ../../program/editor/neovim
      ../../program/terminal/fish
      ../../program/terminal/tmux
    ];

    nixpkgs.config.allowUnfree = true;

    nixpkgs.overlays = [
      (self: super: {
        nerdfonts = super.nerdfonts.override {
          fonts = [
            "IBMPlexMono"
            "Iosevka"
          ];
        };
      })

      (self: super: {
        neovim-unwrapped = super.neovim-unwrapped.overrideAttrs (oldAttrs: {
          version = "master";
          src = builtins.fetchGit {
            url = https://github.com/neovim/neovim.git;
          };
          nativeBuildInputs = super.neovim-unwrapped.nativeBuildInputs ++ [ super.tree-sitter ];
        });
      })
    ];

    home.packages = with pkgs; [
      # General terminal tools
      tmux
      tmuxPlugins.onedark-theme
      starship
      xclip
      thefuck
      zoxide
      direnv
      exa bat sd dust fd ripgrep procs hyperfine zenith
      fzf
      neofetch
      asciiquarium

      # Development tools
      neovim-unwrapped
      rustup
      nodejs
      yarn
      gnumake
      clang
      binutils
      coreutils
      pciutils
      pijul

      # Fonts
      nerdfonts

      # GUI apps
      firefox-wayland
      spotify
      discord
      vlc
      obs-studio
      zoom-us
      slack
      thunderbird
      birdtray

      # Games
      multimc

      # Utilities
      gnome3.gnome-tweak-tool
      speedtest-cli
      spotify-cli-linux
      xkcdpass

      # Camera
      gphoto2
      ffmpeg

      yubikey-personalization
    ];

    programs.git = {
      enable = true;
      userName = "Søren Mortensen";
      userEmail = "soren@neros.dev";

      aliases = {
        hist = "log --graph --pretty=format:'%C(magenta)%h%Creset - %G?%C(red)%d%Creset %s %C(dim green)(%cr) %C(cyan)<%an>%Creset' --abbrev-commit";
      };

      extraConfig = {
        core = {
          editor = "nvim";
        };

        user = {
          signingKey = "535312F23EADCB793F27D20FB67C8BD37A888A98";
        };

        commit = {
          gpgSign = true;
        };

        pull = {
          rebase = true;
        };

        rerere = {
          enabled = true;
        };

        diff = {
          tool = "vimdiff3";
        };

        difftool.vimdiff3 = {
          path = "nvim";
        };
      };
    };

    programs.firefox.extensions = with pkgs.nur.repos.rycee.firefox-addons; [
      ublock-origin
      1password
    ];
  };

}