refactor some modules
This commit is contained in:
@@ -11,6 +11,7 @@ in
|
||||
{
|
||||
imports = [
|
||||
../../modules
|
||||
../../modules/profiles/physical
|
||||
../../modules/profiles/btrfs
|
||||
];
|
||||
|
||||
@@ -224,9 +225,6 @@ in
|
||||
};
|
||||
|
||||
services = {
|
||||
pcscd.enable = true;
|
||||
acpid.enable = true;
|
||||
fwupd.enable = true;
|
||||
logind = {
|
||||
lidSwitch = "ignore";
|
||||
powerKey = "suspend";
|
||||
@@ -724,10 +722,8 @@ in
|
||||
environment = {
|
||||
enableDebugInfo = true;
|
||||
systemPackages = with pkgs; [
|
||||
acpi
|
||||
yt-dlp
|
||||
inferno
|
||||
nvme-cli
|
||||
tpm2-tools
|
||||
amdgpu_top
|
||||
graphicsmagick
|
||||
|
||||
@@ -11,7 +11,7 @@ in
|
||||
imports = [
|
||||
../../shared/work
|
||||
../../modules
|
||||
../../modules/profiles/desktop
|
||||
../../modules/profiles/workstation
|
||||
../../modules/profiles/autorandr
|
||||
../../modules/profiles/btrfs
|
||||
];
|
||||
|
||||
@@ -12,7 +12,7 @@ in
|
||||
{
|
||||
imports = [
|
||||
../../modules
|
||||
../../modules/profiles/desktop
|
||||
../../modules/profiles/workstation
|
||||
../../modules/profiles/autorandr
|
||||
../../modules/profiles/btrfs
|
||||
];
|
||||
|
||||
@@ -10,6 +10,7 @@ in
|
||||
{
|
||||
imports = [
|
||||
../../modules
|
||||
../../modules/profiles/physical
|
||||
../../modules/profiles/btrfs
|
||||
];
|
||||
|
||||
@@ -71,12 +72,6 @@ in
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
|
||||
services = {
|
||||
pcscd.enable = true;
|
||||
acpid.enable = true;
|
||||
fwupd.enable = true;
|
||||
};
|
||||
|
||||
mj = {
|
||||
stateVersion = "24.11";
|
||||
timeZone = "Europe/Vilnius";
|
||||
|
||||
@@ -110,17 +110,12 @@ in
|
||||
btdu
|
||||
lshw
|
||||
entr
|
||||
cloc
|
||||
poop # hopefully poof some day
|
||||
pigz
|
||||
zstd
|
||||
flex
|
||||
bison
|
||||
s-tui # stress and monitor cpu
|
||||
unrar
|
||||
iotop
|
||||
wdiff
|
||||
tokei
|
||||
sshfs
|
||||
pwgen
|
||||
below # tracking cgroups
|
||||
@@ -130,10 +125,7 @@ in
|
||||
bindfs
|
||||
spiped
|
||||
parted
|
||||
bloaty
|
||||
dhcpcd
|
||||
hdparm
|
||||
sdparm
|
||||
procps
|
||||
unison
|
||||
usbtop
|
||||
@@ -144,7 +136,6 @@ in
|
||||
ethtool
|
||||
gettext
|
||||
exiftool
|
||||
bpftrace
|
||||
keyutils
|
||||
libkcapi
|
||||
usbutils
|
||||
@@ -152,17 +143,11 @@ in
|
||||
bsdgames
|
||||
parallel
|
||||
yamllint
|
||||
binutils
|
||||
dos2unix
|
||||
patchelf
|
||||
compsize
|
||||
rtorrent
|
||||
p7zip-rar
|
||||
hyperfine
|
||||
stress-ng
|
||||
dmidecode
|
||||
moreutils
|
||||
sloccount
|
||||
cryptsetup
|
||||
lm_sensors
|
||||
inotify-info
|
||||
@@ -199,9 +184,6 @@ in
|
||||
config.boot.kernelPackages.perf
|
||||
config.boot.kernelPackages.vm-tools
|
||||
|
||||
# non-virtual
|
||||
powerstat
|
||||
config.boot.kernelPackages.cpupower
|
||||
]
|
||||
(lib.mkIf (pkgs.stdenv.hostPlatform.system == "x86_64-linux") [ wrk2 ])
|
||||
];
|
||||
|
||||
@@ -18,16 +18,12 @@ let
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [ ../dev ];
|
||||
imports = [
|
||||
../dev
|
||||
../physical
|
||||
];
|
||||
config = {
|
||||
boot = {
|
||||
loader.systemd-boot.enable = true;
|
||||
initrd.systemd.enable = true;
|
||||
supportedFilesystems = [
|
||||
"exfat"
|
||||
"ntfs"
|
||||
"xfs"
|
||||
];
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
};
|
||||
|
||||
@@ -66,11 +62,8 @@ in
|
||||
];
|
||||
|
||||
services = {
|
||||
fwupd.enable = true;
|
||||
blueman.enable = true;
|
||||
udev.packages = [ pkgs.yubikey-personalization ];
|
||||
acpid.enable = true;
|
||||
pcscd.enable = true;
|
||||
gnome.gnome-keyring.enable = true;
|
||||
openssh.settings.X11Forwarding = true;
|
||||
|
||||
@@ -113,14 +106,6 @@ in
|
||||
|
||||
pipewire.enable = false;
|
||||
|
||||
tlp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
START_CHARGE_THRESH_BAT0 = lib.mkDefault 80;
|
||||
STOP_CHARGE_THRESH_BAT0 = lib.mkDefault 87;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
programs = {
|
||||
@@ -158,9 +143,7 @@ in
|
||||
xkcd-font
|
||||
];
|
||||
|
||||
environment.systemPackages =
|
||||
with pkgs;
|
||||
[
|
||||
environment.systemPackages = with pkgs; [
|
||||
# packages defined here
|
||||
open
|
||||
nicer
|
||||
@@ -169,19 +152,13 @@ in
|
||||
|
||||
f3 # flight-flash-fraud
|
||||
iw
|
||||
rr
|
||||
gdb
|
||||
ntp
|
||||
i7z
|
||||
vlc
|
||||
sox
|
||||
mpv
|
||||
imv # image viewer
|
||||
acpi
|
||||
gimp
|
||||
josm
|
||||
pdal
|
||||
gdal
|
||||
qemu
|
||||
zlib
|
||||
ninja
|
||||
@@ -217,15 +194,12 @@ in
|
||||
gnumake
|
||||
libwebp
|
||||
librsvg
|
||||
neomutt
|
||||
picocom
|
||||
inferno
|
||||
libheif
|
||||
csvkit
|
||||
mplayer
|
||||
tcpflow
|
||||
cppcheck
|
||||
wasmtime
|
||||
undocker
|
||||
nautilus
|
||||
smplayer
|
||||
@@ -236,14 +210,8 @@ in
|
||||
bsdgames
|
||||
pstoedit
|
||||
xss-lock
|
||||
valgrind
|
||||
musl.dev
|
||||
audacity
|
||||
graphviz
|
||||
powertop
|
||||
nvme-cli
|
||||
librecad
|
||||
qgis-ltr # qgis gets recompiled, qgis-ltr is cached by hydra
|
||||
colordiff
|
||||
tesseract
|
||||
trayscale
|
||||
@@ -254,14 +222,10 @@ in
|
||||
miniupnpc
|
||||
v4l-utils
|
||||
#nerdfonts
|
||||
postgresql
|
||||
winetricks
|
||||
#diffoscope # broken on 2025-09-28, not used much
|
||||
alsa-utils
|
||||
gcc_latest
|
||||
shellcheck
|
||||
borgbackup
|
||||
efibootmgr
|
||||
virtualenv
|
||||
imagemagick
|
||||
#ventoy-full
|
||||
@@ -276,7 +240,6 @@ in
|
||||
poppler_utils
|
||||
rkdeveloptool
|
||||
squashfsTools
|
||||
nixpkgs-review
|
||||
joplin-desktop
|
||||
aspellDicts.en
|
||||
aspellDicts.lt
|
||||
@@ -285,7 +248,6 @@ in
|
||||
magic-wormhole
|
||||
signal-desktop
|
||||
gnome-calendar
|
||||
intel-gpu-tools
|
||||
element-desktop
|
||||
netsurf-browser
|
||||
man-pages-posix
|
||||
@@ -315,29 +277,7 @@ in
|
||||
]
|
||||
))
|
||||
|
||||
(texlive.combine {
|
||||
inherit (texlive)
|
||||
lithuanian
|
||||
scheme-medium
|
||||
hyphen-lithuanian
|
||||
collection-binextra
|
||||
collection-bibtexextra
|
||||
collection-latexextra
|
||||
collection-publishers
|
||||
;
|
||||
})
|
||||
]
|
||||
++ (with llvmPackages_19; [
|
||||
clang
|
||||
lld.dev
|
||||
llvm.dev
|
||||
clang-tools
|
||||
libllvm.dev
|
||||
libclang.dev
|
||||
llvm-manpages
|
||||
clang-manpages
|
||||
compiler-rt.dev
|
||||
]);
|
||||
];
|
||||
|
||||
# https://discourse.nixos.org/t/nixos-rebuild-switch-upgrade-networkmanager-wait-online-service-failure/30746
|
||||
systemd.services.NetworkManager-wait-online.enable = false;
|
||||
@@ -347,7 +287,6 @@ in
|
||||
{
|
||||
imports = [ ./plasma.nix ];
|
||||
xdg.configFile = {
|
||||
"awesome/rc.lua".source = ./rc.lua;
|
||||
"gdb/gdbinit".text = ''
|
||||
set style address foreground yellow
|
||||
set style function foreground cyan
|
||||
@@ -356,10 +295,6 @@ in
|
||||
};
|
||||
|
||||
programs = {
|
||||
msmtp.enable = true;
|
||||
mbsync.enable = true;
|
||||
neomutt.enable = true;
|
||||
notmuch.enable = true;
|
||||
ghostty = {
|
||||
enable = true;
|
||||
installVimSyntax = true;
|
||||
@@ -377,104 +312,6 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
tmux.extraConfig =
|
||||
let
|
||||
cmd = "${pkgs.extract_url}/bin/extract_url";
|
||||
cfg = pkgs.writeText "urlviewrc" "COMMAND systemd-run --user --collect xdg-open %s";
|
||||
in
|
||||
''
|
||||
bind-key u capture-pane -J \; \
|
||||
save-buffer /tmp/tmux-buffer \; \
|
||||
delete-buffer \; \
|
||||
split-window -l 10 "${cmd} -c ${cfg} /tmp/tmux-buffer"
|
||||
'';
|
||||
};
|
||||
|
||||
accounts.email = {
|
||||
maildirBasePath = "Maildir";
|
||||
|
||||
accounts.mj = {
|
||||
primary = true;
|
||||
userName = "motiejus@jakstys.lt";
|
||||
address = "motiejus@jakstys.lt";
|
||||
realName = "Motiejus Jakštys";
|
||||
passwordCommand = "cat /home/${username}/.mail-appcode";
|
||||
imap.host = "imap.gmail.com";
|
||||
smtp.host = "smtp.gmail.com";
|
||||
|
||||
mbsync = {
|
||||
enable = true;
|
||||
create = "maildir";
|
||||
patterns = [
|
||||
"*"
|
||||
"![Gmail]/All Mail"
|
||||
];
|
||||
};
|
||||
|
||||
msmtp = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
notmuch = {
|
||||
enable = true;
|
||||
neomutt.enable = true;
|
||||
};
|
||||
|
||||
neomutt = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
set index_format="%4C %Z %{%F %H:%M} %-15.15L (%?l?%4l&%4c?) %s"
|
||||
|
||||
set mailcap_path = ${pkgs.writeText "mailcaprc" ''
|
||||
text/html; ${pkgs.elinks}/bin/elinks -dump ; copiousoutput;
|
||||
application/*; ${pkgs.xdg-utils}/bin/xdg-open %s &> /dev/null &;
|
||||
image/*; ${pkgs.xdg-utils}/bin/xdg-open %s &> /dev/null &;
|
||||
''}
|
||||
auto_view text/html
|
||||
unset record
|
||||
set send_charset="utf-8"
|
||||
|
||||
macro attach 'V' "<pipe-entry>iconv -c --to-code=UTF8 > ~/.cache/mutt/mail.html<enter><shell-escape>firefox ~/.cache/mutt/mail.html<enter>"
|
||||
macro index,pager \cb "<pipe-message> env BROWSER=firefox urlscan<Enter>" "call urlscan to extract URLs out of a message"
|
||||
macro attach,compose \cb "<pipe-entry> env BROWSER=firefox urlscan<Enter>" "call urlscan to extract URLs out of a message"
|
||||
|
||||
set sort_browser=date
|
||||
set sort=reverse-threads
|
||||
set sort_aux=last-date-received
|
||||
|
||||
bind pager g top
|
||||
bind pager G bottom
|
||||
bind attach,index g first-entry
|
||||
bind attach,index G last-entry
|
||||
bind attach,index,pager \CD half-down
|
||||
bind attach,index,pager \CU half-up
|
||||
bind attach,index,pager \Ce next-line
|
||||
bind attach,index,pager \Cy previous-line
|
||||
bind index,pager B sidebar-toggle-visible
|
||||
bind index,pager R group-reply
|
||||
|
||||
set sidebar_visible = yes
|
||||
set sidebar_width = 15
|
||||
bind index,pager \Cp sidebar-prev
|
||||
bind index,pager \Cn sidebar-next
|
||||
bind index,pager \Co sidebar-open
|
||||
bind index,pager B sidebar-toggle-visible
|
||||
set sidebar_short_path = yes
|
||||
set sidebar_delim_chars = '/'
|
||||
set sidebar_format = '%B%* %?N?%N?'
|
||||
set mail_check_stats
|
||||
set postponed="+[Gmail]/Drafts"
|
||||
mailboxes =btrfs
|
||||
mailboxes =Debian
|
||||
mailboxes =alerts
|
||||
mailboxes ="[Gmail]/Drafts"
|
||||
mailboxes ="[Gmail]/Starred"
|
||||
mailboxes ="[Gmail]/Sent Mail"
|
||||
|
||||
source ${./notmuch-colors.muttrc}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
|
||||
51
modules/profiles/physical/default.nix
Normal file
51
modules/profiles/physical/default.nix
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
config = {
|
||||
boot = {
|
||||
loader.systemd-boot.enable = true;
|
||||
initrd.systemd.enable = true;
|
||||
supportedFilesystems = [
|
||||
"exfat"
|
||||
"ntfs"
|
||||
"xfs"
|
||||
];
|
||||
};
|
||||
|
||||
services = {
|
||||
fwupd.enable = true;
|
||||
acpid.enable = true;
|
||||
pcscd.enable = true;
|
||||
|
||||
tlp = {
|
||||
enable = lib.mkDefault true;
|
||||
settings = {
|
||||
START_CHARGE_THRESH_BAT0 = lib.mkDefault 80;
|
||||
STOP_CHARGE_THRESH_BAT0 = lib.mkDefault 87;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
acpi
|
||||
i7z
|
||||
nvme-cli
|
||||
powertop
|
||||
efibootmgr
|
||||
smartmontools
|
||||
intel-gpu-tools
|
||||
tpm2-tools
|
||||
hdparm
|
||||
sdparm
|
||||
s-tui
|
||||
dmidecode
|
||||
stress-ng
|
||||
powerstat
|
||||
config.boot.kernelPackages.cpupower
|
||||
];
|
||||
};
|
||||
}
|
||||
194
modules/profiles/workstation/default.nix
Normal file
194
modules/profiles/workstation/default.nix
Normal file
@@ -0,0 +1,194 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (config.mj) username;
|
||||
in
|
||||
{
|
||||
imports = [ ../desktop ];
|
||||
|
||||
config = {
|
||||
services.xserver = {
|
||||
windowManager.awesome.enable = true;
|
||||
};
|
||||
|
||||
services.displayManager = {
|
||||
defaultSession = lib.mkDefault "none+awesome";
|
||||
};
|
||||
|
||||
environment.systemPackages =
|
||||
with pkgs;
|
||||
[
|
||||
rr
|
||||
josm
|
||||
pdal
|
||||
gdal
|
||||
qgis-ltr
|
||||
neomutt
|
||||
valgrind
|
||||
musl.dev
|
||||
graphviz
|
||||
postgresql
|
||||
cppcheck
|
||||
wasmtime
|
||||
gcc_latest
|
||||
borgbackup
|
||||
nixpkgs-review
|
||||
cloc
|
||||
tokei
|
||||
bloaty
|
||||
binutils
|
||||
patchelf
|
||||
hyperfine
|
||||
sloccount
|
||||
bpftrace
|
||||
flex
|
||||
bison
|
||||
|
||||
(texlive.combine {
|
||||
inherit (texlive)
|
||||
lithuanian
|
||||
scheme-medium
|
||||
hyphen-lithuanian
|
||||
collection-binextra
|
||||
collection-bibtexextra
|
||||
collection-latexextra
|
||||
collection-publishers
|
||||
;
|
||||
})
|
||||
]
|
||||
++ (with llvmPackages_19; [
|
||||
clang
|
||||
lld.dev
|
||||
llvm.dev
|
||||
clang-tools
|
||||
libllvm.dev
|
||||
libclang.dev
|
||||
llvm-manpages
|
||||
clang-manpages
|
||||
compiler-rt.dev
|
||||
]);
|
||||
|
||||
home-manager.users.${username} =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
xdg.configFile = {
|
||||
"awesome/rc.lua".source = ../desktop/rc.lua;
|
||||
"gdb/gdbinit".text = ''
|
||||
set style address foreground yellow
|
||||
set style function foreground cyan
|
||||
set style string foreground magenta
|
||||
'';
|
||||
};
|
||||
|
||||
programs = {
|
||||
msmtp.enable = true;
|
||||
mbsync.enable = true;
|
||||
neomutt.enable = true;
|
||||
notmuch.enable = true;
|
||||
|
||||
tmux.extraConfig =
|
||||
let
|
||||
cmd = "${pkgs.extract_url}/bin/extract_url";
|
||||
cfg = pkgs.writeText "urlviewrc" "COMMAND systemd-run --user --collect xdg-open %s";
|
||||
in
|
||||
''
|
||||
bind-key u capture-pane -J \; \
|
||||
save-buffer /tmp/tmux-buffer \; \
|
||||
delete-buffer \; \
|
||||
split-window -l 10 "${cmd} -c ${cfg} /tmp/tmux-buffer"
|
||||
'';
|
||||
};
|
||||
|
||||
accounts.email = {
|
||||
maildirBasePath = "Maildir";
|
||||
|
||||
accounts.mj = {
|
||||
primary = true;
|
||||
userName = "motiejus@jakstys.lt";
|
||||
address = "motiejus@jakstys.lt";
|
||||
realName = "Motiejus Jakštys";
|
||||
passwordCommand = "cat /home/${username}/.mail-appcode";
|
||||
imap.host = "imap.gmail.com";
|
||||
smtp.host = "smtp.gmail.com";
|
||||
|
||||
mbsync = {
|
||||
enable = true;
|
||||
create = "maildir";
|
||||
patterns = [
|
||||
"*"
|
||||
"![Gmail]/All Mail"
|
||||
];
|
||||
};
|
||||
|
||||
msmtp = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
notmuch = {
|
||||
enable = true;
|
||||
neomutt.enable = true;
|
||||
};
|
||||
|
||||
neomutt = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
set index_format="%4C %Z %{%F %H:%M} %-15.15L (%?l?%4l&%4c?) %s"
|
||||
|
||||
set mailcap_path = ${pkgs.writeText "mailcaprc" ''
|
||||
text/html; ${pkgs.elinks}/bin/elinks -dump ; copiousoutput;
|
||||
application/*; ${pkgs.xdg-utils}/bin/xdg-open %s &> /dev/null &;
|
||||
image/*; ${pkgs.xdg-utils}/bin/xdg-open %s &> /dev/null &;
|
||||
''}
|
||||
auto_view text/html
|
||||
unset record
|
||||
set send_charset="utf-8"
|
||||
|
||||
macro attach 'V' "<pipe-entry>iconv -c --to-code=UTF8 > ~/.cache/mutt/mail.html<enter><shell-escape>firefox ~/.cache/mutt/mail.html<enter>"
|
||||
macro index,pager \cb "<pipe-message> env BROWSER=firefox urlscan<Enter>" "call urlscan to extract URLs out of a message"
|
||||
macro attach,compose \cb "<pipe-entry> env BROWSER=firefox urlscan<Enter>" "call urlscan to extract URLs out of a message"
|
||||
|
||||
set sort_browser=date
|
||||
set sort=reverse-threads
|
||||
set sort_aux=last-date-received
|
||||
|
||||
bind pager g top
|
||||
bind pager G bottom
|
||||
bind attach,index g first-entry
|
||||
bind attach,index G last-entry
|
||||
bind attach,index,pager \CD half-down
|
||||
bind attach,index,pager \CU half-up
|
||||
bind attach,index,pager \Ce next-line
|
||||
bind attach,index,pager \Cy previous-line
|
||||
bind index,pager B sidebar-toggle-visible
|
||||
bind index,pager R group-reply
|
||||
|
||||
set sidebar_visible = yes
|
||||
set sidebar_width = 15
|
||||
bind index,pager \Cp sidebar-prev
|
||||
bind index,pager \Cn sidebar-next
|
||||
bind index,pager \Co sidebar-open
|
||||
bind index,pager B sidebar-toggle-visible
|
||||
set sidebar_short_path = yes
|
||||
set sidebar_delim_chars = '/'
|
||||
set sidebar_format = '%B%* %?N?%N?'
|
||||
set mail_check_stats
|
||||
set postponed="+[Gmail]/Drafts"
|
||||
mailboxes =btrfs
|
||||
mailboxes =Debian
|
||||
mailboxes =alerts
|
||||
mailboxes ="[Gmail]/Drafts"
|
||||
mailboxes ="[Gmail]/Starred"
|
||||
mailboxes ="[Gmail]/Sent Mail"
|
||||
|
||||
source ${../desktop/notmuch-colors.muttrc}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
18
modules/profiles/xfce4/default.nix
Normal file
18
modules/profiles/xfce4/default.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ ../desktop ];
|
||||
|
||||
config = {
|
||||
services.xserver = {
|
||||
desktopManager.xfce.enable = true;
|
||||
};
|
||||
|
||||
services.displayManager = {
|
||||
defaultSession = lib.mkForce "xfce";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user