Skip to content

Commit 73a94e3

Browse files
committed
Create a configuration for laptops
1 parent 776e819 commit 73a94e3

File tree

11 files changed

+132
-61
lines changed

11 files changed

+132
-61
lines changed

Diff for: machines/base-workstation.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
# Enable exfat and ntfs for mounted drives
1010
# boot.extraModulePackages = [ config.boot.kernelPackages.exfat-nofuse ];
11-
boot.supportedFilesystems = [ "ntfs" ];
11+
boot.supportedFilesystems = [ "ntfs" "exfat" ];
1212

1313
# Timezone
1414
time.timeZone = "CET";

Diff for: machines/jwx1carbon/configuration.nix

-59
This file was deleted.
File renamed without changes.

Diff for: machines/thinkpadje/configuration.nix

+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
{ config, pkgs, lib,... }:
2+
3+
{
4+
# Channels
5+
#nix.nixPath = lib.mkDefault (lib.mkBefore [
6+
# "nixpkgs=https://nixos.org/channels/nixos-18.09"
7+
# "nixos-hardware=https://github.com/NixOS/nixos-hardware/archive/master.tar.gz"
8+
#]);
9+
10+
imports =
11+
[
12+
<nixos-hardware/lenovo/thinkpad/x1/6th-gen>
13+
../base-workstation.nix
14+
../../private/thinkpadje-wifi.nix
15+
16+
# Yubikey
17+
../../yubikey.nix
18+
19+
# Packages
20+
../../packages/user/common.nix
21+
../../packages/user/development.nix
22+
../../packages/docker.nix
23+
../../packages/user/fonts.nix
24+
../../packages/user/fish.nix
25+
../../packages/user/insync.nix
26+
../../packages/user/gnupg.nix
27+
../../packages/user/desktop/programs/kitty.nix
28+
../../packages/user/desktop/programs/toggl.nix
29+
30+
# Audio
31+
../../packages/audio.nix
32+
../../packages/user/desktop/programs/audio.nix
33+
34+
# Bluetooth
35+
../../packages/bluetooth.nix
36+
37+
# Xserver
38+
../../packages/xserver.nix
39+
../../packages/user/desktop/i3.nix
40+
./trackpad.nix
41+
42+
# Packages
43+
../../packages/user/common.nix
44+
../../packages/user/development.nix
45+
../../packages/user/fonts.nix
46+
../../packages/user/gnupg.nix
47+
48+
];
49+
50+
# Boot settings
51+
boot = {
52+
# Use latest kernel
53+
kernelPackages = pkgs.linuxPackages_latest;
54+
loader = {
55+
# Use the systemd-boot EFI boot loader.
56+
systemd-boot.enable = true;
57+
efi.canTouchEfiVariables = true;
58+
};
59+
};
60+
61+
# This value determines the NixOS release with which your
62+
# system is to be compatible, in order to avoid breaking
63+
# some software such as database servers. You should
64+
# change this only after NixOS release notes say you
65+
# should.
66+
system.stateVersion = "19.09";
67+
68+
# Networking
69+
networking = {
70+
hostName = "thinkpadje";
71+
wireless.enable = true;
72+
};
73+
74+
# Printing
75+
services.printing.enable = true;
76+
services.printing.drivers = [ pkgs.cups-bjnp pkgs.gutenprintBin ];
77+
78+
# ACPI
79+
services.acpid = {
80+
enable = true;
81+
};
82+
83+
# Update settings
84+
system.autoUpgrade.enable = true;
85+
time.hardwareClockInLocalTime = true;
86+
87+
# Power management
88+
environment.systemPackages = with pkgs; [
89+
powertop
90+
wpa_supplicant_gui
91+
];
92+
93+
# Overrides
94+
programs.fish = {
95+
shellInit = ''
96+
${builtins.readFile ../../packages/user/fish/work.fish }
97+
'';
98+
};
99+
100+
# Thinkpad x1 Backlight control via buttons
101+
programs.light.enable = true;
102+
services.actkbd = {
103+
enable = true;
104+
bindings = [
105+
{ keys = [ 224 ]; events = [ "key" ]; command = "/run/current-system/sw/bin/light -U 5"; } # Light -
106+
{ keys = [ 225 ]; events = [ "key" ]; command = "/run/current-system/sw/bin/light -A 5"; } # Light +
107+
];
108+
};
109+
}
File renamed without changes.

Diff for: packages/user/common.nix

+5
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,9 @@ in
1111
home-manager.users.${secrets.username}.home.packages = with pkgs; [
1212
keybase
1313
];
14+
15+
# Enable Keybase service
16+
services.keybase = {
17+
enable = true;
18+
};
1419
}

Diff for: packages/user/development.nix

+4
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,9 @@ in
2424

2525
# API
2626
unstable.postman
27+
28+
# Golang
29+
unstable.go
30+
gcc
2731
];
2832
}

Diff for: packages/user/fish/config.fish

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@ set -xg NPM_CONFIG_PREFIX $XDG_CONFIG_HOME/npm/global
1111
set PATH $NPM_CONFIG_PREFIX/bin $PATH
1212

1313
# TERMINAL
14-
set -xg TERMINAL xterm-color
14+
set -xg TERMINAL xterm-color
15+
16+
# GOLANG
17+
set -xg GOPATH $HOME/Projects/go

Diff for: packages/user/git.nix

+6
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ in
1212
push = { default = "current"; };
1313
pull = { rebase = true; };
1414
rebase = { autoStash = true; };
15+
"url \"[email protected]:\"" = { insteadOf = "https://bitbucket.org/"; };
16+
"url \"[email protected]:\"" = { insteadOf = "https://github.com/"; };
17+
};
18+
signing = {
19+
signByDefault = true;
20+
key = "3E5DD4E9B37115436F1F91E847C02FA6BCC1976D";
1521
};
1622
aliases = {
1723
co = "checkout";

Diff for: packages/user/gnupg.nix

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ in
88
enable = true;
99
defaultCacheTtlSsh = 28800;
1010
maxCacheTtlSsh = 28800;
11+
defaultCacheTtl = 28800;
12+
maxCacheTtl = 28800;
1113
enableSshSupport = true;
1214
};
1315
}

Diff for: yubikey.nix

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ in
2121
unstable.yubikey-personalization
2222
unstable.yubikey-personalization-gui
2323
unstable.yubioath-desktop
24+
unstable.yubikey-manager
2425
];
2526

2627
services.udev.packages = with pkgs; [

0 commit comments

Comments
 (0)