Compare commits

..

10 commits

Author SHA1 Message Date
HackerNCoder 232ec312d1 remove snapserver 2024-09-20 18:00:01 +02:00
HackerNCoder 47285cff49 Revert "flakes!"
This reverts commit c88ed8e5ed.
2024-09-20 17:58:18 +02:00
HackerNCoder c88ed8e5ed flakes! 2024-09-20 14:28:46 +02:00
HackerNCoder c743501eca Updates 2024-09-19 17:56:20 +02:00
HackerNCoder 4d7650cc4a update 2024-07-26 19:39:59 +02:00
HackerNCoder c279557211 update 2024-07-14 11:32:29 +02:00
HackerNCoder 3e0a7b79a1 Add python and rust stuff for emacs 2024-06-23 18:18:35 +02:00
HackerNCoder bb564b1729 Add oh-my-zsh remove unused init-extra and envExtra options
Also some tab/space stuff
2024-06-23 18:17:38 +02:00
HackerNCoder bd6f4a179a Add signal-desktop and nheko 2024-06-23 18:17:18 +02:00
HackerNCoder 8f08e145d4 Desktop init 2024-06-19 13:28:03 +02:00
13 changed files with 583 additions and 343 deletions

View file

@ -1,8 +1,8 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, lib, pkgs, ... }:
{ config, pkgs, ... }:
{
imports =
@ -10,54 +10,51 @@
./hardware-configuration.nix
];
# Use the systemd-boot EFI boot loader.
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "nixos"; # 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 = {
hostName = "ocean-princess"; # Define your hostname.
networkmanager.enable = true;
};
# Set your time zone.
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.
i18n.defaultLocale = "en_GB.UTF-8";
console = {
# font = "Lat2-Terminus16";
keyMap = "dk-latin1";
# useXkbConfig = true; # use xkb.options in tty.
i18n = {
defaultLocale = "en_DK.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "en_DK.UTF-8";
LC_IDENTIFICATION = "en_DK.UTF-8";
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";
};
};
services.xserver.xkb = {
layout = "dk";
};
services.xserver.enable = true;
services.displayManager.sddm = {
# Enable the X11 windowing system.
services.xserver = {
enable = true;
wayland.enable = true;
excludePackages = [ pkgs.xterm ];
xkb = {
layout = "dk";
variant = "";
};
};
# Enable the KDE Plasma Desktop Environment.
services.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;
programs.kdeconnect.enable = true;
services.pipewire = {
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;
# Configure console keymap
console.keyMap = "dk-latin1";
fonts = {
enableDefaultPackages = true;
@ -67,89 +64,158 @@
noto-fonts-cjk
liberation_ttf
nerdfonts
source-code-pro
];
};
services.greetd = {
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" ];
};
# Enable CUPS to print documents.
services.printing.enable = true;
services.avahi = {
enable = true;
nssmdns4 = true;
};
services.usbmuxd = {
enable = true;
package = pkgs.usbmuxd2;
};
security.polkit.enable = true;
security.pam.services.swaylock = {};
# Enable sound with pipewire.
sound.enable = false;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound.
# sound.enable = true;
# hardware.pulseaudio.enable = true;
users.groups = {
nix = { };
services.pipewire = {
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;
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.
users.users.ed = {
isNormalUser = true;
extraGroups = [ "lp" "networkmanager" "nix" "scanner" "wheel" ]; # Enable sudo for the user.
description = "Ed";
extraGroups = [ "networkmanager" "wheel" "transmission" ];
shell = pkgs.zsh;
# packages = with pkgs; [
# firefox
# tree
# ];
#packages = with pkgs; [
# firefox-esr
# thunderbird
#];
};
nix.settings.allowed-users = [ "@nix" ];
programs.appimage = {
enable = true;
binfmt = true;
};
programs.steam.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:
# $ nix search wget
environment.systemPackages = with pkgs; [
neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
git
ripgrep
fd
clang
coreutils
libimobiledevice
ifuse
kdePackages.kdeconnect-kde
# wget
(lutris.override {
extraLibraries = pkgs: [
gdk-pixbuf
# libgobject-2.0.so.0
# libglib-2.0.so.0
# libgio-2.0.so.0
glib
# libnss3.so
# 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
# started in user sessions.
# programs.mtr.enable = true;
@ -164,35 +230,19 @@
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
networking.firewall.allowedTCPPorts = [ 6680 ];
# 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;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
system.autoUpgrade.enable = true;
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#
# 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 .
# 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. Its 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.11"; # Did you read the comment?
}

View file

@ -1,9 +1,8 @@
{ config, pkgs, lib, ... }:
{ config, pkgs, ... }:
{
imports = [
./programs
#./sway.nix
imports = [
./programs
];
# Home Manager needs a bit of information about you and the paths it should
# manage.
@ -17,24 +16,23 @@
# 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
# release notes.
home.stateVersion = "23.11"; # Please read the comment before changing.
home.stateVersion = "24.05"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = with pkgs; [
kitty
calibre
htop
libsForQt5.skanpage
keepassxc
gimp
libreoffice-qt6-fresh
digikam
exiftool # for digikam
# # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run.
# pkgs.hello
scanmem
avalonia-ilspy
signal-desktop
audacity
calibre
prismlauncher
kid3
iamb
protonvpn-gui
# # It is sometimes useful to fine-tune packages, for example, by applying
# # 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
@ -64,25 +62,73 @@
# '';
};
programs.bashmount.enable = true;
programs.neovim = {
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.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.sessionVariables'. If you don't want to manage your shell through Home
# Manager then you have to manually source 'hm-session-vars.sh' located at
# either
# 'home.sessionVariables'. These will be explicitly sourced when using a
# shell provided by Home Manager. If you don't want to manage your shell
# through Home Manager then you have to manually source 'hm-session-vars.sh'
# located at either
#
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
#
# 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
#
home.sessionVariables = {
EDITOR = "emacsclient --create-frame";
DIRENV_LOG_FORMAT = ""; #remove if direnv.silent becomes available
};
#nixpkgs.config.allowUnfree = true;
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}

View file

@ -2,12 +2,11 @@
{
imports = [
./firefox.nix
./emacs.nix
./zsh.nix
./git.nix
./email.nix
./gpg.nix
./mpv.nix
./email.nix
./emacs.nix
./mopidy.nix
];
}

View file

@ -6,6 +6,32 @@
zip
unzip
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 = {
enable = true;
@ -13,11 +39,12 @@
enable = true;
arguments = [" --create-frame"];
};
startWithUserSession = true;
defaultEditor = false;
startWithUserSession = "graphical";
};
programs.emacs = {
enable = true;
package = pkgs.emacs29-pgtk;
package = pkgs.emacs;
extraPackages = epkgs: [ epkgs.vterm ];
};
}

View file

@ -1,44 +1,40 @@
{ config, lib, pkgs, ... }:
let
name = "HackerNCoder";
email = "hackerncoder@encryptionin.space";
host = "mail.encryptionin.space";
maildir = "/home/ed/.mail";
in
{
accounts.email = {
maildirBasePath = "${maildir}";
maildirBasePath = ".mail";
accounts = {
hackerncoder = {
hackerncoder = rec {
primary = true;
address = "${email}";
userName = "${email}";
realName = "${name}";
address = "hackerncoder@encryptionin.space";
userName = "${address}";
realName = "HackerNCoder";
flavor = "plain";
passwordCommand = "${pkgs.pass}/bin/pass Email/hackerncoder";
imap = {
host = "${host}";
port = 993;
smtp = {
host = "mail.encryptionin.space";
port = 465;
tls.enable = true;
};
smtp = {
host = "${host}";
port = 465;
imap = {
host = "${smtp.host}";
port = 993;
tls.enable = true;
};
mbsync = {
enable = true;
create = "both";
create = "maildir";
expunge = "both";
patterns = [ "*" "!Archive" "!Archives*" ];
};
msmtp.enable = true;
mu.enable = true;
imapnotify = {
enable = true;
boxes = [ "Inbox" ];
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";
onNotify = "${pkgs.libnotify}/bin/notify-send -u normal -i mail-unread -a 'imap-notify' 'New email'";
};
neomutt = {
enable = true;
};
};
};
@ -47,21 +43,266 @@ in
programs = {
msmtp.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 = {
enable = true;
enable = false;
frequency = "0/3:00:00";
preExec = "${pkgs.libnotify}/bin/notify-send -u normal -i view-refresh -a 'mbsync timer' 'Syncing with mbsync'";
postExec = "${pkgs.mu}/bin/mu index";
};
services.imapnotify.enable = true;
services.imapnotify.enable = false;
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; [
pass
mu.mu4e
libnotify
lynx
file
];
}

View file

@ -1,15 +0,0 @@
{ config, lib, pkgs, ... }:
{
programs.firefox = {
enable = true;
nativeMessagingHosts = [ pkgs.kdePackages.plasma-browser-integration ];
# profiles = {
# default = {
# settings = {
# "widget.use-xdg-desktop-portal.file-picker" = 1;
# };
# };
# };
};
}

View file

@ -26,12 +26,16 @@
newHighlight = "green bold 52";
};
};
sendmail = {
sendemail = {
smtpserver = "mail.encryptionin.space";
smtpuser = "hackerncoder@encryptionin.space";
smtpencryption = "ssl";
smtpserverport = 465;
};
merge = {
conflictstyle = "diff3";
};
};
};
}

View file

@ -7,16 +7,12 @@
enable = true;
enableZshIntegration = true;
defaultCacheTtl = 1800;
pinentryPackage = pkgs.pinentry-qt;
extraConfig = ''
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; [
pinentry
];

32
programs/mopidy.nix Normal file
View file

@ -0,0 +1,32 @@
{ 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";
};
}

View file

@ -1,10 +0,0 @@
{ config, lib, pkgs, ... }:
{
home.packages = with pkgs; [
haruna
];
programs.mpv = {
enable = true;
};
}

View file

@ -43,7 +43,7 @@
# last prompt line gets hidden if it would overlap with left prompt.
typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
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
direnv # direnv status (https://direnv.net/)
asdf # asdf version manager (https://github.com/asdf-vm/asdf)
@ -56,7 +56,7 @@
nodeenv # node.js environment (https://github.com/ekalinin/nodeenv)
# node_version # node.js version
# 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)
# php_version # php version (https://www.php.net/)
# laravel_version # laravel php framework version (https://laravel.com/)

View file

@ -7,26 +7,24 @@
autosuggestion.enable = true;
enableVteIntegration = true;
syntaxHighlighting.enable = true;
initExtra = ''
# [Ctrl-RightArrow] - move forward one word
bindkey '^[[1;5C' forward-word
# [Ctrl-LeftArrow] - move backward one word
bindkey '^[[1;5D' backward-word
'';
envExtra = ''
export PATH="${config.xdg.configHome}/emacs/bin:$PATH"
'';
history.path = "${config.xdg.dataHome}/zsh/history";
initExtra = ''
alias hsw='home-manager switch'
'';
oh-my-zsh = {
enable = true;
plugins = [ "git" "direnv" ];
};
plugins = [
{
name = "powerlevel10k";
src = pkgs.zsh-powerlevel10k;
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
src = pkgs.zsh-powerlevel10k;
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
}
{
name = "powerlevel10k-config";
src = lib.cleanSource ./p10k-config;
file = "p10k.zsh";
src = lib.cleanSource ./p10k-config;
file = "p10k.zsh";
}
];
};

128
sway.nix
View file

@ -1,128 +0,0 @@
{ 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";
# };
}