Add lots of new nix config
This commit is contained in:
parent
aab1d4ff96
commit
13871c1ff9
@ -9,6 +9,8 @@ in
|
||||
_module.args.colorTheme = colorTheme;
|
||||
|
||||
imports = [
|
||||
./misc/mimetypes.nix
|
||||
|
||||
./programs/alacritty.nix
|
||||
./programs/comma.nix
|
||||
./programs/emacs.nix
|
||||
@ -17,11 +19,20 @@ in
|
||||
./programs/ncmpcpp.nix
|
||||
./programs/neovim.nix
|
||||
./programs/newsboat.nix
|
||||
./programs/qutebrowser.nix
|
||||
./programs/rofi.nix
|
||||
./programs/tmux.nix
|
||||
./programs/vscode.nix
|
||||
./programs/zathura.nix
|
||||
./programs/zsh.nix
|
||||
|
||||
./services/dunst.nix
|
||||
./services/mpd.nix
|
||||
./services/picom.nix
|
||||
./services/stalonetray.nix
|
||||
./services/sxhkd.nix
|
||||
|
||||
./secret/ssh/hosts
|
||||
];
|
||||
|
||||
xsession = {
|
||||
@ -36,11 +47,8 @@ in
|
||||
home-manager.enable = true;
|
||||
|
||||
bat.enable = true;
|
||||
|
||||
# bottom.enable = true;
|
||||
|
||||
bottom.enable = true;
|
||||
exa.enable = true;
|
||||
|
||||
feh.enable = true;
|
||||
|
||||
fzf = {
|
||||
@ -52,6 +60,7 @@ in
|
||||
irssi.enable = true;
|
||||
lazygit.enable = true;
|
||||
mpv.enable = true;
|
||||
ssh.enable = true;
|
||||
|
||||
man = {
|
||||
enable = true;
|
||||
@ -60,16 +69,6 @@ in
|
||||
|
||||
obs-studio.enable = true;
|
||||
|
||||
qutebrowser = {
|
||||
enable = true;
|
||||
aliases = {};
|
||||
searchEngines = {};
|
||||
settings = {};
|
||||
keyBindings = {};
|
||||
# quickmarks = {};
|
||||
extraConfig = '''';
|
||||
};
|
||||
|
||||
skim = {
|
||||
enable = true;
|
||||
defaultCommand ="fd --type f";
|
||||
@ -85,12 +84,6 @@ in
|
||||
zoxide.enable = true;
|
||||
};
|
||||
|
||||
services.mpd = import ./services/mpd.nix args;
|
||||
services.picom = import ./services/picom.nix;
|
||||
services.stalonetray = import ./services/stalonetray.nix (args // { inherit colorTheme; });
|
||||
services.sxhkd = import ./services/sxhkd.nix args;
|
||||
|
||||
|
||||
home = {
|
||||
stateVersion = "21.05";
|
||||
username = "h7x4";
|
||||
@ -101,11 +94,14 @@ in
|
||||
asciidoctor
|
||||
audacity
|
||||
beets
|
||||
biber
|
||||
calibre
|
||||
castnow
|
||||
citra
|
||||
cool-retro-term
|
||||
copyq
|
||||
czkawka
|
||||
darktable
|
||||
desmume
|
||||
discord
|
||||
diskonaut
|
||||
@ -116,8 +112,10 @@ in
|
||||
fd
|
||||
ffmpeg
|
||||
geogebra
|
||||
gnome.gnome-font-viewer
|
||||
google-chrome
|
||||
# gpgtui
|
||||
graphviz
|
||||
# hck
|
||||
hexyl
|
||||
imagemagick
|
||||
@ -132,6 +130,7 @@ in
|
||||
lastpass-cli
|
||||
lazydocker
|
||||
libreoffice-fresh
|
||||
light
|
||||
lolcat
|
||||
maim
|
||||
mdcat
|
||||
@ -197,34 +196,12 @@ in
|
||||
];
|
||||
};
|
||||
|
||||
services.gnome-keyring.enable = true;
|
||||
|
||||
services.dropbox.enable = true;
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
iconTheme = {
|
||||
package = pkgs.gnome.adwaita-icon-theme;
|
||||
name = "Adwaita";
|
||||
size = "32x32";
|
||||
};
|
||||
settings = {
|
||||
global = {
|
||||
geometry = "300x5-30+50";
|
||||
transparency = 10;
|
||||
frame_color = "#eceff1";
|
||||
font = "Droid Sans 9";
|
||||
};
|
||||
urgency_normal = {
|
||||
background = "#37474f";
|
||||
foreground = "#eceff1";
|
||||
timeout = 10;
|
||||
};
|
||||
};
|
||||
services = {
|
||||
gnome-keyring.enable = true;
|
||||
dropbox.enable = true;
|
||||
network-manager-applet.enable = true;
|
||||
# redshift.enable = true;
|
||||
};
|
||||
|
||||
services.network-manager-applet.enable = true;
|
||||
|
||||
# services.redshift.enable = true;
|
||||
|
||||
}
|
||||
|
||||
|
142
nixpkgs/misc/mimetypes.nix
Normal file
142
nixpkgs/misc/mimetypes.nix
Normal file
@ -0,0 +1,142 @@
|
||||
{ lib, ... }:
|
||||
|
||||
let
|
||||
|
||||
# Applications
|
||||
google-chrome = "google-chrome.desktop";
|
||||
gimp = "gimp.desktop";
|
||||
inkscape = "org.inkscape.Inkscape.desktop";
|
||||
vscode = "code.desktop";
|
||||
mpv = "mpv.desktop";
|
||||
zathura = "org.pwmt.zathura.desktop";
|
||||
sxiv = "sxiv.desktop";
|
||||
font-viewer = "org.gnome.font-viewer.desktop";
|
||||
|
||||
# Formats
|
||||
"3g2-audio" = "audio/3gpp";
|
||||
"3g2-video" = "video/3gpp";
|
||||
"3gp-audio" = "audio/3gpp";
|
||||
"3gp-video" = "video/3gpp";
|
||||
aac = "audio/aac";
|
||||
avi = "video/x-msvideo";
|
||||
bmp = "image/bmp";
|
||||
cbr = "application/vnd.comicbook+rar";
|
||||
cbrx = "application/x-cbr";
|
||||
cbz = "application/vnd.comicbook+zip";
|
||||
cbzx = "application/x-cbz";
|
||||
djvu = "image/vnd.djvu";
|
||||
epub = "application/epub+zip";
|
||||
flv = "video/x-flv";
|
||||
gif = "image/gif";
|
||||
html = "text/html";
|
||||
http = "x-scheme-handler/http";
|
||||
https = "x-scheme-handler/https";
|
||||
ico = "image/vnd.microsoft.icon";
|
||||
icox = "image/x-icon";
|
||||
ini = "application/x-wine-extension-ini";
|
||||
jpg = "image/jpeg";
|
||||
m4v = "video/x-m4v";
|
||||
mkv = "video/x-matroska";
|
||||
mov = "video/quicktime";
|
||||
mp3 = "audio/mpeg";
|
||||
mp4 = "video/mp4";
|
||||
mpeg = "video/mpeg";
|
||||
ogg = "audio/ogg";
|
||||
ogv = "video/ogg";
|
||||
opus = "audio/opus";
|
||||
otf = "font/otf";
|
||||
pdf = "application/pdf";
|
||||
pic = "image/x-pict";
|
||||
png = "image/png";
|
||||
psd = "image/vnd.adobe.photoshop";
|
||||
svg = "image/svg+xml";
|
||||
tiff = "image/tiff";
|
||||
ttf = "font/ttf";
|
||||
txt = "text/plain";
|
||||
url = "application/x-mswinurl";
|
||||
wav = "audio/wav";
|
||||
wavx = "audio/x-wav";
|
||||
webm-audio = "audio/webm";
|
||||
webm-video = "video/webm";
|
||||
webp = "image/webp";
|
||||
wmv = "video/x-ms-wmv";
|
||||
woff = "font/woff";
|
||||
woff2 = "font/woff2";
|
||||
xbm = "image/x-xbitmap";
|
||||
xcf = "image/x-xcf";
|
||||
xhtml = "application/xhtml+xml";
|
||||
xml = "text/xml";
|
||||
xpm = "image/x-xpixmap";
|
||||
|
||||
|
||||
# Generalizations
|
||||
audio-player = mpv;
|
||||
gui-text-editor = vscode;
|
||||
image-viewer = sxiv;
|
||||
pdf-viewer = zathura;
|
||||
video-player = mpv;
|
||||
web-browser = google-chrome;
|
||||
|
||||
in {
|
||||
|
||||
xdg.mimeApps = {
|
||||
enable = true;
|
||||
# associations.added = {};
|
||||
# associations.removed = {};
|
||||
defaultApplications = {
|
||||
${"3g2-audio"} = audio-player;
|
||||
${"3g2-video"} = video-player;
|
||||
${"3gp-audio"} = audio-player;
|
||||
${"3gp-video"} = video-player;
|
||||
${aac} = audio-player;
|
||||
${avi} = video-player;
|
||||
${bmp} = image-viewer;
|
||||
${cbrx} = zathura;
|
||||
${cbr} = zathura;
|
||||
${cbzx} = zathura;
|
||||
${cbz} = zathura;
|
||||
${djvu} = pdf-viewer;
|
||||
${epub} = zathura;
|
||||
${flv} = video-player;
|
||||
${gif} = image-viewer;
|
||||
${html} = web-browser;
|
||||
${https} = web-browser;
|
||||
${http} = web-browser;
|
||||
${icox} = image-viewer;
|
||||
${ico} = image-viewer;
|
||||
${jpg} = image-viewer;
|
||||
${m4v} = video-player;
|
||||
${mkv} = video-player;
|
||||
${mov} = video-player;
|
||||
${mp3} = audio-player;
|
||||
${mp4} = video-player;
|
||||
${mpeg} = video-player;
|
||||
${ogg} = audio-player;
|
||||
${ogv} = video-player;
|
||||
${opus} = audio-player;
|
||||
${otf} = font-viewer;
|
||||
${pdf} = pdf-viewer;
|
||||
${pic} = image-viewer;
|
||||
${png} = image-viewer;
|
||||
${psd} = gimp;
|
||||
${svg} = image-viewer;
|
||||
${tiff} = image-viewer;
|
||||
${ttf} = font-viewer;
|
||||
${txt} = gui-text-editor;
|
||||
${url} = web-browser;
|
||||
${wav} = audio-player;
|
||||
${webm-audio} = audio-player;
|
||||
${webm-video} = video-player;
|
||||
${webp} = image-viewer;
|
||||
${wmv} = video-player;
|
||||
${woff2} = font-viewer;
|
||||
${woff} = font-viewer;
|
||||
${xbm} = image-viewer;
|
||||
${xcf} = gimp;
|
||||
${xhtml} = web-browser;
|
||||
${xml} = gui-text-editor;
|
||||
${xpm} = image-viewer;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -1,13 +1,31 @@
|
||||
{ lib, pkgs, colorTheme, ... }:
|
||||
{
|
||||
programs.alacritty = { enable = true; settings = { window.padding = { x = 15; y = 15; }; font = { normal = { family = "Fira Code"; style = "Retina"; }; bold.family = "Fira Code"; italic.family = "Fira Code"; size = 12.0; };
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
window.padding = { x = 15; y = 15; };
|
||||
|
||||
font = {
|
||||
normal = {
|
||||
family = "Fira Code";
|
||||
style = "Retina";
|
||||
};
|
||||
bold.family = "Fira Code";
|
||||
italic.family = "Fira Code";
|
||||
size = 12.0;
|
||||
};
|
||||
|
||||
colors =
|
||||
let
|
||||
pColors = [ "foreground" "background" ];
|
||||
inherit (lib.attrsets) getAttrs filterAttrs;
|
||||
inherit (lib.lists) any;
|
||||
primaryColors = [ "foreground" "background" ];
|
||||
in
|
||||
{
|
||||
primary = lib.attrsets.getAttrs pColors colorTheme.default;
|
||||
normal = lib.attrsets.filterAttrs (n: v: pColors ? n) colorTheme.default;
|
||||
primary = getAttrs primaryColors colorTheme.default;
|
||||
normal = let
|
||||
removePrimaryColorAttrs = n: v: !(any (pc: n ? pc) primaryColors);
|
||||
in filterAttrs removePrimaryColorAttrs colorTheme.default;
|
||||
};
|
||||
|
||||
background_opacity = 1.0;
|
||||
@ -18,6 +36,12 @@
|
||||
unfocused_hollow = true;
|
||||
};
|
||||
|
||||
bell = {
|
||||
animation = "EaseOutExpo";
|
||||
color = "0xffffff";
|
||||
duration = 20;
|
||||
};
|
||||
|
||||
live_config_reload = true;
|
||||
|
||||
shell = {
|
||||
|
@ -2,10 +2,12 @@
|
||||
{
|
||||
programs.gh = {
|
||||
enable = true;
|
||||
gitProtocol = "ssh";
|
||||
aliases = {
|
||||
co = "pr checkout";
|
||||
pv = "pr view";
|
||||
settings = {
|
||||
gitProtocol = "ssh";
|
||||
aliases = {
|
||||
co = "pr checkout";
|
||||
pv = "pr view";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -1,14 +1,12 @@
|
||||
{pkgs, ...}:
|
||||
{ pkgs, home, colorTheme, ... }:
|
||||
{
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
# defaultEditor = true;
|
||||
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
extraConfig = ''
|
||||
set clipboard+=unnamedplus
|
||||
'';
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
vim-commentary
|
||||
vim-gitgutter
|
||||
@ -23,12 +21,33 @@
|
||||
limelight-vim
|
||||
vim-tmux-navigator
|
||||
vim-polyglot
|
||||
lightline-vim
|
||||
{
|
||||
plugin = rainbow;
|
||||
config = ''
|
||||
let g:rainbow_active = 1
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = vim-monokai;
|
||||
config = ''
|
||||
colorscheme monokai
|
||||
autocmd ColorScheme * highlight Normal ctermbg=0
|
||||
autocmd ColorScheme * highlight LineNr ctermbg=0
|
||||
autocmd ColorScheme * highlight CursorLineNR ctermbg=0 ctermfg=208
|
||||
autocmd ColorScheme * highlight SignColumn ctermbg=0
|
||||
autocmd ColorScheme * highlight GitGutterAdd ctermbg=0
|
||||
autocmd ColorScheme * highlight GitGutterChange ctermbg=0
|
||||
autocmd ColorScheme * highlight GitGutterDelete ctermbg=0
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
extraConfig = ''
|
||||
set clipboard+=unnamedplus
|
||||
set number relativenumber
|
||||
'';
|
||||
};
|
||||
|
||||
home.sessionVariables = { EDITOR = "nvim"; };
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ ... }:
|
||||
{ lib, ... }:
|
||||
let
|
||||
defaultBrowser = "google-chrome-stable %u";
|
||||
videoViewer = "mpv %u";
|
||||
@ -8,7 +8,7 @@ in {
|
||||
autoReload = true;
|
||||
maxItems = 50;
|
||||
browser = defaultBrowser;
|
||||
extraConfig = builtins.concatStringsSep "\n" [
|
||||
extraConfig = lib.strings.concatStringsSep "\n" [
|
||||
''
|
||||
macro m set browser "${videoViewer}"; open-in-browser ; set browser "${defaultBrowser}"
|
||||
macro l set browser "${defaultBrowser}"; open-in-browser ; set browser "${defaultBrowser}"
|
||||
|
12
nixpkgs/programs/qutebrowser.nix
Normal file
12
nixpkgs/programs/qutebrowser.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs.qutebrowser = {
|
||||
enable = true;
|
||||
aliases = {};
|
||||
searchEngines = {};
|
||||
settings = {};
|
||||
keyBindings = {};
|
||||
# quickmarks = {};
|
||||
extraConfig = '''';
|
||||
};
|
||||
}
|
@ -14,13 +14,13 @@
|
||||
# ];
|
||||
|
||||
font = "Droid Sans 12";
|
||||
theme = ../../rofi/themes/blank.rasi;
|
||||
theme = ../../general/.config/rofi/themes/blank.rasi;
|
||||
|
||||
extraConfig = {
|
||||
modi = "window,run,drun,ssh,windowcd,file-browser";
|
||||
modi = "window,run,drun,ssh,windowcd";
|
||||
show-icons = true;
|
||||
drun-display-format = "{name}";
|
||||
fullscreen = false;
|
||||
# fullscreen = false;
|
||||
threads = 0;
|
||||
matching = "fuzzy";
|
||||
scroll-method = 0;
|
||||
|
@ -5,10 +5,16 @@
|
||||
baseIndex = 1;
|
||||
clock24 = true;
|
||||
escapeTime = 0;
|
||||
# keyMode = "vi";
|
||||
keyMode = "vi";
|
||||
prefix = "C-a";
|
||||
plugins = with pkgs.tmuxPlugins; [
|
||||
|
||||
fingers
|
||||
fpp
|
||||
pain-control
|
||||
prefix-highlight
|
||||
sidebar
|
||||
tmux-fzf
|
||||
urlview
|
||||
];
|
||||
extraConfig = ''
|
||||
# Don't rename windows automatically after rename with ','
|
||||
@ -52,10 +58,10 @@
|
||||
bind -n C-l select-pane -R
|
||||
|
||||
# Resize pane using Alt-Shift-[hjkl]
|
||||
bind -n M-H resize-pane -L 5
|
||||
bind -n M-J resize-pane -D 5
|
||||
bind -n M-K resize-pane -U 5
|
||||
bind -n M-L resize-pane -R 5
|
||||
bind -n M-H resize-pane -L 5
|
||||
bind -n M-J resize-pane -D 5
|
||||
bind -n M-K resize-pane -U 5
|
||||
bind -n M-L resize-pane -R 5
|
||||
|
||||
# Fullscreen current pane using $P-Alt-z
|
||||
unbind z
|
||||
@ -73,7 +79,7 @@
|
||||
bind c clock-mode
|
||||
bind t new-window
|
||||
|
||||
# Setup 'y' to yank (copy)
|
||||
# Setup 'y' to yank (copy)
|
||||
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "pbcopy"
|
||||
bind-key -T copy-mode-vi 'V' send -X select-line
|
||||
bind-key -T copy-mode-vi 'r' send -X rectangle-toggle
|
||||
@ -82,7 +88,7 @@
|
||||
### DESIGN CHANGES ###
|
||||
######################
|
||||
|
||||
set-option -g status-left '#[bg=blue]#[fg=black,bold] ###S #[bg=default] #[fg=green]#(~/.scripts/tmux/fcitx) #[fg=red]%H:%M '
|
||||
set-option -g status-left '#{prefix_highlight} #[bg=blue]#[fg=black,bold] ###S #[bg=default] #[fg=green]#(~/.scripts/tmux/fcitx) #[fg=red]%H:%M '
|
||||
set-option -g status-right '#[fg=red]#(~/.scripts/tmux/mpd)'
|
||||
set-window-option -g window-status-current-style fg=magenta
|
||||
set-option -g status-style 'bg=black fg=default'
|
||||
|
@ -307,7 +307,7 @@ in
|
||||
# ms-vsliveshare.vsliveshare
|
||||
redhat.java
|
||||
wholroyd.jinja
|
||||
bbenoist.Nix
|
||||
bbenoist.nix
|
||||
# jock.svg
|
||||
vscodevim.vim
|
||||
haskell.haskell
|
||||
|
@ -7,6 +7,14 @@
|
||||
defaultKeymap = "viins";
|
||||
|
||||
plugins = [
|
||||
# {
|
||||
# name = "nix-zsh-shell-integration";
|
||||
# src = pkgs.nix-zsh-shell-integration;
|
||||
# }
|
||||
{
|
||||
name = "zsh-fast-syntax-highlighting";
|
||||
src = pkgs.zsh-fast-syntax-highlighting;
|
||||
}
|
||||
{
|
||||
name = "zsh-completions";
|
||||
src = pkgs.zsh-completions;
|
||||
@ -55,7 +63,8 @@
|
||||
# hs = "${pkgs.home-manager}/bin/home-manager switch";
|
||||
|
||||
hms = "home-manager switch";
|
||||
nos = "sudo ${nixos-rebuild}/bin/nixos-rebuild switch";
|
||||
nxr = "sudo ${nixos-rebuild}/bin/nixos-rebuild switch";
|
||||
nxc = "sudoedit /etc/nixos/configuration.nix";
|
||||
ns = "nix-shell";
|
||||
|
||||
# Having 'watch' with a space after as an alias, enables it to expand other aliases
|
||||
@ -117,6 +126,8 @@
|
||||
|
||||
ip = "ip -c";
|
||||
|
||||
regex-escapechars = "echo \"[\\^$.|?*+()\"";
|
||||
|
||||
connectedIps = shellPipe [
|
||||
"netstat -tn 2>/dev/null"
|
||||
"grep :$1"
|
||||
@ -183,7 +194,7 @@
|
||||
nthCdsAsNameValuePairs = n: map (cmd: nameValuePair cmd (realCommand n)) (nthCds n);
|
||||
allCdNameValuePairs = (flatten (map nthCdsAsNameValuePairs (range 1 9)));
|
||||
in
|
||||
builtins.listToAttrs allCdNameValuePairs);
|
||||
lib.attrsets.listToAttrs allCdNameValuePairs);
|
||||
|
||||
initExtra = ''
|
||||
source ${config.home.homeDirectory}/${dotDir}/p10k.zsh
|
||||
|
17
nixpkgs/secret/.gitignore
vendored
Normal file
17
nixpkgs/secret/.gitignore
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
|
||||
# Ignore everything
|
||||
*
|
||||
|
||||
# Sincde it's not possible to re-include a file if a
|
||||
# parent directory of that file is excluded, we need to
|
||||
# reinclude all directories.
|
||||
!/**/
|
||||
|
||||
# Root level exceptions
|
||||
!/**/default.nix
|
||||
!.gitignore
|
||||
!update.sh
|
||||
!README.md
|
||||
|
||||
# Other exceptions
|
||||
!ssh/hosts/pvv.nix
|
36
nixpkgs/secret/README.md
Normal file
36
nixpkgs/secret/README.md
Normal file
@ -0,0 +1,36 @@
|
||||
# Secrets
|
||||
|
||||
|
||||
|
||||
## Structure
|
||||
|
||||
<!-- tree-output -->
|
||||
```
|
||||
.
|
||||
├── common
|
||||
│ ├── browser-bookmarks.nix
|
||||
│ └── browser-engines.nix
|
||||
├── programs
|
||||
│ ├── chromium
|
||||
│ │ ├── bookmarks.nix
|
||||
│ │ ├── default.nix
|
||||
│ │ └── engines.nix
|
||||
│ ├── newsboat
|
||||
│ │ ├── default.nix
|
||||
│ │ └── sources.nix
|
||||
│ ├── qutebrowser
|
||||
│ │ ├── bookmarks.nix
|
||||
│ │ ├── default.nix
|
||||
│ │ └── engines.nix
|
||||
│ └── default.nix
|
||||
├── ssh
|
||||
│ └── hosts
|
||||
│ ├── default.nix
|
||||
│ ├── home.nix
|
||||
│ ├── ntnu.nix
|
||||
│ ├── pvv.nix
|
||||
│ └── users.nix
|
||||
├── default.nix
|
||||
├── README.md
|
||||
└── update.sh
|
||||
```
|
7
nixpkgs/secret/default.nix
Normal file
7
nixpkgs/secret/default.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./programs
|
||||
./ssh/hosts
|
||||
];
|
||||
}
|
7
nixpkgs/secret/programs/chromium/default.nix
Normal file
7
nixpkgs/secret/programs/chromium/default.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./bookmarks.nix
|
||||
./engines.nix
|
||||
];
|
||||
}
|
8
nixpkgs/secret/programs/default.nix
Normal file
8
nixpkgs/secret/programs/default.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./chromium
|
||||
./newsboat
|
||||
./qutebrowser
|
||||
];
|
||||
}
|
6
nixpkgs/secret/programs/newsboat/default.nix
Normal file
6
nixpkgs/secret/programs/newsboat/default.nix
Normal file
@ -0,0 +1,6 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./sources
|
||||
];
|
||||
}
|
7
nixpkgs/secret/programs/qutebrowser/default.nix
Normal file
7
nixpkgs/secret/programs/qutebrowser/default.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./bookmarks.nix
|
||||
./engines.nix
|
||||
];
|
||||
}
|
8
nixpkgs/secret/ssh/hosts/default.nix
Normal file
8
nixpkgs/secret/ssh/hosts/default.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./pvv.nix
|
||||
./ntnu.nix
|
||||
./home.nix
|
||||
];
|
||||
}
|
100
nixpkgs/secret/ssh/hosts/pvv.nix
Normal file
100
nixpkgs/secret/ssh/hosts/pvv.nix
Normal file
@ -0,0 +1,100 @@
|
||||
{ lib, ... }:
|
||||
let
|
||||
users = import ./users.nix;
|
||||
inherit (users.pvv) normalUser adminUser;
|
||||
|
||||
# http://www.pvv.ntnu.no/pvv/Maskiner
|
||||
normalMachines = [
|
||||
[ "hildring" "pvv-login" "pvv" ]
|
||||
"demiurgen"
|
||||
"eirin"
|
||||
[ "jokum" "pvv-nix" ]
|
||||
"isvegg"
|
||||
[ "microbel" "pvv-users" "pvv-mail" ]
|
||||
];
|
||||
|
||||
rootMachines = [
|
||||
[ "knakelibrak" "pvv-databases" ]
|
||||
[ "spikkjeposche" "pvv-web" "pvv-wiki" "pvv-webmail" ]
|
||||
"sleipner"
|
||||
"fenris"
|
||||
"balduzius"
|
||||
"joshua"
|
||||
"skrotnisse"
|
||||
"principal"
|
||||
"tom"
|
||||
"monty"
|
||||
|
||||
{
|
||||
names = ["dvask"];
|
||||
proxyJump = "monty";
|
||||
}
|
||||
|
||||
[ "innovation" "pvv-minecraft" ]
|
||||
];
|
||||
|
||||
normalizeValueType = let
|
||||
inherit (lib.strings) isString concatStringsSep;
|
||||
inherit (lib.lists) isList;
|
||||
inherit (lib.attrsets) filterAttrs;
|
||||
in
|
||||
machine:
|
||||
if (isString machine) then (normalizeValueType [machine])
|
||||
else if (isList machine) then (normalizeValueType { names = machine; })
|
||||
else ({ name = concatStringsSep " " machine.names; } // (removeAttrs machine ["names"]));
|
||||
|
||||
# TODO: Merge the following two functions. They have too much code in common.
|
||||
convertNormalMachines = let
|
||||
inherit (lib.trivial) pipe;
|
||||
inherit (lib.attrsets) listToAttrs;
|
||||
inherit (lib.lists) head;
|
||||
inherit (lib.strings) split;
|
||||
|
||||
convertNormalMachine = normalizedMachine:
|
||||
rec {
|
||||
inherit (normalizedMachine) name;
|
||||
value = ({
|
||||
hostname = "${head (split " " name)}.pvv.org";
|
||||
user = normalUser;
|
||||
} // removeAttrs normalizedMachine ["name"]);
|
||||
};
|
||||
|
||||
pipeline = [
|
||||
(ms: map normalizeValueType ms)
|
||||
(ms: map convertNormalMachine ms)
|
||||
listToAttrs
|
||||
];
|
||||
in machines: pipe machines pipeline;
|
||||
|
||||
convertAdminMachines = let
|
||||
inherit (lib.trivial) pipe;
|
||||
inherit (lib.attrsets) listToAttrs;
|
||||
inherit (lib.lists) head;
|
||||
inherit (lib.strings) split;
|
||||
|
||||
convertAdminMachine = normalizedMachine:
|
||||
rec {
|
||||
inherit (normalizedMachine) name;
|
||||
value = ({
|
||||
hostname = "${head (split " " name)}.pvv.org";
|
||||
user = adminUser;
|
||||
proxyJump = "hildring";
|
||||
} // removeAttrs normalizedMachine ["name"]);
|
||||
};
|
||||
|
||||
pipeline = [
|
||||
(ms: map normalizeValueType ms)
|
||||
(ms: map convertAdminMachine ms)
|
||||
listToAttrs
|
||||
];
|
||||
in machines: pipe machines pipeline;
|
||||
|
||||
in
|
||||
{
|
||||
programs.ssh.matchBlocks = let
|
||||
concatSets = lib.lists.foldl (s1: s2: s1 // s2) {};
|
||||
in concatSets [
|
||||
(convertNormalMachines normalMachines)
|
||||
(convertAdminMachines rootMachines)
|
||||
];
|
||||
}
|
2
nixpkgs/secret/update.sh
Executable file
2
nixpkgs/secret/update.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env sh
|
||||
perl -0777 -pi -e '$tree=`exa -I XX* --tree --group-directories-first`; s/<!-- tree-output -->\n```\n(?:.|\n)+```/<!-- tree-output -->\n```\n$tree```/' README.md
|
24
nixpkgs/services/dunst.nix
Normal file
24
nixpkgs/services/dunst.nix
Normal file
@ -0,0 +1,24 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
iconTheme = {
|
||||
package = pkgs.gnome.adwaita-icon-theme;
|
||||
name = "Adwaita";
|
||||
size = "32x32";
|
||||
};
|
||||
settings = {
|
||||
global = {
|
||||
geometry = "300x5-30+50";
|
||||
transparency = 10;
|
||||
frame_color = "#eceff1";
|
||||
font = "Droid Sans 9";
|
||||
};
|
||||
urgency_normal = {
|
||||
background = "#37474f";
|
||||
foreground = "#eceff1";
|
||||
timeout = 10;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,8 +1,10 @@
|
||||
{ config, ... }:
|
||||
rec {
|
||||
enable = true;
|
||||
musicDirectory = "${config.services.dropbox.path}/music/music";
|
||||
# musicDirectory = "${config.home.homeDirectory}/music";
|
||||
playlistDirectory = "${musicDirectory}/playlists/MPD";
|
||||
{
|
||||
services.mpd = rec {
|
||||
enable = true;
|
||||
musicDirectory = "${config.services.dropbox.path}/music/music";
|
||||
# musicDirectory = "${config.home.homeDirectory}/music";
|
||||
playlistDirectory = "${musicDirectory}/playlists/MPD";
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1,34 +1,37 @@
|
||||
{ ... }:
|
||||
{
|
||||
enable = true;
|
||||
services.picom = {
|
||||
enable = true;
|
||||
|
||||
blur = true;
|
||||
blurExclude = [
|
||||
"class_g = 'slop'"
|
||||
"class_g = 'XAVA'"
|
||||
"class_g = 'lattedock'"
|
||||
"class_g = 'latte-dock'"
|
||||
"window_type = 'dock'"
|
||||
"window_type = 'desktop'"
|
||||
"_GTK_FRAME_EXTENTS@:c"
|
||||
];
|
||||
blur = true;
|
||||
blurExclude = [
|
||||
"class_g = 'slop'"
|
||||
"class_g = 'XAVA'"
|
||||
"class_g = 'lattedock'"
|
||||
"class_g = 'latte-dock'"
|
||||
"window_type = 'dock'"
|
||||
"window_type = 'desktop'"
|
||||
"_GTK_FRAME_EXTENTS@:c"
|
||||
];
|
||||
|
||||
fade = true;
|
||||
fadeSteps = [ "0.1" "0.1" ];
|
||||
fadeExclude = [];
|
||||
fade = true;
|
||||
fadeSteps = [ "0.1" "0.1" ];
|
||||
fadeExclude = [];
|
||||
|
||||
shadow = true;
|
||||
shadowOffsets = [ (-7) (-7) ];
|
||||
shadowOpacity = "0.25";
|
||||
shadowExclude = [
|
||||
"class_g = 'XAVA'"
|
||||
"class_g = 'stalonetray'"
|
||||
"class_g = 'lattedock'"
|
||||
"class_g = 'latte-dock'"
|
||||
];
|
||||
noDockShadow = true;
|
||||
noDNDShadow = true;
|
||||
shadow = true;
|
||||
shadowOffsets = [ (-7) (-7) ];
|
||||
shadowOpacity = "0.25";
|
||||
shadowExclude = [
|
||||
"class_g = 'XAVA'"
|
||||
"class_g = 'stalonetray'"
|
||||
"class_g = 'lattedock'"
|
||||
"class_g = 'latte-dock'"
|
||||
];
|
||||
noDockShadow = true;
|
||||
noDNDShadow = true;
|
||||
|
||||
vSync = true;
|
||||
vSync = true;
|
||||
|
||||
extraOptions = '''';
|
||||
extraOptions = '''';
|
||||
};
|
||||
}
|
||||
|
@ -1,21 +1,23 @@
|
||||
{ colorTheme, ... }:
|
||||
{
|
||||
enable = true;
|
||||
config = {
|
||||
decorations = "none";
|
||||
transparent = false;
|
||||
dockapp_mode = "none";
|
||||
geometry = "8x1-0+0";
|
||||
background = colorTheme.default.background;
|
||||
kludges = "force_icons_size";
|
||||
grow_gravity = "NW";
|
||||
icon_gravity = "NW";
|
||||
icon_size = 30;
|
||||
sticky = true;
|
||||
window_type = "dock";
|
||||
window_layer = "bottom";
|
||||
no_shrink = true;
|
||||
skip_taskbar = true;
|
||||
slot_size = 40;
|
||||
services.stalonetray = {
|
||||
enable = true;
|
||||
config = {
|
||||
decorations = "none";
|
||||
transparent = false;
|
||||
dockapp_mode = "none";
|
||||
geometry = "8x1-0+0";
|
||||
background = colorTheme.default.background;
|
||||
kludges = "force_icons_size";
|
||||
grow_gravity = "NW";
|
||||
icon_gravity = "NW";
|
||||
icon_size = 30;
|
||||
sticky = true;
|
||||
window_type = "dock";
|
||||
window_layer = "bottom";
|
||||
no_shrink = true;
|
||||
skip_taskbar = true;
|
||||
slot_size = 40;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -1,77 +1,79 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
enable = true;
|
||||
keybindings = {
|
||||
services.sxhkd = {
|
||||
enable = true;
|
||||
keybindings = {
|
||||
|
||||
# make sxhkd reload its configuration files:
|
||||
"super + Escape" = "pkill -USR1 -x sxhkd && ${pkgs.libnotify}/bin/notify-send -t 3000 \"sxhkd configuration reloaded\"";
|
||||
# make sxhkd reload its configuration files:
|
||||
"super + Escape" = "pkill -USR1 -x sxhkd && ${pkgs.libnotify}/bin/notify-send -t 3000 \"sxhkd configuration reloaded\"";
|
||||
|
||||
# Applications
|
||||
"super + w" = "${pkgs.emacs}/bin/emacs";
|
||||
# Applications
|
||||
"super + w" = "${pkgs.emacs}/bin/emacs";
|
||||
|
||||
"super + e" = "$FILEBROWSER";
|
||||
"super + e" = "$FILEBROWSER";
|
||||
|
||||
"super + s" = "$BROWSER";
|
||||
"super + s" = "$BROWSER";
|
||||
|
||||
"super + r" = "${pkgs.rofi}/bin/rofi -show drun";
|
||||
"super + r" = "${pkgs.rofi}/bin/rofi -show drun";
|
||||
|
||||
# Volume
|
||||
# Volume
|
||||
|
||||
"super + {@F7,@F8}" = "${pkgs.alsaUtils}/bin/amixer set Master 2%{-,+}";
|
||||
"super + {@F7,@F8}" = "${pkgs.alsaUtils}/bin/amixer set Master 2%{-,+}";
|
||||
|
||||
"{XF86AudioLowerVolume,XF86AudioRaiseVolume}" = "${pkgs.alsaUtils}/bin/amixer set Master 2%{-,+}";
|
||||
"{XF86AudioLowerVolume,XF86AudioRaiseVolume}" = "${pkgs.alsaUtils}/bin/amixer set Master 2%{-,+}";
|
||||
|
||||
"XF86AudioMute" = "${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||
"XF86AudioMute" = "${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||
|
||||
# Music
|
||||
# Music
|
||||
|
||||
"super + p" = "${pkgs.mpc_cli}/bin/mpc toggle";
|
||||
"super + p" = "${pkgs.mpc_cli}/bin/mpc toggle";
|
||||
|
||||
"XF86AudioPlay" = "${pkgs.mpc_cli}/bin/mpc toggle";
|
||||
"XF86AudioPrev" = "${pkgs.mpc_cli}/bin/mpc prev";
|
||||
"XF86AudioNext" = "${pkgs.mpc_cli}/bin/mpc next";
|
||||
"XF86AudioPlay" = "${pkgs.mpc_cli}/bin/mpc toggle";
|
||||
"XF86AudioPrev" = "${pkgs.mpc_cli}/bin/mpc prev";
|
||||
"XF86AudioNext" = "${pkgs.mpc_cli}/bin/mpc next";
|
||||
|
||||
# Monitor
|
||||
# Monitor
|
||||
|
||||
"XF86MonBrightnessUp" = "${pkgs.light}/bin/light -A 5";
|
||||
"XF86MonBrightnessDown" = "${pkgs.light}/bin/light -U 5";
|
||||
"XF86MonBrightnessUp" = "${pkgs.light}/bin/light -A 5";
|
||||
"XF86MonBrightnessDown" = "${pkgs.light}/bin/light -U 5";
|
||||
|
||||
"@Print" = "${pkgs.maim}/bin/maim --hidecursor --nokeyboard --select | ${pkgs.xclip}/bin/xclip -selection clipboard -target image/png -in";
|
||||
"@Print" = "${pkgs.maim}/bin/maim --hidecursor --nokeyboard --select | ${pkgs.xclip}/bin/xclip -selection clipboard -target image/png -in";
|
||||
|
||||
"shift + @Print" = "${pkgs.maim}/bin/maim --hidecursor --nokeyboard $SCREENSHOT_DIR/$(date +%s).png";
|
||||
"shift + @Print" = "${pkgs.maim}/bin/maim --hidecursor --nokeyboard $SCREENSHOT_DIR/$(date +%s).png";
|
||||
|
||||
# TODO: Add boomer as package
|
||||
# "super + @Print" = "boomer";
|
||||
# TODO: Add boomer as package
|
||||
# "super + @Print" = "boomer";
|
||||
|
||||
# Misc
|
||||
# Misc
|
||||
|
||||
"super + a" = "${pkgs.copyq}/bin/copyq toggle";
|
||||
"super + a" = "${pkgs.copyq}/bin/copyq toggle";
|
||||
|
||||
# fcitx
|
||||
"super + {b,n,m}" = "${pkgs.fcitx}/bin/fcitx-remote -s {mozc,fcitx-keyboard-no,fcitx-keyboard-us}";
|
||||
# fcitx
|
||||
"super + {b,n,m}" = "${pkgs.fcitx}/bin/fcitx-remote -s {mozc,fcitx-keyboard-no,fcitx-keyboard-us}";
|
||||
|
||||
# fcitx5
|
||||
# "super + {b,n,m}" = "${pkgs.fcitx5}/bin/fcitx5-remote -s {mozc,keyboard-no,keyboard-us}";
|
||||
# fcitx5
|
||||
# "super + {b,n,m}" = "${pkgs.fcitx5}/bin/fcitx5-remote -s {mozc,keyboard-no,keyboard-us}";
|
||||
|
||||
# TODO: fix
|
||||
# "super + v" = "${pkgs.rofi}/bin/rofi -modi lpass:$HOME/.scripts/rofi/lpass/rofi-lpass -show lpass";
|
||||
# TODO: fix
|
||||
# "super + v" = "${pkgs.rofi}/bin/rofi -modi lpass:$HOME/.scripts/rofi/lpass/rofi-lpass -show lpass";
|
||||
|
||||
"super + minus" = "${pkgs.xcalib}/bin/xcalib -invert -alter";
|
||||
"super + minus" = "${pkgs.xcalib}/bin/xcalib -invert -alter";
|
||||
|
||||
# ¯\_(ツ)_/¯
|
||||
# "super + shift + s"
|
||||
# sleep 0.3; \
|
||||
# ${pkgs.xdotool}/bin/xdotool key U00AF; \
|
||||
# ${pkgs.xdotool}/bin/xdotool key U005C; \
|
||||
# ${pkgs.xdotool}/bin/xdotool key U005F; \
|
||||
# ${pkgs.xdotool}/bin/xdotool key U0028; \
|
||||
# ${pkgs.xdotool}/bin/xdotool key U30C4; \
|
||||
# ${pkgs.xdotool}/bin/xdotool key U0029; \
|
||||
# ${pkgs.xdotool}/bin/xdotool key U005F; \
|
||||
# ${pkgs.xdotool}/bin/xdotool key U002F; \
|
||||
# ${pkgs.xdotool}/bin/xdotool key U00AF
|
||||
# ¯\_(ツ)_/¯
|
||||
# "super + shift + s"
|
||||
# sleep 0.3; \
|
||||
# ${pkgs.xdotool}/bin/xdotool key U00AF; \
|
||||
# ${pkgs.xdotool}/bin/xdotool key U005C; \
|
||||
# ${pkgs.xdotool}/bin/xdotool key U005F; \
|
||||
# ${pkgs.xdotool}/bin/xdotool key U0028; \
|
||||
# ${pkgs.xdotool}/bin/xdotool key U30C4; \
|
||||
# ${pkgs.xdotool}/bin/xdotool key U0029; \
|
||||
# ${pkgs.xdotool}/bin/xdotool key U005F; \
|
||||
# ${pkgs.xdotool}/bin/xdotool key U002F; \
|
||||
# ${pkgs.xdotool}/bin/xdotool key U00AF
|
||||
|
||||
# é
|
||||
"super + shift + e" = "sleep 0.3; ${pkgs.xdotool}/bin/xdotool key U00E9";
|
||||
};
|
||||
# é
|
||||
"super + shift + e" = "sleep 0.3; ${pkgs.xdotool}/bin/xdotool key U00E9";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user