Tons of refactor
This commit is contained in:
parent
c7720b7035
commit
4793a68ed5
13
cachix/cachix.nix
Normal file
13
cachix/cachix.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
|
||||
{
|
||||
nix = {
|
||||
binaryCaches = [
|
||||
"https://cachix.cachix.org"
|
||||
];
|
||||
binaryCachePublicKeys = [
|
||||
"cachix.cachix.org-1:eWNHQldwUO7G2VkjpnjDbWwy4KQ/HNxht7H4SSoMckM="
|
||||
];
|
||||
trustedUsers = [ "root" "maralorn" ];
|
||||
};
|
||||
}
|
||||
|
13
cachix/nixfmt.nix
Normal file
13
cachix/nixfmt.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
|
||||
{
|
||||
nix = {
|
||||
binaryCaches = [
|
||||
"https://nixfmt.cachix.org"
|
||||
];
|
||||
binaryCachePublicKeys = [
|
||||
"nixfmt.cachix.org-1:uyEQg16IhCFeDpFV07aL+Dbmh18XHVUqpkk/35WAgJI="
|
||||
];
|
||||
trustedUsers = [ "root" "maralorn" ];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
let
|
||||
inherit (import ../common/lib.nix) niv;
|
||||
pkgs = import <nixpkgs> {};
|
||||
unstable = import <unstable> {};
|
||||
lorriSrc = (import ../nix/sources.nix).lorri;
|
||||
lorri = import lorriSrc { src = lorriSrc; pkgs = unstable; };
|
||||
neovim = pkgs.neovim.override {
|
||||
vimAlias = true;
|
||||
withPython3 = true;
|
||||
};
|
||||
in
|
||||
{
|
||||
core = builtins.attrValues {
|
||||
inherit neovim;
|
||||
inherit (pkgs)
|
||||
gitFull
|
||||
gnumake
|
||||
python3
|
||||
mkpasswd
|
||||
file
|
||||
wget
|
||||
curl
|
||||
wireguard
|
||||
gnupg
|
||||
mutt
|
||||
bind
|
||||
liboping
|
||||
psmisc
|
||||
unzip
|
||||
rename
|
||||
whois
|
||||
lsof;
|
||||
};
|
||||
|
||||
extra = builtins.attrValues {
|
||||
inherit lorri niv;
|
||||
inherit (pkgs.gitAndTools) git-annex;
|
||||
inherit (pkgs.rxvt_unicode) terminfo;
|
||||
inherit (pkgs.pythonPackages) qrcode;
|
||||
inherit (pkgs)
|
||||
|
||||
git-crypt
|
||||
htop
|
||||
tree
|
||||
pwgen
|
||||
borgbackup
|
||||
inotifyTools
|
||||
|
||||
direnv
|
||||
|
||||
socat
|
||||
nmap
|
||||
tcpdump
|
||||
|
||||
tmux
|
||||
tig
|
||||
exa
|
||||
fzf
|
||||
ag
|
||||
fd
|
||||
bat
|
||||
|
||||
ripgrep
|
||||
|
||||
ranger
|
||||
|
||||
pass
|
||||
sshuttle;
|
||||
};
|
||||
}
|
176
common/pkgs.nix
Normal file
176
common/pkgs.nix
Normal file
|
@ -0,0 +1,176 @@
|
|||
rec {
|
||||
inherit (import ../common/lib.nix) niv;
|
||||
pkgs = import <nixpkgs> {};
|
||||
unstable = import <unstable> {};
|
||||
lorriSrc = (import ../nix/sources.nix).lorri;
|
||||
lorri = import lorriSrc { src = lorriSrc; pkgs = unstable; };
|
||||
tasktree = pkgs.callPackage ../packages/tasktree {};
|
||||
neovim = pkgs.neovim.override {
|
||||
vimAlias = true;
|
||||
withPython3 = true;
|
||||
};
|
||||
home-neovim = (import ../home-manager/nvim) neovim;
|
||||
|
||||
# pkgs assumed to be present on a non nixos host
|
||||
core-system-pkgs = {
|
||||
inherit neovim;
|
||||
inherit (pkgs)
|
||||
gitFull
|
||||
gnumake
|
||||
python3
|
||||
mkpasswd
|
||||
file
|
||||
wget
|
||||
curl
|
||||
wireguard
|
||||
gnupg
|
||||
mutt
|
||||
bind
|
||||
liboping
|
||||
psmisc
|
||||
unzip
|
||||
rename
|
||||
whois
|
||||
lsof;
|
||||
};
|
||||
|
||||
extra-system-pkgs = {
|
||||
inherit lorri niv;
|
||||
inherit (pkgs.gitAndTools) git-annex;
|
||||
inherit (pkgs.rxvt_unicode) terminfo;
|
||||
inherit (pkgs.pythonPackages) qrcode;
|
||||
inherit (pkgs)
|
||||
|
||||
git-crypt
|
||||
htop
|
||||
tree
|
||||
pwgen
|
||||
borgbackup
|
||||
inotifyTools
|
||||
|
||||
direnv
|
||||
|
||||
socat
|
||||
nmap
|
||||
tcpdump
|
||||
|
||||
tmux
|
||||
tig
|
||||
exa
|
||||
fzf
|
||||
ag
|
||||
fd
|
||||
bat
|
||||
|
||||
ripgrep
|
||||
|
||||
ranger
|
||||
|
||||
pass
|
||||
sshuttle;
|
||||
};
|
||||
|
||||
laptop-home-pkgs = {
|
||||
maintenance = pkgs.writeShellScriptBin "maintenance" ''
|
||||
git -C ~/git/nixos/config pull
|
||||
update-home
|
||||
sudo system-maintenance
|
||||
'';
|
||||
rewlan = pkgs.writeShellScriptBin "rewlan" ''
|
||||
nmcli r wifi off;
|
||||
sleep 0.1s;
|
||||
nmcli r wifi on;
|
||||
'';
|
||||
cachix = import (import ../nix/sources.nix).cachix {};
|
||||
nixfmt = import (import ../nix/sources.nix).nixfmt {};
|
||||
inherit (pkgs.gnome3) nautilus;
|
||||
inherit (unstable.haskellPackages) brittany;
|
||||
inherit (pkgs.xorg) xev xbacklight;
|
||||
inherit (pkgs)
|
||||
# web
|
||||
chromium
|
||||
|
||||
# communication
|
||||
signal-desktop
|
||||
tdesktop
|
||||
acpi
|
||||
dino
|
||||
mumble
|
||||
|
||||
# config
|
||||
arandr
|
||||
|
||||
#dev
|
||||
meld
|
||||
icedtea8_web
|
||||
octave
|
||||
filezilla
|
||||
|
||||
# tools & office
|
||||
feh
|
||||
gimp
|
||||
imagemagick
|
||||
ghostscript
|
||||
libreoffice-fresh
|
||||
pandoc
|
||||
xournal
|
||||
musescore
|
||||
handbrake
|
||||
evince
|
||||
|
||||
|
||||
networkmanagerapplet
|
||||
# teamviewer
|
||||
|
||||
# media
|
||||
ncpamixer
|
||||
pavucontrol
|
||||
deluge
|
||||
mpd
|
||||
gmpc
|
||||
calibre
|
||||
mpv
|
||||
youtubeDL
|
||||
|
||||
minetest
|
||||
;};
|
||||
|
||||
my-home-pkgs = {
|
||||
print215 = pkgs.writeShellScriptBin "print215" ''
|
||||
scp "$@" ag-forward:
|
||||
ssh ag-forward lpr -Zduplex -r "$@"
|
||||
'';
|
||||
print215single = pkgs.writeShellScriptBin "print215single" ''
|
||||
scp "$@" ag-forward:
|
||||
ssh ag-forward lpr -r "$@"
|
||||
'';
|
||||
};
|
||||
urxvt = pkgs.rxvt_unicode-with-plugins;
|
||||
terminal = pkgs.writeShellScriptBin "terminal" ''
|
||||
${urxvt}/bin/urxvtc "$@"
|
||||
if [ $? -eq 2 ]; then
|
||||
${urxvt}/bin/urxvtd -q -o -f
|
||||
${urxvt}/bin/urxvtc "$@"
|
||||
fi
|
||||
'';
|
||||
desktop-pkgs = {
|
||||
inherit urxvt tasktree terminal;
|
||||
inherit (pkgs) xautolock;
|
||||
inherit (pkgs.gnome3) dconf;
|
||||
};
|
||||
home-pkgs = {
|
||||
inherit (pkgs) ncmpcpp;
|
||||
inherit home-neovim;
|
||||
};
|
||||
accounting-pkgs = {
|
||||
jali = pkgs.callPackage ../packages/jali {};
|
||||
inherit (pkgs.haskellPackages) hledger hledger-ui;
|
||||
inherit (pkgs) ledger;
|
||||
};
|
||||
system-pkgs = core-system-pkgs // extra-system-pkgs // {
|
||||
inherit (import ./test-lib.nix) test-system-config test-home-config test-and-bump-config;
|
||||
inherit (import ../common/lib.nix) home-manager;
|
||||
};
|
||||
foreign-home-pkgs = extra-system-pkgs;
|
||||
eventd = pkgs.callPackage ../packages/eventd {};
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{ lib, pkgs, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
inherit (import ../common/pkgs.nix) eventd;
|
||||
battery-watch = pkgs.writeScript "battery-watch" ''
|
||||
#!${pkgs.stdenv.shell}
|
||||
|
||||
|
@ -11,9 +11,9 @@ do
|
|||
if [ "$(${pkgs.acpi}/bin/acpi -a | grep -o off)" == "off" ]; then
|
||||
battery_level=`${pkgs.acpi}/bin/acpi -b | sed 's/.*[dg], //g;s/\%,.*//g'`
|
||||
if [ $battery_level -le $critical_level ]; then
|
||||
${pkgs.eventd}/bin/eventc critical battery -d "title='Battery level is low!'" -d "message='Only $battery_level% of the charge remains.'"
|
||||
${eventd}/bin/eventc critical battery -d "title='Battery level is low!'" -d "message='Only $battery_level% of the charge remains.'"
|
||||
else
|
||||
${pkgs.eventd}/bin/eventc notification battery -d "title='Battery is discharging!'" -d "message='Only $battery_level% of the charge remains.'"
|
||||
${eventd}/bin/eventc notification battery -d "title='Battery is discharging!'" -d "message='Only $battery_level% of the charge remains.'"
|
||||
sleep 18m
|
||||
fi
|
||||
fi
|
||||
|
@ -22,9 +22,6 @@ done
|
|||
'';
|
||||
in {
|
||||
|
||||
options.m-0.battery.enable = mkEnableOption "Battery";
|
||||
|
||||
config = mkIf config.m-0.battery.enable {
|
||||
systemd.user = {
|
||||
services.battery = {
|
||||
Unit = {
|
||||
|
@ -38,6 +35,5 @@ config = mkIf config.m-0.battery.enable {
|
|||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
|
@ -8,30 +8,18 @@ imports = [
|
|||
./update-script.nix
|
||||
./modules/taskwarrior.nix
|
||||
./modules/force-copies.nix
|
||||
./modules/battery.nix
|
||||
./modules/laptop.nix
|
||||
./modules/accounting
|
||||
./modules/rustdev.nix
|
||||
./modules/latex.nix
|
||||
./modules/sleep-nag.nix
|
||||
./modules/graphical
|
||||
./modules/mail.nix
|
||||
./modules/home-options.nix
|
||||
./modules/eventd.nix
|
||||
./modules/unlock.nix
|
||||
./modules/weechat
|
||||
./modules/update_tasks.nix
|
||||
./modules/bugwarrior.nix
|
||||
./modules/pythia.nix
|
||||
../common
|
||||
];
|
||||
|
||||
nixpkgs.overlays = [ (self: super: {
|
||||
tasktree = super.callPackage ./packages/tasktree {};
|
||||
jali = super.callPackage ./packages/jali {};
|
||||
eventd = super.callPackage ./packages/eventd {};
|
||||
neovim = (import ./nvim) super config.m-0.rustdev.enable;
|
||||
})];
|
||||
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
|
@ -112,7 +100,9 @@ programs = {
|
|||
};
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
home = {
|
||||
packages = builtins.attrValues (import ../common/pkgs.nix).home-pkgs;
|
||||
sessionVariables = {
|
||||
PATH = "$HOME/.cargo/bin:/etc/profiles/per-user/${config.home.username}/bin:$HOME/.nix-profile/bin:$PATH";
|
||||
BROWSER = "${pkgs.firefox}/bin/firefox";
|
||||
EDITOR = "${pkgs.neovim}/bin/nvim";
|
||||
|
@ -122,6 +112,7 @@ home.sessionVariables = {
|
|||
print-pw = pkgs.writeShellScriptBin "print-pw" "pass show eu/m-0/${config.m-0.hostName}/user/${config.home.username}";
|
||||
in
|
||||
"${print-pw}/bin/print-pw";
|
||||
};
|
||||
};
|
||||
fonts.fontconfig.enableProfileFonts = true;
|
||||
|
||||
|
@ -135,16 +126,6 @@ services = {
|
|||
};
|
||||
};
|
||||
|
||||
home.packages = builtins.attrValues {
|
||||
inherit (pkgs) neovim;
|
||||
print215 = (pkgs.writeShellScriptBin "print215" ''
|
||||
scp "$@" ag-forward:
|
||||
ssh ag-forward lpr -Zduplex -r "$@"
|
||||
'');
|
||||
print215single = (pkgs.writeShellScriptBin "print215single" ''
|
||||
scp "$@" ag-forward:
|
||||
ssh ag-forward lpr -r "$@"
|
||||
'');
|
||||
};
|
||||
|
||||
xdg.enable = true;
|
||||
}
|
||||
|
|
|
@ -1,25 +1,16 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
inherit (import ../../common/pkgs.nix) desktop-pkgs;
|
||||
in
|
||||
{
|
||||
|
||||
options.m-0.graphical.enable = mkEnableOption "Window Manager";
|
||||
|
||||
imports = [
|
||||
./i3.nix
|
||||
./rofi
|
||||
./rofi.nix
|
||||
./ssh-agent.nix
|
||||
./eventd.nix
|
||||
./sleep-nag.nix
|
||||
];
|
||||
config = let
|
||||
urxvt = pkgs.rxvt_unicode-with-plugins;
|
||||
terminal = pkgs.writeShellScriptBin "terminal" ''
|
||||
${urxvt}/bin/urxvtc "$@"
|
||||
if [ $? -eq 2 ]; then
|
||||
${urxvt}/bin/urxvtd -q -o -f
|
||||
${urxvt}/bin/urxvtc "$@"
|
||||
fi
|
||||
'';
|
||||
in
|
||||
mkIf config.m-0.graphical.enable {
|
||||
m-0 = {
|
||||
workspaces = [
|
||||
"tasks"
|
||||
|
@ -33,7 +24,7 @@ mkIf config.m-0.graphical.enable {
|
|||
"leisure"
|
||||
"config"
|
||||
];
|
||||
terminal = "${terminal}/bin/terminal";
|
||||
terminal = "${desktop-pkgs.terminal}/bin/terminal";
|
||||
colors = {
|
||||
"foreground" = "#dddbff";
|
||||
"background" = "#05004a";
|
||||
|
@ -56,12 +47,7 @@ mkIf config.m-0.graphical.enable {
|
|||
};
|
||||
};
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
terminal
|
||||
tasktree
|
||||
xautolock
|
||||
gnome3.dconf
|
||||
];
|
||||
packages = builtins.attrValues desktop-pkgs;
|
||||
keyboard = {
|
||||
layout = "de";
|
||||
variant = "neo";
|
||||
|
@ -70,7 +56,7 @@ mkIf config.m-0.graphical.enable {
|
|||
};
|
||||
programs.urxvt = {
|
||||
enable = true;
|
||||
package = pkgs.rxvt_unicode-with-plugins;
|
||||
package = desktop-pkgs.urxvt;
|
||||
fonts = [ "6x13" ];
|
||||
keybindings = {
|
||||
"C-1" = "command:\\033]710;6x13\\007";
|
||||
|
@ -122,11 +108,6 @@ mkIf config.m-0.graphical.enable {
|
|||
};
|
||||
services = {
|
||||
nextcloud-client.enable = true;
|
||||
random-background = {
|
||||
enable = true;
|
||||
imageDirectory = "%h/data/aktuell/media/bilder/wallpaper/";
|
||||
interval = "15minutes";
|
||||
};
|
||||
redshift = {
|
||||
enable = true;
|
||||
temperature.day = 6500;
|
||||
|
@ -139,6 +120,5 @@ mkIf config.m-0.graphical.enable {
|
|||
};
|
||||
};
|
||||
xsession.enable = true;
|
||||
};
|
||||
|
||||
}
|
|
@ -1,17 +1,10 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
colors = config.m-0.colors;
|
||||
inherit (import ../../common/pkgs.nix) eventd;
|
||||
in {
|
||||
|
||||
options.m-0.eventd.enable = mkEnableOption "Eventd";
|
||||
|
||||
config = mkIf config.m-0.eventd.enable {
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
eventd
|
||||
];
|
||||
};
|
||||
home.packages = [ eventd ];
|
||||
systemd.user = {
|
||||
services = {
|
||||
eventd = {
|
||||
|
@ -26,8 +19,8 @@ config = mkIf config.m-0.eventd.enable {
|
|||
Service = {
|
||||
Type="notify";
|
||||
Sockets="eventd-control.socket eventd.socket";
|
||||
ExecStart="${pkgs.eventd}/bin/eventd --listen systemd";
|
||||
ExecReload="${pkgs.eventd}/bin/eventdctl reload";
|
||||
ExecStart="${eventd}/bin/eventd --listen systemd";
|
||||
ExecReload="${eventd}/bin/eventdctl reload";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -54,7 +47,7 @@ config = mkIf config.m-0.eventd.enable {
|
|||
};
|
||||
};
|
||||
xdg = {
|
||||
configFile = mkIf config.m-0.graphical.enable {
|
||||
configFile = {
|
||||
"eventd/eventd.conf".text = lib.generators.toINI {} {
|
||||
"Queue default" = {
|
||||
Margin = 10;
|
||||
|
@ -169,6 +162,5 @@ config = mkIf config.m-0.eventd.enable {
|
|||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
|
@ -73,7 +73,6 @@ let
|
|||
(builtins.attrNames oldbindings);
|
||||
in {
|
||||
|
||||
config = mkIf config.m-0.graphical.enable {
|
||||
xsession = {
|
||||
windowManager.i3 = {
|
||||
enable = true;
|
||||
|
@ -209,6 +208,5 @@ config = mkIf config.m-0.graphical.enable {
|
|||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
|
@ -4,10 +4,8 @@ let
|
|||
inherit (config.m-0) colors workspaces terminal;
|
||||
in {
|
||||
|
||||
config = mkIf config.m-0.graphical.enable {
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
(writeScriptBin "tasklauncher" (builtins.readFile ./tasklauncher.py))
|
||||
rofi-pass
|
||||
];
|
||||
};
|
||||
|
@ -67,6 +65,5 @@ config = mkIf config.m-0.graphical.enable {
|
|||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
|
@ -1,22 +1,19 @@
|
|||
{ lib, pkgs, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
inherit (import ../../common/pkgs.nix) eventd;
|
||||
sleep-nag = pkgs.writeScript "sleep-nag" ''
|
||||
#!${pkgs.stdenv.shell}
|
||||
|
||||
while true
|
||||
do
|
||||
if [[ `date +%H` -ge 23 ]] || [[ `date +%H` -lt 6 ]]; then
|
||||
${pkgs.eventd}/bin/eventc notification kassandra -d "title='Es ist $(date +%H:%M) Uhr: Zeit ins Bett zu gehen!'" -d "message='Du kannst das hier auch morgen tun!'"
|
||||
${eventd}/bin/eventc notification kassandra -d "title='Es ist $(date +%H:%M) Uhr: Zeit ins Bett zu gehen!'" -d "message='Du kannst das hier auch morgen tun!'"
|
||||
fi
|
||||
sleep 10m
|
||||
done
|
||||
'';
|
||||
in {
|
||||
|
||||
options.m-0.sleep-nag.enable = mkEnableOption "Sleep Nag";
|
||||
|
||||
config = mkIf config.m-0.sleep-nag.enable {
|
||||
systemd.user = {
|
||||
services.sleep-nag = {
|
||||
Unit = {
|
||||
|
@ -30,6 +27,5 @@ config = mkIf config.m-0.sleep-nag.enable {
|
|||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
{ pkgs , config , lib, ... }:
|
||||
with lib; {
|
||||
{
|
||||
|
||||
config = mkIf config.m-0.graphical.enable {
|
||||
xsession.initExtra = let
|
||||
cat-pw = pkgs.writeShellScriptBin "cat-ssh-pw" ''
|
||||
pass eu/m-0/${config.m-0.hostName}/ssh
|
||||
|
@ -15,6 +14,5 @@ config = mkIf config.m-0.graphical.enable {
|
|||
'';
|
||||
in
|
||||
". ${start-agent}/bin/start-ssh-agent";
|
||||
};
|
||||
|
||||
}
|
|
@ -9,12 +9,7 @@ options.m-0.accounting.config = mkOption {
|
|||
|
||||
config = mkIf config.m-0.accounting.enable {
|
||||
home.file.".config/jali/config.py".text = config.m-0.accounting.config;
|
||||
home.packages = with pkgs; [
|
||||
hledger
|
||||
haskellPackages.hledger-ui
|
||||
ledger
|
||||
jali
|
||||
];
|
||||
home.packages = builtins.attrValues (import ../../../common/pkgs.nix).accounting-pkgs;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import subprocess
|
||||
import os
|
||||
import sys
|
||||
|
||||
def call_task(args):
|
||||
return subprocess.Popen(["task", "rc.verbose=nothing"] + args, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0].strip()
|
||||
|
||||
runtime_dir = os.getenv("XDG_RUNTIME_DIR")
|
||||
if not os.path.exists(runtime_dir):
|
||||
os.makedirs(runtime_dir)
|
||||
filename = os.path.join(runtime_dir, "taskfilter")
|
||||
if not os.path.exists(filename):
|
||||
with open(filename, 'w') as filterfile:
|
||||
filterfile.write("inboxall")
|
||||
|
||||
lastresult = ""
|
||||
while True:
|
||||
with open(filename) as filterfile:
|
||||
filter = filterfile.read().strip()
|
||||
tasklist = call_task(["default"] + filter.split())
|
||||
rofi_list_cmd = ['rofi', '-dmenu', '-p', 'task', '-mesg', '\n'.join([lastresult, "filter: {}".format(filter)]).strip()]
|
||||
rofi = subprocess.Popen(rofi_list_cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
entered_command = rofi.communicate(input=tasklist)[0].decode('utf8').strip()
|
||||
if entered_command == "":
|
||||
sys.exit(0)
|
||||
task_result = subprocess.Popen(["task", "rc.confirmation=no", "rc.default.command=execute \"$HOME/bin/taskfilter\""] + entered_command.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
|
||||
lastresult = '\n'.join([task_result[0].decode('utf8'), task_result[1].decode('utf8')]).strip()
|
|
@ -1,104 +0,0 @@
|
|||
{ lib, pkgs, config, ...}:
|
||||
with lib;
|
||||
{
|
||||
|
||||
options.m-0.laptop.enable = mkEnableOption "Laptop";
|
||||
|
||||
config = let
|
||||
rewlan = pkgs.writeShellScriptBin "rewlan" ''
|
||||
nmcli r wifi off;
|
||||
sleep 0.1s;
|
||||
nmcli r wifi on;
|
||||
'';
|
||||
in
|
||||
mkIf config.m-0.laptop.enable {
|
||||
home.file.".ncmpcpp/config".text = ''
|
||||
ask_before_clearing_playlists=no
|
||||
mouse_support = yes
|
||||
song_columns_list_format = "(24)[red]{a} $R(48)[blue]{t} (24)[green]{b} (4)[magenta]{l}"
|
||||
playlist_display_mode = columns
|
||||
search_engine_display_mode = columns
|
||||
browser_display_mode = columns
|
||||
user_interface = alternative
|
||||
'';
|
||||
programs = {
|
||||
firefox = {
|
||||
enable = true;
|
||||
};
|
||||
git = {
|
||||
signing = {
|
||||
signByDefault = true;
|
||||
key = "6C3D12CD88CDF46C5EAF4D12226A2D41EF5378C9";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
udiskie = {
|
||||
enable = true;
|
||||
notify = true;
|
||||
};
|
||||
network-manager-applet.enable = true;
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# web
|
||||
chromium
|
||||
|
||||
# communication
|
||||
signal-desktop
|
||||
tdesktop
|
||||
acpi
|
||||
dino
|
||||
mumble
|
||||
|
||||
# config
|
||||
arandr
|
||||
xorg.xev
|
||||
xorg.xbacklight
|
||||
rewlan
|
||||
|
||||
#dev
|
||||
meld
|
||||
icedtea8_web
|
||||
octave
|
||||
filezilla
|
||||
|
||||
# tools & office
|
||||
feh
|
||||
gimp
|
||||
imagemagick
|
||||
ghostscript
|
||||
libreoffice-fresh
|
||||
pandoc
|
||||
xournal
|
||||
musescore
|
||||
handbrake
|
||||
evince
|
||||
gnome3.nautilus
|
||||
|
||||
(import ../nix/sources.nix).cachix
|
||||
|
||||
# look & feel
|
||||
libertine
|
||||
nerdfonts
|
||||
|
||||
networkmanagerapplet
|
||||
# teamviewer
|
||||
|
||||
# media
|
||||
ncmpcpp
|
||||
ncpamixer
|
||||
pavucontrol
|
||||
deluge
|
||||
mpd
|
||||
gmpc
|
||||
calibre
|
||||
mpv
|
||||
youtubeDL
|
||||
|
||||
minetest
|
||||
];
|
||||
};
|
||||
|
||||
}
|
|
@ -1,22 +1,13 @@
|
|||
pkgs: mkRust:
|
||||
pkgs.neovim.override {
|
||||
neovim:
|
||||
neovim.override {
|
||||
vimAlias = true;
|
||||
withPython3 = true;
|
||||
configure = {
|
||||
customRC = if mkRust then ''
|
||||
let $RUST_SRC_PATH="${pkgs.rustPlatform.rustcSrc}"
|
||||
let g:rustfmt_command = "${pkgs.rustfmt}/bin/rustfmt"
|
||||
let g:racer_cmd = "${pkgs.rustracer}/bin/racer"
|
||||
let g:rustfmt_autosave = 1
|
||||
let g:syntastic_rust_checkers = [ 'cargo']
|
||||
let g:rust_recommend_style = 1
|
||||
let g:rust_fold =1
|
||||
${builtins.readFile ./vimrc}
|
||||
'' else builtins.readFile ./vimrc;
|
||||
packages.myVimPackage = with pkgs.vimPlugins; {
|
||||
start = [
|
||||
customRC = builtins.readFile ./vimrc;
|
||||
packages.myVimPackage = {
|
||||
start = builtins.attrValues {
|
||||
inherit ((import <nixpkgs> {}).vimPlugins)
|
||||
vim-nix
|
||||
YouCompleteMe
|
||||
vimtex
|
||||
airline
|
||||
rust-vim
|
||||
|
@ -24,9 +15,8 @@ pkgs.neovim.override {
|
|||
vim-trailing-whitespace
|
||||
vim-pandoc
|
||||
vim-pandoc-syntax
|
||||
haskell-vim
|
||||
# vim-brittany
|
||||
];
|
||||
haskell-vim;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ let
|
|||
in
|
||||
{
|
||||
home = {
|
||||
packages = builtins.attrValues (import ../common/pkgs.nix).foreign-home-pkgs;
|
||||
sessionVariables = {
|
||||
NIX_PATH = "$HOME/.nix-path";
|
||||
};
|
||||
|
|
|
@ -3,5 +3,6 @@
|
|||
home = {
|
||||
username = "maralorn";
|
||||
homeDirectory = "/home/maralorn";
|
||||
packages = builtins.attrValues (import ../common/pkgs.nix).my-home-pkgs;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
{ config, lib, pkgs , ... }:
|
||||
with lib;
|
||||
let
|
||||
inherit (config.m-0.private) me;
|
||||
in {
|
||||
options.m-0.update_tasks.enable = mkEnableOption "Update Tasks";
|
||||
config = mkIf config.m-0.update_tasks.enable {
|
||||
inherit (import ../common/pkgs.nix) eventd;
|
||||
in
|
||||
{
|
||||
systemd.user = {
|
||||
services.update_tasks = {
|
||||
Unit = {
|
||||
|
@ -12,7 +10,7 @@ config = mkIf config.m-0.update_tasks.enable {
|
|||
};
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
Environment="PATH=${pkgs.taskwarrior}/bin:${pkgs.eventd}/bin";
|
||||
Environment="PATH=${pkgs.taskwarrior}/bin:${eventd}/bin";
|
||||
ExecStart= "${config.home.homeDirectory}/.cargo/bin/update_tasks";
|
||||
};
|
||||
};
|
||||
|
@ -25,6 +23,5 @@ config = mkIf config.m-0.update_tasks.enable {
|
|||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
|
@ -4,26 +4,25 @@
|
|||
imports = [
|
||||
../../home-manager
|
||||
../../home-manager/on-my-machine.nix
|
||||
../../home-manager/battery.nix
|
||||
../../home-manager/update_tasks.nix
|
||||
../../home-manager/desktop
|
||||
];
|
||||
|
||||
home.packages = builtins.attrValues (import ../../common/pkgs.nix).laptop-home-pkgs;
|
||||
|
||||
m-0 = {
|
||||
hostName = "apollo";
|
||||
laptop.enable = true;
|
||||
sleep-nag.enable = true;
|
||||
battery.enable = true;
|
||||
latex.enable = true;
|
||||
accounting = {
|
||||
enable = true;
|
||||
config = builtins.readFile secret/jaliconfig.py;
|
||||
};
|
||||
graphical.enable = true;
|
||||
rustdev.enable = true;
|
||||
taskwarrior = {
|
||||
enable = true;
|
||||
git_active = true;
|
||||
};
|
||||
update_tasks.enable = true;
|
||||
eventd.enable = true;
|
||||
pythia.enable = true;
|
||||
unlocker = [ {
|
||||
name = "hera";
|
||||
|
@ -37,6 +36,34 @@ m-0 = {
|
|||
};
|
||||
};
|
||||
|
||||
home.file.".ncmpcpp/config".text = ''
|
||||
ask_before_clearing_playlists=no
|
||||
mouse_support = yes
|
||||
song_columns_list_format = "(24)[red]{a} $R(48)[blue]{t} (24)[green]{b} (4)[magenta]{l}"
|
||||
playlist_display_mode = columns
|
||||
search_engine_display_mode = columns
|
||||
browser_display_mode = columns
|
||||
user_interface = alternative
|
||||
'';
|
||||
programs = {
|
||||
firefox = {
|
||||
enable = true;
|
||||
};
|
||||
git = {
|
||||
signing = {
|
||||
signByDefault = true;
|
||||
key = "6C3D12CD88CDF46C5EAF4D12226A2D41EF5378C9";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
udiskie = {
|
||||
enable = true;
|
||||
notify = true;
|
||||
};
|
||||
network-manager-applet.enable = true;
|
||||
};
|
||||
|
||||
programs.autorandr = {
|
||||
enable = true;
|
||||
|
@ -107,12 +134,5 @@ programs.autorandr = {
|
|||
};
|
||||
};
|
||||
|
||||
home.packages = [
|
||||
(pkgs.writeShellScriptBin "maintenance" ''
|
||||
git -C ~/git/nixos/config pull
|
||||
update-home
|
||||
sudo system-maintenance
|
||||
'')
|
||||
];
|
||||
|
||||
}
|
||||
|
|
|
@ -10,10 +10,7 @@ systemd.user.systemctlPath = "/usr/bin/systemctl";
|
|||
|
||||
m-0 = {
|
||||
hostName = "fb04217";
|
||||
#sleep-nag.enable = true;
|
||||
#latex.enable = true;
|
||||
#graphical.enable = true;
|
||||
#rustdev.enable = true;
|
||||
#taskwarrior = {
|
||||
# enable = true;
|
||||
# git_active = true;
|
||||
|
@ -77,7 +74,7 @@ home = {
|
|||
nix-collect-garbage --delete-older-than 5d
|
||||
nix-store --optimise
|
||||
'')
|
||||
] ++ ((import ../../common/essentials.nix).extra pkgs);
|
||||
] ++ ((import ../../common/pkgs.nix).);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -47,6 +47,18 @@
|
|||
"url": "https://github.com/nmattia/niv/archive/8b7b70465c130d8d7a98fba1396ad1481daee518.tar.gz",
|
||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||
},
|
||||
"nixfmt": {
|
||||
"branch": "master",
|
||||
"description": "A formatter for Nix code",
|
||||
"homepage": "https://nixfmt.serokell.io",
|
||||
"owner": "serokell",
|
||||
"repo": "nixfmt",
|
||||
"rev": "af09262aa7d08d2b0905b11d2e8958889aadcf46",
|
||||
"sha256": "0njgjv6syv3sk97v8kq0cb4mhgrb7nag2shsj7rphs6h5b7k9nbx",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/serokell/nixfmt/archive/af09262aa7d08d2b0905b11d2e8958889aadcf46.tar.gz",
|
||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"branch": "master",
|
||||
"description": "A collection of NixOS modules covering hardware quirks.",
|
||||
|
|
|
@ -4,6 +4,7 @@ let
|
|||
me = config.m-0.private.me;
|
||||
in {
|
||||
imports = [
|
||||
../cachix.nix
|
||||
../common
|
||||
./modules/laptop.nix
|
||||
./modules/mathechor.de.nix
|
||||
|
|
|
@ -18,38 +18,39 @@
|
|||
};
|
||||
enableDefaultFonts = true;
|
||||
enableFontDir = true;
|
||||
fonts = [
|
||||
pkgs.anonymousPro
|
||||
pkgs.arkpandora_ttf
|
||||
pkgs.caladea
|
||||
pkgs.carlito
|
||||
pkgs.comfortaa
|
||||
pkgs.comic-relief
|
||||
pkgs.crimson
|
||||
pkgs.dejavu_fonts
|
||||
pkgs.google-fonts
|
||||
pkgs.inconsolata
|
||||
pkgs.iosevka
|
||||
pkgs.liberationsansnarrow
|
||||
pkgs.liberation_ttf
|
||||
pkgs.libertine
|
||||
pkgs.mononoki
|
||||
pkgs.montserrat
|
||||
pkgs.nerdfonts
|
||||
pkgs.norwester-font
|
||||
pkgs.opensans-ttf
|
||||
pkgs.powerline-fonts
|
||||
pkgs.roboto
|
||||
pkgs.sampradaya
|
||||
pkgs.source-code-pro
|
||||
pkgs.source-sans-pro
|
||||
pkgs.source-serif-pro
|
||||
pkgs.tai-ahom
|
||||
pkgs.tempora_lgc
|
||||
pkgs.terminus_font
|
||||
pkgs.theano
|
||||
pkgs.ubuntu_font_family
|
||||
];
|
||||
fonts = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
anonymousPro
|
||||
arkpandora_ttf
|
||||
caladea
|
||||
carlito
|
||||
comfortaa
|
||||
comic-relief
|
||||
crimson
|
||||
dejavu_fonts
|
||||
google-fonts
|
||||
inconsolata
|
||||
iosevka
|
||||
liberationsansnarrow
|
||||
liberation_ttf
|
||||
libertine
|
||||
mononoki
|
||||
montserrat
|
||||
nerdfonts
|
||||
norwester-font
|
||||
opensans-ttf
|
||||
powerline-fonts
|
||||
roboto
|
||||
sampradaya
|
||||
source-code-pro
|
||||
source-sans-pro
|
||||
source-serif-pro
|
||||
tai-ahom
|
||||
tempora_lgc
|
||||
terminus_font
|
||||
theano
|
||||
ubuntu_font_family;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -24,12 +24,9 @@ with lib;
|
|||
|
||||
environment = {
|
||||
# Put these into an extra file so the essential packages can also be included on non selfadminstrated systems from home-manager
|
||||
systemPackages = let essentials = import ../common/essentials.nix;
|
||||
in essentials.core ++ essentials.extra ++ (builtins.attrValues {
|
||||
inherit (import ./test-lib.nix) test-system-config test-home-config test-and-bump-config;
|
||||
inherit (import ../common/lib.nix) home-manager;
|
||||
systemPackages = builtins.attrValues ({
|
||||
inherit (import ./update-lib.nix config.system.build.nixos-rebuild) update-system system-maintenance;
|
||||
});
|
||||
} // (import ../common/pkgs.nix).system-pkgs);
|
||||
sessionVariables = {
|
||||
TERMINFO = "/run/current-system/sw/share/terminfo";
|
||||
};
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
WorkingDirectory = "/var/cache/gc-links";
|
||||
ExecStart = "${(import ./test-lib.nix).test-and-bump-config}/bin/test-and-bump-config";
|
||||
ExecStart = "${(import ../common/test-lib.nix).test-and-bump-config}/bin/test-and-bump-config";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue