module moving mostly done

This commit is contained in:
Gerg-L 2023-02-21 22:30:10 -05:00
parent a9de747c25
commit e78a971b9b
33 changed files with 455 additions and 447 deletions

View file

@ -1,72 +0,0 @@
_: {
lib,
pkgs,
...
}: {
#use a better tty
services.kmscon = {
enable = true;
hwRender = true;
extraConfig = ''
font-size=10
'';
fonts = [
{
name = "Overpass Mono";
package = pkgs.overpass;
}
{
name = "OverpassMono Nerd Font";
package =
pkgs.nerdfonts.override
{
fonts = ["Overpass"];
};
}
{
name = "Material Design Icons";
package = pkgs.material-design-icons;
}
];
};
systemd.services = {
"autovt@tty1".enable = false;
"kmsconvt@tty1".enable = false;
};
networking = {
firewall = {
enable = true;
allowPing = true;
};
networkmanager.enable = true;
};
#enable ssh
programs = {
mtr.enable = true; #ping and traceroute
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
};
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "yes";
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
};
#time settings
time.timeZone = "America/New_York";
services = {
timesyncd = {
enable = true;
servers = [
"time.cloudflare.com"
];
};
};
i18n.defaultLocale = "en_US.UTF-8";
}

View file

@ -57,7 +57,6 @@
modules = [
(import ./modules inputs)
(import ./common.nix inputs)
(import ./systems/gerg-desktop inputs)
{
nixpkgs.overlays = [
@ -78,7 +77,6 @@
};
modules = [
(import ./modules inputs)
(import ./common.nix inputs)
(import ./systems/game-laptop inputs)
];
};
@ -93,7 +91,6 @@
};
modules = [
(import ./modules inputs)
(import ./common.nix inputs)
(import ./systems/mom-laptop inputs)
];
};

View file

