forked from ryuga4/my-nixos-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configuration.nix
135 lines (119 loc) · 4.35 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
{ config, pkgs, ... }:
let
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz";
in
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
(import "${home-manager}/nixos")
./desktop/xserver.nix
./desktop/nvidia.nix
./desktop/64bit.nix
./desktop/games.nix
./desktop/programs.nix
(fetchTarball "https://github.com/msteen/nixos-vscode-server/tarball/master")
];
services.vscode-server.enable = true;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "nixos"; # Define your hostname.
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
networking.firewall.checkReversePath = "loose";
time.timeZone = "Europe/Warsaw";
i18n.defaultLocale = "pl_PL.UTF-8";
users.mutableUsers = false;
users.users.jankun = {
isNormalUser = true;
extraGroups = [ "networkmanager" "wheel" "sudo" "docker"]; # Enable ‘sudo’ for the user.
hashedPassword = "$6$KrwiYyPQDQC63BTb$I1kkwVvmDsT.yRqkMLR20i6GYdKAql0qFcrNGcGOmHlI7zU9iZdF21pDRw6CHS1V8w37IdrNf7pGO7.ooJ6rA.";
openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC9Ki+f7VsnlcohDCxOgvMi06KnABHymPqJZDiTmnU6H2Tp2UxMma6/wx+t9PkX6z+QkK+ReyAi8OvEJLxWmdRHHoyAVCNzxrs+yNDij7ByUdRCxKz2TCOwei3T8338nslLSIdGVgb9PshZQOcxO6Y1wPMpyPY9tTSEnWpUqv0k7bDOZXl/dW7K6bWGI1IlbM2JVW+i8YKGdQoZdRxbCW/X1DdrWT+QeoMvkhw36/RJ28DQKOirGdxtPpuWukRyFmahG5d+BX0vNY2x2JR0cwpAtFneKqo0qjAClC6N8KZt2nOUlUE/9zrmnu9ga/6IZc5nkrdKQzfIct6FCb8hAWN0o0UdlYN9PcoXgU32iW+6VLdqH7babKvGUImJqc8TvvThwpnEom3MrTXOU0tB1Ylg1fwJqDo1lgEDzwydtcLOGZv86gBpyrZ8kJ0LnfJ2I25jc+mK3nNFNTCYn4GReWSCl31AlFmxua4L7GSziJrZL9tueTWK7bRAtVJtAHOULnE= [email protected]" ];
shell = pkgs.zsh;
};
environment.systemPackages = with pkgs; [
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget
curl
git
gh
tmux
htop
lynx
emacs-nox
rnix-lsp
silver-searcher
tree
ranger
docker
docker-compose
oh-my-zsh
python310
openssl
protobuf
tailscale
gnumake
nasm
gcc
dasm
];
programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
services.openssh.enable = true;
system.stateVersion = "22.05"; # Did you read the comment?
nix = {
package = pkgs.nixFlakes;
extraOptions = ''
experimental-features = nix-command flakes
'';
settings.sandbox = false;
settings.substituters = [
"https://cache.iog.io" "https://iohk.cachix.org" "https://cache.nixos.org/"
];
settings.trusted-public-keys = [
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" "iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo=" "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
];
};
boot.loader.grub.device = "/dev/sda";
boot.initrd.checkJournalingFS = false;
services.tailscale.enable = true;
services.logrotate.checkConfig = false;
services.postgresql.enable = true;
services.postgresql.package = pkgs.postgresql_11;
environment.sessionVariables = {
EDITOR = "vim";
};
home-manager.users.jankun = {
programs.vim = {
enable = true;
plugins = with pkgs.vimPlugins; [vim-elixir vim-nix];
};
home.stateVersion = "22.05";
};
programs.zsh = {
enable = true;
autosuggestions.enable = true;
syntaxHighlighting.enable = true;
shellAliases.nsu = "NIXOS_INSTALL_BOOTLOADER=1 sudo --preserve-env=NIXOS_INSTALL_BOOTLOADER nixos-rebuild switch --upgrade";
ohMyZsh = {
enable = true;
plugins = [
"git"
"python"
"man"
"ag"
"aliases"
"ansible"
"sudo"
"history"
];
customPkgs = [
pkgs.zsh-autocomplete
];
theme = "awesomepanda";
};
};
virtualisation.docker.enable = true;
}