Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit78eaa0ccb01720bb91ffe6af1a0db93ab9408317 (patch)
Author
 Syndamia <kamen@syndamia.com>
2024-07-07 10:44:00 +0300
Committer
 Syndamia <kamen@syndamia.com>
2024-07-07 10:44:00 +0300
Files852e1b34d14cf3d54b9f4aaf1dc95fef8560e264
nix-78eaa0ccb01720bb91ffe6af1a0db93ab9408317.tar
nix-78eaa0ccb01720bb91ffe6af1a0db93ab9408317.tar.gz
nix-78eaa0ccb01720bb91ffe6af1a0db93ab9408317.zip
Parentf087e4cda75ce0ab2dcf6f4a8dbcaad9ec876ede (diff)
[all] Renamed and reorganized modules
21 files changed, 140 insertions, 111 deletions
-rw-r--r--configuration.nix19
-rw-r--r--module-groups.nix3
-rw-r--r--modules/battery.nix (renamed from modules/laptop_control.nix)3
-rw-r--r--modules/cli-apps.nix33
-rw-r--r--modules/cli-essential.nix20
-rw-r--r--modules/cli-powerful.nix18
-rw-r--r--modules/desktop_archiving.nix15
-rw-r--r--modules/dev-cli.nix (renamed from modules/dev.nix)7
-rw-r--r--modules/dev-gui.nix8
-rw-r--r--modules/gui-essential.nix (renamed from modules/gui-apps.nix)37
-rw-r--r--modules/gui-powerful.nix8
-rw-r--r--modules/hardware-general.nix9
-rw-r--r--modules/hardware-laptop.nix15
-rw-r--r--modules/keyboards-custom.nix (renamed from modules/keyboard.nix)0
-rw-r--r--modules/openbox-de.nix2
-rw-r--r--modules/rtl-sdr.nix (renamed from rtl-temp.nix)4
-rw-r--r--modules/tex.nix12
-rw-r--r--modules/users-standard.nix16
-rw-r--r--modules/virtualization.nix10
-rw-r--r--modules/web-server.nix4
-rw-r--r--modules/xserver.nix (renamed from modules/general-settings.nix)8
diff --git a/configuration.nix b/configuration.nix
index 95ca38f..3a8aa90 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -1,8 +1,4 @@
{ config, pkgs, ... }: {
- imports = [
- ./rtl-temp.nix
- ];
-
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It's perfectly fine and recommended to leave
@@ -19,8 +15,10 @@
nix.settings.experimental-features = [ "nix-command" "flakes" ];
+ nixpkgs.config.allowUnfree = true;
+
environment.systemPackages = with pkgs; [
- pipewire networkmanager
+ networkmanager
];
#
@@ -71,17 +69,6 @@
# Users
#
- # Define a user account. Don't forget to set a password with ‘passwd’.
- # Thanks https://discourse.nixos.org/t/gns3-setcap-and-ubridge-gns3-unable-to-execute-setcap-command/13485/3
- users = {
- groups.ubridge = {};
- users.kamen = {
- isNormalUser = true;
- extraGroups = [ "wheel" "audio" "video" "input" "lpadmin" "libvirtd" "lp" "scanner" "plugdev" "docker" "ubridge" ]; # Enable ‘sudo’ for the user.
- packages = [ ];
- shell = pkgs.zsh;
- homeMode = "711"; # mostly done for httpd access
- };};
# TODO
# Enable the OpenSSH daemon.
diff --git a/module-groups.nix b/module-groups.nix
index 368cc1a..263c4fa 100644
--- a/module-groups.nix
+++ b/module-groups.nix
@@ -1,3 +1,4 @@
{
- non-desktop = [ "laptop_control" ];
+ non-desktop = [ "battery" "hardware-laptop" ];
+ non-laptop = [ "dev-gui" "gui-powerful" ];
}
diff --git a/modules/laptop_control.nix b/modules/battery.nix
index 95de027..417446e 100644
--- a/modules/laptop_control.nix
+++ b/modules/battery.nix
@@ -1,9 +1,6 @@
{ pkgs, ... }: {
environment.systemPackages = with pkgs; [
- # Power
powertop upower acpid tlp
- # Other
- brightnessctl libinput-gestures epkowa
];
services = {
diff --git a/modules/cli-apps.nix b/modules/cli-apps.nix
deleted file mode 100644
index ab6f5a9..0000000
--- a/modules/cli-apps.nix
+++ /dev/null
@@ -1,33 +0,0 @@
-{ pkgs, ... }: {
- environment.systemPackages = with pkgs; [
- # Hardware managing apps
- pipewire libinput lm_sensors lshw usbutils chrony iotop bluez efibootmgr libva-utils
- parted dosfstools mtpfs ntfs3g squashfsTools
- # Network
- wget git rsync inetutils vnstat yt-dlp
- # Working with files
- neovim vim-full inotify-tools lsof tree xmlstarlet
- # General usage
- zsh dash htop rlwrap bc ddrescue cron
- # Working with files
- ffmpeg img2pdf pdftk imagemagick pngcrush jpegoptim optipng gd kid3 pandoc libisoburn mediainfo
- # Archive formats
- p7zip dpkg cdrtools zip unzip rar unrar rpm
- # Misc
- neofetch nixpkgs-2305.exa moc lazygit aspell
- ];
-
- # zsh
- programs.zsh.enable = true;
- environment.shells = with pkgs; [ zsh ];
-
- # bluez
-
- programs = {
- mtr.enable = true;
- gnupg.agent = {
- enable = true;
- enableSSHSupport = true;
- };
- };
-}
diff --git a/modules/cli-essential.nix b/modules/cli-essential.nix
new file mode 100644
index 0000000..b3c38f5
--- /dev/null
+++ b/modules/cli-essential.nix
@@ -0,0 +1,20 @@
+{ pkgs, ... }: {
+ environment.systemPackages = with pkgs; [
+ dash htop rlwrap bc
+ # Hardware
+ lm_sensors lshw
+ # Network
+ wget git rsync inetutils
+ # Files
+ vim-full
+ # Archive formats
+ gnutar p7zip zip unzip rar unrar
+ ];
+
+ programs = {
+ gnupg.agent = {
+ enable = true;
+ enableSSHSupport = true;
+ };
+ };
+}
diff --git a/modules/cli-powerful.nix b/modules/cli-powerful.nix
new file mode 100644
index 0000000..558adb5
--- /dev/null
+++ b/modules/cli-powerful.nix
@@ -0,0 +1,18 @@
+{ pkgs, ... }: {
+ environment.systemPackages = with pkgs; [
+ neovim cron
+ # Hardware
+ usbutils chrony iotop efibootmgr libva-utils
+ # File systems
+ parted dosfstools mtpfs ntfs3g squashfsTools
+ # Network
+ vnstat yt-dlp
+ # Working with files
+ neovim inotify-tools lsof tree xmlstarlet
+ # Working with (media) files
+ ffmpeg img2pdf pdftk imagemagick pngcrush jpegoptim optipng gd kid3 pandoc libisoburn mediainfo
+ cdrtools rpm dpkg
+ # Misc
+ neofetch nixpkgs-2305.exa moc lazygit aspell ddrescue
+ ];
+}
diff --git a/modules/desktop_archiving.nix b/modules/desktop_archiving.nix
deleted file mode 100644
index f3b6de8..0000000
--- a/modules/desktop_archiving.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{ pkgs, ... }: {
- environment.systemPackages = with pkgs; [
- timeshift
- # k3s
- ];
-
- networking.firewall = {
- allowedTCPPorts = [ 6443 ];
- };
-
- services.k3s = {
- enable = false;
- role = "server";
- };
-}
diff --git a/modules/dev.nix b/modules/dev-cli.nix
index b291692..a701c2e 100644
--- a/modules/dev.nix
+++ b/modules/dev-cli.nix
@@ -5,13 +5,11 @@
# C/C++
clang clang-tools glibc gcc gdb valgrind pugixml cmake libusb libusb-compat-0_1 meson
# .NET
- dotnet-sdk mono
+ dotnet-sdk mono
# Python
- python3Minimal
+ python3Minimal
# Android
android-tools heimdall
- # Networking
- wireshark gns3-gui gns3-server dynamips
# awk
gawk mawk nawk
# DB
@@ -20,6 +18,5 @@
racket ghc sbcl
# Compilers
flex bison
- rstudio
];
}
diff --git a/modules/dev-gui.nix b/modules/dev-gui.nix
new file mode 100644
index 0000000..fd066f3
--- /dev/null
+++ b/modules/dev-gui.nix
@@ -0,0 +1,8 @@
+{ pkgs, ... }: {
+ environment.systemPackages = with pkgs; [
+ # Networking
+ gns3-gui gns3-server dynamips
+ # Other
+ rstudio
+ ];
+}
diff --git a/modules/gui-apps.nix b/modules/gui-essential.nix
index 7817860..09ee028 100644
--- a/modules/gui-apps.nix
+++ b/modules/gui-essential.nix
@@ -1,42 +1,23 @@
-{ pkgs, ... }:
-let
- tex = (pkgs.texlive.combine {
- inherit (pkgs.texlive) scheme-medium
- babel-bulgarian cyrillic cancel enumitem;
- });
-in {
+{ pkgs, ... }: {
environment.systemPackages = with pkgs; [
- terminator
- obs-studio qbittorrent speedcrunch
- rtl-sdr gqrx sdrangel xed-editor
- devilspie2 sxhkd
- glava
+ devilspie2 sxhkd speedcrunch peek wireshark
+ obs-studio qbittorrent glava
+ # Terminals
+ terminator xterm
# Settings and backup tools
- feh xterm arandr pavucontrol blueberry piper
+ feh arandr pavucontrol blueberry piper
# Tray
copyq flameshot barrier redshift
# File openers/players
audacious mpv libreoffice
- # File/image/audio editors
- gimp inkscape texmaker tex krita ardour
- # Web (app) clients
+ # File editors
+ gimp xed-editor
+ # Web (app) clients
brave bitwarden nextcloud-client thunderbird birdtray
- # System
- peek gparted
- # Virtualization
- virt-manager libvirt qemu_kvm kvmtool qemu_full
];
programs.firefox.enable = true;
- # libvirt
- virtualisation.libvirtd.enable = true;
-
- # docker
- virtualisation.docker.enable = true;
-
- # rtl-sdr
-
systemd.user.services = {
devilspie2 = {
description = "devilspie2 runner";
diff --git a/modules/gui-powerful.nix b/modules/gui-powerful.nix
new file mode 100644
index 0000000..469dd15
--- /dev/null
+++ b/modules/gui-powerful.nix
@@ -0,0 +1,8 @@
+{ pkgs, ... }: {
+ environment.systemPackages = with pkgs; [
+ # File/image/audio editors
+ inkscape krita ardour
+ # System
+ gparted timeshift
+ ];
+}
diff --git a/modules/hardware-general.nix b/modules/hardware-general.nix
new file mode 100644
index 0000000..4f83454
--- /dev/null
+++ b/modules/hardware-general.nix
@@ -0,0 +1,9 @@
+{ pkgs, ... }: {
+ environment.systemPackages = with pkgs; [
+ pipewire bluez
+ ];
+
+ programs = {
+ mtr.enable = true;
+ };
+}
diff --git a/modules/hardware-laptop.nix b/modules/hardware-laptop.nix
new file mode 100644
index 0000000..53fb737
--- /dev/null
+++ b/modules/hardware-laptop.nix
@@ -0,0 +1,15 @@
+{ pkgs, ... }: {
+ environment.systemPackages = with pkgs; [
+ brightnessctl
+ libinput libinput-gestures
+ epkowa
+ ];
+
+ services.xserver = {
+ # touchpad support
+ libinput = {
+ enable = true;
+ touchpad.naturalScrolling = true;
+ };
+ };
+}
diff --git a/modules/keyboard.nix b/modules/keyboards-custom.nix
index 9dcc502..9dcc502 100644
--- a/modules/keyboard.nix
+++ b/modules/keyboards-custom.nix
diff --git a/modules/openbox-de.nix b/modules/openbox-de.nix
index 8102d6b..4d1bc2e 100644
--- a/modules/openbox-de.nix
+++ b/modules/openbox-de.nix
@@ -4,7 +4,7 @@
dbus cairo libnotify gtk3 yad gnome.zenity gnome.gvfs gmtp at-spi2-atk
# Main apps and their config apps
# window manager, compositor, taskbar, notifications, app menu, lockscreen, session manager
- openbox lxappearance obconf picom nixpkgs-2305.tint2 dunst jgmenu i3lock-color lightdm lightdm-gtk-greeter
+ openbox lxappearance obconf picom nixpkgs-2305.tint2 dunst jgmenu i3lock-color lightdm lightdm-gtk-greeter
# General X11 tools
lxqt.lxqt-policykit xorg.xev xfontsel xorg.xmodmap xorg.xwininfo xorg.xprop clipnotify xdotool xautolock xcape xorg.setxkbmap xkbmon xorg.xhost xclip wmctrl
menu-cache
diff --git a/rtl-temp.nix b/modules/rtl-sdr.nix
index 4f8f3c6..4347bf4 100644
--- a/rtl-temp.nix
+++ b/modules/rtl-sdr.nix
@@ -1,4 +1,8 @@
{ pkgs, ... }: {
+ environment.systemPackages = with pkgs; [
+ rtl-sdr gqrx sdrangel
+ ];
+
services.udev.extraRules = ''
#
# Copyright 2012-2013 Osmocom rtl-sdr project
diff --git a/modules/tex.nix b/modules/tex.nix
new file mode 100644
index 0000000..9e45bb6
--- /dev/null
+++ b/modules/tex.nix
@@ -0,0 +1,12 @@
+{ pkgs, ... }:
+let
+ tex = (pkgs.texlive.combine {
+ inherit (pkgs.texlive) scheme-medium
+ babel-bulgarian cyrillic cancel enumitem;
+ });
+in {
+ environment.systemPackages = with pkgs; [
+ texmaker tex
+ ];
+}
+
diff --git a/modules/users-standard.nix b/modules/users-standard.nix
new file mode 100644
index 0000000..a9065d2
--- /dev/null
+++ b/modules/users-standard.nix
@@ -0,0 +1,16 @@
+{ config, pkgs, ... }: {
+ # zsh
+ programs.zsh.enable = true;
+ environment.shells = with pkgs; [ zsh ];
+ # Thanks https://discourse.nixos.org/t/gns3-setcap-and-ubridge-gns3-unable-to-execute-setcap-command/13485/3
+ users = {
+ groups.ubridge = {};
+ users.kamen = {
+ isNormalUser = true;
+ extraGroups = [ "wheel" "audio" "video" "input" "lpadmin" "libvirtd" "lp" "scanner" "plugdev" "docker" "ubridge" ]; # Enable ‘sudo’ for the user.
+ packages = [ ];
+ shell = pkgs.zsh;
+ homeMode = "711"; # mostly done for httpd access
+ };
+ };
+}
diff --git a/modules/virtualization.nix b/modules/virtualization.nix
new file mode 100644
index 0000000..38c7536
--- /dev/null
+++ b/modules/virtualization.nix
@@ -0,0 +1,10 @@
+{ pkgs, ... }: {
+ environment.systemPackages = with pkgs; [
+ virt-manager libvirt qemu_kvm kvmtool qemu_full
+ ];
+
+ virtualisation = {
+ libvirtd.enable = true;
+ docker.enable = true;
+ };
+}
diff --git a/modules/web-server.nix b/modules/web-server.nix
index f8a13b5..bb4a968 100644
--- a/modules/web-server.nix
+++ b/modules/web-server.nix
@@ -1,5 +1,7 @@
{ pkgs, ... }: {
- environment.systemPackages = with pkgs; [ apacheHttpd ];
+ environment.systemPackages = with pkgs; [
+ apacheHttpd
+ ];
services.httpd = {
enable = true;
diff --git a/modules/general-settings.nix b/modules/xserver.nix
index 652c55c..05d50ec 100644
--- a/modules/general-settings.nix
+++ b/modules/xserver.nix
@@ -1,6 +1,4 @@
{ pkgs, ... }: {
- nixpkgs.config.allowUnfree = true;
-
services.xserver = {
# xkbmap
layout = "us,bg-custom";
@@ -11,11 +9,5 @@
languages = [ "bg" ];
symbolsFile = ../packages/bg-custom;
};
-
- # touchpad support
- libinput = {
- enable = true;
- touchpad.naturalScrolling = true;
- };
};
}