Compare commits
No commits in common. "desktop" and "laptop" have entirely different histories.
|
@ -1,8 +1,8 @@
|
||||||
# Edit this configuration file to define what should be installed on
|
# Edit this configuration file to define what should be installed on
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page, on
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||||
|
|
||||||
{ config, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
|
@ -10,51 +10,54 @@
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Bootloader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
networking = {
|
networking.hostName = "nixos"; # Define your hostname.
|
||||||
hostName = "ocean-princess"; # Define your hostname.
|
# Pick only one of the below networking options.
|
||||||
networkmanager.enable = true;
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
};
|
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/Copenhagen";
|
time.timeZone = "Europe/Copenhagen";
|
||||||
|
|
||||||
|
# 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.
|
# Select internationalisation properties.
|
||||||
i18n = {
|
i18n.defaultLocale = "en_GB.UTF-8";
|
||||||
defaultLocale = "en_DK.UTF-8";
|
console = {
|
||||||
extraLocaleSettings = {
|
# font = "Lat2-Terminus16";
|
||||||
LC_ADDRESS = "en_DK.UTF-8";
|
keyMap = "dk-latin1";
|
||||||
LC_IDENTIFICATION = "en_DK.UTF-8";
|
# useXkbConfig = true; # use xkb.options in tty.
|
||||||
LC_MEASUREMENT = "en_DK.UTF-8";
|
|
||||||
LC_MONETARY = "en_DK.UTF-8";
|
|
||||||
LC_NAME = "en_DK.UTF-8";
|
|
||||||
LC_NUMERIC = "en_DK.UTF-8";
|
|
||||||
LC_PAPER = "en_DK.UTF-8";
|
|
||||||
LC_TELEPHONE = "en_DK.UTF-8";
|
|
||||||
LC_TIME = "en_DK.UTF-8";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
services.xserver.xkb = {
|
||||||
services.xserver = {
|
layout = "dk";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.xserver.enable = true;
|
||||||
|
services.displayManager.sddm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
excludePackages = [ pkgs.xterm ];
|
wayland.enable = true;
|
||||||
xkb = {
|
|
||||||
layout = "dk";
|
|
||||||
variant = "";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable the KDE Plasma Desktop Environment.
|
|
||||||
services.displayManager.sddm.enable = true;
|
|
||||||
services.desktopManager.plasma6.enable = true;
|
services.desktopManager.plasma6.enable = true;
|
||||||
programs.kdeconnect.enable = true;
|
programs.kdeconnect.enable = true;
|
||||||
|
|
||||||
# Configure console keymap
|
services.pipewire = {
|
||||||
console.keyMap = "dk-latin1";
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
# If you want to use JACK applications, uncomment this
|
||||||
|
#jack.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
enableDefaultPackages = true;
|
enableDefaultPackages = true;
|
||||||
|
@ -64,158 +67,89 @@
|
||||||
noto-fonts-cjk
|
noto-fonts-cjk
|
||||||
liberation_ttf
|
liberation_ttf
|
||||||
nerdfonts
|
nerdfonts
|
||||||
source-code-pro
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
services.greetd = {
|
||||||
services.printing.enable = true;
|
enable = false;
|
||||||
|
settings = {
|
||||||
|
default_session = {
|
||||||
|
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd sway";
|
||||||
|
user = "greeter";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware.opengl = {
|
||||||
|
enable = true;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
intel-media-driver # For Broadwell (2015) or newer processors. LIBVA_DRIVER_NAME=iHD
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware.sane = {
|
||||||
|
enable = true;
|
||||||
|
extraBackends = [ pkgs.sane-airscan ];
|
||||||
|
disabledDefaultBackends = [ "escl" ];
|
||||||
|
};
|
||||||
|
|
||||||
services.avahi = {
|
services.avahi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
nssmdns4 = true;
|
nssmdns4 = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable sound with pipewire.
|
services.usbmuxd = {
|
||||||
sound.enable = false;
|
enable = true;
|
||||||
hardware.pulseaudio.enable = false;
|
package = pkgs.usbmuxd2;
|
||||||
|
};
|
||||||
|
|
||||||
|
security.polkit.enable = true;
|
||||||
|
security.pam.services.swaylock = {};
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
services.pipewire = {
|
|
||||||
enable = true;
|
# Enable CUPS to print documents.
|
||||||
alsa.enable = true;
|
# services.printing.enable = true;
|
||||||
alsa.support32Bit = true;
|
|
||||||
pulse.enable = true;
|
# Enable sound.
|
||||||
# If you want to use JACK applications, uncomment this
|
# sound.enable = true;
|
||||||
jack.enable = true;
|
# hardware.pulseaudio.enable = true;
|
||||||
|
|
||||||
|
users.groups = {
|
||||||
|
nix = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.bluetooth.enable = true;
|
|
||||||
|
|
||||||
hardware.opengl = {
|
|
||||||
enable = true;
|
|
||||||
driSupport = true;
|
|
||||||
driSupport32Bit = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable touchpad support (enabled default in most desktopManager).
|
|
||||||
# services.xserver.libinput.enable = true;
|
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
users.users.ed = {
|
users.users.ed = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Ed";
|
extraGroups = [ "lp" "networkmanager" "nix" "scanner" "wheel" ]; # Enable ‘sudo’ for the user.
|
||||||
extraGroups = [ "networkmanager" "wheel" "transmission" ];
|
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
#packages = with pkgs; [
|
# packages = with pkgs; [
|
||||||
# firefox-esr
|
# firefox
|
||||||
# thunderbird
|
# tree
|
||||||
#];
|
# ];
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.appimage = {
|
nix.settings.allowed-users = [ "@nix" ];
|
||||||
enable = true;
|
|
||||||
binfmt = true;
|
|
||||||
};
|
|
||||||
programs.steam.enable = true;
|
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
environment.pathsToLink = [ "/share/zsh" ]; # for zsh completion
|
|
||||||
|
|
||||||
services.transmission = {
|
|
||||||
enable = false;
|
|
||||||
package = pkgs.transmission_4;
|
|
||||||
group = "users";
|
|
||||||
settings = {
|
|
||||||
download-dir = "/home/ed/Downloads";
|
|
||||||
ratio-limit = 1;
|
|
||||||
ratio-limit-enabled = true;
|
|
||||||
idle-seeding-limit-enabled = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.locate = { #emacs
|
|
||||||
enable = true;
|
|
||||||
interval = "hourly";
|
|
||||||
package = pkgs.plocate;
|
|
||||||
localuser = null;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Allow unfree packages
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
# List packages installed in system profile. To search, run:
|
||||||
# $ nix search wget
|
# $ nix search wget
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||||
git
|
git
|
||||||
(lutris.override {
|
ripgrep
|
||||||
extraLibraries = pkgs: [
|
fd
|
||||||
gdk-pixbuf
|
clang
|
||||||
# libgobject-2.0.so.0
|
coreutils
|
||||||
# libglib-2.0.so.0
|
libimobiledevice
|
||||||
# libgio-2.0.so.0
|
ifuse
|
||||||
glib
|
kdePackages.kdeconnect-kde
|
||||||
# libnss3.so
|
# wget
|
||||||
# libnssutil3.so
|
|
||||||
# libsmime3.so
|
|
||||||
nss
|
|
||||||
# libnspr4.so
|
|
||||||
nspr
|
|
||||||
# libatk-1.0.so.0
|
|
||||||
# libatk-bridge-2.0.so.0
|
|
||||||
# libatspi.so.0
|
|
||||||
at-spi2-core
|
|
||||||
# libcups.so.2
|
|
||||||
cups
|
|
||||||
# libdrm.so.2
|
|
||||||
libdrm
|
|
||||||
# libdbus-1.so.3
|
|
||||||
dbus
|
|
||||||
# libX11.so.6
|
|
||||||
xorg.libX11
|
|
||||||
# libXcomposite.so.1
|
|
||||||
xorg.libXcomposite
|
|
||||||
# libXdamage.so.1
|
|
||||||
xorg.libXdamage
|
|
||||||
# libXext.so.6
|
|
||||||
xorg.libXext
|
|
||||||
# libXfixes.so.3
|
|
||||||
xorg.libXfixes
|
|
||||||
# libXrandr.so.2
|
|
||||||
xorg.libXrandr
|
|
||||||
# libgbm.so.1
|
|
||||||
mesa
|
|
||||||
# libexpat.so.1
|
|
||||||
expat
|
|
||||||
# libxcb.so.1
|
|
||||||
xorg.libxcb
|
|
||||||
# libxkbcommon.so.0
|
|
||||||
libxkbcommon
|
|
||||||
# libpango-1.0.so.0
|
|
||||||
pango
|
|
||||||
# libcairo.so.2
|
|
||||||
cairo
|
|
||||||
# libasound.so.2
|
|
||||||
alsa-lib
|
|
||||||
];
|
|
||||||
extraPkgs = pkgs: [
|
|
||||||
appimage-run
|
|
||||||
];
|
|
||||||
})
|
|
||||||
wineWowPackages.stable
|
|
||||||
unar #ark
|
|
||||||
p7zip #ark
|
|
||||||
kmymoney
|
|
||||||
digikam
|
|
||||||
exiftool # for digikam
|
|
||||||
okteta
|
|
||||||
kdePackages.kcalc
|
|
||||||
kdePackages.partitionmanager
|
|
||||||
kdePackages.filelight
|
|
||||||
kdePackages.korganizer
|
|
||||||
pkgsi686Linux.gperftools
|
|
||||||
wget
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
environment.pathsToLink = [ "/share/zsh" ]; # for zsh completion
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
# started in user sessions.
|
# started in user sessions.
|
||||||
# programs.mtr.enable = true;
|
# programs.mtr.enable = true;
|
||||||
|
@ -230,19 +164,35 @@
|
||||||
# services.openssh.enable = true;
|
# services.openssh.enable = true;
|
||||||
|
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
networking.firewall.allowedTCPPorts = [ 6680 ];
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
# Or disable the firewall altogether.
|
# Or disable the firewall altogether.
|
||||||
# networking.firewall.enable = false;
|
# networking.firewall.enable = false;
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
# 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;
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
system.autoUpgrade.enable = true;
|
||||||
# settings for stateful data, like file locations and database versions
|
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||||
# this value at the release version of the first install of this system.
|
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||||
# Before changing this value read the documentation for this option
|
#
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
# Most users should NEVER change this value after the initial install, for any reason,
|
||||||
|
# even if you've upgraded your system to a new NixOS release.
|
||||||
|
#
|
||||||
|
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||||
|
# so changing it will NOT upgrade your system.
|
||||||
|
#
|
||||||
|
# This value being lower than the current NixOS release does NOT mean your system is
|
||||||
|
# out of date, out of support, or vulnerable.
|
||||||
|
#
|
||||||
|
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||||
|
# and migrated your data accordingly.
|
||||||
|
#
|
||||||
|
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||||
system.stateVersion = "23.11"; # Did you read the comment?
|
system.stateVersion = "23.11"; # Did you read the comment?
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
80
home.nix
80
home.nix
|
@ -1,8 +1,9 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./programs
|
./programs
|
||||||
|
#./sway.nix
|
||||||
];
|
];
|
||||||
# Home Manager needs a bit of information about you and the paths it should
|
# Home Manager needs a bit of information about you and the paths it should
|
||||||
# manage.
|
# manage.
|
||||||
|
@ -16,23 +17,24 @@
|
||||||
# You should not change this value, even if you update Home Manager. If you do
|
# You should not change this value, even if you update Home Manager. If you do
|
||||||
# want to update the value, then make sure to first check the Home Manager
|
# want to update the value, then make sure to first check the Home Manager
|
||||||
# release notes.
|
# release notes.
|
||||||
home.stateVersion = "24.05"; # Please read the comment before changing.
|
home.stateVersion = "23.11"; # Please read the comment before changing.
|
||||||
|
|
||||||
# The home.packages option allows you to install Nix packages into your
|
# The home.packages option allows you to install Nix packages into your
|
||||||
# environment.
|
# environment.
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
kitty
|
||||||
|
calibre
|
||||||
|
htop
|
||||||
|
libsForQt5.skanpage
|
||||||
keepassxc
|
keepassxc
|
||||||
gimp
|
gimp
|
||||||
libreoffice-qt6-fresh
|
libreoffice-qt6-fresh
|
||||||
scanmem
|
digikam
|
||||||
avalonia-ilspy
|
exiftool # for digikam
|
||||||
signal-desktop
|
# # Adds the 'hello' command to your environment. It prints a friendly
|
||||||
audacity
|
# # "Hello, world!" when run.
|
||||||
calibre
|
# pkgs.hello
|
||||||
prismlauncher
|
|
||||||
kid3
|
|
||||||
iamb
|
|
||||||
protonvpn-gui
|
|
||||||
# # It is sometimes useful to fine-tune packages, for example, by applying
|
# # It is sometimes useful to fine-tune packages, for example, by applying
|
||||||
# # overrides. You can do that directly here, just don't forget the
|
# # overrides. You can do that directly here, just don't forget the
|
||||||
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
|
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
|
||||||
|
@ -62,73 +64,25 @@
|
||||||
# '';
|
# '';
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.neovim = {
|
programs.bashmount.enable = true;
|
||||||
enable = true;
|
|
||||||
viAlias = true;
|
|
||||||
vimAlias = true;
|
|
||||||
extraConfig = ''
|
|
||||||
filetype plugin indent on
|
|
||||||
" On pressing tab, insert 2 spaces
|
|
||||||
set expandtab
|
|
||||||
" show existing tab with 2 spaces width
|
|
||||||
set tabstop=2
|
|
||||||
set softtabstop=2
|
|
||||||
" when indenting with '>', use 2 spaces width
|
|
||||||
set shiftwidth=2
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.kitty = {
|
|
||||||
enable = true;
|
|
||||||
font.name = "MesloLGS NF";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.lorri.enable = true;
|
|
||||||
programs.direnv.enable = true;
|
|
||||||
|
|
||||||
programs.firefox = {
|
|
||||||
enable = true;
|
|
||||||
nativeMessagingHosts = [ pkgs.kdePackages.plasma-browser-integration ];
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.chromium.enable = true;
|
|
||||||
|
|
||||||
programs.nheko.enable = true;
|
programs.nheko.enable = true;
|
||||||
|
|
||||||
programs.obs-studio = {
|
|
||||||
enable = true;
|
|
||||||
plugins = with pkgs.obs-studio-plugins; [
|
|
||||||
wlrobs
|
|
||||||
obs-backgroundremoval
|
|
||||||
obs-pipewire-audio-capture
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.yt-dlp.enable = true;
|
|
||||||
|
|
||||||
# Home Manager can also manage your environment variables through
|
# Home Manager can also manage your environment variables through
|
||||||
# 'home.sessionVariables'. These will be explicitly sourced when using a
|
# 'home.sessionVariables'. If you don't want to manage your shell through Home
|
||||||
# shell provided by Home Manager. If you don't want to manage your shell
|
# Manager then you have to manually source 'hm-session-vars.sh' located at
|
||||||
# through Home Manager then you have to manually source 'hm-session-vars.sh'
|
# either
|
||||||
# located at either
|
|
||||||
#
|
#
|
||||||
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||||
#
|
#
|
||||||
# or
|
# or
|
||||||
#
|
#
|
||||||
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
|
|
||||||
#
|
|
||||||
# or
|
|
||||||
#
|
|
||||||
# /etc/profiles/per-user/ed/etc/profile.d/hm-session-vars.sh
|
# /etc/profiles/per-user/ed/etc/profile.d/hm-session-vars.sh
|
||||||
#
|
#
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
EDITOR = "emacsclient --create-frame";
|
EDITOR = "emacsclient --create-frame";
|
||||||
DIRENV_LOG_FORMAT = ""; #remove if direnv.silent becomes available
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,11 +2,12 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./firefox.nix
|
||||||
|
./emacs.nix
|
||||||
./zsh.nix
|
./zsh.nix
|
||||||
./git.nix
|
./git.nix
|
||||||
./gpg.nix
|
|
||||||
./email.nix
|
./email.nix
|
||||||
./emacs.nix
|
./gpg.nix
|
||||||
./mopidy.nix
|
./mpv.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,32 +6,6 @@
|
||||||
zip
|
zip
|
||||||
unzip
|
unzip
|
||||||
texlive.combined.scheme-medium
|
texlive.combined.scheme-medium
|
||||||
ripgrep
|
|
||||||
pandoc
|
|
||||||
fd
|
|
||||||
nixfmt-rfc-style
|
|
||||||
|
|
||||||
#html/prettier
|
|
||||||
vscode-langservers-extracted
|
|
||||||
scss-lint
|
|
||||||
nodePackages.prettier
|
|
||||||
nodePackages.js-beautify
|
|
||||||
|
|
||||||
#python layer
|
|
||||||
black
|
|
||||||
python3
|
|
||||||
python311Packages.python-lsp-server
|
|
||||||
python311Packages.python-lsp-black
|
|
||||||
python311Packages.pylsp-rope
|
|
||||||
|
|
||||||
#rust layer
|
|
||||||
rustc
|
|
||||||
cargo
|
|
||||||
cargo-edit
|
|
||||||
rustfmt
|
|
||||||
rust-analyzer
|
|
||||||
clippy
|
|
||||||
gcc
|
|
||||||
];
|
];
|
||||||
services.emacs = {
|
services.emacs = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -39,12 +13,11 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
arguments = [" --create-frame"];
|
arguments = [" --create-frame"];
|
||||||
};
|
};
|
||||||
defaultEditor = false;
|
startWithUserSession = true;
|
||||||
startWithUserSession = "graphical";
|
|
||||||
};
|
};
|
||||||
programs.emacs = {
|
programs.emacs = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.emacs;
|
package = pkgs.emacs29-pgtk;
|
||||||
extraPackages = epkgs: [ epkgs.vterm ];
|
extraPackages = epkgs: [ epkgs.vterm ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,40 +1,44 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
name = "HackerNCoder";
|
||||||
|
email = "hackerncoder@encryptionin.space";
|
||||||
|
host = "mail.encryptionin.space";
|
||||||
|
maildir = "/home/ed/.mail";
|
||||||
|
in
|
||||||
{
|
{
|
||||||
accounts.email = {
|
accounts.email = {
|
||||||
maildirBasePath = ".mail";
|
maildirBasePath = "${maildir}";
|
||||||
accounts = {
|
accounts = {
|
||||||
hackerncoder = rec {
|
hackerncoder = {
|
||||||
primary = true;
|
primary = true;
|
||||||
address = "hackerncoder@encryptionin.space";
|
address = "${email}";
|
||||||
userName = "${address}";
|
userName = "${email}";
|
||||||
realName = "HackerNCoder";
|
realName = "${name}";
|
||||||
flavor = "plain";
|
flavor = "plain";
|
||||||
passwordCommand = "${pkgs.pass}/bin/pass Email/hackerncoder";
|
passwordCommand = "${pkgs.pass}/bin/pass Email/hackerncoder";
|
||||||
smtp = {
|
imap = {
|
||||||
host = "mail.encryptionin.space";
|
host = "${host}";
|
||||||
port = 465;
|
port = 993;
|
||||||
tls.enable = true;
|
tls.enable = true;
|
||||||
};
|
};
|
||||||
imap = {
|
smtp = {
|
||||||
host = "${smtp.host}";
|
host = "${host}";
|
||||||
port = 993;
|
port = 465;
|
||||||
tls.enable = true;
|
tls.enable = true;
|
||||||
};
|
};
|
||||||
mbsync = {
|
mbsync = {
|
||||||
enable = true;
|
enable = true;
|
||||||
create = "maildir";
|
create = "both";
|
||||||
expunge = "both";
|
expunge = "both";
|
||||||
patterns = [ "*" "!Archive" "!Archives*" ];
|
|
||||||
};
|
};
|
||||||
msmtp.enable = true;
|
msmtp.enable = true;
|
||||||
|
mu.enable = true;
|
||||||
imapnotify = {
|
imapnotify = {
|
||||||
enable = true;
|
enable = true;
|
||||||
boxes = [ "Inbox" ];
|
boxes = [ "Inbox" ];
|
||||||
onNotify = "${pkgs.libnotify}/bin/notify-send -u normal -i mail-unread -a 'imap-notify' 'New email'";
|
onNotify = "${pkgs.libnotify}/bin/notify-send -u normal -i mail-unread -a 'imap-notify' 'New email' ; ${pkgs.isync}/bin/mbsync --pull --new hackerncoder:INBOX";
|
||||||
};
|
onNotifyPost = "${pkgs.mu}/bin/mu index";
|
||||||
neomutt = {
|
|
||||||
enable = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -43,266 +47,21 @@
|
||||||
programs = {
|
programs = {
|
||||||
msmtp.enable = true;
|
msmtp.enable = true;
|
||||||
mbsync.enable = true;
|
mbsync.enable = true;
|
||||||
};
|
mu.enable = true;
|
||||||
|
|
||||||
programs.neomutt = {
|
|
||||||
enable = true;
|
|
||||||
# vimKeys = true;
|
|
||||||
sidebar = {
|
|
||||||
enable = true;
|
|
||||||
width = 20;
|
|
||||||
format = "%D%?F? [%F]?%* %?N?%N/? %?S?%S?";
|
|
||||||
};
|
|
||||||
sort = "threads";
|
|
||||||
settings = {
|
|
||||||
mark_old = "no";
|
|
||||||
text_flowed = "yes";
|
|
||||||
mime_type_query_command = "\"file --mime-type -b %s\"";
|
|
||||||
date_format = ''"%y/%m/%d %I:%M%p"'';
|
|
||||||
index_format=''"%2C %Z %?X?A& ? %D %-15.15F %s (%-4.4c)"'';
|
|
||||||
mailcap_path = "$HOME/.config/neomutt/mailcap:$mailcap_path";
|
|
||||||
smtp_authenticators = "'login:plain'";
|
|
||||||
query_command = ''"abook --mutt-query '%s'"'';
|
|
||||||
rfc2047_parameters = "yes";
|
|
||||||
sleep_time = "0"; # Pause 0 seconds for informational messages
|
|
||||||
markers = "no"; # Disables the `+` displayed at line wraps
|
|
||||||
mime_forward = "no"; # mail body is forwarded as text
|
|
||||||
forward_attachments = "yes"; # attachments are forwarded with mail
|
|
||||||
wait_key = "no"; # mutt won't ask "press key to continue"
|
|
||||||
fast_reply = "yes"; # skip to compose when replying
|
|
||||||
fcc_attach = "yes"; # save attachments with the body
|
|
||||||
forward_format = ''"Fwd: %s"''; # format of subject when forwarding
|
|
||||||
forward_quote = "yes"; # include message in forwards
|
|
||||||
include = "yes"; # include message in replies
|
|
||||||
mail_check = "60"; # to avoid lags using IMAP with some email providers (yahoo for example)
|
|
||||||
edit_headers = "yes";
|
|
||||||
sort_aux = "reverse-last-date-received";
|
|
||||||
};
|
|
||||||
binds = [
|
|
||||||
{
|
|
||||||
map = ["index" "pager"];
|
|
||||||
key = "i";
|
|
||||||
action = "noop";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
map = ["index" "pager"];
|
|
||||||
key = "g";
|
|
||||||
action = "noop";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
map = ["index" "pager"];
|
|
||||||
key = "\Cf";
|
|
||||||
action = "noop";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
map = ["index" "pager"];
|
|
||||||
key = "M";
|
|
||||||
action = "noop";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
map = ["index" "pager"];
|
|
||||||
key = "C";
|
|
||||||
action = "noop";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
extraConfig =
|
|
||||||
''
|
|
||||||
auto_view text/html # automatically show html (mailcap uses lynx)
|
|
||||||
auto_view application/pgp-encrypted
|
|
||||||
|
|
||||||
# General rebindings
|
|
||||||
bind index gg first-entry
|
|
||||||
bind index j next-entry
|
|
||||||
bind index k previous-entry
|
|
||||||
bind attach <return> view-mailcap
|
|
||||||
bind attach l view-mailcap
|
|
||||||
bind editor <space> noop
|
|
||||||
bind index G last-entry
|
|
||||||
bind pager,attach h exit
|
|
||||||
bind pager j next-line
|
|
||||||
bind pager k previous-line
|
|
||||||
bind pager l view-attachments
|
|
||||||
bind index D delete-message
|
|
||||||
bind index U undelete-message
|
|
||||||
bind index L limit
|
|
||||||
bind index h noop
|
|
||||||
bind index l display-message
|
|
||||||
bind index,query <space> tag-entry
|
|
||||||
#bind browser h goto-parent
|
|
||||||
macro browser h '<change-dir><kill-line>..<enter>' "Go to parent folder"
|
|
||||||
bind index,pager H view-raw-message
|
|
||||||
bind browser l select-entry
|
|
||||||
bind browser gg top-page
|
|
||||||
bind browser G bottom-page
|
|
||||||
bind pager gg top
|
|
||||||
bind pager G bottom
|
|
||||||
bind index,pager,browser d half-down
|
|
||||||
bind index,pager,browser u half-up
|
|
||||||
bind index,pager S sync-mailbox
|
|
||||||
bind index,pager R group-reply
|
|
||||||
bind index \031 previous-undeleted # Mouse wheel
|
|
||||||
bind index \005 next-undeleted # Mouse wheel
|
|
||||||
bind pager \031 previous-line # Mouse wheel
|
|
||||||
bind pager \005 next-line # Mouse wheel
|
|
||||||
bind editor <Tab> complete-query
|
|
||||||
|
|
||||||
macro index,pager gi "<change-folder>=INBOX<enter>" "go to inbox"
|
|
||||||
macro index,pager Mi ";<save-message>=INBOX<enter>" "move mail to inbox"
|
|
||||||
macro index,pager Ci ";<copy-message>=INBOX<enter>" "copy mail to inbox"
|
|
||||||
macro index,pager gd "<change-folder>=Drafts<enter>" "go to drafts"
|
|
||||||
macro index,pager Md ";<save-message>=Drafts<enter>" "move mail to drafts"
|
|
||||||
macro index,pager Cd ";<copy-message>=Drafts<enter>" "copy mail to drafts"
|
|
||||||
macro index,pager gj "<change-folder>=Junk<enter>" "go to junk"
|
|
||||||
macro index,pager Mj ";<save-message>=Junk<enter>" "move mail to junk"
|
|
||||||
macro index,pager Cj ";<copy-message>=Junk<enter>" "copy mail to junk"
|
|
||||||
macro index,pager gt "<change-folder>=Trash<enter>" "go to trash"
|
|
||||||
macro index,pager Mt ";<save-message>=Trash<enter>" "move mail to trash"
|
|
||||||
macro index,pager Ct ";<copy-message>=Trash<enter>" "copy mail to trash"
|
|
||||||
macro index,pager gs "<change-folder>=Sent<enter>" "go to sent"
|
|
||||||
macro index,pager Ms ";<save-message>=Sent<enter>" "move mail to sent"
|
|
||||||
macro index,pager Cs ";<copy-message>=Sent<enter>" "copy mail to sent"
|
|
||||||
macro index,pager ga "<change-folder>=Archive<enter>" "go to archive"
|
|
||||||
macro index,pager Ma ";<save-message>=Archive<enter>" "move mail to archive"
|
|
||||||
macro index,pager Ca ";<copy-message>=Archive<enter>" "copy mail to archive"
|
|
||||||
|
|
||||||
#set crypt_auto_sign = yes
|
|
||||||
#set crypt_opportunistic_encrypt = yes
|
|
||||||
#set pgp_self_encrypt = yes
|
|
||||||
#set pgp_default_key = 'your@gpgemailaddre.ss'
|
|
||||||
macro index \eg "<enter-command>unset wait_key<enter><shell-escape>gpg --list-secret-keys; printf 'Enter email ID of user to publish: '; read eID; printf 'Enter fingerprint of GPG key to publish: '; read eFGPT; $prefix/libexec/gpg-wks-client --create \\\$eFGPT \\\$eID | msmtp --read-envelope-from --read-recipients -a $fulladdr<enter>" "publish GPG key to WKS provider"
|
|
||||||
macro index \eh "<pipe-message>$prefix/libexec/gpg-wks-client --receive | msmtp --read-envelope-from --read-recipients -a $fulladdr<enter>" "confirm GPG publication"
|
|
||||||
|
|
||||||
macro index,pager a "<enter-command>set my_pipe_decode=\$pipe_decode pipe_decode<return><pipe-message>abook --add-email<return><enter-command>set pipe_decode=\$my_pipe_decode; unset my_pipe_decode<return>" "add the sender address to abook"
|
|
||||||
macro index \Cr "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read"
|
|
||||||
macro index O "<shell-escape>mailsync<enter>" "run mailsync to sync all mail"
|
|
||||||
macro index \Cf "<enter-command>unset wait_key<enter><shell-escape>printf 'Enter a search term to find with notmuch: '; read x; echo \$x >~/.cache/mutt_terms<enter><limit>~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;s/\^id:// for@a;$,=\"|\";print@a' | perl -le '@a=<>; chomp@a; s/\\+/\\\\+/ for@a;print@a' \`\"<enter>" "show only messages matching a notmuch pattern"
|
|
||||||
macro index A "<limit>all\n" "show all messages (undo limit)"
|
|
||||||
|
|
||||||
# Sidebar mappings
|
|
||||||
set mail_check_stats
|
|
||||||
bind index,pager \Ck sidebar-prev
|
|
||||||
bind index,pager \Cj sidebar-next
|
|
||||||
bind index,pager \Co sidebar-open
|
|
||||||
bind index,pager \Cp sidebar-prev-new
|
|
||||||
bind index,pager \Cn sidebar-next-new
|
|
||||||
bind index,pager B sidebar-toggle-visible
|
|
||||||
|
|
||||||
# Default index colors:
|
|
||||||
color index yellow default '.*'
|
|
||||||
color index_author red default '.*'
|
|
||||||
color index_number blue default
|
|
||||||
color index_subject cyan default '.*'
|
|
||||||
|
|
||||||
# New mail is boldened:
|
|
||||||
color index brightyellow black "~N"
|
|
||||||
color index_author brightred black "~N"
|
|
||||||
color index_subject brightcyan black "~N"
|
|
||||||
|
|
||||||
# Tagged mail is highlighted:
|
|
||||||
color index brightyellow blue "~T"
|
|
||||||
color index_author brightred blue "~T"
|
|
||||||
color index_subject brightcyan blue "~T"
|
|
||||||
|
|
||||||
# Flagged mail is highlighted:
|
|
||||||
color index brightgreen default "~F"
|
|
||||||
color index_subject brightgreen default "~F"
|
|
||||||
color index_author brightgreen default "~F"
|
|
||||||
|
|
||||||
# Other colors and aesthetic settings:
|
|
||||||
mono bold bold
|
|
||||||
mono underline underline
|
|
||||||
mono indicator reverse
|
|
||||||
mono error bold
|
|
||||||
color normal default default
|
|
||||||
color indicator brightblack white
|
|
||||||
color sidebar_highlight red default
|
|
||||||
color sidebar_divider brightblack black
|
|
||||||
color sidebar_flagged red black
|
|
||||||
color sidebar_new green black
|
|
||||||
color error red default
|
|
||||||
color tilde black default
|
|
||||||
color message cyan default
|
|
||||||
color markers red white
|
|
||||||
color attachment white default
|
|
||||||
color search brightmagenta default
|
|
||||||
color status brightyellow black
|
|
||||||
color hdrdefault brightgreen default
|
|
||||||
color quoted green default
|
|
||||||
color quoted1 blue default
|
|
||||||
color quoted2 cyan default
|
|
||||||
color quoted3 yellow default
|
|
||||||
color quoted4 red default
|
|
||||||
color quoted5 brightred default
|
|
||||||
color signature brightgreen default
|
|
||||||
color bold black default
|
|
||||||
color underline black default
|
|
||||||
|
|
||||||
# Regex highlighting:
|
|
||||||
color header brightmagenta default "^From"
|
|
||||||
color header brightcyan default "^Subject"
|
|
||||||
color header brightwhite default "^(CC|BCC)"
|
|
||||||
color header blue default ".*"
|
|
||||||
color body brightred default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses
|
|
||||||
color body brightblue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL
|
|
||||||
color body green default "\`[^\`]*\`" # Green text between ` and `
|
|
||||||
color body brightblue default "^# \.*" # Headings as bold blue
|
|
||||||
color body brightcyan default "^## \.*" # Subheadings as bold cyan
|
|
||||||
color body brightgreen default "^### \.*" # Subsubheadings as bold green
|
|
||||||
color body yellow default "^(\t| )*(-|\\*) \.*" # List items as yellow
|
|
||||||
color body brightcyan default "[;:][-o][)/(|]" # emoticons
|
|
||||||
color body brightcyan default "[;:][)(|]" # emoticons
|
|
||||||
color body brightcyan default "[ ][*][^*]*[*][ ]?" # more emoticon?
|
|
||||||
color body brightcyan default "[ ]?[*][^*]*[*][ ]" # more emoticon?
|
|
||||||
color body red default "(BAD signature)"
|
|
||||||
color body cyan default "(Good signature)"
|
|
||||||
color body brightblack default "^gpg: Good signature .*"
|
|
||||||
color body brightyellow default "^gpg: "
|
|
||||||
color body brightyellow red "^gpg: BAD signature from.*"
|
|
||||||
mono body bold "^gpg: Good signature"
|
|
||||||
mono body bold "^gpg: BAD signature from.*"
|
|
||||||
color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]"
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.mbsync = {
|
services.mbsync = {
|
||||||
enable = false;
|
enable = true;
|
||||||
frequency = "0/3:00:00";
|
frequency = "0/3:00:00";
|
||||||
preExec = "${pkgs.libnotify}/bin/notify-send -u normal -i view-refresh -a 'mbsync timer' 'Syncing with mbsync'";
|
preExec = "${pkgs.libnotify}/bin/notify-send -u normal -i view-refresh -a 'mbsync timer' 'Syncing with mbsync'";
|
||||||
postExec = "${pkgs.mu}/bin/mu index";
|
postExec = "${pkgs.mu}/bin/mu index";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.imapnotify.enable = false;
|
services.imapnotify.enable = true;
|
||||||
|
|
||||||
xdg.configFile."neomutt/mailcap".text = ''
|
|
||||||
text/plain; $EDITOR %s ;
|
|
||||||
text/html; ''${XDG_DATA_HOME}/neomutt/openfile %s ; nametemplate=%s.html
|
|
||||||
text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -dump -width=1024 %s; nametemplate=%s.html; copiousoutput;
|
|
||||||
image/*; ''${XDG_DATA_HOME}/neomutt/openfile %s ;
|
|
||||||
video/*; setsid mpv --quiet %s &; copiousoutput
|
|
||||||
audio/*; mpv %s ;
|
|
||||||
application/pdf; ''${XDG_DATA_HOME}/neomutt/openfile %s ;
|
|
||||||
application/pgp-encrypted; gpg -d '%s'; copiousoutput;
|
|
||||||
application/pgp-keys; gpg --import '%s'; copiousoutput;
|
|
||||||
application/x-subrip; $EDITOR %s ;
|
|
||||||
'';
|
|
||||||
|
|
||||||
xdg.dataFile."neomutt/openfile".text = ''
|
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Helps open a file with xdg-open from mutt in a external program without weird side effects.
|
|
||||||
tempdir="''${XDG_CACHE_HOME:-$HOME/.cache}/neomutt/files"
|
|
||||||
file="$tempdir/''${1##*/}"
|
|
||||||
[ "$(uname)" = "Darwin" ] && opener="open" || opener="setsid -f xdg-open"
|
|
||||||
mkdir -p "$tempdir"
|
|
||||||
cp -f "$1" "$file"
|
|
||||||
$opener "$file" >/dev/null 2>&1
|
|
||||||
find "''${tempdir:?}" -mtime +1 -type f -delete
|
|
||||||
'';
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
pass
|
pass
|
||||||
|
mu.mu4e
|
||||||
libnotify
|
libnotify
|
||||||
lynx
|
|
||||||
file
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
15
programs/firefox.nix
Normal file
15
programs/firefox.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.firefox = {
|
||||||
|
enable = true;
|
||||||
|
nativeMessagingHosts = [ pkgs.kdePackages.plasma-browser-integration ];
|
||||||
|
# profiles = {
|
||||||
|
# default = {
|
||||||
|
# settings = {
|
||||||
|
# "widget.use-xdg-desktop-portal.file-picker" = 1;
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
}
|
|
@ -26,16 +26,12 @@
|
||||||
newHighlight = "green bold 52";
|
newHighlight = "green bold 52";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
sendemail = {
|
sendmail = {
|
||||||
smtpserver = "mail.encryptionin.space";
|
smtpserver = "mail.encryptionin.space";
|
||||||
smtpuser = "hackerncoder@encryptionin.space";
|
smtpuser = "hackerncoder@encryptionin.space";
|
||||||
smtpencryption = "ssl";
|
smtpencryption = "ssl";
|
||||||
smtpserverport = 465;
|
smtpserverport = 465;
|
||||||
};
|
};
|
||||||
merge = {
|
|
||||||
conflictstyle = "diff3";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,12 +7,16 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
defaultCacheTtl = 1800;
|
defaultCacheTtl = 1800;
|
||||||
extraConfig = ''
|
pinentryPackage = pkgs.pinentry-qt;
|
||||||
pinentry-program ${pkgs.pinentry}/bin/pinentry-qt
|
|
||||||
allow-loopback-pinentry
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# configFile."gnupg/gpg-agent.conf" = {
|
||||||
|
# text = ''
|
||||||
|
# default-cache-ttl 3600
|
||||||
|
# pinentry-program ${pkgs.pinentry}/bin/pinentry
|
||||||
|
# '';
|
||||||
|
# };
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
pinentry
|
pinentry
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
services.mopidy = {
|
|
||||||
enable = true;
|
|
||||||
extensionPackages = with pkgs; [ mopidy-youtube mopidy-local mopidy-mpd mopidy-mpris mopidy-iris ];
|
|
||||||
settings = {
|
|
||||||
http = {
|
|
||||||
hostname = "::";
|
|
||||||
};
|
|
||||||
mpd = {
|
|
||||||
enabled = true;
|
|
||||||
hostname = "127.0.0.1";
|
|
||||||
port = 6600;
|
|
||||||
max_connections = 20;
|
|
||||||
connection_timeout = 60;
|
|
||||||
};
|
|
||||||
local = {
|
|
||||||
media_dir = "/home/ed/Music";
|
|
||||||
};
|
|
||||||
youtube = {
|
|
||||||
enabled = true;
|
|
||||||
youtube_dl_package = "yt_dlp";
|
|
||||||
allow_cache = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
programs.ncmpcpp = {
|
|
||||||
enable = true;
|
|
||||||
mpdMusicDir = "~/Music";
|
|
||||||
};
|
|
||||||
}
|
|
10
programs/mpv.nix
Normal file
10
programs/mpv.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
haruna
|
||||||
|
];
|
||||||
|
programs.mpv = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
|
@ -43,7 +43,7 @@
|
||||||
# last prompt line gets hidden if it would overlap with left prompt.
|
# last prompt line gets hidden if it would overlap with left prompt.
|
||||||
typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
|
typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
|
||||||
status # exit code of the last command
|
status # exit code of the last command
|
||||||
# command_execution_time # duration of the last command
|
command_execution_time # duration of the last command
|
||||||
background_jobs # presence of background jobs
|
background_jobs # presence of background jobs
|
||||||
direnv # direnv status (https://direnv.net/)
|
direnv # direnv status (https://direnv.net/)
|
||||||
asdf # asdf version manager (https://github.com/asdf-vm/asdf)
|
asdf # asdf version manager (https://github.com/asdf-vm/asdf)
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
nodeenv # node.js environment (https://github.com/ekalinin/nodeenv)
|
nodeenv # node.js environment (https://github.com/ekalinin/nodeenv)
|
||||||
# node_version # node.js version
|
# node_version # node.js version
|
||||||
# go_version # go version (https://golang.org)
|
# go_version # go version (https://golang.org)
|
||||||
rust_version # rustc version (https://www.rust-lang.org)
|
# rust_version # rustc version (https://www.rust-lang.org)
|
||||||
# dotnet_version # .NET version (https://dotnet.microsoft.com)
|
# dotnet_version # .NET version (https://dotnet.microsoft.com)
|
||||||
# php_version # php version (https://www.php.net/)
|
# php_version # php version (https://www.php.net/)
|
||||||
# laravel_version # laravel php framework version (https://laravel.com/)
|
# laravel_version # laravel php framework version (https://laravel.com/)
|
||||||
|
|
|
@ -7,24 +7,26 @@
|
||||||
autosuggestion.enable = true;
|
autosuggestion.enable = true;
|
||||||
enableVteIntegration = true;
|
enableVteIntegration = true;
|
||||||
syntaxHighlighting.enable = true;
|
syntaxHighlighting.enable = true;
|
||||||
history.path = "${config.xdg.dataHome}/zsh/history";
|
|
||||||
initExtra = ''
|
initExtra = ''
|
||||||
alias hsw='home-manager switch'
|
# [Ctrl-RightArrow] - move forward one word
|
||||||
|
bindkey '^[[1;5C' forward-word
|
||||||
|
# [Ctrl-LeftArrow] - move backward one word
|
||||||
|
bindkey '^[[1;5D' backward-word
|
||||||
'';
|
'';
|
||||||
oh-my-zsh = {
|
envExtra = ''
|
||||||
enable = true;
|
export PATH="${config.xdg.configHome}/emacs/bin:$PATH"
|
||||||
plugins = [ "git" "direnv" ];
|
'';
|
||||||
};
|
history.path = "${config.xdg.dataHome}/zsh/history";
|
||||||
plugins = [
|
plugins = [
|
||||||
{
|
{
|
||||||
name = "powerlevel10k";
|
name = "powerlevel10k";
|
||||||
src = pkgs.zsh-powerlevel10k;
|
src = pkgs.zsh-powerlevel10k;
|
||||||
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
|
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "powerlevel10k-config";
|
name = "powerlevel10k-config";
|
||||||
src = lib.cleanSource ./p10k-config;
|
src = lib.cleanSource ./p10k-config;
|
||||||
file = "p10k.zsh";
|
file = "p10k.zsh";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
128
sway.nix
Normal file
128
sway.nix
Normal file
|
@ -0,0 +1,128 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
brightnessctl
|
||||||
|
wl-clipboard
|
||||||
|
];
|
||||||
|
|
||||||
|
wayland.windowManager.sway = {
|
||||||
|
enable = true;
|
||||||
|
config = rec {
|
||||||
|
modifier = "Mod4";
|
||||||
|
input = {
|
||||||
|
"*" = {
|
||||||
|
xkb_layout = "dk";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
terminal = "kitty";
|
||||||
|
keybindings = lib.mkOptionDefault {
|
||||||
|
"${modifier}+Shift+e" = "exec emacsclient --create-frame";
|
||||||
|
"${modifier}+Ctrl+e" = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'";
|
||||||
|
"${modifier}+Ctrl+q" = "exec swaynag -t warning -m 'You pressed the quit shortcut. Do you really want to shutdown? This will end your session.' -b 'Yes, shutdown' 'shutdown now'";
|
||||||
|
"${modifier}+Ctrl+l" = "exec swaylock -fF";
|
||||||
|
"${modifier}+Ctrl+s" = "exec swaylock -fF && systemctl suspend";
|
||||||
|
"XF86MonBrightnessDown" = "exec brightnessctl set 5%-";
|
||||||
|
"XF86MonBrightnessUp" = "exec brightnessctl set 5%+";
|
||||||
|
};
|
||||||
|
bars = [
|
||||||
|
{
|
||||||
|
fonts = {
|
||||||
|
names = [ "pango:Hack Nerd" ];
|
||||||
|
size = 9.0;
|
||||||
|
};
|
||||||
|
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs /home/ed/.config/i3status-rust/config-default.toml";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.dunst = {
|
||||||
|
enable = true;
|
||||||
|
iconTheme = {
|
||||||
|
name = "Adwaita";
|
||||||
|
package = pkgs.gnome.adwaita-icon-theme;
|
||||||
|
size = "16x16";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.i3status-rust = {
|
||||||
|
enable = true;
|
||||||
|
bars = {
|
||||||
|
default = {
|
||||||
|
theme = "solarized-dark";
|
||||||
|
icons = "material-nf";
|
||||||
|
blocks = [
|
||||||
|
{
|
||||||
|
block = "maildir";
|
||||||
|
inboxes = [ "~/.mail/hackerncoder/Inbox" ];
|
||||||
|
interval = 120;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
block = "backlight";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
block = "net";
|
||||||
|
format = " $icon {$signal_strength $ssid $frequency|Wired connection} via $device ";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
block = "disk_space";
|
||||||
|
path = "/";
|
||||||
|
info_type = "available";
|
||||||
|
interval = 60;
|
||||||
|
alert = 10.0;
|
||||||
|
warning = 20.0;
|
||||||
|
format = " $icon $available.eng(w:2) ";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
block = "time";
|
||||||
|
format = " $icon $timestamp.datetime(f:'%a %d/%m')";
|
||||||
|
interval = 3600;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
block = "time";
|
||||||
|
format = "$timestamp.datetime(f:'%H %Z')";
|
||||||
|
timezone = "Etc/UTC";
|
||||||
|
interval = 600;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
block = "time";
|
||||||
|
format = "$timestamp.datetime(f:'%R') ";
|
||||||
|
interval = 60;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.swaylock = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
color = "000000";
|
||||||
|
#font-size = 24;
|
||||||
|
indicator-idle-visible = false;
|
||||||
|
#indicator-radius = 100;
|
||||||
|
#line-color = "ffffff";
|
||||||
|
#show-failed-attempts = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.swayidle = {
|
||||||
|
enable = true;
|
||||||
|
timeouts = [
|
||||||
|
{ timeout = 240; command = "${pkgs.swaylock}/bin/swaylock -fF"; }
|
||||||
|
{ timeout = 480; command = "${pkgs.systemd}/bin/systemctl suspend"; }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# gtk = {
|
||||||
|
# enable = true;
|
||||||
|
# theme.name = "breeze";
|
||||||
|
# };
|
||||||
|
|
||||||
|
# qt = {
|
||||||
|
# enable = true;
|
||||||
|
# platformTheme.name = "kde";
|
||||||
|
# style.name = "breeze";
|
||||||
|
# };
|
||||||
|
}
|
Loading…
Reference in a new issue