fix ISO, add Packard-Server profile
This commit is contained in:
parent
c442d1dc24
commit
e5851507b8
@ -4,29 +4,32 @@
|
||||
inputs.self.nixosRoles.base
|
||||
inputs.base16.hmModule
|
||||
|
||||
alacritty
|
||||
applications-setup
|
||||
cursor
|
||||
dunst
|
||||
fonts
|
||||
gtk
|
||||
i3
|
||||
i3status-rust
|
||||
kde
|
||||
kitty
|
||||
mako
|
||||
mpv
|
||||
packages
|
||||
picom
|
||||
print-scan
|
||||
rofi
|
||||
sound
|
||||
sway
|
||||
themes
|
||||
urxvt
|
||||
vivaldi
|
||||
vscode
|
||||
xserver
|
||||
];
|
||||
networking.wireless.enable = lib.mkForce false;
|
||||
networking.networkmanager.enable = lib.mkForce true;
|
||||
services.openssh.permitRootLogin = lib.mkForce "no";
|
||||
sound.enable = lib.mkForce true;
|
||||
hardware.pulseaudio.enable = lib.mkForce true;
|
||||
services.getty.autologinUser = lib.mkForce "alukard";
|
||||
boot.kernelPackages = lib.mkForce pkgs.linuxPackages_latest;
|
||||
boot.supportedFilesystems = lib.mkForce [ "ext4" "vfat" "btrfs" "ntfs" ];
|
||||
disabledModules = [ "installer/cd-dvd/channel.nix" ];
|
||||
hardware.pulseaudio.enable = lib.mkForce false;
|
||||
networking.networkmanager.enable = lib.mkForce true;
|
||||
networking.wireless.enable = lib.mkForce false;
|
||||
services.getty.autologinUser = lib.mkForce "alukard";
|
||||
services.openssh.permitRootLogin = lib.mkForce "no";
|
||||
sound.enable = lib.mkForce false;
|
||||
|
||||
deviceSpecific.devInfo.drive.type = "hdd";
|
||||
deviceSpecific.devInfo.gpu.vendor = "other";
|
||||
@ -35,15 +38,4 @@
|
||||
deviceSpecific.isGaming = false;
|
||||
deviceSpecific.enableVirtualisation = false;
|
||||
deviceSpecific.wireguard.enable = false;
|
||||
|
||||
defaultApplications = {
|
||||
fm = {
|
||||
cmd = "${pkgs.xfce4-14.thunar}/bin/thunar";
|
||||
desktop = "thunar";
|
||||
};
|
||||
monitor = {
|
||||
cmd = "${pkgs.xfce4-14.xfce4-taskmanager}/bin/xfce4-taskmanager";
|
||||
desktop = "taskmanager";
|
||||
};
|
||||
};
|
||||
}
|
34
machines/Packard-Server/default.nix
Normal file
34
machines/Packard-Server/default.nix
Normal file
@ -0,0 +1,34 @@
|
||||
{ inputs, lib, ... }: {
|
||||
imports = with inputs.self.nixosModules; with inputs.self.nixosProfiles; [
|
||||
./hardware-configuration.nix
|
||||
inputs.self.nixosRoles.server
|
||||
|
||||
hardware
|
||||
light
|
||||
mullvad
|
||||
services
|
||||
];
|
||||
|
||||
deviceSpecific.devInfo = {
|
||||
cpu = {
|
||||
vendor = "intel";
|
||||
clock = 2300;
|
||||
cores = 4;
|
||||
};
|
||||
drive = {
|
||||
type = "hdd";
|
||||
speed = 100;
|
||||
size = 500;
|
||||
};
|
||||
gpu = {
|
||||
vendor = "intel";
|
||||
};
|
||||
bigScreen = false;
|
||||
ram = 6;
|
||||
};
|
||||
deviceSpecific.enableVirtualisation = false;
|
||||
deviceSpecific.wireguard.enable = true;
|
||||
deviceSpecific.isLaptop = lib.mkForce true;
|
||||
|
||||
boot.cleanTmpDir = true;
|
||||
}
|
1
machines/Packard-Server/system
Normal file
1
machines/Packard-Server/system
Normal file
@ -0,0 +1 @@
|
||||
x86_64-linux
|
@ -37,7 +37,7 @@
|
||||
startupApplications = with config.defaultApplications; [
|
||||
messenger.cmd
|
||||
"${pkgs.keepassxc}/bin/keepassxc --keyfile=/home/alukard/.passwords.key /home/alukard/nixos-config/misc/Passwords.kdbx"
|
||||
"${term.cmd} -e spt"
|
||||
# "${term.cmd} -e spt"
|
||||
# "${pkgs.feh}/bin/feh --bg-fill ${/. + ../misc/wallpaper}"
|
||||
];
|
||||
|
||||
|
@ -3,14 +3,12 @@ let
|
||||
thm = config.lib.base16.theme;
|
||||
in with config.deviceSpecific;
|
||||
{
|
||||
# defaultApplications.term = lib.mkIf (isLaptop || isDesktop) {
|
||||
defaultApplications.term = {
|
||||
cmd = "${pkgs.kitty}/bin/kitty";
|
||||
desktop = "kitty";
|
||||
};
|
||||
home-manager.users.alukard = {
|
||||
programs.kitty = {
|
||||
# enable = isLaptop || isDesktop;
|
||||
enable = true;
|
||||
font.name = "${thm.fonts.powerline.family} ${thm.fontSizes.small.str}";
|
||||
# keybindings = ''
|
||||
|
@ -26,7 +26,6 @@ with config.deviceSpecific; {
|
||||
# pinfo
|
||||
ripgrep
|
||||
ripgrep-all
|
||||
samba
|
||||
sd
|
||||
tealdeer
|
||||
# tidal-dl
|
||||
@ -47,9 +46,6 @@ with config.deviceSpecific; {
|
||||
ranger
|
||||
|
||||
# gui
|
||||
audacity
|
||||
blueman
|
||||
# bookworm
|
||||
discord
|
||||
element-desktop
|
||||
feh
|
||||
@ -60,7 +56,6 @@ with config.deviceSpecific; {
|
||||
qbittorrent
|
||||
qimgv
|
||||
quodlibet
|
||||
scrcpy
|
||||
system-config-printer
|
||||
tdesktop
|
||||
xarchiver
|
||||
@ -76,7 +71,11 @@ with config.deviceSpecific; {
|
||||
duf
|
||||
zsh-z
|
||||
] ++ lib.optionals (!(isVM || isISO)) [
|
||||
audacity
|
||||
blueman
|
||||
libreoffice
|
||||
samba
|
||||
scrcpy
|
||||
] ++ lib.optionals isGaming [
|
||||
# ceserver
|
||||
# ckan
|
||||
@ -93,11 +92,9 @@ with config.deviceSpecific; {
|
||||
# winetricks
|
||||
] ++ lib.optionals isLaptop [
|
||||
acpi
|
||||
] ++ lib.optionals (config.device == "AMD-Workstation") [
|
||||
] ++ lib.optionals (enableVirtualisation) [
|
||||
virt-manager
|
||||
] ++ lib.optionals (config.virtualisation.docker.enable) [
|
||||
docker-compose
|
||||
];
|
||||
|
||||
}
|
||||
|
@ -1,12 +1,19 @@
|
||||
{ lib, pkgs, config, ... }:
|
||||
with config.deviceSpecific; {
|
||||
boot = if !isServer then {
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
algorithm = "zstd";
|
||||
memoryPercent = 60;
|
||||
numDevices = 1;
|
||||
};
|
||||
|
||||
boot = if !isServer && !isISO then {
|
||||
loader = {
|
||||
timeout = lib.mkForce 4;
|
||||
systemd-boot.enable = pkgs.system == "x86_64-linux";
|
||||
};
|
||||
|
||||
kernelParams = [ "quiet" "scsi_mod.use_blk_mq=1" "modeset" "nofb" ]
|
||||
kernelParams = [ "zswap.enabled=0" "quiet" "scsi_mod.use_blk_mq=1" "modeset" "nofb" ]
|
||||
++ lib.optionals (pkgs.system == "x86_64-linux") [
|
||||
"rd.systemd.show_status=auto"
|
||||
"rd.udev.log_priority=3"
|
||||
@ -26,9 +33,10 @@ with config.deviceSpecific; {
|
||||
kernel.sysctl = {
|
||||
"vm.swappiness" = if config.deviceSpecific.isSSD then 1 else 10;
|
||||
};
|
||||
} else {
|
||||
} else if isServer then {
|
||||
kernelPackages = pkgs.linuxPackages_5_15_hardened;
|
||||
kernelModules = [ "tcp_bbr" ];
|
||||
kernelParams = [ "zswap.enabled=0" ];
|
||||
kernel.sysctl = {
|
||||
"kernel.sysrq" = 0;
|
||||
"net.ipv4.icmp_echo_ignore_broadcasts" = 1;
|
||||
@ -50,5 +58,9 @@ with config.deviceSpecific; {
|
||||
"net.ipv4.tcp_congestion_control" = "bbr";
|
||||
"net.core.default_qdisc" = "cake";
|
||||
};
|
||||
} else {
|
||||
kernelPackages = lib.mkForce pkgs.linuxPackages_latest;
|
||||
kernelParams = lib.mkForce [ "zswap.enabled=0" ];
|
||||
supportedFilesystems = lib.mkForce [ "ext4" "vfat" "btrfs" "ntfs" ];
|
||||
};
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
with config.deviceSpecific; {
|
||||
|
||||
services.acpid.enable = true;
|
||||
services.acpid.enable = !isServer;
|
||||
services.acpid.logEvents = false;
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
services.blueman.enable = true;
|
||||
hardware.bluetooth.enable = !isServer;
|
||||
services.blueman.enable = !isServer;
|
||||
|
||||
services.btrbk.instances.home = {
|
||||
settings = {
|
||||
@ -59,12 +59,14 @@ with config.deviceSpecific; {
|
||||
gpuOffset = -48; # -54
|
||||
};
|
||||
|
||||
services.udev.packages = [ pkgs.stlink ];
|
||||
services.udev.packages = lib.mkIf (config.device == "AMD-Workstation") [
|
||||
pkgs.stlink
|
||||
];
|
||||
|
||||
home-manager.users.alukard.services.udiskie.enable = true;
|
||||
home-manager.users.alukard.services.udiskie.enable = !isServer;
|
||||
|
||||
home-manager.users.alukard.services.gammastep = {
|
||||
enable = true;
|
||||
enable = !isServer;
|
||||
latitude = 48.79;
|
||||
longitude = 44.78;
|
||||
temperature.day = 6500;
|
||||
@ -74,13 +76,4 @@ with config.deviceSpecific; {
|
||||
services.upower.enable = true;
|
||||
|
||||
systemd.services.systemd-udev-settle.enable = false;
|
||||
|
||||
# Enable zram, disable zswap
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
algorithm = "zstd";
|
||||
memoryPercent = 60;
|
||||
numDevices = 1;
|
||||
};
|
||||
boot.kernelParams = [ "zswap.enabled=0" ];
|
||||
}
|
||||
|
@ -1,78 +0,0 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
thm = config.lib.base16.theme;
|
||||
in
|
||||
with config.deviceSpecific; {
|
||||
services.xserver = {
|
||||
enable = false;
|
||||
# enable = true;
|
||||
|
||||
# TODO: Disable natural scrolling for external mouse
|
||||
libinput = {
|
||||
enable = true;
|
||||
mouse = {
|
||||
accelProfile = "flat";
|
||||
middleEmulation = false;
|
||||
naturalScrolling = false;
|
||||
};
|
||||
touchpad = lib.mkIf isLaptop {
|
||||
accelProfile = "adaptive";
|
||||
middleEmulation = true;
|
||||
naturalScrolling = true;
|
||||
};
|
||||
};
|
||||
|
||||
# TODO: make settings for laptops with dGPU
|
||||
videoDrivers = if devInfo.gpu.vendor == "amd" then
|
||||
[ "amdgpu" ]
|
||||
else if devInfo.gpu.vendor == "nvidia" then
|
||||
[ "nvidia" ]
|
||||
else if devInfo.gpu.vendor == "intel" then
|
||||
[ "intel" ]
|
||||
else
|
||||
[ ];
|
||||
|
||||
displayManager.lightdm = {
|
||||
greeters.mini = {
|
||||
enable = isShared;
|
||||
user = "alukard";
|
||||
extraConfig = ''
|
||||
[greeter]
|
||||
show-password-label = true
|
||||
password-label-text = Welcome, Alukard
|
||||
invalid-password-text = Are you sure?
|
||||
show-input-cursor = false
|
||||
password-alignment = right
|
||||
[greeter-theme]
|
||||
font = "#${thm.fonts.mono.family}"
|
||||
font-size = ${thm.fontSizes.header.str}pt
|
||||
text-color = "#${thm.base0B-hex}"
|
||||
error-color = "#${thm.base0B-hex}"
|
||||
background-image = ""
|
||||
background-color = "#${thm.base00-hex}"
|
||||
window-color = "#${thm.base01-hex}"
|
||||
border-color = "#${thm.base0D-hex}"
|
||||
border-width = 1px
|
||||
layout-space = 14
|
||||
password-color = "#${thm.base0B-hex}"
|
||||
password-background-color = "#${thm.base00-hex}"
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
displayManager.autoLogin.enable = !isShared;
|
||||
displayManager.autoLogin.user = "alukard";
|
||||
|
||||
displayManager.defaultSession = "none+i3";
|
||||
|
||||
desktopManager.xterm.enable = false;
|
||||
|
||||
windowManager.i3 = {
|
||||
enable = true;
|
||||
package = pkgs.i3-gaps;
|
||||
};
|
||||
|
||||
layout = "us,ru";
|
||||
xkbOptions = "grp:win_space_toggle";
|
||||
};
|
||||
}
|
@ -12,7 +12,6 @@
|
||||
sound
|
||||
themes
|
||||
virtualisation
|
||||
xserver
|
||||
|
||||
alacritty
|
||||
corectrl
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
direnv
|
||||
kitty
|
||||
nix-index
|
||||
|
||||
#coturn
|
||||
#gitea
|
||||
|
Loading…
x
Reference in New Issue
Block a user