/
default.nix
123 lines (101 loc) · 3.67 KB
/
default.nix
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
{ config, pkgs, ... }:
let
sources = import ../nix/sources.nix { };
unstable = import sources.nixos-unstable { config.allowUnfree = true; };
in {
nixpkgs.config.allowUnfree = true;
imports = [ # Include the results of the hardware scan.
./hardware-configuration.nix
../home-manager/nixos
("${sources.nixos-hardware}/apple/macbook-pro/12-1")
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "torch"; # Define your hostname.
networking.wireless.enable =
false; # Enables wireless support via wpa_supplicant.
# Set your time zone.
time.timeZone = "America/Chicago";
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
networking.networkmanager.enable = true;
networking.useDHCP = false;
networking.interfaces.wlp3s0.useDHCP = true;
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the GNOME 3 Desktop Environment.
services.xserver.desktopManager.gnome3.enable = true;
services.xserver.displayManager.gdm.enable = true;
# Enable CUPS to print documents.
# services.printing.enable = true;
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.brian = {
isNormalUser = true;
shell = pkgs.zsh;
# Enable ‘sudo’ for the user.
extraGroups = [ "wheel" "networkmanager" "video" ];
};
home-manager.users.brian = {
imports = [ ../dotfiles ];
home.packages = [
pkgs.wl-clipboard
unstable.chromium
unstable.obsidian
pkgs._1password-gui
pkgs.gnome3.nautilus
pkgs.gnome3.sushi
unstable.dropbox-cli
pkgs.gnomeExtensions.paperwm
pkgs.gnome3.gnome-tweak-tool
pkgs.alacritty
];
};
systemd.user.services.ssh-agent = {
enable = true;
wantedBy = [ "multi-user.target" ];
description = "SSH key agent";
documentation = [
"https://wiki.archlinux.org/index.php/SSH_keys#Start_ssh-agent_with_systemd_user"
];
environment = {
SSH_AUTH_SOCK = "%t/ssh-agent.socket";
DISPLAY = ":0";
};
script = "${pkgs.openssh}/bin/ssh-agent -D -a $SSH_AUTH_SOCK";
};
systemd.user.services.gammastep = {
enable = true;
description = "gammastep";
documentation = [ "https://gitlab.com/chinstrap/gammastep" ];
script = "${pkgs.gammastep}/bin/gammastep";
};
systemd.user.services.dropbox = {
# https://nixos.wiki/wiki/Dropbox
description = "Dropbox";
wantedBy = [ "graphical-session.target" ];
environment = {
QT_PLUGIN_PATH = "/run/current-system/sw/"
+ pkgs.qt5.qtbase.qtPluginPrefix;
QML2_IMPORT_PATH = "/run/current-system/sw/"
+ pkgs.qt5.qtbase.qtQmlPrefix;
};
serviceConfig = {
ExecStart = "${unstable.dropbox}/bin/dropbox";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
KillMode = "control-group"; # upstream recommends process
Restart = "on-failure";
PrivateTmp = true;
ProtectSystem = "full";
Nice = 10;
};
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It‘s perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "20.09"; # Did you read the comment?
}