This commit is contained in:
illustris 2023-02-25 02:07:50 +05:30
parent 37f9aa58ac
commit 16c21e9faa
Signed by: illustris
GPG Key ID: 56C8FC0B899FEFA3
5 changed files with 144 additions and 191 deletions

View File

@ -1,19 +1,9 @@
{ config, pkgs, ... }:
let
ghKeys = builtins.fetchurl {
sha256 = "sha256:189ah8yyqgjvlsi2hydk94jrra97jj7hpxr805bzkif05jp2ivai";
url = "https://github.com/illustris.keys";
};
in
{ config, pkgs, lib, ... }:
{
nixpkgs.overlays = [
];
imports = [
./hardware-configuration.nix
./desktop-configuration.nix
./hardware-configuration.nix
./networking-configuration.nix
./modules
];
@ -38,94 +28,60 @@ in
zfs.devNodes = "/dev/disk/by-partuuid";
};
time.timeZone = "Asia/Kolkata";
networking = {
hostId = "f86b2fa7";
hostName = "desktop";
networkmanager.enable = true;
};
security.sudo.wheelNeedsPassword = false;
users.users = {
illustris = {
isNormalUser = true;
extraGroups = [ "wheel" "docker" "tty" "adb" "libvirtd" ];
openssh.authorizedKeys.keyFiles = [ ghKeys ];
};
root.openssh.authorizedKeys.keyFiles = [ ghKeys ];
};
environment = {
etc.nixpkgs.source = pkgs.path;
systemPackages = with pkgs; [
asciinema
arandr
bind
binutils-unwrapped
bmon
bind binutils-unwrapped bmon
cmatrix # More useful than you might think
#ec2_api_tools
ethtool
expect
fatrace
file
gdb
git
gnumake
#graphviz
cscope
ethtool expect
fatrace file
gdb git gnumake
htop
#imagemagick
iotop
iperf
iotop iperf
jq
killall
latencytop
linuxPackages.perf
lsof
latencytop linuxPackages.perf lsof
mosh
ncdu
neofetch
nethogs
networkmanager
nfs-utils
nix-du
nix-top
nix-prefetch-git
nix-tree
ncdu neofetch nethogs networkmanager nfs-utils
nix-du nix-top nix-prefetch-git nix-tree
nnn
p7zip
pciutils
powertop
pv
python3
python3Packages.percol
openvpn
p7zip pciutils powertop pv
python3 python3Packages.percol
ranger
screen
sshfs
surf
sysstat
tmate
tmux
tree
unzip
usbutils
screen sshfs surf sysstat
tmate tmux tree
unzip usbutils
valgrind
#virt-manager
wget
youtube-dl
(cscope.override{emacsSupport = false;})
#(emacs.override{withGTK3 = false; withX = false;})
(pass.withExtensions (exts: [ exts.pass-otp ]))
((pkgs.callPackage ./packages/passcol) { })
(writeScriptBin "vpnpass" (builtins.readFile ./scripts/vpnpass))
];
etc = {
nixpkgs.source = pkgs.path;
};
# for ZFS
networking.hostId = "f86b2fa7";
nix = {
nixPath = [ "nixpkgs=${pkgs.path}" ];
settings = {
auto-optimise-store = true;
experimental-features = [ "nix-command" "flakes" ];
trusted-users = [ "root" "illustris" ];
};
};
# TODO: make a mergable option
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"nvidia-persistenced" "nvidia-settings" "nvidia-x11"
"steam" "steam-original" "steam-run"
"zerotierone"
];
programs = {
adb.enable = true;
bash = {
@ -156,29 +112,48 @@ in
enable = true;
pinentryFlavor = "curses";
};
mosh.enable = true;
mtr.enable = true;
ssh.startAgent = true;
};
security.sudo.wheelNeedsPassword = false;
services = {
zfs.autoScrub.enable = true;
flatpak.enable = true;
gnome.gnome-keyring.enable = true;
ntp.enable = true;
openssh = {
enable = true;
settings.X11Forwarding = true;
};
qemuGuest.enable = true;
resolved.enable = true;
udev = {
packages = [ (pkgs.callPackage (import ./packages/xr-hardware/default.nix) {}) ];
# TODO: check if still needed
extraRules = ''
SUBSYSTEM=="virtio-ports", ATTR{name}=="org.qemu.guest_agent.0", TAG+="systemd" ENV{SYSTEMD_WANTS}="qemu-guest-agent.service"
'';
packages = [ (pkgs.callPackage (import ./packages/xr-hardware/default.nix) {}) ];
};
ntp.enable = true;
zerotierone.enable = true;
flatpak.enable = true;
gnome.gnome-keyring.enable = true;
qemuGuest.enable = true;
resolved.enable = true;
zfs.autoScrub.enable = true;
};
time.timeZone = "Asia/Kolkata";
users.users = let
ghKeys = pkgs.fetchurl {
hash = "sha256-Ue0orizAxflXASj3C4+UJ6mcJUmzeSiipls+7D2CKqE=";
url = "https://github.com/illustris.keys";
};
in {
illustris = {
extraGroups = [ "adb" "docker" "libvirtd" "tty" "wheel" ];
isNormalUser = true;
openssh.authorizedKeys.keyFiles = [ ghKeys ];
};
root.openssh.authorizedKeys.keyFiles = [ ghKeys ];
};
virtualisation = {
@ -191,26 +166,8 @@ in
libvirtd.enable = true;
};
networking.firewall.enable = false;
nix = {
extraOptions = ''
experimental-features = nix-command flakes
'';
nixPath = [ "nixpkgs=${pkgs.path}" ];
settings = {
trusted-users = [ "root" "illustris" ];
auto-optimise-store = true;
};
};
xdg.portal.enable = true;
# In case of emergency, bash glass
#systemd.tmpfiles.rules = [
# "L /bin/bash - - - - /run/current-system/sw/bin/bash"
#];
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave

