forked from ilude/nix-black-magic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configuration.nix
72 lines (61 loc) · 1.5 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
{ config, lib, pkgs, ... }:
{
system.stateVersion = "23.11";
boot.kernelPackages = pkgs.linuxPackages_latest;
# disable ipv6
networking.enableIPv6 = false;
imports = [
<nixpkgs/nixos/modules/profiles/qemu-guest.nix>
];
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
autoResize = true;
fsType = "ext4";
};
boot.kernelParams = ["console=ttyS0"];
boot.loader.grub.device = lib.mkDefault "/dev/vda";
boot.loader.timeout = 1;
#nixpkgs.config.allowUnfree = true;
users = {
defaultUserShell = pkgs.zsh;
users.ilude = {
isNormalUser = true;
extraGroups = [ "wheel" "docker" "users" ];
shell = pkgs.zsh;
password = "";
};
};
services.getty.autologinUser = "ilude";
system.userActivationScripts = {
createZshrcFile = {
text = ''
if [ ! -f "$HOME/.zshrc" ]; then
touch "$HOME/.zshrc"
fi
'';
};
};
programs = {
# needed for vscode remote ssh
nix-ld.enable = true;
zsh = {
enable = true;
autosuggestions.enable = true;
zsh-autoenv.enable = false;
syntaxHighlighting.enable = true;
};
};
security.sudo.wheelNeedsPassword = false;
environment = {
shells = [ pkgs.zsh pkgs.bash ];
shellAliases = {
l = "ls -lhA --color=auto --group-directories-first";
nix-gc = "nix-store --gc";
nix-rs = "sudo nixos-rebuild switch";
sdn = "sudo shutdown -h now";
};
systemPackages = with pkgs; [
python310
];
};
}