-
Notifications
You must be signed in to change notification settings - Fork 0
/
configuration.nix
137 lines (123 loc) · 3.29 KB
/
configuration.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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
{ config, pkgs,lib,callPackage, ... }:
let
bahriyeApp = import /home/delirehberi/www/bahriye {inherit pkgs;};
telegram_api_key = builtins.readFile ./telegram.secret;
in
{
imports =
[
./hardware-configuration.nix
./packages.nix
./xserver.nix
./boot.nix
./network.nix
<home-manager/nixos>
];
nixpkgs.config = {
allowUnfree = true;
android_sdk.accept_license = true;
};
environment.etc."docker/daemon.json"= {
text=''{
"dns": ["10.0.0.2", "8.8.8.8"]
}'';
};
#console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz";
console.font = "Lat2-Terminus11";
console.keyMap = "trq";
i18n={
defaultLocale = "en_US.UTF-8";
};
time.timeZone = "Europe/Istanbul";
services.blueman.enable = true;
services.clamav.daemon.enable = true;
services.clamav.updater.enable = true;
fonts = {
enableFontDir = true;
enableGhostscriptFonts = true;
fonts = with pkgs; [
terminus_font
source-code-pro
ubuntu_font_family
inconsolata
fira-mono
font-awesome-ttf
];
};
# List packages installed in system profile. To search, run:
# $ nix search wget
services.gnome3.gnome-keyring.enable=true;
programs.tmux.enable = true;
virtualisation.docker.enable = true;
virtualisation.virtualbox ={
host = {
enable = true;
};
};
sound.enable = true;
sound.mediaKeys.enable = true;
users.users.delirehberi = {
isNormalUser = true;
extraGroups = [ "wheel" "docker" "networkmanager" "adbusers"]; # Enable ‘sudo’ for the user.
};
services.udev.packages = [pkgs.android-udev-rules];
home-manager.users.delirehberi = import ./delirehberi/home.nix;
nix ={
binaryCaches = [
"https://cache.nixos.org/"
"https://all-hies.cachix.org"
];
trustedUsers = [ "root" "delirehberi" ];
#gc.automatic = true;
optimise.automatic = true;
autoOptimiseStore = true;
};
programs.vim.defaultEditor = true;
programs.bash.shellAliases = {
cat="${pkgs.bat}/bin/bat";
};
programs.bash.interactiveShellInit = ''
if command -v ${pkgs.tmux}/bin/tmux &> /dev/null && [ -z "$TMUX" ]; then
${pkgs.tmux}/bin/tmux new
fi
'';
services.redshift = {
enable = false;
brightness = {
day = "1";
night = "0.5";
};
};
location = {
# Ankara City
latitude = 39.925533;
longitude = 32.866287;
};
programs.adb.enable = true; #android
services.cron = {
enable = true;
systemCronJobs = [
#"*/30 * * * * root speedtest --json > /home/delirehberi/speedtest-result/$(date|tr -d '\ +:-')\".st\""
];
};
systemd.user.services = {
dunst = {
script = "${pkgs.dunst}/bin/dunst";
wantedBy = ["default.target"];
};
bahriye = {
enable = true;
after = ["network.target" "sound.target"];
wantedBy = ["default.target"];
script = "${bahriyeApp}/bin/bahriye";
environment = {
API_KEY="${telegram_api_key}";
};
serviceConfig = {
"Restart" = "always";
"RestartSec"= 5;
};
};
};
system.stateVersion = "20.09"; # Did you read the comment?
}