Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commitd0caf89ffc06104cb9c077c299a96b778d5db79b (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-11-29 19:44:57 +0200
Committer
 Syndamia <kamen@syndamia.com>
2023-11-29 19:44:57 +0200
Files1f4850021bc37dd9a0531206e60fcf795b343461
nix-d0caf89ffc06104cb9c077c299a96b778d5db79b.tar
nix-d0caf89ffc06104cb9c077c299a96b778d5db79b.tar.gz
nix-d0caf89ffc06104cb9c077c299a96b778d5db79b.zip
Parent3c2f7173c7620e14ef349ab36df14bf07f109d66 (diff)
(all) Overhaul, moved all package and their configs into packages/default.nix, reordered configuration.nix
6 files changed, 394 insertions, 365 deletions
-rw-r--r--autoconfig.nix63
-rw-r--r--configuration.nix180
-rw-r--r--machines/juno/configuration.nix15
-rw-r--r--packages.nix109
-rw-r--r--packages/default.nix271
-rw-r--r--services.nix121
diff --git a/autoconfig.nix b/autoconfig.nix
index 06021ee..e57d9e1 100644
--- a/autoconfig.nix
+++ b/autoconfig.nix
@@ -2,20 +2,6 @@
let
inherit (inputs) nixpkgs;
inherit (nixpkgs) lib;
- _mergeAttrs =
- let
- recurse = attrset:
- lib.zipAttrsWith
- (name: values:
- if builtins.isAttrs (builtins.head values) then
- recurse (builtins.filter (val: builtins.isAttrs val) values)
- else if builtins.isList (builtins.head values) then
- lib.concatLists (builtins.filter (val: builtins.isList val) values)
- else
- lib.last values)
- attrset;
- in
- recurse;
in {
configurations =
lib.mapAttrs
@@ -23,50 +9,25 @@ in {
let
inherit (import ./machines/${dir}/sysidentity.nix) sysidentity;
- package-groups = import ./packages { pkgs = nixpkgs.legacyPackages.${sysidentity.arch}; };
- packages =
- lib.foldlAttrs
- (config: _: package-group:
- let
- config-from-group =
- lib.foldlAttrs
- (acc: pkg-name: pkg-settings:
- if pkg-name == "for" then
- acc
- else if pkg-name == "list" then
- _mergeAttrs [
- acc
- {
- environment.systemPackages = pkg-settings;
- }]
- else
- _mergeAttrs [
- acc
- (lib.filterAttrs (name: _: name != "ref") pkg-settings)
- (if pkg-settings ? ref then
- {
- environment.systemPackages = [pkg-settings.ref];
- }
- else
- {} )])
- {}
- package-group;
- in
- _mergeAttrs [config config-from-group])
- {}
+ package-modules =
+ lib.mapAttrsToList
+ (_: module: module)
(lib.filterAttrs
- (_: prop: ((prop ? for.type) -> (builtins.elem sysidentity.type prop.for.type)) &&
- ((prop ? for.name) -> (builtins.elem sysidentity.name prop.for.name)))
- package-groups);
-
+ (name: _:
+ (lib.hasInfix "_" name) -> (lib.hasPrefix (sysidentity.type + "_") name))
+ (import ./packages));
in
lib.nixosSystem {
system = sysidentity.arch;
modules = [
./machines/${dir}/hardware-configuration.nix
./configuration.nix
- packages
- ];
+ ({ ... }: { networking.hostName = sysidentity.name; })
+ ]
+ ++ (if lib.pathIsRegularFile ./machines/${dir}/configuration.nix
+ then [ ./machines/${dir}/configuration.nix ]
+ else [])
+ ++ package-modules;
})
(lib.filterAttrs (_: type: type == "directory") (builtins.readDir ./machines));
}
diff --git a/configuration.nix b/configuration.nix
index 458c62d..2263b61 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -1,18 +1,46 @@
-# Edit this configuration file to define what should be installed on
-# your system. Help is available in the configuration.nix(5) man page
-# and in the NixOS manual (accessible by running `nixos-help`).
-
-{ config, pkgs, ... }:
-
-let
- sysidentity = { name="juno"; type="laptop"; };
-in {
+{ config, pkgs, ... }: {
imports =
[ # Include the results of the hardware scan.
- ./packages.nix
./services.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
+ # this value at the release version of the first install of this system.
+ # Before changing this value read the documentation for this option
+ # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
+ system.stateVersion = "23.05"; # Did you read the comment?
+
+ # Copy the NixOS configuration file and link it from the resulting system
+ # (/run/current-system/configuration.nix). This is useful in case you
+ # accidentally delete configuration.nix.
+ # Not available with flakes
+ # system.copySystemConfiguration = true;
+
+ nix.settings.experimental-features = [ "nix-command" "flakes" ];
+
+ environment.systemPackages = with pkgs; [
+ pipewire networkmanager
+ ];
+
+ #
+ # Kernel
+ #
+
+ boot.kernelModules = [ "kvm-intel" ];
+
+ # Is this for kernel?
+ # console = {
+ # font = "Lat2-Terminus16";
+ # keyMap = "us";
+ # useXkbConfig = true; # use xkbOptions in tty.
+ # };
+
+ #
+ # Bootloader
+ #
+
# Use the systemd-boot EFI boot loader.
# boot.loader.systemd-boot.enable = true;
# boot.loader.efi.canTouchEfiVariables = true;
@@ -28,35 +56,18 @@ in {
device = "nodev"; # or "nodev" for efi only
};
- networking.hostName = sysidentity.name; # Define your hostname.
- # Pick only one of the below networking options.
- # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
- networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
- networking.extraHosts = ''
- 127.0.0.1 synd.local
- '';
+ #
+ # Timezone and locale
+ #
# Set your time zone.
time.timeZone = "Europe/Sofia";
-
- # Configure network proxy if necessary
- # networking.proxy.default = "http://user:password@proxy:port/";
- # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
-
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
- # console = {
- # font = "Lat2-Terminus16";
- # keyMap = "us";
- # useXkbConfig = true; # use xkbOptions in tty.
- # };
-
- # Enable CUPS to print documents.
- services.printing.enable = true;
- # Enable sound.
- sound.enable = true;
- # hardware.pulseaudio.enable = true;
+ #
+ # Users
+ #
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.kamen = {
@@ -66,53 +77,88 @@ in {
shell = pkgs.zsh;
homeMode = "711"; # mostly done for httpd access
};
-programs.zsh.enable = true;
-
- environment.shells = with pkgs; [ zsh ];
+ # TODO
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
+ #
+ # Graphics
+ #
+
+ # https://nixos.wiki/wiki/Accelerated_Video_Playback
+ nixpkgs.config.packageOverrides = pkgs: {
+ vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
+ };
+ hardware.opengl = {
+ enable = true;
+ extraPackages = with pkgs; [
+ intel-media-driver # LIBVA_DRIVER_NAME=iHD
+ vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
+ vaapiVdpau
+ libvdpau-va-gl
+ ];
+ };
+
+
+ #
+ # Sound
+ #
+
+ sound.enable = true;
+ # hardware.pulseaudio.enable = true;
+
+ services.pipewire = {
+ enable = true;
+ alsa.support32Bit = true;
+ pulse.enable = true;
+ };
+
+ #
+ # Networking
+ #
+
+ # Pick only one of the below networking options.
+ # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
+ networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
+ networking.extraHosts = ''
+ 127.0.0.1 synd.local
+ '';
+
+ # Configure network proxy if necessary
+ # networking.proxy.default = "http://user:password@proxy:port/";
+ # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
+
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
- # Copy the NixOS configuration file and link it from the resulting system
- # (/run/current-system/configuration.nix). This is useful in case you
- # accidentally delete configuration.nix.
- # system.copySystemConfiguration = true;
+ # zeroconf networking
+ services.avahi = {
+ enable = true;
+ nssmdns = true;
+ openFirewall = true;
+ };
- # 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
- # this value at the release version of the first install of this system.
- # Before changing this value read the documentation for this option
- # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
- system.stateVersion = "23.05"; # Did you read the comment?
+ #
+ # Bluetooth
+ #
+
+ hardware.bluetooth.enable = true;
- # hardware.bluetooth.enable = true;
- # hardware.sane.enable = true;
- # hardware.rtl-sdr.enable = true;
- # virtualisation.docker.enable = true;
#
- # security.polkit.enable = true;
- # boot.kernelModules = [ "kvm-intel" ];
+ # Printers and scanners
+ #
- # https://nixos.wiki/wiki/Accelerated_Video_Playback
- # nixpkgs.config.packageOverrides = pkgs: {
- # vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
- # };
- # hardware.opengl = {
- # enable = true;
- # extraPackages = with pkgs; [
- # intel-media-driver # LIBVA_DRIVER_NAME=iHD
- # vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
- # vaapiVdpau
- # libvdpau-va-gl
- # ];
- # };
+ # Enable CUPS to print documents.
+ services.printing.enable = true;
+ hardware.sane.enable = true;
- nix.settings.experimental-features = [ "nix-command" "flakes" ];
+ #
+ # Other hardware
+ #
+
+ hardware.rtl-sdr.enable = true;
}
diff --git a/machines/juno/configuration.nix b/machines/juno/configuration.nix
new file mode 100644
index 0000000..9e75d45
--- /dev/null
+++ b/machines/juno/configuration.nix
@@ -0,0 +1,15 @@
+{ pkgs, ... }: {
+ environment.systemPackages = with pkgs; [
+ thinkfan xorg.xf86inputsynaptics
+ ];
+
+ services.thinkfan = {
+ enable = true;
+ levels = [
+ [0 0 35]
+ [1 35 38]
+ [3 38 53]
+ ["level auto" 53 32767]
+ ];
+ };
+}
diff --git a/packages.nix b/packages.nix
deleted file mode 100644
index 8a37e2f..0000000
--- a/packages.nix
+++ /dev/null
@@ -1,109 +0,0 @@
-{ pkgs, ... }:
-
-let
- sysidentity = { name="juno"; type="laptop"; };
- #unstable = import <nixos-unstable> { config.allowUnfree = true; };
- tex = (pkgs.texlive.combine {
- inherit (pkgs.texlive) scheme-medium
- babel-bulgarian cyrillic cancel enumitem;
- });
-in {
- nixpkgs.config.allowUnfree = true;
-
- # List packages installed in system profile. To search, run:
- # $ nix search wget
- environment.systemPackages = with pkgs;
- let
- cli-userspace = [
- # Working with files
- ffmpeg img2pdf pdftk imagemagick pngcrush jpegoptim optipng gd kid3 pandoc libisoburn
- # Archive formats
- p7zip dpkg cdrtools zip unzip rar unrar rpm
- # Misc
- neofetch exa moc lazygit aspell
- ];
- openboxDE-userspace = [
- terminator
- rtl-sdr gqrx sdrangel xed-editor
- # Settings and backup tools
- feh xterm arandr pavucontrol blueberry piper
- # Tray
- libappindicator networkmanagerapplet pnmixer copyq flameshot barrier redshift
- # File openers/players
- audacious mpv libreoffice evince gnome.eog gnome.file-roller cinnamon.nemo-with-extensions gnome.seahorse
- # File/image/audio editors
- gimp inkscape texmaker tex krita ardour
- # Web (app) clients
- brave firefox bitwarden nextcloud-client thunderbird birdtray
- # System
- gnome.gnome-system-monitor udisks gnome.gnome-disk-utility baobab gnome.simple-scan peek gparted
- obs-studio qbittorrent speedcrunch virt-manager libvirt qemu_kvm kvmtool qemu_full
- ];
- openboxDE-core = [
- # Essential libs
- 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 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
- devilspie2 sxhkd
- ];
- laptop = [
- brightnessctl powertop upower libinput-gestures acpid tlp epkowa
- ];
- desktop = [
- timeshift
- ];
- dev = [
- gnumake
- # C/C++
- clang glibc gcc gdb valgrind pugixml cmake libusb libusb-compat-0_1
- # .NET
- dotnet-sdk mono
- # Python
- python3Minimal
- # Android
- android-tools heimdall
- # Networking
- apacheHttpd wireshark gns3-gui gns3-server dynamips
- # awk
- gawk mawk nawk
- # DB
- mysql sqlitebrowser flyway
- # Functional
- racket ghc sbcl
- # Compilers
- flex bison
-
- lowdown wakatime cloc go php fontforge
- ];
- in cli-userspace ++ openboxDE-userspace ++ openboxDE-core ++ dev ++
- (if sysidentity.type == "laptop" then laptop else desktop);
-
- fonts.fonts = with pkgs; [
- # Note to self: DO NOT INSTALL ADOBE FONTS!
- corefonts vistafonts liberation_ttf helvetica-neue-lt-std noto-fonts noto-fonts-emoji cm_unicode symbola
- # CJK
- noto-fonts-cjk arphic-ukai arphic-uming takao wqy_microhei wqy_zenhei
- ];
-
- # List services that you want to enable:
- programs = {
- dconf.enable = true;
- gnome-disks.enable = true;
- firefox.enable = true;
-
- # Some programs need SUID wrappers, can be configured further or are
- # started in user sessions.
- mtr.enable = true;
- gnupg.agent = {
- enable = true;
- enableSSHSupport = true;
- };
- };
- services = {
- dbus.packages = with pkgs; [ gnome2.GConf ];
- udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
- };
-}
diff --git a/packages/default.nix b/packages/default.nix
index 2ee094f..5a307e1 100644
--- a/packages/default.nix
+++ b/packages/default.nix
@@ -1,6 +1,6 @@
-{ pkgs, ... }: {
- cli-core = {
- list = with pkgs; [
+{
+ cli-apps = { pkgs, ... }: {
+ environment.systemPackages = with pkgs; [
# Hardware managing apps
pipewire libinput lm_sensors lshw usbutils chrony iotop bluez
parted dosfstools mtpfs ntfs3g squashfsTools
@@ -9,34 +9,269 @@
# Working with files
vim-full inotify-tools lsof tree
# General usage
- htop rlwrap bc ddrescue cron
+ zsh htop rlwrap bc ddrescue cron
+ # Working with files
+ ffmpeg img2pdf pdftk imagemagick pngcrush jpegoptim optipng gd kid3 pandoc libisoburn
+ # Archive formats
+ p7zip dpkg cdrtools zip unzip rar unrar rpm
+ # Misc
+ neofetch exa moc lazygit aspell
];
- zsh = {
- ref = pkgs.zsh;
- programs.zsh.enable = true;
- environment.shells = with pkgs; [ zsh ];
+ # zsh
+ programs.zsh.enable = true;
+ environment.shells = with pkgs; [ zsh ];
+
+ # bluez
+
+ programs = {
+ mtr.enable = true;
+ gnupg.agent = {
+ enable = true;
+ enableSSHSupport = true;
+ };
};
+ };
+
+
+
+ gui-apps = { pkgs, ... }:
+ let
+ tex = (pkgs.texlive.combine {
+ inherit (pkgs.texlive) scheme-medium
+ babel-bulgarian cyrillic cancel enumitem;
+ });
+ in {
+ environment.systemPackages = with pkgs; [
+ terminator
+ obs-studio qbittorrent speedcrunch
+ rtl-sdr gqrx sdrangel xed-editor
+ devilspie2 sxhkd
+ # Settings and backup tools
+ feh xterm 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
+ brave firefox 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
+ security.rtkit.enable = true;
+
+ systemd.user.services = {
+ devilspie2 = {
+ description = "devilspie2 runner";
+ wantedBy = [ "graphical-session.target" ];
+ wants = [ "graphical-session.target" ];
+ after = [ "graphical-session.target" ];
+ serviceConfig = {
+ ExecStart = "${pkgs.devilspie2}/bin/devilspie2";
+ Restart = "on-failure";
+ RestartSec = 1;
+ TimeoutStopSec = 10;
+ };
+ };
+ };
+ };
- bluez = {
- ref = pkgs.bluez;
- hardware.bluetooth.enable = true;
+
+
+ dev = { pkgs, ... }: {
+ environment.systemPackages = with pkgs; [
+ gnumake
+ lowdown wakatime cloc go php fontforge
+ # C/C++
+ clang glibc gcc gdb valgrind pugixml cmake libusb libusb-compat-0_1
+ # .NET
+ dotnet-sdk mono
+ # Python
+ python3Minimal
+ # Android
+ android-tools heimdall
+ # Networking
+ wireshark gns3-gui gns3-server dynamips
+ # awk
+ gawk mawk nawk
+ # DB
+ mysql sqlitebrowser flyway
+ # Functional
+ racket ghc sbcl
+ # Compilers
+ flex bison
+ ];
+ };
+
+
+
+ web-server = { pkgs, ... }: {
+ environment.systemPackages = with pkgs; [ apacheHttpd ];
+
+ services.httpd = {
+ enable = true;
+
+ virtualHosts = {
+ syndamiadotcom-local = {
+ hostName = "synd.local";
+ listen = [ { port = 80; } ];
+ documentRoot = "/home/kamen/Programming/GitLab-repos/syndamiadotcom/website";
+ };
+ };
};
};
- power-control = {
- for.type = [ "laptop" ];
- list = with pkgs; [
+
+ laptop_control = { pkgs, ... }: {
+ environment.systemPackages = with pkgs; [
+ # Power
powertop upower acpid tlp
+ # Other
+ brightnessctl libinput-gestures epkowa
+ ];
+
+ services = {
+ upower.enable = true;
+ tlp.enable = true;
+ };
+ };
+
+
+
+ desktop_archiving = { pkgs, ... }: {
+ environment.systemPackages = with pkgs; [
+ timeshift
+ ];
+ };
+
+
+
+ openbox-de = { pkgs, ... }: {
+ environment.systemPackages = with pkgs; [
+ # Essential libs
+ 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 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
+ # Tray
+ libappindicator networkmanagerapplet pnmixer
+ # File openers
+ evince gnome.eog gnome.file-roller cinnamon.nemo-with-extensions gnome.seahorse
+ # System
+ gnome.gnome-system-monitor udisks gnome.gnome-disk-utility baobab gnome.simple-scan
];
+
+ security.polkit.enable = true;
+
+ programs = {
+ dconf.enable = true;
+ gnome-disks.enable = true;
+ };
+
+ services = {
+ dbus.packages = with pkgs; [ gnome2.GConf ];
+ udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
+
+ udisks2.enable = true; # gnome-disks disk access
+ gnome.gnome-keyring.enable = true;
+ gvfs.enable = true; # MTP (for nemo)
+
+ logind.extraConfig = ''
+ InhibitDelayMaxSec=1
+ HoldoffTimeoutSec=1s
+ HandlePowerKey=poweroff'';
+ };
+
+ services.xserver = {
+ enable = true;
+ # Window manager
+ windowManager.openbox.enable = true;
+
+ xautolock = {
+ enable = true;
+ time = 15;
+ locker = "/home/kamen/.a/sys/lock.sh";
+ extraOptions = [ "-detectsleep" "-secure" ];
+ };
+ };
+
+ systemd.services = {
+ lockscreen = {
+ wantedBy = [ "sleep.target" ];
+ before = [ "suspend.target" ];
+ serviceConfig = {
+ User = "kamen";
+ Environment = [ "DISPLAY=:0" "PATH=/run/current-system/sw/bin" "DBUS_SESSION_BUS_ADDRESS=\"unix:path=/run/user/1000/bus\"" ];
+ ExecStart = "/home/kamen/.a/sys/lock.sh";
+ };
+ };
+ };
+
+ systemd.user.services = {
+ lxqt-policykit = {
+ description = "lxqt-policykit runner";
+ wantedBy = [ "graphical-session.target" ];
+ wants = [ "graphical-session.target" ];
+ after = [ "graphical-session.target" ];
+ serviceConfig = {
+ Type = "simple";
+ ExecStart = "${pkgs.lxqt.lxqt-policykit}/bin/lxqt-policykit-agent";
+ Restart = "on-failure";
+ RestartSec = 1;
+ TimeoutStopSec = 10;
+ };
+ };
+
+ # This is kinda gross, because the xautolock service is already defined and configured
+ # inside services.xserver.xautolock, but it's the only way I know
+ xautolock.serviceConfig.Environment = [ "DISPLAY=:0" "PATH=/run/current-system/sw/bin" ];
+ };
};
- thinkpad = {
- for.name = [ "juno" ];
- list = with pkgs; [
- thinkfan xorg.xf86inputsynaptics
+
+ general-settings = { pkgs, ... }: {
+ nixpkgs.config.allowUnfree = true;
+
+ services.xserver = {
+ # xkbmap
+ layout = "us,bg"; # TODO us,bg-custom
+ xkbVariant = ",phonetic";
+ xkbOptions = "grp:alt_shift_toggle,lv3:switch,caps:escape";
+
+ # touchpad support
+ libinput = {
+ enable = true;
+ touchpad.naturalScrolling = true;
+ };
+ };
+ };
+
+
+
+ fonts = { pkgs, ... }: {
+ fonts.fonts = with pkgs; [
+ # Note to self: DO NOT INSTALL ADOBE FONTS!
+ corefonts vistafonts liberation_ttf helvetica-neue-lt-std noto-fonts noto-fonts-emoji cm_unicode symbola
+ # CJK
+ noto-fonts-cjk arphic-ukai arphic-uming takao wqy_microhei wqy_zenhei
];
};
}
diff --git a/services.nix b/services.nix
index db6158b..261909e 100644
--- a/services.nix
+++ b/services.nix
@@ -1,124 +1,5 @@
-
-{ config, pkgs, ... }:
-
-{
- virtualisation.libvirtd.enable = true;
- systemd.user.services = {
- lxqt-policykit = {
- description = "lxqt-policykit runner";
- wantedBy = [ "graphical-session.target" ];
- wants = [ "graphical-session.target" ];
- after = [ "graphical-session.target" ];
- serviceConfig = {
- Type = "simple";
- ExecStart = "${pkgs.lxqt.lxqt-policykit}/bin/lxqt-policykit-agent";
- Restart = "on-failure";
- RestartSec = 1;
- TimeoutStopSec = 10;
- };
- };
-
- devilspie2 = {
- description = "devilspie2 runner";
- wantedBy = [ "graphical-session.target" ];
- wants = [ "graphical-session.target" ];
- after = [ "graphical-session.target" ];
- serviceConfig = {
- ExecStart = "${pkgs.devilspie2}/bin/devilspie2";
- Restart = "on-failure";
- RestartSec = 1;
- TimeoutStopSec = 10;
- };
- };
-
- # This is kinda gross, because the xautolock service is already defined and configured
- # inside services.xserver.xautolock, but it's the only way I know
- xautolock.serviceConfig.Environment = [ "DISPLAY=:0" "PATH=/run/current-system/sw/bin" ];
- };
-
- systemd.services = {
- lockscreen = {
- wantedBy = [ "sleep.target" ];
- before = [ "suspend.target" ];
- serviceConfig = {
- User = "kamen";
- Environment = [ "DISPLAY=:0" "PATH=/run/current-system/sw/bin" "DBUS_SESSION_BUS_ADDRESS=\"unix:path=/run/user/1000/bus\"" ];
- ExecStart = "/home/kamen/.a/sys/lock.sh";
- };
- };
- };
-
- security.rtkit.enable = true;
+{ pkgs, ... }: {
services = {
- upower.enable = true;
- tlp.enable = true;
- udisks2.enable = true; # gnome-disks disk access
- gnome.gnome-keyring.enable = true;
- gvfs.enable = true; # MTP (for nemo)
-
- avahi = {
- enable = true;
- nssmdns = true;
- openFirewall = true;
- };
-
- pipewire = {
- enable = true;
- alsa.support32Bit = true;
- pulse.enable = true;
- };
-
- logind.extraConfig = ''
- InhibitDelayMaxSec=1
- HoldoffTimeoutSec=1s
- HandlePowerKey=poweroff'';
-
- thinkfan = {
- enable = true;
- levels = [
- [0 0 35]
- [1 35 38]
- [3 38 53]
- ["level auto" 53 32767]
- ];
- };
-
- httpd = {
- enable = true;
-
- virtualHosts = {
- syndamiadotcom-local = {
- hostName = "synd.local";
- listen = [ { port = 80; } ];
- documentRoot = "/home/kamen/Programming/GitLab-repos/syndamiadotcom/website";
- };
- };
- };
-
- xserver = {
- enable = true;
- # xkbmap
- layout = "us,bg"; # TODO us,bg-custom
- xkbVariant = ",phonetic";
- xkbOptions = "grp:alt_shift_toggle,lv3:switch,caps:escape";
-
- # Window manager
- windowManager.openbox.enable = true;
-
- # touchpad support
- libinput = {
- enable = true;
- touchpad.naturalScrolling = true;
- };
-
- xautolock = {
- enable = true;
- time = 15;
- locker = "/home/kamen/.a/sys/lock.sh";
- extraOptions = [ "-detectsleep" "-secure" ];
- };
- };
-
udev.extraRules = ''
#
# Copyright 2012-2013 Osmocom rtl-sdr project