-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdefault.nix
113 lines (104 loc) · 3.57 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
{
config,
lib,
nixpkgs,
...
}: {
options = {
ui.fontSize = lib.mkOption {type = lib.types.ints.positive;};
ui.timezone = lib.mkOption {type = lib.types.str;};
};
config = {
environment.systemPackages = [
nixpkgs.bluez
(nixpkgs.writeShellScriptBin "bluetooth" ''
exec ${nixpkgs.bluez}/bin/bluetoothctl "$@"
'')
nixpkgs.nautilus
(nixpkgs.writeShellScriptBin "files" ''
exec ${nixpkgs.nautilus}/bin/nautilus "$@"
'')
nixpkgs.eog
(nixpkgs.writeShellScriptBin "images" ''
exec ${nixpkgs.eog}/bin/eog "$@"
'')
(nixpkgs.writeShellScriptBin "screen"
(builtins.readFile ./screen.sh))
nixpkgs.gnome-screenshot
(nixpkgs.writeShellScriptBin "screenshot" ''
exec ${nixpkgs.gnome-screenshot}/bin/gnome-screenshot "$@"
'')
nixpkgs.pavucontrol
(nixpkgs.writeShellScriptBin "sound" ''
exec ${nixpkgs.pavucontrol}/bin/pavucontrol "$@"
'')
];
fonts.enableDefaultPackages = false;
fonts.fontconfig.defaultFonts.emoji = [
"Twitter Color Emoji"
"Noto Color Emoji"
];
fonts.fontconfig.defaultFonts.monospace = ["Fira Code"];
fonts.fontconfig.defaultFonts.sansSerif = ["Fira Code"];
fonts.fontconfig.defaultFonts.serif = ["Fira Code"];
fonts.fontconfig.enable = true;
fonts.fontDir.enable = true;
fonts.packages = [
nixpkgs.dejavu_fonts
nixpkgs.freefont_ttf
nixpkgs.gyre-fonts # TrueType substitutes for standard PostScript fonts
nixpkgs.liberation_ttf
nixpkgs.unifont
nixpkgs.noto-fonts-emoji
nixpkgs.twitter-color-emoji
nixpkgs.fira-code
];
home-manager.users.${config.wellKnown.username} = {
gtk.enable = true;
gtk.font.name = "monospace";
gtk.font.size = config.ui.fontSize;
xdg.enable = true;
xdg.userDirs.createDirectories = true;
xdg.userDirs.desktop = "/data/xdg/desktop";
xdg.userDirs.documents = "/data/xdg/documents";
xdg.userDirs.download = "/data/xdg/downloads";
xdg.userDirs.enable = true;
xdg.userDirs.music = "/data/xdg/music";
xdg.userDirs.pictures = "/data/xdg/pictures";
xdg.userDirs.publicShare = "/data/xdg/public-share";
xdg.userDirs.templates = "/data/xdg/templates";
xdg.userDirs.videos = "/data/xdg/videos";
};
programs.dconf.enable = true;
services.displayManager.autoLogin.enable = true;
services.displayManager.autoLogin.user = config.wellKnown.username;
services.displayManager.defaultSession = "none+i3";
services.gnome.gnome-keyring.enable = true;
services.libinput.enable = true;
services.libinput.touchpad.naturalScrolling = true;
services.libinput.touchpad.scrollMethod = "twofinger";
services.libinput.touchpad.tapping = true;
services.xserver.enable = true;
services.xserver.exportConfiguration = true;
services.xserver.windowManager.i3.configFile = builtins.toFile "i3.conf" ''
set $font 'monospace'
set $fontSize ${builtins.toString config.ui.fontSize}
set $i3status_conf ${./i3status.conf}
font pango:$font $fontSize
include ${./i3.conf}
'';
services.xserver.windowManager.i3.enable = true;
services.xserver.windowManager.i3.extraPackages = [
nixpkgs.dmenu
nixpkgs.i3lock
nixpkgs.i3status
];
services.xserver.xkb.layout = "us";
services.xserver.xkb.variant = "altgr-intl";
time.timeZone = config.ui.timezone;
xdg.mime.addedAssociations = {
# "application/pdf" = "brave-browser.desktop";
};
xdg.mime.enable = true;
};
}