View File

@ -1,46 +1,89 @@
{ config, pkgs, ... }:
{ config, pkgs, lib, ... }:
{
nixpkgs.overlays = [
(import ./overlays/suckless/st-overlay.nix)
#(import ./overlays/suckless/surf-overlay.nix)
# (import ./overlays/suckless/surf-overlay.nix)
(import ./overlays/suckless/dwm-overlay.nix)
];
environment.systemPackages = with pkgs; [
arandr
# blender
dmenu
dunst
emacs
firefox
flutter
gimp
gnome.gnome-screenshot
guake
insomnia
# kcachegrind
libnotify
mpv
obs-studio
okular
# openhmd
pavucontrol
remmina
perlPackages.AppClusterSSH
signal-desktop
scrot
st
sunshine
# surf
sxiv
virt-manager
vlc
wireshark
x11vnc
# zoom-us
];
fonts.fonts = with pkgs; [
(nerdfonts.override { fonts = [ "DroidSansMono" ]; })
];
systemd.user.services.sunshine = {
script = "sunshine";
path = [ pkgs.sunshine ];
hardware.pulseaudio = {
daemon.config.default-sample-channels = 6;
enable = false;
# extraConfig = ''
# load-module module-simple-protocol-tcp rate=48000 format=s16le channels=2 source=alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor record=true port=8888
# '';
package = pkgs.pulseaudioFull;
# tcp = {
# enable = true;
# };
};
networking.firewall.allowedTCPPorts = [ 4713 8888 ];
programs.steam.enable = true;
security.rtkit.enable = true;
services = {
xserver = {
enable = true;
displayManager.defaultSession = "none+dwm";
windowManager.dwm.enable = true;
videoDrivers = [ "nvidia" ];
dpi = 100;
#defaultDepth = 30;
};
blueman.enable = true;
picom = {
backend = "glx";
# backend = "xr_glx_hybrid";
enable = true;
vSync = true;
#backend = "xr_glx_hybrid";
backend = "glx";
};
blueman.enable = true;
pipewire = {
xserver = {
# defaultDepth = 30;
displayManager.defaultSession = "none+dwm";
dpi = 100;
enable = true;
videoDrivers = [ "nvidia" ];
windowManager.dwm.enable = true;
};
pipewire = {
alsa = {
enable = true;
support32Bit = true;
};
pulse.enable = true;
jack.enable = true;
socketActivation = true;
config.pipewire = {
#"context.properties" = {
# "link.max-buffers" = 16;
@ -83,62 +126,15 @@
# { name = "libpipewire-module-session-manager"; }
#];
};
enable = true;
jack.enable = true;
pulse.enable = true;
socketActivation = true;
};
};
nixpkgs.config.allowUnfree = true;
programs.steam.enable = true;
environment.systemPackages = with pkgs; [
emacs
st
dmenu
mpv
pavucontrol
sublime3
perlPackages.AppClusterSSH
x11vnc
#kcachegrind
remmina
insomnia
vlc
virt-manager
# openhmd
gimp
firefox
#obs-studio
signal-desktop
sxiv
scrot
#(libsForQt5.callPackage (import ./packages/rescuetime/default.nix) {})
#surf
gnome.gnome-screenshot
# blender
wireshark
flutter
obs-studio
dunst
libnotify
zoom-us
guake
okular
sunshine
];
security.rtkit.enable = true;
hardware.pulseaudio = {
enable = false;
daemon.config.default-sample-channels = 6;
package = pkgs.pulseaudioFull;
#extraConfig = ''
# load-module module-simple-protocol-tcp rate=48000 format=s16le channels=2 source=alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor record=true port=8888
#'';
#tcp = {
# enable = true;
#};
systemd.user.services.sunshine = {
path = [ pkgs.sunshine ];
script = "sunshine";
};
networking.firewall.allowedTCPPorts = [ 4713 8888 ];
}

View File

@ -2,6 +2,5 @@
{
imports = [
./chromium
./openvpn
];
}
}

View File

@ -1,8 +0,0 @@
{ pkgs, ... }:
{
environment = {
systemPackages = with pkgs; [openvpn];
etc.openvpn.source = "${pkgs.update-resolv-conf}/libexec/openvpn";
};
}

View File

@ -0,0 +1,9 @@
{ ... }:
{
networking = {
firewall.enable = false;
hostName = "desktop";
networkmanager.enable = true;
};
services.zerotierone.enable = true;
}