home/natto: move around stuff

move git and zsh from hosts/satori and split services.nix

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2023-01-24 11:36:04 +05:30
parent 950cf357d1
commit 5fef417fb0
18 changed files with 196 additions and 159 deletions

1
home/natto/config/README Normal file
View File

@@ -0,0 +1 @@
Some of these are copied as-it-is. The rest are managed via home-manager and are just here for legacy purposes.

File diff suppressed because one or more lines are too long

View File

@@ -8,13 +8,15 @@
imports = [ imports = [
./email.nix ./email.nix
./secrets
./programs.nix ./programs.nix
./xsession.nix ./xsession.nix
./wayland.nix ./wayland.nix
./services.nix
./pkgs.nix ./pkgs.nix
./stuff.nix ./stuff.nix
./emacs.nix ./emacs.nix
./dunst.nix
./git.nix
./mpd.nix
./zsh.nix
]; ];
} }

38
home/natto/dunst.nix Normal file
View File

@@ -0,0 +1,38 @@
{ config, colors, ... }:
{
services = {
dunst = {
enable = true;
iconTheme = with config.gtk.iconTheme; { inherit name package; };
settings = with colors.hex; {
global = {
mouse_left_click = "close_current";
mouse_right_click = "do_action";
mouse_middle_click = "close_all";
font = "Monospace 10";
separator_color = "auto";
shrink = true;
word_wrap = "yes";
};
urgency_low = {
inherit background foreground;
frame_color = sky;
timeout = 5;
};
urgency_normal = {
inherit background foreground;
frame_color = green;
timeout = 5;
};
urgency_critical = {
inherit background foreground;
frame_color = red;
timeout = 0;
};
};
};
};
}

16
home/natto/git.nix Normal file
View File

@@ -0,0 +1,16 @@
{ config, pkgs, ... }:
{
programs.git = {
enable = true;
package = pkgs.git.override {
doInstallCheck = false;
sendEmailSupport = true;
withManual = false;
};
};
age.secrets.gitconfig = {
file = ./secrets/.gitconfig.age;
path = "${config.home.homeDirectory}/.gitconfig";
};
}

View File

@@ -1,11 +1,14 @@
{ config, pkgs, inputs, ... }: { config, pkgs, ... }:
let
home = config.home.homeDirectory;
in
{ {
services = { services = {
mpd = { mpd = {
enable = true; enable = true;
musicDirectory = "${config.home.homeDirectory}/Music"; musicDirectory = "${home}/Music";
dbFile = "${config.home.homeDirectory}/.config/mpd/database"; dbFile = "${home}/.config/mpd/database";
dataDir = "${config.home.homeDirectory}/.config/mpd"; dataDir = "${home}/.config/mpd";
network = { network = {
startWhenNeeded = true; startWhenNeeded = true;
listenAddress = "any"; listenAddress = "any";
@@ -26,38 +29,6 @@
}; };
}; };
}; };
dunst = {
enable = true;
settings = {
global = {
font = "Monospace 10";
frame_color = "#93a1a1";
separator_color = "#93a1a1";
shrink = true;
icon_theme = config.gtk.iconTheme.name;
};
urgency_low = {
background = "#586e75";
foreground = "#eee8d5";
timeout = 5;
};
urgency_normal = {
background = "#073642";
foreground = "#eee8d5";
timeout = 5;
};
urgency_critical = {
background = "#dc322f";
foreground = "#eee8d5";
timeout = 0;
};
};
};
}; };
systemd.user.services = { systemd.user.services = {
@@ -84,4 +55,25 @@
}; };
}; };
}; };
home = {
packages = with pkgs; [
(ncmpcpp.override {
visualizerSupport = true;
clockSupport = true;
})
mpdas
mpc_cli
];
file.ncmpcpp = {
source = ./config/ncmpcpp/config;
target = "${config.xdg.configHome}/ncmpcpp/config";
};
};
age.secrets.mpdasrc = {
file = ./secrets/mpdasrc.age;
path = "${home}/.config/mpdasrc";
};
} }

View File

