summary refs log tree commit diff stats
path: root/system/modules/programs
diff options
context:
space:
mode:
authorAlan Pearce2019-10-02 16:55:35 +0200
committerAlan Pearce2019-10-02 16:55:35 +0200
commit340b2c244c0b7c331f6633edf9a69f1381916ad2 (patch)
tree2f430f20fbe01191c6b4a455bf792facef3f4fe7 /system/modules/programs
parentec7f1357d16ff2f4aa7430a2940a0b9519018595 (diff)
parent5016c7440ad771fd990e1aa142fc4de0bdc382bd (diff)
downloadnixfiles-340b2c244c0b7c331f6633edf9a69f1381916ad2.tar.lz
nixfiles-340b2c244c0b7c331f6633edf9a69f1381916ad2.tar.zst
nixfiles-340b2c244c0b7c331f6633edf9a69f1381916ad2.zip
Add 'system/' from commit '5016c7440ad771fd990e1aa142fc4de0bdc382bd'
git-subtree-dir: system
git-subtree-mainline: ec7f1357d16ff2f4aa7430a2940a0b9519018595
git-subtree-split: 5016c7440ad771fd990e1aa142fc4de0bdc382bd
Diffstat (limited to 'system/modules/programs')
-rw-r--r--system/modules/programs/accounting.nix10
-rw-r--r--system/modules/programs/barrier.nix7
-rw-r--r--system/modules/programs/dotfiles.nix14
-rw-r--r--system/modules/programs/gnome.nix24
-rw-r--r--system/modules/programs/gnupg.nix10
-rw-r--r--system/modules/programs/i3.nix21
-rw-r--r--system/modules/programs/infrastructure.nix8
-rw-r--r--system/modules/programs/kde.nix20
-rw-r--r--system/modules/programs/keybase.nix11
-rw-r--r--system/modules/programs/passwords.nix9
-rw-r--r--system/modules/programs/shell.nix34
-rw-r--r--system/modules/programs/tor.nix22
-rw-r--r--system/modules/programs/window-manager.nix47
-rw-r--r--system/modules/programs/wine.nix6
14 files changed, 243 insertions, 0 deletions
diff --git a/system/modules/programs/accounting.nix b/system/modules/programs/accounting.nix
new file mode 100644
index 00000000..e98c3e7e
--- /dev/null
+++ b/system/modules/programs/accounting.nix
@@ -0,0 +1,10 @@
+{ config, pkgs, ... }:
+
+{ environment.systemPackages = with pkgs; [
+    ledger
+    bean-add
+    beancount
+    fava
+    reckon
+  ];
+}
diff --git a/system/modules/programs/barrier.nix b/system/modules/programs/barrier.nix
new file mode 100644
index 00000000..9a73620d
--- /dev/null
+++ b/system/modules/programs/barrier.nix
@@ -0,0 +1,7 @@
+{ config, pkgs, ... }: {
+  environment.systemPackages = with pkgs; [
+    barrier
+  ];
+
+  networking.firewall.allowedTCPPorts = [ 24800 ];
+}
diff --git a/system/modules/programs/dotfiles.nix b/system/modules/programs/dotfiles.nix
new file mode 100644
index 00000000..2e3f44aa
--- /dev/null
+++ b/system/modules/programs/dotfiles.nix
@@ -0,0 +1,14 @@
+{ config, pkgs, ... }:
+
+{ environment.systemPackages = with pkgs; [
+    stow
+    fzf
+    ghq
+  ] ++ (
+    if stdenv.isDarwin
+    then [
+    ] else [
+      git
+    ]
+  );
+}
diff --git a/system/modules/programs/gnome.nix b/system/modules/programs/gnome.nix
new file mode 100644
index 00000000..bd785453
--- /dev/null
+++ b/system/modules/programs/gnome.nix
@@ -0,0 +1,24 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+{ services = {
+    gnome3 = {
+      gnome-documents.enable = false;
+      gnome-user-share.enable = false;
+      gnome-online-accounts.enable = false;
+      seahorse.enable = false;
+      tracker.enable = false;
+    };
+    telepathy.enable = false;
+
+    xserver = {
+      desktopManager.gnome3 = {
+        enable = true;
+        extraGSettingsOverrides = ''
+          [org.gnome.desktop.input-sources]
+          sources=[('xkb','${config.services.xserver.layout + (optionalString (config.services.xserver.xkbVariant != "") ("+" + config.services.xserver.xkbVariant))}')]
+        '';
+      };
+    };
+  };
+}
diff --git a/system/modules/programs/gnupg.nix b/system/modules/programs/gnupg.nix
new file mode 100644
index 00000000..663bcb3c
--- /dev/null
+++ b/system/modules/programs/gnupg.nix
@@ -0,0 +1,10 @@
+{ config, pkgs, lib, ... }:
+
+{
+  environment.systemPackages = with pkgs; [
+    gnupg
+    pinentry
+    (python3.withPackages(ps: with ps; [ trezor_agent wheel ]))
+  ];
+  environment.variables.GNUPGHOME = "$HOME/.gnupg/trezor/";
+}
diff --git a/system/modules/programs/i3.nix b/system/modules/programs/i3.nix
new file mode 100644
index 00000000..017f393e
--- /dev/null
+++ b/system/modules/programs/i3.nix
@@ -0,0 +1,21 @@
+{ config, pkgs, ... }:
+
+{ services.xserver.windowManager = {
+    default = "i3";
+    i3 = {
+      enable = true;
+      extraSessionCommands = ''
+        ${pkgs.dunst}/bin/dunst &
+        ${pkgs.sxhkd}/bin/sxhkd &
+      '';
+    };
+  };
+
+  environment.systemPackages = with pkgs; [
+    i3status
+  ];
+
+  imports = [
+    ./window-manager.nix
+  ];
+}
diff --git a/system/modules/programs/infrastructure.nix b/system/modules/programs/infrastructure.nix
new file mode 100644
index 00000000..5e68bc8a
--- /dev/null
+++ b/system/modules/programs/infrastructure.nix
@@ -0,0 +1,8 @@
+{ config, pkgs, ... }:
+
+{ environment.systemPackages = with pkgs; [
+    hugo
+
+    nixops
+  ];
+}
diff --git a/system/modules/programs/kde.nix b/system/modules/programs/kde.nix
new file mode 100644
index 00000000..652eb2a6
--- /dev/null
+++ b/system/modules/programs/kde.nix
@@ -0,0 +1,20 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+{ services = {
+    xserver = {
+      desktopManager = {
+        plasma5.enable = true;
+      };
+      displayManager = {
+        sddm.enable = true;
+      };
+    };
+
+    physlock.enable = lib.mkForce false;
+  };
+
+  environment.systemPackages = with pkgs; [
+    kde-gtk-config
+  ];
+}
diff --git a/system/modules/programs/keybase.nix b/system/modules/programs/keybase.nix
new file mode 100644
index 00000000..39a16b27
--- /dev/null
+++ b/system/modules/programs/keybase.nix
@@ -0,0 +1,11 @@
+{ config, pkgs, lib, ... }:
+
+{
+  services.keybase.enable = true;
+  services.kbfs.enable = true;
+  environment.variables.NIX_SKIP_KEYBASE_CHECKS = "1";
+
+  environment.systemPackages = with pkgs; [
+    keybase-gui
+  ];
+}
diff --git a/system/modules/programs/passwords.nix b/system/modules/programs/passwords.nix
new file mode 100644
index 00000000..094ad29e
--- /dev/null
+++ b/system/modules/programs/passwords.nix
@@ -0,0 +1,9 @@
+{ config, pkgs, ... }:
+
+{ environment.systemPackages = with pkgs.unstable; [
+    keepassx-community
+    rofi-pass
+    pass
+    pwgen
+  ];
+}
diff --git a/system/modules/programs/shell.nix b/system/modules/programs/shell.nix
new file mode 100644
index 00000000..cf36a115
--- /dev/null
+++ b/system/modules/programs/shell.nix
@@ -0,0 +1,34 @@
+{ config, pkgs, ... }:
+
+{ programs.zsh = {
+    enable = true;
+    promptInit = "";
+  };
+  programs.bash.enableCompletion = true;
+  programs.vim = pkgs.lib.attrsets.optionalAttrs pkgs.stdenv.isDarwin {
+    enable = true;
+  };
+
+  environment.systemPackages = with pkgs; [
+    pv
+    fd
+    unstable.sd
+    entr
+    file
+    htop
+    lsof
+    iftop
+    nmap
+    moreutils
+    mtr
+    tree
+    zip
+    telnet
+  ] ++ (
+  if !stdenv.isDarwin
+  then [
+    vim
+    unar
+  ] else [
+  ]);
+}
diff --git a/system/modules/programs/tor.nix b/system/modules/programs/tor.nix
new file mode 100644
index 00000000..5524aede
--- /dev/null
+++ b/system/modules/programs/tor.nix
@@ -0,0 +1,22 @@
+{ config, pkgs, lib, ... }:
+
+{
+  services.tor = {
+    enable = true;
+    client = {
+      enable = true;
+      socksListenAddress = "9050 IPv6Traffic";
+    };
+    torsocks = {
+      enable = true;
+    };
+  };
+  systemd.services.tor.wantedBy = lib.mkForce [];
+  systemd.timers.tor = {
+    description = "Delayed startup of Tor";
+    wantedBy = [ "timers.target" ];
+    timerConfig = {
+      OnActiveSec = "1 min";
+    };
+  };
+}
diff --git a/system/modules/programs/window-manager.nix b/system/modules/programs/window-manager.nix
new file mode 100644
index 00000000..ee6877d8
--- /dev/null
+++ b/system/modules/programs/window-manager.nix
@@ -0,0 +1,47 @@
+{ config, pkgs, ... }:
+
+{ services.xserver = {
+   desktopManager.xterm.enable = false;
+
+   displayManager = {
+     lightdm = {
+       enable = true;
+       greeters.mini = {
+         enable = true;
+         user = "alan";
+       };
+     };
+     sessionCommands = ''
+       ${pkgs.xorg.xrdb}/bin/xrdb -merge $HOME/.xresources/main
+       ${pkgs.xorg.xsetroot}/bin/xsetroot -cursor_name left_ptr -solid '#4d4d4c'
+     '';
+   };
+    xautolock = {
+      enable = true;
+      locker = "${pkgs.i3lock}/bin/i3lock -n";
+      enableNotifier = true;
+      notifier = "${pkgs.libnotify}/bin/notify-send \"Locking in 10 seconds\"";
+      time = 5;
+    };
+  };
+
+  services.xserver.displayManager.setupCommands = ''
+    ${pkgs.redshift}/bin/redshift \
+      -l ${toString config.services.redshift.latitude}:${toString config.services.redshift.longitude} \
+      -t ${toString config.services.redshift.temperature.day}:${toString config.services.redshift.temperature.night} \
+      -b 1:1 \
+      -o \
+      -r \
+  '';
+
+  environment.systemPackages = with pkgs; [
+    dmenu
+    dunst
+    libnotify # for notify-send
+    rofi
+    sxhkd
+    maim
+
+    perlPackages.FileMimeInfo # xdg-utils uses this when no DE
+  ];
+}
diff --git a/system/modules/programs/wine.nix b/system/modules/programs/wine.nix
new file mode 100644
index 00000000..98dd60a2
--- /dev/null
+++ b/system/modules/programs/wine.nix
@@ -0,0 +1,6 @@
+{ config, pkgs, ... }:
+
+{ environment.systemPackages = with pkgs; [
+    wineStable
+  ];
+}