blob: 364ebf58d6149f41ddfa5098cf62c75f3331b205 (
plain)
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
|
{ config, lib, pkgs, inputs, ... }:
{
imports = [
./hardware.nix
./network.nix
../../core
../../roles
];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
environment.persistence."/persist/system" = {
hideMounts = true;
directories = [
"/etc/nixos"
"/var/log"
"/var/lib/nixos"
"/var/lib/systemd/coredump"
#"/var/lib/bluetooth"
];
files = [
"/etc/machine-id"
];
};
programs.fuse.userAllowOther = true;
time.timeZone = "America/Los_Angeles";
users.users = {
root.hashedPasswordFile = "/secrets/passwords/root";
"c" = {
isNormalUser = true;
hashedPasswordFile = "/secrets/passwords/c";
extraGroups = [ "wheel" ];
};
};
home-manager = {
extraSpecialArgs = { inherit inputs; };
users = {
"c" = import ./home.nix;
};
};
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"steam"
"steam-original"
"steam-run"
];
roles = {
desktop = {
enable = true;
videoDrivers = [ "amdgpu" ];
setupCommands = ''
if ${pkgs.xorg.xrandr}/bin/xrandr --query | grep 2560x1080; then
${pkgs.xorg.xrandr}/bin/xrandr --output DVI-D-0 --mode 1920x1080 --rate 60 --pos 0x0
${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-2 --mode 2560x1080 --rate 60 --pos 1920x0 --primary
${pkgs.xorg.xrandr}/bin/xrandr --output HDMI-A-0 --mode 1920x1080 --rate 75 --pos 4480x0
elif ${pkgs.xorg.xrandr}/bin/xrandr --query | grep 2560x1440; then
${pkgs.xorg.xrandr}/bin/xrandr --output DVI-D-0 --mode 1920x1080 --rate 60 --pos 0x360
${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-2 --mode 2560x1440 --rate 165 --pos 1920x0 --primary
${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-1 --mode 1920x1200 --rate 60 --pos 4480x0
fi
'';
};
};
programs = {
steam.enable = true;
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
dconf.enable = true;
};
services = {
pcscd.enable = true;
printing.enable = true;
hardware.openrgb.enable = true;
};
environment.systemPackages = with pkgs; [
(writeShellScriptBin "toys" "nix-shell -p cmatrix asciiquarium pipes cowsay figlet neofetch")
firefox
wineWowPackages.stable
winetricks
ffmpeg
jellyfin
go
jdk21
lutris
libGL
];
system.stateVersion = "23.11";
}
|