Compare commits

...

5 commits

Author SHA1 Message Date
Schrottkatze 1b802a90de
move some graphics stuff into individual modules/files 2024-08-01 08:40:49 +02:00
Schrottkatze ddd6ecd055
move some graphics stuff into individual modules/files 2024-08-01 08:37:19 +02:00
Schrottkatze b63db1934d
rework and fix some hardware key stuff 2024-08-01 08:17:09 +02:00
Schrottkatze 2b13d1c0bb
fix displayManager warnings and clean up displayManager configs 2024-08-01 08:07:17 +02:00
Schrottkatze d8e2f19ced
shell: fix and clean up plugin loading 2024-08-01 07:44:41 +02:00
14 changed files with 113 additions and 57 deletions

View file

@ -138,7 +138,6 @@ with builtins; {
boot.kernel.sysctl."vm.max_map_count" = 2147483642;
hardware = {
opengl.enable = true;
uinput.enable = true;
bluetooth.enable = true;
# keyboard.uhk.enable = true;

View file

@ -19,7 +19,12 @@
./modules
];
jade = {
hwKey.pamAuth.enable = true;
desktop = {
dm.autoLogin = {
enable = true;
delay = 5;
};
syncthing.enable = true;
kdeconnect.enable = true;
cloud.enable = true;
@ -41,18 +46,6 @@
S10E_JRNL_FILE_LOC = "/home/jade/Docs/jrnl.md";
};
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [
intel-ocl
intel-media-driver
intel-vaapi-driver
intel-compute-runtime
libvdpau-va-gl
mesa.drivers
];
};
programs.wireshark.enable = true;
boot.resumeDevice = "/dev/disk/by-uuid/4f9e8afa-f8d7-40bf-b3ea-17e8e8fbb694";
@ -81,10 +74,6 @@
};
boot.kernelPackages = pkgs.linuxPackages_zen;
services.displayManager.autoLogin = {
enable = true;
user = "jade";
};
# networking
networking.networkmanager.enable = true;

View file

@ -1,5 +1,6 @@
{...}: {
imports = [
./input.nix
./graphics.nix
];
}

View file

@ -0,0 +1,12 @@
{pkgs, ...}: {
hardware.graphics = {
extraPackages = with pkgs; [
intel-ocl
intel-media-driver
intel-vaapi-driver
intel-compute-runtime
libvdpau-va-gl
mesa.drivers
];
};
}

View file

@ -6,9 +6,11 @@
./hardware-configuration.nix
../../common.nix
../../modules
./modules
];
jade = {
hwKey.pamAuth.enable = true;
desktop = {
syncthing.enable = true;
kdeconnect.enable = true;
@ -57,9 +59,6 @@
# TODO: clean up.
zenstates
zenmonitor
nvtop-amd
radeontop
rgp
tea
blender-hip
];

View file

@ -0,0 +1,5 @@
{}: {
imports = [
./graphics.nix
];
}

View file

@ -0,0 +1,7 @@
{pkgs, ...}: {
environment.systemPackages = [
pkgs.nvtop-amd
pkgs.radeontop
pkgs.rgp
];
}

View file

@ -6,5 +6,6 @@
./firewall.nix
./desktop-environment
./input
./graphics.nix
];
}

View file

@ -3,6 +3,7 @@
./audio.nix
./flatpak.nix
./home
./dm.nix
];
services.upower = {
enable = true;

View file

@ -0,0 +1,36 @@
{
pkgs,
config,
lib,
...
}: let
cfg = config.jade.desktop.dm;
in
with lib; {
options.jade.desktop.dm.autoLogin = {
enable = mkEnableOption "Enable Autologin";
delay = mkOption {
type = types.int;
default = 0;
};
};
config.services = {
displayManager = {
autoLogin = {
enable = cfg.autoLogin.enable;
user = "jade";
};
defaultSession = "sway";
sessionPackages = [
pkgs.sway
];
};
xserver.displayManager.gdm = {
enable = true;
banner = "Meow :3";
autoLogin = {
delay = cfg.autoLogin.delay;
};
};
};
}

View file

@ -6,14 +6,6 @@
xterm.enable = false;
};
displayManager = {
gdm.enable = true;
sessionPackages = [
pkgs.sway
];
gdm.autoLogin.delay = 5;
};
windowManager.xmonad = {
enable = true;
};
@ -21,7 +13,4 @@
security.polkit.enable = true;
programs.sway.enable = true;
# services.displayManager.defaultSession = "none+xmonad";
services.displayManager.defaultSession = "sway";
}

3
modules/graphics.nix Normal file
View file

@ -0,0 +1,3 @@
{...}: {
hardware.graphics.enable = true;
}

View file

@ -1,20 +1,35 @@
{pkgs, ...}: {
# nitrokey
services.udev.packages = [pkgs.nitrokey-udev-rules];
# smartcard daemon
services.pcscd.enable = true;
# authenticate using hw key
security.pam = {
services.jade.u2fAuth = true;
u2f = {
enable = true;
cue = true;
control = "sufficient";
authFile = "/home/jade/.ssh/u2f_keys";
{
pkgs,
config,
lib,
...
}: let
cfg = config.jade.hwKey;
in
with lib; {
options.jade.hwKey = {
pamAuth.enable = mkEnableOption "Enable PAM authentication with hardware keys";
};
};
config = {
# nitrokey
services.udev.packages = [pkgs.nitrokey-udev-rules];
programs.i3lock.u2fSupport = true;
}
# smartcard daemon
services.pcscd.enable = true;
# authenticate using hw key
security.pam = {
services.jade.u2fAuth = cfg.pamAuth.enable;
u2f = {
enable = true;
control = "sufficient";
settings = {
cue = true;
authFile = "/home/jade/.ssh/u2f_keys";
};
};
};
programs.i3lock.u2fSupport = true;
};
}

View file

@ -11,11 +11,6 @@
};
home.packages = [
pkgs.pueue
pkgs.nushellPlugins.net
pkgs.nushellPlugins.query
pkgs.nushellPlugins.gstat
pkgs.nushellPlugins.polars
pkgs.nushellPlugins.formats
];
programs.nushell = {
enable = true;
@ -23,9 +18,13 @@
configFile.source = ../../other/config.nu;
envFile.source = ../../other/env.nu;
extraConfig = ''
plugin use ${pkgs.nushellPlugins.query}/bin/nu_plugin_query;
plugin use ${pkgs.nushellPlugins.polars}/bin/nu_plugin_polars;
plugin use ${pkgs.nushellPlugins.formats}/bin/nu_plugin_formats;
plugin add ${pkgs.nushellPlugins.query}/bin/nu_plugin_query;
plugin add ${pkgs.nushellPlugins.polars}/bin/nu_plugin_polars;
plugin add ${pkgs.nushellPlugins.formats}/bin/nu_plugin_formats;
plugin use query;
plugin use polars;
plugin use formats;
'';
};
programs.starship.enableNushellIntegration = true;