This repository has been archived by the owner on Nov 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathniximg.nix
94 lines (85 loc) · 2.47 KB
/
niximg.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
{ config, lib, pkgs, ... }:
with lib; {
home-manager.useUserPackages = true;
isoImage.edition = "gnome";
# Whitelist wheel users to do anything
# This is useful for things like pkexec
#
# WARNING: this is dangerous for systems
# outside the installation-cd and shouldn't
# be used anywhere else.
security.polkit.extraConfig = ''
polkit.addRule(function(action, subject) {
if (subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
});
'';
networking.wireless.enable = mkForce false;
services.xserver.displayManager = {
gdm = {
# autoSuspend makes the machine automatically suspend after inactivity.
# It's possible someone could/try to ssh'd into the machine and obviously
# have issues because it's inactive.
# See:
# * https://github.com/NixOS/nixpkgs/pull/63790
# * https://gitlab.gnome.org/GNOME/gnome-control-center/issues/22
autoSuspend = false;
};
autoLogin = {
enable = true;
user = "nixos";
};
};
x-os = {
enable = true;
isoMode = true;
hostname = "niximg";
# Use SJTU Mirror together with original cache because SJTU has better performance inside Mainland China.
# Use Cachix to reduce repeated builds.
# Set the list to `[ ]` to use official cache only.
binaryCaches = [
"https://mirror.sjtu.edu.cn/nix-channels/store"
"https://cache.nixos.org/"
"https://dcompass.cachix.org/"
"https://lexuge.cachix.org/"
"https://dram.cachix.org"
];
# Choose ibus engines to apply
ibus-engines = with pkgs.ibus-engines; [ libpinyin ];
# Add installation script into LiveCD.
extraPackages = [
(pkgs.writeShellScriptBin "install-script"
(builtins.readFile ./install.sh))
];
};
std.interface = {
system = { dirs = { secrets.clash = "${./secrets/clash.yaml}"; }; };
};
# Networking
netkit = {
clash = {
enable = true;
redirPort = 7892; # This must be the same with the one in your clash.yaml
afterUnits = [ "dcompass.service" ];
};
};
# User related section.
users.users.nixos.shell = pkgs.zsh;
ash-profile.nixos = {
extraPackages = with pkgs; [
htop
firefox-wayland
tdesktop
gparted
etcher
# torbrowser
pavucontrol
];
emacsPackages = with pkgs; [
(hunspellWithDicts [ hunspellDicts.en-us hunspellDicts.en-us-large ])
emacs-all-the-icons-fonts
ash-emacs-x86_64-linux
];
};
}