summary refs log tree commit diff
path: root/host/RoryNix/configuration.nix
blob: a5dbf3bb7c874b95e1597edc67750388405e7450 (plain) (blame)
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
{ config, pkgs, lib, ... }:

{
  imports =
    [
#       ./hardware-configuration.nix
       ../../modules/packages/vim.nix
    ];

    boot = {
      kernelPackages = pkgs.linuxPackages_latest;
      loader = {
        grub = {
          enable = true;
          device = "/dev/sda"; # nodev for EFI only
          # EFI
          efiSupport = false;
          efiInstallAsRemovable = false;
        };
    };
    #readOnlyNixStore = false;
  };

  networking = {
    hostName = "RoryNix";
    networkmanager.enable = true;
    wireless.enable = false;
    firewall = {
      enable = false;
      # allowedTCPPorts = [ ... ];
      # allowedUDPPorts = [ ... ];
    };
  };

  time.timeZone = "Europe/Brussels";
  i18n.defaultLocale = "en_US.UTF-8";

  services = {
    xserver = {
      enable = true;
      videoDrivers = [ "intel" ];
      desktopManager.gnome.enable = true;
      libinput.enable = true;
      layout = "us";
      modules = [ pkgs.xorg.xf86videointel ];
    };
    gnome = {
      core-developer-tools.enable = false;
      core-utilities.enable = false;
      tracker-miners.enable = false;
      tracker.enable = false;
      sushi.enable = false;
      rygel.enable = false;
      gnome-user-share.enable = false;
      gnome-remote-desktop.enable = false;
      gnome-online-miners.enable = lib.mkForce false;
      gnome-online-accounts.enable = false;
      gnome-initial-setup.enable = false;
      gnome-browser-connector.enable = false;
      games.enable = false;
      evolution-data-server.enable = lib.mkForce false;
      at-spi2-core.enable = lib.mkForce false;
    };
    printing.enable = false;
    openssh = {
      enable = true;
      extraConfig = ''
        MaxAuthTries 32
        '';
    };	
    pipewire = {
      enable = true;
      audio.enable = true;
      pulse.enable = true;
      wireplumber.enable = true;
      jack.enable = true;
      alsa.enable = true;
    };
  };


  sound.enable = true;
  hardware.pulseaudio.enable = false;

  users.users = {
    Rory = {
      isNormalUser = true;
      extraGroups = [ "wheel" ];
      packages = with pkgs; [
        #gimp-with-plugins

        #xterm
        gnomeExtensions.vitals
        gnomeExtensions.runcat
      ];
      initialPassword = "password";
    };
  };

  environment.systemPackages = with pkgs; [
    wget
    neofetch
    lnav
    pciutils
    git
    lsd
    duf
    htop
    btop
    udisks
    gparted
    kitty.terminfo
    glxinfo
    jq
    yq
    pv
    dig
    cloud-utils
    sshfs
    cinnamon.nemo
    firefox-bin

    #epiphany
    gnome-console
    feh
    # Various extensions...
    # - Gnome
    #gnomeExtensions.vitals
    #gnomeExtensions.runcat
    #  - Dont work on gnome 43:
    #gnomeExtensions.undecorate
    #gnomeExtensions.inactivity
    #gnomeExtensions.left-clock
    # - Vim
    vimPlugins.vim-nix
    # - zsh
    zsh
    zsh-powerlevel10k
    zsh-nix-shell
    zsh-you-should-use
    zsh-syntax-highlighting
    zsh-completions
    
  ];
  fonts.fonts = with pkgs; [
    (nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
  ];
  nix = {
    settings = {
      experimental-features = [ "nix-command" "flakes" ];
      auto-optimise-store = true;
    };
  };
  nixpkgs = {
    config.allowUnfree = true;
  };
  security = {
    polkit.enable = true;
    sudo.wheelNeedsPassword = false;
  };

  nix = {
    distributedBuilds = true;

    buildMachines = [
      #"self" = {
      #  
      #};
      {
        systems = [ "x86_64-linux" "i686-linux" ];
        hostName = "192.168.0.3";
        sshUser = "Rory";
        sshKey = "/home/Rory/.ssh/id_ed25519";
        maxJobs = 6;
        #cores = 2;
        speedFactor = 43200;
      }
    ];
    #buildersUseSubstitutes = true;
    #ssh://Rory@192.168.0.3 x86_64-linux,i686-linux /home/Rory/.ssh/id_ed25519 12 1 - - -
    #registry.nixpkgs.flake = pkgs;
    nixPath = [ "nixpkgs=flake:nixpkgs" ];

    settings.trusted-substituters = [
      "https://nix-community.cachix.org"
      "https://cache.garnix.io"
      "https://numtide.cachix.org"
    ];
    settings.trusted-public-keys = [
      "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
      "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
      "numtide.cachix.org-1:2ps1kLBUWjxIneOy1Ik6cQjb41X0iXVXeHigGmycPPE="
    ];

  };
  
  system.stateVersion = "22.11"; # DO NOT EDIT!
}