feat: split up config
This commit is contained in:
parent
e7c4e520e7
commit
e12135c3e8
6 changed files with 183 additions and 178 deletions
43
nixos/cfg/boot.nix
Normal file
43
nixos/cfg/boot.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
boot = {
|
||||
consoleLogLevel = 0;
|
||||
initrd.verbose = false;
|
||||
initrd.systemd.enable = true;
|
||||
|
||||
loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
grub = {
|
||||
enable = true;
|
||||
device = "nodev";
|
||||
efiSupport = true;
|
||||
extraConfig = ''
|
||||
set timeout_style=hidden
|
||||
'';
|
||||
# Because it still draws that image otherwise
|
||||
splashImage = null;
|
||||
};
|
||||
timeout = 2;
|
||||
};
|
||||
|
||||
kernelParams = [
|
||||
"quiet"
|
||||
"splash"
|
||||
"boot.shell_on_fail"
|
||||
"i915.fastboot=1"
|
||||
"loglevel=3"
|
||||
"rd.systemd.show_status=false"
|
||||
"rd.udev.log_level=3"
|
||||
"udev.log_priority=3"
|
||||
"cryptdevice=UUID=ab82b477-2477-453f-b95f-28e5553ad10d:root"
|
||||
"root=/dev/mapper/root"
|
||||
];
|
||||
|
||||
plymouth = {
|
||||
enable = true;
|
||||
themePackages = [ pkgs.catppuccin-plymouth ];
|
||||
theme = "catppuccin-macchiato";
|
||||
};
|
||||
};
|
||||
}
|
39
nixos/cfg/extra-hardware.nix
Normal file
39
nixos/cfg/extra-hardware.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
};
|
||||
|
||||
services.blueman.enable = true;
|
||||
|
||||
services.udev.extraRules = ''
|
||||
# give permanent path to keyboard XF86* binds
|
||||
SUBSYSTEMS=="input", ATTRS{id/product}=="0006", ATTRS{id/vendor}=="0000", SYMLINK += "video-bus"
|
||||
'';
|
||||
|
||||
# enable brightness control for swayosd
|
||||
programs.light.enable = true;
|
||||
|
||||
services.fwupd.enable = true;
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
services.printing.drivers = with pkgs; [
|
||||
hplip
|
||||
];
|
||||
|
||||
# Enable sound.
|
||||
# sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
jack.enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
hardware.sensor.iio.enable = true;
|
||||
hardware.opengl.enable = true;
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
}
|
|
@ -88,7 +88,7 @@
|
|||
gnome.gnome-calculator
|
||||
swaynotificationcenter
|
||||
#swayosd
|
||||
(with import <nixpkgs> {}; callPackage ./swayosd.nix {})
|
||||
(with import <nixpkgs> {}; callPackage ../pkgs/swayosd.nix {})
|
||||
swayidle
|
||||
wl-clipboard
|
||||
cliphist
|
||||
|
|
96
nixos/cfg/security.nix
Normal file
96
nixos/cfg/security.nix
Normal file
|
@ -0,0 +1,96 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.fprintd.enable = true;
|
||||
|
||||
systemd.services.fprintd = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig.Type = "simple";
|
||||
};
|
||||
|
||||
services.logind.lidSwitch = "lock";
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
networking.firewall.enable = false;
|
||||
|
||||
security.sudo.extraConfig = ''
|
||||
Defaults timestamp_timeout=60
|
||||
'';
|
||||
|
||||
security.pam.services = {
|
||||
|
||||
gtklock = {};
|
||||
|
||||
# all the changes in /etc/pam.d/*
|
||||
sddm.text = ''
|
||||
auth [success=1 new_authtok_reqd=1 default=ignore] pam_unix.so try_first_pass likeauth nullok
|
||||
auth sufficient /nix/store/7hw6i2p2p7zzgjirw6xaj3c50gga488y-fprintd-1.94.2/lib/security/pam_fprintd.so
|
||||
auth substack login
|
||||
account include login
|
||||
password substack login
|
||||
session include login
|
||||
'';
|
||||
|
||||
sudo.text = ''
|
||||
# Account management.
|
||||
auth sufficient /root/lib/pam/pam_fprintd_grosshack.so
|
||||
auth sufficient pam_unix.so try_first_pass nullok
|
||||
account required pam_unix.so
|
||||
|
||||
# Authentication management.
|
||||
auth required pam_deny.so
|
||||
|
||||
# Password management.
|
||||
password sufficient pam_unix.so nullok yescrypt
|
||||
|
||||
# Session management.
|
||||
session required pam_env.so conffile=/etc/pam/environment readenv=0
|
||||
session required pam_unix.so
|
||||
'';
|
||||
|
||||
login.text = ''
|
||||
# Account management.
|
||||
account required pam_unix.so
|
||||
|
||||
# Authentication management.
|
||||
auth sufficient /root/lib/pam/pam_fprintd_grosshack.so
|
||||
auth optional pam_unix.so nullok likeauth
|
||||
auth optional /nix/store/21dqfghfa8b09ssvgja8l5bg7h5d9rzl-gnome-keyring-42.1/lib/security/pam_gnome_keyring.so
|
||||
auth sufficient pam_unix.so try_first_pass nullok
|
||||
auth required pam_deny.so
|
||||
|
||||
# Password management.
|
||||
password sufficient pam_unix.so nullok yescrypt
|
||||
password optional /nix/store/21dqfghfa8b09ssvgja8l5bg7h5d9rzl-gnome-keyring-42.1/lib/security/pam_gnome_keyring.so use_authtok
|
||||
|
||||
# Session management.
|
||||
session required pam_env.so conffile=/etc/pam/environment readenv=0
|
||||
session required pam_unix.so
|
||||
session required pam_loginuid.so
|
||||
session required /nix/store/4m8ab1p9y6ig31wniimlvsl23i9sazvp-linux-pam-1.5.2/lib/security/pam_lastlog.so silent
|
||||
session optional /nix/store/8pbr7x6wh765mg43zs0p70gsaavmbbh7-systemd-253.3/lib/security/pam_systemd.so
|
||||
session optional /nix/store/21dqfghfa8b09ssvgja8l5bg7h5d9rzl-gnome-keyring-42.1/lib/security/pam_gnome_keyring.so auto_start
|
||||
'';
|
||||
|
||||
polkit-1.text = ''
|
||||
# Account management.
|
||||
account required pam_unix.so
|
||||
|
||||
# Authentication management.
|
||||
auth sufficient /root/lib/pam/pam_fprintd_grosshack.so
|
||||
auth sufficient pam_unix.so try_first_pass nullok
|
||||
auth required pam_deny.so
|
||||
|
||||
# Password management.
|
||||
password sufficient pam_unix.so nullok yescrypt
|
||||
|
||||
# Session management.
|
||||
session required pam_env.so conffile=/etc/pam/environment readenv=0
|
||||
session required pam_unix.so
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, wrapGAppsHook
|
||||
, gtk-layer-shell
|
||||
, libpulseaudio
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "swayosd";
|
||||
version = "unstable-2023-05-09";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ErikReider";
|
||||
repo = "SwayOSD";
|
||||
rev = "c573f5ce94e2017d37b3dd3c2c1363bb1c6f82a3";
|
||||
hash = "sha256-cPom4dU+64TdCIi9D+GZN+EJltgXWy8fezEL1r9kUDo=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-fkPpkXvq2ms6+Vt12cnsjKkbJdN2JgVrRxGRH9qaGD8=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
wrapGAppsHook
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gtk-layer-shell
|
||||
libpulseaudio
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A GTK based on screen display for keyboard shortcuts";
|
||||
homepage = "https://github.com/ErikReider/SwayOSD";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ aleksana ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue