fix ISO, add Packard-Server profile
This commit is contained in:
parent
c442d1dc24
commit
e5851507b8
@ -4,29 +4,32 @@
|
|||||||
inputs.self.nixosRoles.base
|
inputs.self.nixosRoles.base
|
||||||
inputs.base16.hmModule
|
inputs.base16.hmModule
|
||||||
|
|
||||||
alacritty
|
applications-setup
|
||||||
cursor
|
cursor
|
||||||
dunst
|
|
||||||
fonts
|
fonts
|
||||||
gtk
|
gtk
|
||||||
i3
|
|
||||||
i3status-rust
|
i3status-rust
|
||||||
|
kde
|
||||||
|
kitty
|
||||||
|
mako
|
||||||
|
mpv
|
||||||
|
packages
|
||||||
|
picom
|
||||||
|
print-scan
|
||||||
rofi
|
rofi
|
||||||
|
sound
|
||||||
|
sway
|
||||||
themes
|
themes
|
||||||
urxvt
|
|
||||||
vivaldi
|
vivaldi
|
||||||
vscode
|
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" ];
|
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.drive.type = "hdd";
|
||||||
deviceSpecific.devInfo.gpu.vendor = "other";
|
deviceSpecific.devInfo.gpu.vendor = "other";
|
||||||
@ -35,15 +38,4 @@
|
|||||||
deviceSpecific.isGaming = false;
|
deviceSpecific.isGaming = false;
|
||||||
deviceSpecific.enableVirtualisation = false;
|
deviceSpecific.enableVirtualisation = false;
|
||||||
deviceSpecific.wireguard.enable = 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; [
|
startupApplications = with config.defaultApplications; [
|
||||||
messenger.cmd
|
messenger.cmd
|
||||||
"${pkgs.keepassxc}/bin/keepassxc --keyfile=/home/alukard/.passwords.key /home/alukard/nixos-config/misc/Passwords.kdbx"
|
"${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}"
|
# "${pkgs.feh}/bin/feh --bg-fill ${/. + ../misc/wallpaper}"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -3,14 +3,12 @@ let
|
|||||||
thm = config.lib.base16.theme;
|
thm = config.lib.base16.theme;
|
||||||
in with config.deviceSpecific;
|
in with config.deviceSpecific;
|
||||||
{
|
{
|
||||||
# defaultApplications.term = lib.mkIf (isLaptop || isDesktop) {
|
|
||||||
defaultApplications.term = {
|
defaultApplications.term = {
|
||||||
cmd = "${pkgs.kitty}/bin/kitty";
|
cmd = "${pkgs.kitty}/bin/kitty";
|
||||||
desktop = "kitty";
|
desktop = "kitty";
|
||||||
};
|
};
|
||||||
home-manager.users.alukard = {
|
home-manager.users.alukard = {
|
||||||
programs.kitty = {
|
programs.kitty = {
|
||||||
# enable = isLaptop || isDesktop;
|
|
||||||
enable = true;
|
enable = true;
|
||||||
font.name = "${thm.fonts.powerline.family} ${thm.fontSizes.small.str}";
|
font.name = "${thm.fonts.powerline.family} ${thm.fontSizes.small.str}";
|
||||||
# keybindings = ''
|
# keybindings = ''
|
||||||
|
@ -26,7 +26,6 @@ with config.deviceSpecific; {
|
|||||||
# pinfo
|
# pinfo
|
||||||
ripgrep
|
ripgrep
|
||||||
ripgrep-all
|
ripgrep-all
|
||||||
samba
|
|
||||||
sd
|
sd
|
||||||
tealdeer
|
tealdeer
|
||||||
# tidal-dl
|
# tidal-dl
|
||||||
@ -47,9 +46,6 @@ with config.deviceSpecific; {
|
|||||||
ranger
|
ranger
|
||||||
|
|
||||||
# gui
|
# gui
|
||||||
audacity
|
|
||||||
blueman
|
|
||||||
# bookworm
|
|
||||||
discord
|
discord
|
||||||
element-desktop
|
element-desktop
|
||||||
feh
|
feh
|
||||||
@ -60,7 +56,6 @@ with config.deviceSpecific; {
|
|||||||
qbittorrent
|
qbittorrent
|
||||||
qimgv
|
qimgv
|
||||||
quodlibet
|
quodlibet
|
||||||
scrcpy
|
|
||||||
system-config-printer
|
system-config-printer
|
||||||
tdesktop
|
tdesktop
|
||||||
xarchiver
|
xarchiver
|
||||||
@ -76,7 +71,11 @@ with config.deviceSpecific; {
|
|||||||
duf
|
duf
|
||||||
zsh-z
|
zsh-z
|
||||||
] ++ lib.optionals (!(isVM || isISO)) [
|
] ++ lib.optionals (!(isVM || isISO)) [
|
||||||
|
audacity
|
||||||
|
blueman
|
||||||
libreoffice
|
libreoffice
|
||||||
|
samba
|
||||||
|
scrcpy
|
||||||
] ++ lib.optionals isGaming [
|
] ++ lib.optionals isGaming [
|
||||||
# ceserver
|
# ceserver
|
||||||
# ckan
|
# ckan
|
||||||
@ -93,11 +92,9 @@ with config.deviceSpecific; {
|
|||||||
# winetricks
|
# winetricks
|
||||||
] ++ lib.optionals isLaptop [
|
] ++ lib.optionals isLaptop [
|
||||||
acpi
|
acpi
|
||||||
] ++ lib.optionals (config.device == "AMD-Workstation") [
|
|
||||||
] ++ lib.optionals (enableVirtualisation) [
|
] ++ lib.optionals (enableVirtualisation) [
|
||||||
virt-manager
|
virt-manager
|
||||||
] ++ lib.optionals (config.virtualisation.docker.enable) [
|
] ++ lib.optionals (config.virtualisation.docker.enable) [
|
||||||
docker-compose
|
docker-compose
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,19 @@
|
|||||||
{ lib, pkgs, config, ... }:
|
{ lib, pkgs, config, ... }:
|
||||||
with config.deviceSpecific; {
|
with config.deviceSpecific; {
|
||||||
boot = if !isServer then {
|
zramSwap = {
|
||||||
|
enable = true;
|
||||||
|
algorithm = "zstd";
|
||||||
|
memoryPercent = 60;
|
||||||
|
numDevices = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
boot = if !isServer && !isISO then {
|
||||||
loader = {
|
loader = {
|
||||||
timeout = lib.mkForce 4;
|
timeout = lib.mkForce 4;
|
||||||
systemd-boot.enable = pkgs.system == "x86_64-linux";
|
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") [
|
++ lib.optionals (pkgs.system == "x86_64-linux") [
|
||||||
"rd.systemd.show_status=auto"
|
"rd.systemd.show_status=auto"
|
||||||
"rd.udev.log_priority=3"
|
"rd.udev.log_priority=3"
|
||||||
@ -26,9 +33,10 @@ with config.deviceSpecific; {
|
|||||||
kernel.sysctl = {
|
kernel.sysctl = {
|
||||||
"vm.swappiness" = if config.deviceSpecific.isSSD then 1 else 10;
|
"vm.swappiness" = if config.deviceSpecific.isSSD then 1 else 10;
|
||||||
};
|
};
|
||||||
} else {
|
} else if isServer then {
|
||||||
kernelPackages = pkgs.linuxPackages_5_15_hardened;
|
kernelPackages = pkgs.linuxPackages_5_15_hardened;
|
||||||
kernelModules = [ "tcp_bbr" ];
|
kernelModules = [ "tcp_bbr" ];
|
||||||
|
kernelParams = [ "zswap.enabled=0" ];
|
||||||
kernel.sysctl = {
|
kernel.sysctl = {
|
||||||
"kernel.sysrq" = 0;
|
"kernel.sysrq" = 0;
|
||||||
"net.ipv4.icmp_echo_ignore_broadcasts" = 1;
|
"net.ipv4.icmp_echo_ignore_broadcasts" = 1;
|
||||||
@ -50,5 +58,9 @@ with config.deviceSpecific; {
|
|||||||
"net.ipv4.tcp_congestion_control" = "bbr";
|
"net.ipv4.tcp_congestion_control" = "bbr";
|
||||||
"net.core.default_qdisc" = "cake";
|
"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, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
with config.deviceSpecific; {
|
with config.deviceSpecific; {
|
||||||
|
|
||||||
services.acpid.enable = true;
|
services.acpid.enable = !isServer;
|
||||||
services.acpid.logEvents = false;
|
services.acpid.logEvents = false;
|
||||||
|
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = !isServer;
|
||||||
services.blueman.enable = true;
|
services.blueman.enable = !isServer;
|
||||||
|
|
||||||
services.btrbk.instances.home = {
|
services.btrbk.instances.home = {
|
||||||
settings = {
|
settings = {
|
||||||
@ -59,12 +59,14 @@ with config.deviceSpecific; {
|
|||||||
gpuOffset = -48; # -54
|
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 = {
|
home-manager.users.alukard.services.gammastep = {
|
||||||
enable = true;
|
enable = !isServer;
|
||||||
latitude = 48.79;
|
latitude = 48.79;
|
||||||
longitude = 44.78;
|
longitude = 44.78;
|
||||||
temperature.day = 6500;
|
temperature.day = 6500;
|
||||||
@ -74,13 +76,4 @@ with config.deviceSpecific; {
|
|||||||
services.upower.enable = true;
|
services.upower.enable = true;
|
||||||
|
|
||||||
systemd.services.systemd-udev-settle.enable = false;
|
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
|
sound
|
||||||
themes
|
themes
|
||||||
virtualisation
|
virtualisation
|
||||||
xserver
|
|
||||||
|
|
||||||
alacritty
|
alacritty
|
||||||
corectrl
|
corectrl
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
direnv
|
direnv
|
||||||
kitty
|
kitty
|
||||||
|
nix-index
|
||||||
|
|
||||||
#coturn
|
#coturn
|
||||||
#gitea
|
#gitea
|
||||||
|
Loading…
x
Reference in New Issue
Block a user