about summary refs log tree commit diff
path: root/home/profiles/base/default.nix
blob: 3c838b980728cda4723dc9188df605c9f9f8330a (plain)
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
{ config, lib, inputs, pkgs, self, ... }:
let
  cfg = config.profiles.base;

  neotheme = config.neotheme;

  inherit (self.packages.x86_64-linux) neovim phocus;
in
{
  imports = [
    ../../modules/programs/nixpkgs
    ../../modules/programs/zshell
    ../../modules/misc/neotheme
  ];

  options.profiles.base.enable = lib.mkEnableOption
    "The base profile, should be always enabled";

  config = lib.mkIf cfg.enable {
    home.sessionVariables = rec {
      EDITOR = "nvim";
      VISUAL = "nvim";
      GIT_EDITOR = EDITOR;
    };

    gtk.enable = true;
    gtk.iconTheme.package = pkgs.papirus-icon-theme;
    gtk.iconTheme.name = "Papirus-Dark";
    gtk.theme.package = phocus;
    gtk.theme.name = "phocus";

    home.file.".icons/default".source = "${pkgs.vanilla-dmz}/share/icons/Vanilla-DMZ-AA";

    neotheme = {
      name = "Nightlamp Theme - Iceberg Variant";
      identifier = "nightlamp-iceberg";

      colors = {
        background = "18191f";
        foreground = "cbc0ab";
        alt0 = "404147";
        alt1 = "54555b";
        color0 = "222329";
        color1 = "b17f81";
        color2 = "8aa387";
        color3 = "d4ae80";
        color4 = "84a0c6";
        color5 = "a093c7";
        color6 = "7aacaa";
        color7 = "d0d0c7";
        bright0 = "36373d";
        bright1 = "c59395";
        bright2 = "9eb79b";
        bright3 = "e8c294";
        bright4 = "a2bee4";
        bright5 = "beb1e5";
        bright6 = "8ec0be";
        bright7 = "e4e4db";
      };

      wallpaper = "${inputs.wallpapers}/nixos/nix-glow-fg-d4ae80.png";
    };

    home.keyboard.layout = "us";
    home.packages = [
      pkgs.bottom
      pkgs.hydra-check
      pkgs.procs
      pkgs.sops
      neovim

      # Fonts
      pkgs.iosevka-pure-bin
      pkgs.dina-font
      pkgs.sarasa-gothic
      pkgs.scientifica
      pkgs.jetbrains-mono
      pkgs.twemoji-color-font
      pkgs.symbola
      pkgs.emacs-all-the-icons-fonts
      (pkgs.nerdfonts.override { fonts = [ "Iosevka" "JetBrainsMono" ]; })
    ];

    fonts.fontconfig.enable = true;


    wayland.windowManager.sway = {
      enable = true;

      config = {
        bars = [{ command = "${pkgs.waybar}/bin/waybar"; }];
        keybindings = { };
      };

      extraConfig = import ./config/sway.nix { inherit pkgs neotheme; };
    };

    programs = {
      bat.enable = true;
      direnv.enable = true;
      direnv.nix-direnv.enable = true;
      exa.enable = true;
      exa.enableAliases = true;
      home-manager.enable = true;
      htop.enable = true;

      foot = {
        enable = true;

        settings = import ./config/foot.nix { inherit neotheme; };
      };

      password-store.enable = true;

      waybar = {
        enable = config.wayland.windowManager.sway.enable;

        settings = [ (import ./config/waybar-settings.nix { inherit neotheme; }) ];

        style = import ./config/waybar-style.nix { inherit neotheme; };
      };

      zsh = {
        enable = true;

        enableCompletion = true;
        enableAutosuggestions = true;

        autocd = true;

        dotDir = ".config/zsh";

        plugins = [
          {
            name = "powerlevel10k";
            src = pkgs.zsh-powerlevel10k;
            file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
          }

          {
            name = "powerlevel10k-config";
            src = lib.cleanSource ./p10k-config;
            file = "p10k.zsh";
          }

          {
            name = "zsh-syntax-highlighting";
            src = pkgs.fetchFromGitHub {
              owner = "zsh-users";
              repo = "zsh-syntax-highlighting";
              rev = "0.7.1";
              sha256 = "03r6hpb5fy4yaakqm3lbf4xcvd408r44jgpv4lnzl9asp4sb9qc0";
            };
          }

          {
            name = "doas-zsh-plugin";
            src = pkgs.fetchFromGitHub {
              owner = "anatolykopyl";
              repo = "doas-zsh-plugin";
              rev = "17d0b55ca2acd12f7acc9e38c4ecaf413725be18";
              sha256 = "sha256-10rcF9cho9GuZCFQVIdFjvHCAlTLHNaLY4twxjT2jcE=";
            };
            file = "doas.plugin.zsh";
          }
        ];

        shellAliases = config.programs.zshell.aliases;
      };

      zshell.aliases = {
        e = "nvim";
      };

      zoxide = {
        enable = true;
        enableZshIntegration = true;
      };
    };

    services = {
      dunst = {
        enable = true;
        settings = import ./config/dunst.nix { inherit neotheme; };
      };

      wlsunset = {
        enable = true;
        latitude = "36.5";
        longitude = "127.2";
      };
    };

    nixpkgs.allowedUnfree = [ "symbola" ];
  };
}