summaryrefslogtreecommitdiff
path: root/modules/home/christian.nix
blob: 2942916e165cc8111d50946d2fa0a9ec261e1221 (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
{
  config,
  pkgs,
  inputs,
  lib,
  ...
}:
{
  imports = [ ./nvim ];

  options.custom.xmobarBattery = lib.mkEnableOption "xmobar battery widget";

  config = {
    home.stateVersion = "25.11";

    home.packages = with pkgs; [
      (dmenu.override {
        conf = ./dmenu/config.h;
      })
      nixfmt
    ];

    programs.alacritty = {
      enable = true;
      settings = {
        font.size = 8;
        selection.save_to_clipboard = true;
        mouse.bindings = [
          {
            mouse = "Right";
            action = "Paste";
          }
        ];
      };
    };

    programs.bash.enable = true;

    programs.ssh = {
      enable = true;
      matchBlocks = {
        "myserver" = {
          hostname = "192.168.0.111";
        };
      };
    };

    programs.git = {
      enable = true;
      settings.user.name = "Christian";
      settings.user.email = "[email protected]";
      settings.init.defaultBranch = "main";
    };

    programs.direnv = {
      enable = true;
      enableBashIntegration = true;
      nix-direnv.enable = true;
      silent = true;
    };

    programs.firefox = {
      enable = true;
      policies = {
        OverrideFirstRunPage = "";
        DisableFirefoxAccounts = true;
        FirefoxHome = {
          SponsoredTopSites = false;
          Stories = false;
        };
      };
      profiles.christian = {
        name = "Christian";
        isDefault = true;
        settings = {
          "browser.aboutConfig.showWarning" = false;
          "extensions.autoDisableScopes" = 0;
          "browser.theme.content-theme" = 0;
          "browser.theme.toolbar-theme" = 0;
        };
        extensions.packages = with inputs.nur.legacyPackages.x86_64-linux.repos.rycee.firefox-addons; [
          ublock-origin
        ];
      };
    };

    programs.xmobar = {
      enable = true;
      extraConfig = ''
        -- vim: set ft=haskell:
        Config
          { font        = "Monospace"
          , borderColor = "#d0d0d0"
          , border      = FullB
          , borderWidth = 1
          , bgColor     = "#222"
          , fgColor     = "grey"
          , position    = TopH 30
          , commands    =
              [ Run Cpu ["-t", "cpu: <fc=#4eb4fa><bar> <total>%</fc>"] 10
              , Run Network "wlan0" ["-S", "True", "-t", "wlan: <fc=#4eb4fa><rx></fc>/<fc=#4eb4fa><tx></fc>"] 10
              , Run Memory ["-t","mem: <fc=#4eb4fa><usedbar> <usedratio>%</fc>"] 10
              , Run Date "date: <fc=#4eb4fa>%a %d %b %Y %I:%M:%S %p </fc>" "date" 10
              ${lib.optionalString config.custom.xmobarBattery ''
                , Run Battery
                  ["-t", "bat: <leftbar> <left> <watts>",
                   "-L", "10", "-H", "80", "-S", "True",
                   "-l", "red", "-n", "#4eb4fa", "-h", "green",
                   "--",
                   "-L", "-15", "-H", "-5",
                   "-l", "red", "-m", "#4eb4fa", "-h", "green"]
                  600
              ''}
              ]
          , sepChar     = "%"
          , alignSep    = "}{"
          , template    = "  ${lib.optionalString config.custom.xmobarBattery "%battery% | "}%cpu% | %memory% | %wlan0%  }{%date%  "
          }
      '';
    };

    programs.home-manager.enable = true;
  };
}