@ -1,4 +1,5 @@
_: {pkgs, ...}: {
#use a better tty
services.kmscon = {
enable = true;
hwRender = true;
@ -24,6 +25,11 @@ _: {pkgs, ...}: {
}
];
};
systemd.services = {
"autovt@tty1".enable = false;
"kmsconvt@tty1".enable = false;
};
fonts = {
fonts = with pkgs; [
overpass

View file

@ -1,41 +0,0 @@
_: {
services.picom = {
enable = true;
backend = "glx";
shadow = false;
shadowOpacity = 0.5;
vSync = false;
settings = {
blur = false;
shadow-radius = 12;
frame-opacity = 1.0;
inactive-opacity-override = false;
corner-radius = 12;
rounded-corners-exclude = [
"window_type = 'desktop'"
"window_type = 'tooltip'"
];
mark-wmwin-focused = true;
mark-ovredir-focused = true;
detect-rounded-corners = true;
detect-client-opacity = true;
detect-transient = true;
use-damage = true;
log-level = "warn";
wintypes = {
tooltip = {
fade = true;
shadow = false;
opacity = 1.0;
focus = true;
full-shadow = false;
};
dock = {shadow = true;};
dnd = {shadow = true;};
popup_menu = {opacity = 1.0;};
dropdown_menu = {opacity = 1.0;};
};
};
};
}

View file

@ -6,6 +6,7 @@
#put:
#source /run/current-system/sw/share/nix-direnv/direnvrc
#in ~/.direnvrc
#do i need to do this^?
environment = {
systemPackages = [
pkgs.dash
@ -38,7 +39,7 @@
nix-boot = "nixos-rebuild boot --use-remote-sudo";
nix-clean = "nix-collect-garbage -d";
nix-gc-force = "rm /nix/var/nix/gcroots/auto/*";
nix-gc-check = "sudo nix-store --gc --print-roots | egrep -v \"^(/nix/var|/run/\w+-system|\{memory|/proc)\"";
nix-gc-check = "nix-store --gc --print-roots | egrep -v \"^(/nix/var|/run/\w+-system|\{memory|/proc)\"";
#vim stuff
vi = "nvim";
vim = "nvim";

View file

@ -7,13 +7,14 @@
...
}:
with lib; let
cfg = config.localModules.dwm;
cfg = config.localModules.DE.dwm;
in {
options.localModules.dwm = {
options.localModules.DE.dwm = {
enable = mkEnableOption "";
};
config = mkIf cfg.enable {
services.gvfs.enable = true;
environment.systemPackages = [suckless.packages.${pkgs.system}.dmenu];
services.xserver = {
enable = true;
@ -23,7 +24,7 @@ in {
};
displayManager = {
sessionCommands = ''
feh --bg-scale ${self + /misc/recursion.png}
${pkgs.feh}/bin/feh --bg-scale ${self + /misc/recursion.png}
'';
defaultSession = "none+dwm";
};

View file

@ -6,9 +6,9 @@ _: {
...
}:
with lib; let
cfg = config.localModules.gnome;
cfg = config.localModules.DE.gnome;
in {
options.localModules.gnome = {
options.localModules.DE.gnome = {
enable = mkEnableOption "";
};
config = mkIf cfg.enable {

View file

@ -5,9 +5,9 @@ _: {
...
}:
with lib; let
cfg = config.localModules.xfce;
cfg = config.localModules.DE.xfce;
in {
options.localModules.xfce = {
options.localModules.DE.xfce = {
enable = mkEnableOption "";
};
config = mkIf cfg.enable {

View file

@ -6,12 +6,10 @@ _: {
...
}:
with lib; let
cfg = config.localModules.autoLogin;
cfg = config.localModules.DM.autoLogin;
in {
options.localModules.autoLogin = {
enable = mkEnableOption "";
};
config = mkIf cfg.enable {
options.localModules.DM.autoLogin = mkEnableOption "";
config = mkIf cfg {
services.xserver.displayManager = {
autoLogin = {
enable = true;

View file

@ -7,9 +7,9 @@ _: {
...
}:
with lib; let
cfg = config.localModules.lightdm;
cfg = config.localModules.DM.lightdm;
in {
options.localModules.lightdm = {
options.localModules.DM.lightdm = {
enable = mkEnableOption "";
};
config = mkIf cfg.enable {

124
modules/X11.nix Normal file
View file

@ -0,0 +1,124 @@
_: {
config,
pkgs,
options,
lib,
...
}:
with lib; let
cfg = config.localModules.X11Programs;
in {
options.localModules.X11Programs = {
picom.enable = mkEnableOption "";
sxhkd.enable = mkEnableOption "";
};
config = mkMerge [
{
services.xserver = {
exportConfiguration = true;
layout = "us";
libinput.enable = true;
xautolock.enable = false;
excludePackages = [pkgs.xterm];
};
}
(
mkIf cfg.picom.enable {
services.picom = {
enable = true;
backend = "glx";
shadow = false;
shadowOpacity = 0.5;
vSync = false;
settings = {
blur = false;
shadow-radius = 12;
frame-opacity = 1.0;
inactive-opacity-override = false;
corner-radius = 12;
rounded-corners-exclude = [
"window_type = 'desktop'"
"window_type = 'tooltip'"
];
mark-wmwin-focused = true;
mark-ovredir-focused = true;
detect-rounded-corners = true;
detect-client-opacity = true;
detect-transient = true;
use-damage = true;
log-level = "warn";
wintypes = {
tooltip = {
fade = true;
shadow = false;
opacity = 1.0;
focus = true;
full-shadow = false;
};
dock = {shadow = true;};
dnd = {shadow = true;};
popup_menu = {opacity = 1.0;};
dropdown_menu = {opacity = 1.0;};
};
};
};
}
)
(
let
configFile = pkgs.writeText "sxhkdrc" ''
XF86AudioPlay
playerctl play-pause
XF86AudioPause
playerctl play-pause
XF86AudioStop
playerctl stop
XF86AudioNext
playerctl next
XF86AudioPrev
playerctl previous
XF86AudioRaiseVolume
amixer sset Master 40+
XF86AudioLowerVolume
amixer sset Master 40-
XF86AudioMute
amixer sset Master toggle
XF86MonBrightnessUp
brightnessctl s 20+
XF86MonBrightnessDown
brightnessctl s 20-
Print
maim $HOME/Screenshots/$(date +%Y-%m-%d_%H-%m-%s).jpg
Print + shift
maim | xclip -selection clipboard -t image/png
super + Print
maim -s $HOME/Screenshots/$(date +%Y-%m-%d_%H-%m-%s).jpg
super + Print + shift
maim -s | xclip -selection clipboard -t image/png
'';
in
mkIf cfg.sxhkd.enable
{
environment.systemPackages = [
pkgs.maim #screenshooter
pkgs.brightnessctl #brightness control for laptop
pkgs.playerctl #music control
pkgs.xclip
pkgs.coreutils
];
systemd.user.services.sxhkd = {
description = "sxhkd hotkey daemon";
wantedBy = ["graphical-session.target"];
partOf = ["graphical-session.target"];
serviceConfig = {
ExecStart = "${pkgs.sxhkd}/bin/sxhkd -c ${configFile}";
RestartSec = 3;
Restart = "always";
};
};
}
)
];
}

View file

@ -11,7 +11,7 @@ _: {lib, ...}: {
consoleLogLevel = 0;
initrd.verbose = false;
plymouth = {
enable = true;
enable = lib.mkDefault true;
theme = "breeze";
logo = ../misc/nixos.png;
};

View file

@ -1,6 +0,0 @@
inputs: {
imports = [
(import ./nix.nix inputs)
(import ./x.nix inputs)
];
}

View file

@ -1,15 +0,0 @@
_: {
lib,
pkgs,
...
}:
with lib; {
services.xserver = {
exportConfiguration = mkDefault true;
layout = mkDefault "us";
libinput.enable = mkDefault true;
xautolock.enable = mkDefault false;
desktopManager.xterm.enable = mkDefault false;
excludePackages = mkDefault [pkgs.xterm];
};
}

View file

@ -1,9 +1,12 @@
inputs: {
imports = [
(import ./sxhkd.nix inputs)
(import ./common inputs)
(import ./boot.nix inputs)
(import ./misc.nix inputs)
(import ./packages.nix inputs)
(import ./X11.nix inputs)
(import ./nix.nix inputs)
(import ./unfree.nix inputs)
(import ./DE-WM inputs)
(import ./DE inputs)
(import ./DM inputs)
(import ./hardware.nix inputs)
];

View file

@ -1,8 +1,10 @@
_: {
config,
options,
lib,
...
}: let
}:
with lib; let
cfg = config.localModules.hardware;
in {
options.localModules.hardware = {
@ -19,8 +21,7 @@ in {
};
};
};
config =
mkMerge [
config = mkMerge [
(
mkIf (! cfg.gpuAcceleration.disable) {
hardware = {
@ -46,14 +47,15 @@ in {
jack.enable = true;
};
})
]
++ {
{
hardware = {
enableRedistributableFirmware = true;
cpu = {
intel.updateMicrocode = true;
amd.updateMicrocode = true;
enableRedistributableFirmware = true;
};
};
};
}
];
}

30
modules/misc.nix Normal file
View file

@ -0,0 +1,30 @@
_: {
#enable ssh
programs = {
mtr.enable = true; #ping and traceroute
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
};
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "yes";
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
};
#time settings
time.timeZone = "America/New_York";
services = {
timesyncd = {
enable = true;
servers = [
"time.cloudflare.com"
];
};
};
i18n.defaultLocale = "en_US.UTF-8";
}

View file

@ -7,18 +7,9 @@ _: {pkgs, ...}: {
pkgs.alsa-utils #volume control
pkgs.xclip #commandline clipboard access
pkgs.btrfs-progs #for external harddrive
pkgs.feh #for wallpaper #directly used tui apps
pkgs.bottom #view tasks
pkgs.bc #terminal calculator
pkgs.nix-tree #view packages
#pointless stuff
pkgs.cava #pretty audio
pkgs.pipes-rs # more fun things
#gui apps
pkgs.pavucontrol #gui volume control
pkgs.pcmanfm #file manager
#big gui apps
pkgs.librewolf #best browser
];
};
}

View file

@ -1,64 +0,0 @@
_: {
config,
lib,
options,
pkgs,
...
}:
with lib; let
cfg = config.localModules.sxhkd;
keybindingsStr = ''
XF86AudioPlay
playerctl play-pause
XF86AudioPause
playerctl play-pause
XF86AudioStop
playerctl stop
XF86AudioNext
playerctl next
XF86AudioPrev
playerctl previous
XF86AudioRaiseVolume
amixer sset Master 40+
XF86AudioLowerVolume
amixer sset Master 40-
XF86AudioMute
amixer sset Master toggle
XF86MonBrightnessUp
brightnessctl s 20+
XF86MonBrightnessDown
brightnessctl s 20-
Print
maim $HOME/Screenshots/$(date +%Y-%m-%d_%H-%m-%s).jpg
Print + shift
maim | xclip -selection clipboard -t image/png
super + Print
maim -s $HOME/Screenshots/$(date +%Y-%m-%d_%H-%m-%s).jpg
super + Print + shift
maim -s | xclip -selection clipboard -t image/png
'';
configFile = pkgs.writeText "sxhkdrc" keybindingsStr;
in {
options.localModules.sxhkd = {
enable = mkEnableOption "simple X hotkey daemon";
};
config = mkIf cfg.enable {
environment.systemPackages = [
pkgs.maim #screenshooter
pkgs.brightnessctl #brightness control for laptop
pkgs.playerctl #music control
pkgs.xclip
pkgs.coreutils
];
systemd.user.services.sxhkd = {
description = "sxhkd hotkey daemon";
wantedBy = ["graphical-session.target"];
partOf = ["graphical-session.target"];
serviceConfig = {
ExecStart = "${pkgs.sxhkd}/bin/sxhkd -c ${configFile}";
RestartSec = 3;
Restart = "always";
};
};
};
}

View file

@ -4,16 +4,22 @@ inputs: {
...
}: {
imports = [
(import ../imports/boot.nix inputs)
(import ./prime.nix inputs)
(import ./gaming.nix inputs)
(import ../imports/fonts.nix inputs)
(import ../imports/git.nix inputs)
(import ../imports/packages.nix inputs)
(import ../imports/prime.nix inputs)
(import ../imports/gnome.nix inputs)
(import ../imports/shells.nix inputs)
(import ../imports/gaming.nix inputs)
(import ../imports/theme.nix inputs)
];
localModules = {
DE.gnome.enable = true;
DM = {
lightdm.enable = true;
autoLogin = true;
};
};
nixpkgs.allowedUnfree = [
"nvidia-x11"
"nvidia-persistenced"
@ -23,9 +29,15 @@ inputs: {
];
system.stateVersion = "23.05";
environment.systemPackages = [
pkgs.pavucontrol #gui volume control
pkgs.pcmanfm #file manager
pkgs.librewolf #best browser
pkgs.webcord
];
networking.hostName = settings.hostname;
networking = {
hostName = settings.hostname;
networkmanager.enable = true;
};
boot.kernelPackages = pkgs.linuxPackages_latest;
hardware.cpu.amd.updateMicrocode = true;
users = {
@ -35,10 +47,6 @@ inputs: {
extraGroups = ["audio" "networkmanager"];
};
};
services.xserver.displayManager.autoLogin = {
enable = true;
user = settings.username;
};
hardware.bluetooth.enable = true;
services.blueman.enable = true;
boot = {

View file

@ -1,170 +1,84 @@
inputs: {
pkgs,
settings,
config,
...
}: {
imports = [
# (import ../imports/boot.nix inputs)
#(import ../../imports/dwm.nix inputs)
(import ./refreshrate.nix inputs)
(import ./vfio.nix inputs)
(import ./parrot.nix inputs)
(import ./spicetify.nix inputs)
#(import ./mining.nix inputs)
(import ./zfs inputs)
(import ../../imports/fonts.nix inputs)
(import ../../imports/git.nix inputs)
(import ../../imports/packages.nix inputs)
(import ../../imports/parrot.nix inputs)
(import ../../imports/picom.nix inputs)
(import ../../imports/refreshrate.nix inputs)
(import ../../imports/shells.nix inputs)
(import ../../imports/theme.nix inputs)
(import ../../imports/vfio.nix inputs)
# (import ../../imports/mining.nix inputs)
(import ../../imports/spicetify.nix inputs)
];
system.stateVersion = "23.05";
localModules = {
X11Programs = {
sxhkd.enable = true;
dwm.enable = true;
lightdm.enable = true;
autoLogin.enable = true;
picom.enable = true;
};
DE.dwm.enable = true;
DM = {
lightdm.enable = true;
autoLogin = true;
};
};
services.xserver.videoDrivers = ["amdgpu"];
services.gvfs.enable = true; #gvfs for pcmanfm
environment.systemPackages = with pkgs; [
webcord # talk to people (gross)
bitwarden #store stuff
qbittorrent #steal stuff
networkmanagerapplet #gui connection control
vlc #play stuff
environment.systemPackages = [
pkgs.webcord # talk to people (gross)
pkgs.bitwarden #store stuff
pkgs.qbittorrent #steal stuff
pkgs.networkmanagerapplet #gui connection control
pkgs.pavucontrol #gui volume control
pkgs.pcmanfm #file manager
pkgs.librewolf #best browser
#pointless stuff
pkgs.cava #pretty audio
pkgs.pipes-rs # more fun things
pkgs.vlc #play stuff
];
networking = {
hostName = settings.hostname;
hostId = "288b56db";
useDHCP = false;
dhcpcd.enable = false;
networkmanager.enable = false;
nameservers = ["1.1.1.1" "1.0.0.1"];
defaultGateway = "192.168.1.1";
interfaces = {
"enp11s0" = {
name = "eth0";
};
"bridge0" = {
name = "bridge0";
ipv4.addresses = [
{
address = "192.168.1.4";
prefixLength = 24;
}
];
};
};
bridges."bridge0".interfaces = ["eth0"];
};
hardware.cpu.amd.updateMicrocode = true;
#user managment
users = {
users."${settings.username}" = {
users.users."${settings.username}" = {
uid = 1000;
isNormalUser = true;
extraGroups = ["wheel" "audio" "networkmanager"];
};
extraGroups = ["wheel" "audio"];
};
boot = {
zfs.devNodes = "/dev/disk/by-id/";
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
kernelParams = ["nohibernate" "zfs.zfs_arc_max=17179869184"];
supportedFilesystems = ["zfs" "vfat"];
initrd = {
kernelModules = ["amdgpu" "dm_mod"];
availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod" "hid_generic"];
kernelModules = ["amdgpu"];
availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod"];
includeDefaultModules = false;
};
loader = {
efi = {
canTouchEfiVariables = false;
};
generationsDir.copyKernels = true;
systemd-boot.enable = false;
grub = {
enable = true;
efiInstallAsRemovable = true;
version = 2;
copyKernels = true;
efiSupport = true;
zfsSupport = true;
mirroredBoots = [
{
path = "/boot/efis/nvme-SHPP41-500GM_SSB4N6719101A4N0E";
devices = ["/dev/disk/by-id/nvme-SHPP41-500GM_SSB4N6719101A4N0E"];
}
{
path = "/boot/efis/nvme-SHPP41-500GM_SSB4N6719101A4N22";
devices = ["/dev/disk/by-id/nvme-SHPP41-500GM_SSB4N6719101A4N22"];
}
];
};
};
};
systemd.services.zfs-mount.enable = false;
services.zfs = {
autoScrub.enable = true;
trim.enable = true;
};
fileSystems."/" = {
device = "rpool/nixos/root";
fsType = "zfs";
options = ["X-mount.mkdir"];
};
fileSystems."/home" = {
device = "rpool/nixos/home";
fsType = "zfs";
options = ["X-mount.mkdir"];
};
fileSystems."/var" = {
device = "rpool/nixos/var";
fsType = "zfs";
options = ["X-mount.mkdir"];
};
fileSystems."/var/lib" = {
device = "rpool/nixos/var/lib";
fsType = "zfs";
options = ["X-mount.mkdir"];
};
fileSystems."/var/log" = {
device = "rpool/nixos/var/log";
fsType = "zfs";
options = ["X-mount.mkdir"];
};
fileSystems."/boot" = {
device = "bpool/nixos/root";
fsType = "zfs";
options = ["X-mount.mkdir"];
};
fileSystems."/boot/efis/nvme-SHPP41-500GM_SSB4N6719101A4N0E" = {
device = "/dev/disk/by-id/nvme-SHPP41-500GM_SSB4N6719101A4N0E-part2";
fsType = "vfat";
options = [
"X-mount.mkdir"
"x-systemd.idle-timout=1min"
"x-systemd.automount"
"noauto"
"nofail"
];
};
fileSystems."/boot/efis/nvme-SHPP41-500GM_SSB4N6719101A4N22" = {
device = "/dev/disk/by-id/nvme-SHPP41-500GM_SSB4N6719101A4N22-part2";
fsType = "vfat";
options = [
"X-mount.mkdir"
"x-systemd.idle-timout=1min"
"x-systemd.automount"
"noauto"
"nofail"
];
};
swapDevices = [
{
device = "/dev/disk/by-id/nvme-SHPP41-500GM_SSB4N6719101A4N0E-part4";
discardPolicy = "both";
randomEncryption = {
enable = true;
allowDiscards = true;
};
}
{
device = "/dev/disk/by-id/nvme-SHPP41-500GM_SSB4N6719101A4N22-part4";
discardPolicy = "both";
randomEncryption = {
enable = true;
allowDiscards = true;
};
}
];
}

View file

@ -13,6 +13,8 @@ _: {
script = "parrot";
serviceConfig = {
EnvironmentFile = "/home/${settings.username}/saveme/.env";
Restart = "on-failure";
RestartSec = "30s";
};
};
}

View file

@ -1,7 +1,5 @@
_: {
services.xserver = {
#set drivers for igpu
videoDrivers = ["amdgpu"];
#fix nasty screen tearing
screenSection = ''
Option "TearFree" "true"

View file

@ -1,6 +1,7 @@
_: {
pkgs,
settings,
self,
...
}: {
boot = {
@ -36,9 +37,9 @@ _: {
users.users."${settings.username}".extraGroups = ["kvm" "libvirtd"];
systemd.services.libvirtd.preStart = let
xml = pkgs.writeText "Windows.xml" (builtins.readFile "${self}/misc/Windows.xml");
qemuHook = pkgs.writeScript "qemu-hook" ''
#!${pkgs.stdenv.shell}
GUEST_NAME="$1"
OPERATION="$2"
SUB_OPERATION="$3"
@ -63,5 +64,8 @@ _: {
# Copy hook files
ln -sf ${qemuHook} /var/lib/libvirt/hooks/qemu
mkdir -p /var/lib/libvirt/qemu/
ln -sf ${xml} /var/lib/libvirt/qemu/Windows.xml
'';
}

View file

@ -0,0 +1,122 @@
_: {config, ...}: {
boot = {
zfs.devNodes = "/dev/disk/by-id/";
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
kernelParams = ["nohibernate" "zfs.zfs_arc_max=17179869184"];
supportedFilesystems = ["zfs" "vfat"];
initrd = {
kernelModules = ["dm_mod"];
availableKernelModules = ["hid_generic"];
};
plymouth.enable = false;
loader = {
generationsDir.copyKernels = true;
#override defaults
systemd-boot.enable = false;
efi.canTouchEfiVariables = false;
grub = {
enable = true;
efiInstallAsRemovable = true;
version = 2;
copyKernels = true;
efiSupport = true;
zfsSupport = true;
mirroredBoots = [
{
path = "/boot/efis/nvme-SHPP41-500GM_SSB4N6719101A4N0E";
devices = ["/dev/disk/by-id/nvme-SHPP41-500GM_SSB4N6719101A4N0E"];
}
{
path = "/boot/efis/nvme-SHPP41-500GM_SSB4N6719101A4N22";
devices = ["/dev/disk/by-id/nvme-SHPP41-500GM_SSB4N6719101A4N22"];
}
];
};
};
};
systemd.services.zfs-mount.enable = false;
services.zfs = {
autoScrub.enable = true;
trim.enable = true;
};
fileSystems = {
"/" = {
device = "rpool/nixos/root";
fsType = "zfs";
options = ["X-mount.mkdir"];
};
"/home" = {
device = "rpool/nixos/home";
fsType = "zfs";
options = ["X-mount.mkdir"];
};
"/var" = {
device = "rpool/nixos/var";
fsType = "zfs";
options = ["X-mount.mkdir"];
};
"/var/lib" = {
device = "rpool/nixos/var/lib";
fsType = "zfs";
options = ["X-mount.mkdir"];
};
"/var/log" = {
device = "rpool/nixos/var/log";
fsType = "zfs";
options = ["X-mount.mkdir"];
};
"/boot" = {
device = "bpool/nixos/root";
fsType = "zfs";
options = ["X-mount.mkdir"];
};
"/boot/efis/nvme-SHPP41-500GM_SSB4N6719101A4N0E" = {
device = "/dev/disk/by-id/nvme-SHPP41-500GM_SSB4N6719101A4N0E-part2";
fsType = "vfat";
options = [
"X-mount.mkdir"
"x-systemd.idle-timout=1min"
"x-systemd.automount"
"noauto"
"nofail"
];
};
"/boot/efis/nvme-SHPP41-500GM_SSB4N6719101A4N22" = {
device = "/dev/disk/by-id/nvme-SHPP41-500GM_SSB4N6719101A4N22-part2";
fsType = "vfat";
options = [
"X-mount.mkdir"
"x-systemd.idle-timout=1min"
"x-systemd.automount"
"noauto"
"nofail"
];
};
};
swapDevices = [
{
device = "/dev/disk/by-id/nvme-SHPP41-500GM_SSB4N6719101A4N0E-part4";
discardPolicy = "both";
randomEncryption = {
enable = true;
allowDiscards = true;
};
}
{
device = "/dev/disk/by-id/nvme-SHPP41-500GM_SSB4N6719101A4N22-part4";
discardPolicy = "both";
randomEncryption = {
enable = true;
allowDiscards = true;
};
}
];
}

View file

@ -1,59 +1,43 @@
inputs: {
pkgs,
settings,
lib,
...
}: {
imports = [
(import ../imports/boot.nix inputs)
(import ./printing.nix inputs)
(import ../imports/fonts.nix inputs)
(import ../imports/git.nix inputs)
(import ../imports/packages.nix inputs)
(import ../imports/xfce.nix inputs)
(import ../imports/shells.nix inputs)
(import ../imports/theme.nix inputs)
];
nixpkgs.allowedUnfree = ["hplip"];
localModules = {
DM = {
lightdm.enable = true;
autoLogin = true;
};
DE.xfce.enable = true;
};
system.stateVersion = "22.11";
environment.systemPackages = [
pkgs.gimp
(pkgs.xsane.override {gimpSupport = true;})
pkgs.vlc
pkgs.libreoffice
pkgs.nomacs
pkgs.gnome.gnome-calculator
pkgs.xfce.xfce4-whiskermenu-plugin
pkgs.rsync
pkgs.pavucontrol #gui volume control
pkgs.librewolf #best browser
];
services.xserver.videoDrivers = ["intel"];
networking.hostName = settings.hostname;
networking = {
hostName = settings.hostname;
networkmanager.enable = true;
};
boot.kernelPackages = pkgs.linuxPackages_latest;
hardware.cpu.intel.updateMicrocode = true;
#printing stuff
hardware.sane = {
enable = true;
extraBackends = [pkgs.hplipWithPlugin];
#run this to setup gimp plugin
#ln -s /run/current-system/sw/bin/xsane ~/.config/GIMP/2.10/plug-ins/xsane
};
services = {
printing = {
enable = true;
drivers = [pkgs.hplipWithPlugin];
};
};
users = {
defaultUserShell = pkgs.zsh;
users."${settings.username}" = {
users.users."${settings.username}" = {
uid = 1000;
isNormalUser = true;
extraGroups = ["audio" "networkmanager" "scanner" "lp" "cups"];
};
};
services.xserver.displayManager.autoLogin = {
enable = true;
user = settings.username;
extraGroups = ["audio" "networkmanager"];
};
boot = {
initrd.availableKernelModules = ["xhci-pci" "ehci-pci" "ahci" "usbhid" "sd_mod" "sr_mod" "rtsx_usb_sdmmc"];

View file

@ -0,0 +1,21 @@
_: {pkgs, ...}: {
nixpkgs.allowedUnfree = ["hplip"];
environment.systemPackages = [
pkgs.gimp
(pkgs.xsane.override {gimpSupport = true;})
pkgs.libreoffice
];
users.users."${settings.username}".extraGroups = ["scanner" "lp" "cups"];
hardware.sane = {
enable = true;
extraBackends = [pkgs.hplipWithPlugin];
#run this to setup gimp plugin
#ln -s /run/current-system/sw/bin/xsane ~/.config/GIMP/2.10/plug-ins/xsane
};
services = {
printing = {
enable = true;
drivers = [pkgs.hplipWithPlugin];
};
};
}