@@ -4,10 +4,8 @@
# A/V, codec and media stuff # A/V, codec and media stuff
ffmpeg-full ffmpeg-full
pamixer wireplumber
mpdas
mpv mpv
mpc_cli
pulseaudio pulseaudio
pavucontrol pavucontrol
spotify spotify
@@ -16,22 +14,12 @@
# Utils # Utils
rage rage
curl curl
(dmenu.override { patches = [ ./patches/dmenu.patch ]; })
(st.override {
patches = [ ./patches/st.patch ];
extraLibs = [ harfbuzz ];
})
yt-dlp yt-dlp
xclip
xorg.xkbcomp
xorg.xmodmap
p7zip p7zip
unrar unrar
sxiv
vim vim
jmtpfs jmtpfs
neofetch neofetch
xdotool
(inputs.nbfc.packages.${pkgs.system}.nbfc-client-c) (inputs.nbfc.packages.${pkgs.system}.nbfc-client-c)
(flake.packages.${pkgs.system}.customscripts) (flake.packages.${pkgs.system}.customscripts)
translate-shell translate-shell
@@ -40,16 +28,6 @@
undervolt undervolt
# GUI utils # GUI utils
(xfce.thunar.override {
thunarPlugins = with xfce; [
thunar-media-tags-plugin
thunar-volman
thunar-archive-plugin
];
})
xfce.xfconf
xfce.tumbler
flameshot
(discord.override { (discord.override {
nss = nss_latest; nss = nss_latest;
}) })
@@ -58,12 +36,8 @@
luajit luajit
dunst dunst
feh feh
xmobar
arc-theme
arc-icon-theme
authy authy
gnome.zenity gnome.zenity
stalonetray
# Wine and games and stuff # Wine and games and stuff
steam steam
@@ -108,10 +82,5 @@
anki-bin anki-bin
tor-browser-bundle-bin tor-browser-bundle-bin
mailcap mailcap
(ncmpcpp.override {
visualizerSupport = true;
clockSupport = true;
})
libsForQt5.qtstyleplugins
]; ];
} }

View File

@@ -0,0 +1,17 @@
age-encryption.org/v1
-> ssh-ed25519 kIk5ZQ e1cSQ/CPtYglZXXIQSM2pWQQ8FJQQepuqCXiIDU/Oyk
W3/7wgoihF+wusjGjSvKsn/jJqRSC0jUnWXY3Irvc4s
-> ssh-rsa lnK3Ng
NonFv6q2KMI4U/qNlgb01YOdeo7m7UkuU8rixgv8YZU+89ZfTWcuk946FffNT1Rs
7Y2JrK1YGQGXz2/sNJshJXKJKawRGfynWjSSPt5wiEYvetXnvD9xY36BYX482/59
RhmsIVkAD8i809CZxpjukrwcrqCbqG7O7USe8suFlcYRIFP15jc3q5sMBUaIi982
yZM2UeB4ep/onPLnrhiBPnhzMILkDQTcv6Ajmcax0ZrKTcZ7qoe1dgLmJKTNLA/5
DNO3MT5m1wzx2KZ2FIjmpnJ+/yVXdIfSJgGnrR1qbHl3Zbji8EJx7fbUUddASvot
QS/OgRcYg063DDNCOycxCzpYVGCw6jWSpbohZnoy9+zhei2nnI/UHOZYng2OJ6vV
gP5BWwSBWXtX3UsrCZkLhTDMniU2Qje3S4b0jya8AIdpTLanrIS0GXSWzQTEx2gp
6OqNGXKa/LCAmFw83gC0VDdi6AgCTbBZT6Ul06dQiG4K5PgDtiysxcAb+HPUWJG+
-> #sFXk;-grease xnKp
RDMpdFSVKr7dC3z6iAF4QmYE
--- F4Uen8zSg6WsChoMDXaJSP/fLj/7QWI5jcQMFF0E9DM
<EFBFBD><EFBFBD>U<EFBFBD><EFBFBD>6<07>҄e!31<33>b<EFBFBD>1S,<2C>'<27>C<EFBFBD>}<7D>8d<38><64><19>d<EFBFBD><64>u4{^v/<2F><1B>Zr<5A><72><EFBFBD>$<24>"RK

Binary file not shown.

View File

@@ -1,25 +0,0 @@
{ config, ... }: {
age =
let
home = config.home.homeDirectory;
in
{
sshKeyPaths = [ "${home}/.ssh/id_ed25519" ];
secrets = {
mpdasrc = {
file = ./mpdasrc.age;
path = "${home}/.config/mpdasrc";
};
zshrc = {
file = ./.zshrc.age;
path = "${home}/.zshrc";
mode = "660";
};
gitconfig = {
file = ./.gitconfig.age;
path = "${home}/.gitconfig";
mode = "660";
};
};
};
}

View File

