mirror of
https://github.com/kmein/niveum
synced 2026-03-17 10:41:06 +01:00
Installed. More configuration
~ move options out
~ redshift: switch to geoclue2
~ wifi: add c-base
+ rofi: add active and urgent colours
~ vim: wildmode made more sensible
~ i3blocks: fix battery script
- i3blocks: brightness indicator
+ i3: rofi window switcher
~ use illum for backlight
+ use unclutter
+ tor-browser-bundle-bin
+ xfce.tumbler
+ xorg.{xbacklight,xcursorthemes,xkill}
+ texlive-full
+ cabal{-install,2nix}
+ idris
~ bash: fix prompt
+ helpers file
This commit is contained in:
54
config.nix
54
config.nix
@@ -1,15 +1,11 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
scripts = import ./dot/scripts.nix pkgs;
|
scripts = import ./dot/scripts.nix { inherit pkgs; };
|
||||||
constants = import ./constants.nix;
|
helpers = import ./helpers.nix;
|
||||||
wallpaper = pkgs.copyPathToStore ./art/haskell-grey.png;
|
|
||||||
theme = {
|
|
||||||
gtk = { name = "Numix-SX-Dark"; package = pkgs.numix-sx-gtk-theme; };
|
|
||||||
icon = { name = "Papirus-Adapta-Nokto"; package = pkgs.papirus-icon-theme; };
|
|
||||||
};
|
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
"${builtins.fetchTarball https://github.com/rycee/home-manager/archive/master.tar.gz}/nixos"
|
"${builtins.fetchTarball https://github.com/rycee/home-manager/archive/master.tar.gz}/nixos"
|
||||||
|
./options.nix
|
||||||
./configs/shells.nix
|
./configs/shells.nix
|
||||||
./configs/editors.nix
|
./configs/editors.nix
|
||||||
./configs/graphics.nix
|
./configs/graphics.nix
|
||||||
@@ -64,8 +60,7 @@ in {
|
|||||||
|
|
||||||
services.redshift = {
|
services.redshift = {
|
||||||
enable = true;
|
enable = true;
|
||||||
latitude = "52";
|
provider = "geoclue2";
|
||||||
longitude = "13";
|
|
||||||
temperature = { night = 25000; day = 1000; };
|
temperature = { night = 25000; day = 1000; };
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -76,7 +71,6 @@ in {
|
|||||||
terminal = "screen-256color";
|
terminal = "screen-256color";
|
||||||
};
|
};
|
||||||
|
|
||||||
# networking.hostName = "scardanelli";
|
|
||||||
networking.hosts = {
|
networking.hosts = {
|
||||||
"192.168.178.27" = [ "printer.local" ];
|
"192.168.178.27" = [ "printer.local" ];
|
||||||
};
|
};
|
||||||
@@ -85,20 +79,21 @@ in {
|
|||||||
networking.wireless.networks = {
|
networking.wireless.networks = {
|
||||||
Aether = { pskRaw = "e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a"; };
|
Aether = { pskRaw = "e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a"; };
|
||||||
"Asoziales Netzwerk" = { pskRaw = "8e234041ec5f0cd1b6a14e9adeee9840ed51b2f18856a52137485523e46b0cb6"; };
|
"Asoziales Netzwerk" = { pskRaw = "8e234041ec5f0cd1b6a14e9adeee9840ed51b2f18856a52137485523e46b0cb6"; };
|
||||||
|
"c-base-public" = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.kfm = {
|
home-manager.users.kfm = {
|
||||||
gtk = {
|
gtk = {
|
||||||
enable = true;
|
enable = true;
|
||||||
font = with import ./theme.nix; { package = pkgs.roboto; name = uiFont.name; };
|
font = with import ./theme.nix; { package = pkgs.roboto; name = uiFont.name; };
|
||||||
iconTheme = theme.icon;
|
iconTheme = config.constants.theme.icon;
|
||||||
theme = theme.gtk;
|
theme = config.constants.theme.gtk;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userName = constants.user.name;
|
userName = config.constants.user.name;
|
||||||
userEmail = constants.user.email;
|
userEmail = config.constants.user.email;
|
||||||
aliases = {
|
aliases = {
|
||||||
br = "branch";
|
br = "branch";
|
||||||
co = "checkout";
|
co = "checkout";
|
||||||
@@ -110,24 +105,37 @@ in {
|
|||||||
last = "log -1 HEAD";
|
last = "log -1 HEAD";
|
||||||
pull-all = "!${scripts.git-pull-all}";
|
pull-all = "!${scripts.git-pull-all}";
|
||||||
};
|
};
|
||||||
ignores = constants.ignoredFiles;
|
ignores = config.constants.ignore;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.rofi = with import ./theme.nix; {
|
programs.rofi = with import ./theme.nix; {
|
||||||
enable = true;
|
enable = true;
|
||||||
separator = "solid";
|
separator = "solid";
|
||||||
scrollbar = false;
|
scrollbar = false;
|
||||||
|
terminal = config.defaultApplications.terminal;
|
||||||
borderWidth = 0;
|
borderWidth = 0;
|
||||||
lines = 5;
|
lines = 5;
|
||||||
font = "${uiFont.name} ${toString (uiFont.size + 1)}";
|
font = "${uiFont.name} ${toString (uiFont.size + 1)}";
|
||||||
colors = {
|
colors = rec {
|
||||||
window = { background = black; border = black; separator = gray.dark; };
|
window = { background = black; border = black; separator = gray.dark; };
|
||||||
rows = {
|
rows = {
|
||||||
normal = {
|
normal = {
|
||||||
background = black;
|
background = window.background;
|
||||||
|
backgroundAlt = window.background;
|
||||||
foreground = gray.light;
|
foreground = gray.light;
|
||||||
backgroundAlt = black;
|
highlight = { foreground = white; inherit (window) background; };
|
||||||
highlight = { background = black; foreground = white; };
|
};
|
||||||
|
active = {
|
||||||
|
background = window.background;
|
||||||
|
backgroundAlt = window.background;
|
||||||
|
foreground = blue.dark;
|
||||||
|
highlight = { foreground = blue.light; inherit (window) background; };
|
||||||
|
};
|
||||||
|
urgent = {
|
||||||
|
background = window.background;
|
||||||
|
backgroundAlt = window.background;
|
||||||
|
foreground = red.dark;
|
||||||
|
highlight = { foreground = red.light; inherit (window) background; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -137,7 +145,7 @@ in {
|
|||||||
|
|
||||||
services.dunst = with import ./theme.nix; {
|
services.dunst = with import ./theme.nix; {
|
||||||
enable = true;
|
enable = true;
|
||||||
iconTheme = theme.icon;
|
iconTheme = config.constants.theme.icon;
|
||||||
settings = {
|
settings = {
|
||||||
global = {
|
global = {
|
||||||
transparency = 10;
|
transparency = 10;
|
||||||
@@ -180,9 +188,9 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
home.file = {
|
home.file = {
|
||||||
".background-image".source = wallpaper;
|
".background-image".source = config.constants.wallpaper;
|
||||||
".ghci".text = import ./dot/ghci.nix pkgs;
|
".ghci".text = import ./dot/ghci.nix { inherit pkgs; };
|
||||||
".stack/config.yaml".text = import ./dot/stack.nix constants.user;
|
".stack/config.yaml".text = import ./dot/stack.nix { user = config.constants.user; };
|
||||||
".config/zathura/zathurarc".text = "set selection-clipboard clipboard";
|
".config/zathura/zathurarc".text = "set selection-clipboard clipboard";
|
||||||
".config/mpv/input.conf".text = import ./dot/mpv.nix;
|
".config/mpv/input.conf".text = import ./dot/mpv.nix;
|
||||||
".config/xfce4/terminal/terminalrc".text = import ./dot/terminal.nix;
|
".config/xfce4/terminal/terminalrc".text = import ./dot/terminal.nix;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, config, ... }:
|
||||||
let vim_conf = with import ../constants.nix; ''
|
with import ../helpers.nix;
|
||||||
|
let vim_conf = ''
|
||||||
" if tabular
|
" if tabular
|
||||||
vmap a= :Tabularize /=<CR>
|
vmap a= :Tabularize /=<CR>
|
||||||
vmap a; :Tabularize /::<CR>
|
vmap a; :Tabularize /::<CR>
|
||||||
@@ -14,7 +15,7 @@ let vim_conf = with import ../constants.nix; ''
|
|||||||
set number
|
set number
|
||||||
set path=$PWD/**
|
set path=$PWD/**
|
||||||
set completeopt=menu,longest
|
set completeopt=menu,longest
|
||||||
set wildmode=longest,full,list wildignore+=${commaSep ignoredFiles}
|
set wildmode=list:longest wildignore+=${commaSep config.constants.ignore}
|
||||||
set shortmess+=aI
|
set shortmess+=aI
|
||||||
set nowritebackup noswapfile
|
set nowritebackup noswapfile
|
||||||
set mouse=a
|
set mouse=a
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
let
|
let
|
||||||
spotify_info = pkgs.writeBash "spotify.info" ''
|
spotify_info = pkgs.writeBash "spotify.info" ''
|
||||||
STATUS=$(${pkgs.dbus}/bin/dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'PlaybackStatus'|egrep -A 1 "string"|cut -b 26-|cut -d '"' -f 1|egrep -v ^$)
|
STATUS=$(${pkgs.dbus}/bin/dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'PlaybackStatus'|egrep -A 1 "string"|cut -b 26-|cut -d '"' -f 1|egrep -v ^$)
|
||||||
@@ -26,7 +26,7 @@ let
|
|||||||
'';
|
'';
|
||||||
battery_info = pkgs.writeBash "battery.info" ''
|
battery_info = pkgs.writeBash "battery.info" ''
|
||||||
BAT_DIR="/sys/class/power_supply/$BLOCK_INSTANCE/"
|
BAT_DIR="/sys/class/power_supply/$BLOCK_INSTANCE/"
|
||||||
[ -d BAT_DIR ] && cd BAT_DIR || exit 1
|
[ -d $BAT_DIR ] && cd $BAT_DIR || exit 1
|
||||||
|
|
||||||
status=$(cat status)
|
status=$(cat status)
|
||||||
charge_f=$((100 * $(cat charge_now) / $(cat charge_full)))
|
charge_f=$((100 * $(cat charge_now) / $(cat charge_full)))
|
||||||
@@ -122,15 +122,6 @@ let
|
|||||||
|
|
||||||
[separator]
|
[separator]
|
||||||
|
|
||||||
[brightness]
|
|
||||||
command=printf "%.1f%%" $(${pkgs.xorg.xbacklight}/bin/xbacklight)
|
|
||||||
label=
|
|
||||||
min_width= 100%
|
|
||||||
signal=2
|
|
||||||
interval=once
|
|
||||||
|
|
||||||
[separator]
|
|
||||||
|
|
||||||
[cpu_usage]
|
[cpu_usage]
|
||||||
command=cut -d' ' -f 1-3 < /proc/loadavg
|
command=cut -d' ' -f 1-3 < /proc/loadavg
|
||||||
label=
|
label=
|
||||||
@@ -182,11 +173,12 @@ let
|
|||||||
new_window pixel 1
|
new_window pixel 1
|
||||||
new_float pixel 1
|
new_float pixel 1
|
||||||
|
|
||||||
bindsym $mod+Return exec ${pkgs.xfce.terminal}/bin/xfce4-terminal
|
bindsym $mod+Return exec ${config.defaultApplications.terminal}
|
||||||
bindsym $mod+y exec ${pkgs.chromium}/bin/chrome-browser
|
bindsym $mod+y exec ${config.defaultApplications.browser}
|
||||||
bindsym $mod+t exec ${pkgs.xfce.thunar}/bin/thunar
|
bindsym $mod+t exec ${config.defaultApplications.fileManager}
|
||||||
bindsym $mod+Shift+w exec ${pkgs.xautolock}/bin/xautolock -locknow
|
bindsym $mod+Shift+w exec ${pkgs.xautolock}/bin/xautolock -locknow
|
||||||
bindsym $mod+d exec ${pkgs.rofi}/bin/rofi -display-run — -show run
|
bindsym $mod+d exec ${pkgs.rofi}/bin/rofi -display-run — -show run
|
||||||
|
bindsym $mod+a exec ${pkgs.rofi}/bin/rofi -display-window — -show window
|
||||||
|
|
||||||
bindsym $mod+Shift+q kill
|
bindsym $mod+Shift+q kill
|
||||||
bindsym $mod+Left focus left
|
bindsym $mod+Left focus left
|
||||||
@@ -243,8 +235,6 @@ let
|
|||||||
bindsym XF86AudioLowerVolume exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -d 5 && pkill -RTMIN+3 i3blocks
|
bindsym XF86AudioLowerVolume exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -d 5 && pkill -RTMIN+3 i3blocks
|
||||||
bindsym XF86AudioRaiseVolume exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5 && pkill -RTMIN+3 i3blocks
|
bindsym XF86AudioRaiseVolume exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5 && pkill -RTMIN+3 i3blocks
|
||||||
bindsym XF86AudioMute exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -t && pkill -RTMIN+3 i3blocks
|
bindsym XF86AudioMute exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -t && pkill -RTMIN+3 i3blocks
|
||||||
bindsym XF86MonBrightnessUp exec --no-startup-id ${pkgs.light}/bin/light +A 10 && pkill -RTMIN+2 i3blocks
|
|
||||||
bindsym XF86MonBrightnessDown exec --no-startup-id ${pkgs.light}/bin/light -A 10 && pkill -RTMIN+2 i3blocks
|
|
||||||
|
|
||||||
mode " " {
|
mode " " {
|
||||||
bindsym Left resize shrink width 10 px or 10 ppt
|
bindsym Left resize shrink width 10 px or 10 ppt
|
||||||
@@ -284,17 +274,17 @@ let
|
|||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
services.xserver = with import ../constants.nix; with import ../theme.nix; {
|
services.xserver = with import ../helpers.nix; with import ../theme.nix; {
|
||||||
enable = true;
|
enable = true;
|
||||||
layout = commaSep [ "de" "gr" "ru" ];
|
layout = commaSep [ "de" "gr" "ru" ];
|
||||||
xkbVariant = commaSep [ "T3" "polytonic" "phonetic_winkeys" ];
|
xkbVariant = commaSep [ "T3" "polytonic" "phonetic_winkeys" ];
|
||||||
xkbOptions = commaSep [ "terminate:ctrl_alt_bksp" "grp:alt_space_toggle" ];
|
xkbOptions = commaSep [ "terminate:ctrl_alt_bksp" "grp:alt_space_toggle" ];
|
||||||
libinput.enable = true;
|
libinput.enable = true;
|
||||||
xautolock = let i3lock = "${pkgs.i3lock}/bin/i3lock -e -c ${lib.strings.removePrefix "#" black}"; in {
|
xautolock = {
|
||||||
enable = true;
|
enable = true;
|
||||||
time = 15;
|
time = 15;
|
||||||
locker = i3lock;
|
locker = config.defaultApplications.locker;
|
||||||
nowlocker = i3lock;
|
nowlocker = config.defaultApplications.locker;
|
||||||
enableNotifier = true;
|
enableNotifier = true;
|
||||||
notifier = ''${pkgs.libnotify}/bin/notify-send -u normal -a xautolock "Locking soon" "The screen will lock in 10 seconds."'';
|
notifier = ''${pkgs.libnotify}/bin/notify-send -u normal -a xautolock "Locking soon" "The screen will lock in 10 seconds."'';
|
||||||
};
|
};
|
||||||
@@ -317,10 +307,11 @@ in {
|
|||||||
|
|
||||||
services.compton = {
|
services.compton = {
|
||||||
enable = true;
|
enable = true;
|
||||||
fade = true;
|
|
||||||
shadow = true;
|
shadow = true;
|
||||||
menuOpacity = "0.9";
|
menuOpacity = "0.9";
|
||||||
shadowOpacity = "0.5";
|
shadowOpacity = "0.3";
|
||||||
fadeDelta = 2;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.illum.enable = true;
|
||||||
|
services.unclutter.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
with pkgs;
|
with pkgs;
|
||||||
{
|
{
|
||||||
fonts.fonts = [
|
fonts.fonts = [
|
||||||
@@ -13,8 +13,10 @@ with pkgs;
|
|||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
chromium
|
chromium
|
||||||
|
config.constants.theme.gtk.package
|
||||||
|
config.constants.theme.icon.package
|
||||||
ffmpeg
|
ffmpeg
|
||||||
firefox firefoxPackages.tor-browser
|
firefox
|
||||||
git
|
git
|
||||||
gnumake
|
gnumake
|
||||||
htop
|
htop
|
||||||
@@ -27,6 +29,8 @@ with pkgs;
|
|||||||
pmount
|
pmount
|
||||||
ripgrep tree
|
ripgrep tree
|
||||||
rlwrap
|
rlwrap
|
||||||
|
tor-browser-bundle-bin
|
||||||
|
unzip
|
||||||
w3m
|
w3m
|
||||||
wget
|
wget
|
||||||
whois
|
whois
|
||||||
@@ -34,21 +38,28 @@ with pkgs;
|
|||||||
xfce.ristretto
|
xfce.ristretto
|
||||||
xfce.terminal
|
xfce.terminal
|
||||||
xfce.thunar
|
xfce.thunar
|
||||||
|
xfce.tumbler
|
||||||
|
xorg.xbacklight
|
||||||
|
xorg.xcursorthemes
|
||||||
|
xorg.xkill
|
||||||
youtubeDL
|
youtubeDL
|
||||||
zathura
|
zathura
|
||||||
zip unzip
|
zip
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.command-not-found.enable = true;
|
programs.command-not-found.enable = true;
|
||||||
programs.java.enable = true;
|
programs.java.enable = true;
|
||||||
programs.light.enable = true;
|
|
||||||
|
|
||||||
users.users.kfm.packages = [
|
users.users.kfm.packages = [
|
||||||
|
(texlive.combine { inherit (pkgs.texlive) scheme-full latexmk; })
|
||||||
audacity
|
audacity
|
||||||
biber
|
biber
|
||||||
|
cabal-install
|
||||||
|
cabal2nix
|
||||||
calibre
|
calibre
|
||||||
clojure
|
clojure
|
||||||
ctags
|
ctags
|
||||||
|
dropbox-cli
|
||||||
franz
|
franz
|
||||||
fsharp
|
fsharp
|
||||||
gcc
|
gcc
|
||||||
@@ -59,8 +70,9 @@ with pkgs;
|
|||||||
haskellPackages.hasktags
|
haskellPackages.hasktags
|
||||||
haskellPackages.hindent
|
haskellPackages.hindent
|
||||||
haskellPackages.hoogle
|
haskellPackages.hoogle
|
||||||
haskellPackages.idris
|
haskellPackages.pandoc
|
||||||
haskellPackages.pandoc haskellPackages.pandoc-citeproc
|
haskellPackages.pandoc-citeproc
|
||||||
|
idris
|
||||||
inkscape
|
inkscape
|
||||||
jo
|
jo
|
||||||
lua
|
lua
|
||||||
@@ -79,7 +91,6 @@ with pkgs;
|
|||||||
spotify
|
spotify
|
||||||
stack
|
stack
|
||||||
swiProlog
|
swiProlog
|
||||||
texlive.combined.scheme-tetex
|
|
||||||
tinycc
|
tinycc
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let scripts = import ../dot/scripts.nix pkgs;
|
let scripts = import ../dot/scripts.nix { inherit pkgs; };
|
||||||
in {
|
in {
|
||||||
environment.shellAliases =
|
environment.shellAliases =
|
||||||
let rlwrap = cmd: "${pkgs.rlwrap}/bin/rlwrap ${cmd}";
|
let rlwrap = cmd: "${pkgs.rlwrap}/bin/rlwrap ${cmd}";
|
||||||
@@ -12,7 +12,6 @@ in {
|
|||||||
ip = "${pkgs.iproute}/bin/ip -c";
|
ip = "${pkgs.iproute}/bin/ip -c";
|
||||||
ocaml = rlwrap "${pkgs.ocaml}/bin/ocaml";
|
ocaml = rlwrap "${pkgs.ocaml}/bin/ocaml";
|
||||||
tmux = "${pkgs.tmux}/bin/tmux -2";
|
tmux = "${pkgs.tmux}/bin/tmux -2";
|
||||||
gdrive = ''sh -c "cd ~/google-drive && ${pkgs.grive2}/bin/grive" >/dev/null 2>&1 &'';
|
|
||||||
} // scripts;
|
} // scripts;
|
||||||
|
|
||||||
environment.extraInit = ''
|
environment.extraInit = ''
|
||||||
@@ -56,7 +55,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
programs.bash = {
|
programs.bash = {
|
||||||
promptInit = ''PS1="$(tput bold)\w \$([[ \$? == 0 ]] && echo \"\[\033[1;32m\]\" || echo \"\[\033[1;31m\]\")\$$(tput sgr0) '';
|
promptInit = ''PS1="$(tput bold)\w \$([[ \$? == 0 ]] && echo \"\[\033[1;32m\]\" || echo \"\[\033[1;31m\]\")\$$(tput sgr0) "'';
|
||||||
enableCompletion = true;
|
enableCompletion = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
commaSep = strs: builtins.concatStringsSep "," strs;
|
|
||||||
|
|
||||||
ignoredFiles = [ "*~" ".stack-work/" "__pycache__/" ".mypy_cache/" "*.o" "*.hi" "*.aux" "*.class" "*.dyn_hi" "*.dyn_o" ];
|
|
||||||
|
|
||||||
user = {
|
|
||||||
github = "kmein";
|
|
||||||
name = "Kierán Meinhardt";
|
|
||||||
email = "kieran.meinhardt@gmail.com";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
pkgs:
|
{ pkgs }:
|
||||||
''
|
''
|
||||||
:set editor vim
|
:set editor vim
|
||||||
:def hoogle \x -> return $ ":!${pkgs.haskellPackages.hoogle}/bin/hoogle --color \"" ++ x ++ "\" "
|
:def hoogle \x -> return $ ":!${pkgs.haskellPackages.hoogle}/bin/hoogle --color \"" ++ x ++ "\" "
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
pkgs:
|
{ pkgs }:
|
||||||
let
|
let
|
||||||
bingWallpaper = pkgs.writeBash "bing-wallpaper.sh" ''
|
bingWallpaper = pkgs.writeBash "bing-wallpaper.sh" ''
|
||||||
PICTURE_DIR="$HOME/pictures/external/bing/"
|
PICTURE_DIR="$HOME/pictures/external/bing/"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
user:
|
{ user }:
|
||||||
''
|
''
|
||||||
templates:
|
templates:
|
||||||
params:
|
params:
|
||||||
|
|||||||
3
helpers.nix
Normal file
3
helpers.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
commaSep = builtins.concatStringsSep ",";
|
||||||
|
}
|
||||||
46
options.nix
Normal file
46
options.nix
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
{ lib, pkgs, ... }:
|
||||||
|
with lib;
|
||||||
|
with import ./theme.nix;
|
||||||
|
let
|
||||||
|
stringOption = def: mkOption { type = types.string; default = def; };
|
||||||
|
themeOption = def: mkOption {
|
||||||
|
type = types.submodule {
|
||||||
|
options = {
|
||||||
|
name = mkOption { type = types.string; default = def.name; };
|
||||||
|
package = mkOption { type = types.package; default = def.package; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
default = def;
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
options.defaultApplications = mapAttrs (const stringOption) {
|
||||||
|
terminal = "${pkgs.xfce.terminal}/bin/xfce4-terminal";
|
||||||
|
browser = "${pkgs.chromium}/bin/chromium";
|
||||||
|
fileManager = "${pkgs.xfce.thunar}/bin/thunar";
|
||||||
|
locker = "${pkgs.i3lock}/bin/i3lock -e -c ${strings.removePrefix "#" black}";
|
||||||
|
};
|
||||||
|
|
||||||
|
options.constants = {
|
||||||
|
user = mapAttrs (const stringOption) {
|
||||||
|
github = "kmein";
|
||||||
|
name = "Kierán Meinhardt";
|
||||||
|
email = "kieran.meinhardt@gmail.com";
|
||||||
|
};
|
||||||
|
|
||||||
|
ignore = mkOption {
|
||||||
|
type = types.listOf types.string;
|
||||||
|
default = [ "*~" ".stack-work/" "__pycache__/" ".mypy_cache/" "*.o" "*.hi" "*.aux" "*.class" "*.dyn_hi" "*.dyn_o" "dist/" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
theme = mapAttrs (const themeOption) {
|
||||||
|
gtk = { name = "Paper"; package = pkgs.paper-gtk-theme; };
|
||||||
|
icon = { name = "Paper"; package = pkgs.paper-icon-theme; };
|
||||||
|
};
|
||||||
|
|
||||||
|
wallpaper = mkOption {
|
||||||
|
type = types.path;
|
||||||
|
default = pkgs.copyPathToStore ./art/haskell-grey.png;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user