@@ -4,11 +4,11 @@
userDirs.enable = true; userDirs.enable = true;
}; };
age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ];
home = { home = {
sessionVariables = { sessionVariables = {
LV2_PATH = lib.makeSearchPath "lib/lv2" (with pkgs; [ calf ]); LV2_PATH = lib.makeSearchPath "lib/lv2" (with pkgs; [ calf ]);
TERM = "st-24bits";
QT_QPA_PLATFORMTHEME = "gtk2";
QT_X11_NO_MITSHM = "1"; QT_X11_NO_MITSHM = "1";
HM_CONF_DIR = "/etc/nixos"; HM_CONF_DIR = "/etc/nixos";
}; };
@@ -24,24 +24,10 @@
source = ./config/stalonetrayrc; source = ./config/stalonetrayrc;
target = "${home.homeDirectory}/.stalonetrayrc"; target = "${home.homeDirectory}/.stalonetrayrc";
}; };
ncmpcpp = {
source = ./config/ncmpcpp/config;
target = "${xdg.configHome}/ncmpcpp/config";
};
mpv = { mpv = {
source = ./config/mpv/mpv.conf; source = ./config/mpv/mpv.conf;
target = "${xdg.configHome}/mpv/mpv.conf"; target = "${xdg.configHome}/mpv/mpv.conf";
}; };
packages = {
text =
let
packages = builtins.map (p: "${p.name}") config.home.packages;
sortedUnique = builtins.sort builtins.lessThan (lib.unique packages);
formatted = builtins.concatStringsSep "\n" sortedUnique;
in
formatted;
target = "${xdg.configHome}/${config.home.username}-packages";
};
}; };
}; };
i18n = { i18n = {

View File

@@ -10,18 +10,6 @@
gtk.enable = true; gtk.enable = true;
}; };
gtk = {
enable = true;
theme = {
package = pkgs.numix-solarized-gtk-theme;
name = "NumixSolarizedDarkMagenta";
};
iconTheme = {
package = pkgs.zafiro-icons;
name = "Zafiro-icons-Dark";
};
};
xsession = { xsession = {
enable = true; enable = true;
windowManager = { windowManager = {
@@ -38,4 +26,29 @@
}; };
}; };
}; };
home.packages = with pkgs; [
(dmenu.override { patches = [ ./patches/dmenu.patch ]; })
(st.override {
patches = [ ./patches/st.patch ];
extraLibs = [ harfbuzz ];
})
xclip
xorg.xkbcomp
xorg.xmodmap
sxiv
xdotool
(xfce.thunar.override {
thunarPlugins = with xfce; [
thunar-media-tags-plugin
thunar-volman
thunar-archive-plugin
];
})
xfce.xfconf
xfce.tumbler
flameshot
xmobar
stalonetray
];
} }

33
home/natto/zsh.nix Normal file
View File

@@ -0,0 +1,33 @@
{ config, ... }:
let
secretPath = "${config.home.homeDirectory}/.zshenv_secret";
in
{
programs.zsh = {
enable = true;
autocd = true;
history = rec {
expireDuplicatesFirst = true;
ignoreDups = true;
size = 30000;
save = size;
};
enableAutosuggestions = true;
enableCompletion = true;
enableSyntaxHighlighting = true;
prezto = {
enable = true;
prompt.theme = "pure";
autosuggestions.color = "fg=yellow,bold";
};
initExtra = ''
. ${secretPath};
'';
};
age.secrets.zshenv_secret = {
file = ./secrets/.zshenv_secret;
path = secretPath;
mode = "660";
};
}

View File

@@ -10,6 +10,7 @@
./services.nix ./services.nix
./graphics.nix ./graphics.nix
./xorg.nix ./xorg.nix
./wayland.nix
./nix.nix ./nix.nix
]; ];
system.stateVersion = "21.05"; system.stateVersion = "21.05";

View File

@@ -31,42 +31,9 @@
}; };
}; };
git = {
enable = true;
package = pkgs.git.override {
doInstallCheck = false;
sendEmailSupport = true;
withManual = false;
};
};
zsh = {
enable = true;
histSize = 30000;
enableCompletion = true;
enableBashCompletion = true;
syntaxHighlighting.enable = true;
autosuggestions = {
enable = true;
highlightStyle = "fg=yellow,bold";
};
ohMyZsh.enable = true;
};
adb.enable = true; adb.enable = true;
light.enable = true; light.enable = true;
/* proxychains = {
enable = true;
chain.type = "dynamic";
proxyDNS = true;
proxies = {
remilia = {
enable = true;
type = "socks5";
host = "127.0.0.1";
port = 2217;
};
};
}; */
gamemode.enable = true; gamemode.enable = true;
nm-applet.enable = true; nm-applet.enable = true;
}; };

View File

@@ -19,6 +19,7 @@
]; ];
}; };
}; };
console.useXkbConfig = true;
fonts.fonts = with pkgs; [ fonts.fonts = with pkgs; [
fira-mono fira-mono

View File

@@ -6,7 +6,6 @@
# ''; # '';
#in #in
{ {
console.useXkbConfig = true;
services = { services = {
xserver = { xserver = {
enable = true; enable = true;
@@ -35,8 +34,8 @@
symbolsFile = ./colemak; symbolsFile = ./colemak;
}; };
}; };
layout = "colemak"; layout = "us";
xkbVariant = "dhz"; # trying to ditch DHz now xkbVariant = "colemak_dh"; # trying to ditch DHz now
autoRepeatDelay = 320; autoRepeatDelay = 320;
autoRepeatInterval = 30; autoRepeatInterval = 30;
}; };