Add diskindicator

This commit is contained in:
Cyryl Płotnicki 2019-07-21 16:47:36 +01:00
parent ee6d7f14f8
commit f5917c1945
6 changed files with 66 additions and 61 deletions

1
disk-indicator Normal file
View file

@ -0,0 +1 @@
led=t|0 event=both device=nvme0n1

46
nixos/common-services.nix Normal file
View file

@ -0,0 +1,46 @@
{ config, pkgs, ... }:
{
services = {
fwupd.enable = true;
tlp.enable = true;
fstrim.enable = true;
clipmenu.enable = true;
physlock = {
enable = true;
allowAnyUser = true;
};
printing = {
enable = true;
drivers = [ pkgs.epson-escpr pkgs.samsung-unified-linux-driver pkgs.splix ];
};
avahi = {
enable = true;
nssmdns = true;
};
restic.backups.home = {
passwordFile = "/etc/nixos/secrets/restic-password";
paths = [ "/home" ];
repository = "sftp:fetcher@brix:/mnt/data/backup-targets";
timerConfig = { OnCalendar = "hourly"; };
};
xserver = {
enable = true;
layout = "pl";
libinput = {
enable = true;
naturalScrolling = false;
clickMethod = "clickfinger";
};
displayManager.sddm = {
enable = true;
enableHidpi = true;
};
};
};
}

View file

@ -11,18 +11,9 @@ in
./syncthing.nix
./gsconnect.nix
./common-hardware.nix
./common-services.nix
];
nix = {
binaryCaches = [
"https://cyplo.cachix.org"
];
binaryCachePublicKeys = [
"cyplo.cachix.org-1:6cmlYl6tQ1eidsjU2tw6uGN2hmzQ+P5uiQhuo6d1P5o="
];
};
nixpkgs.config = {
allowUnfree = true;
packageOverrides = pkgs: {
@ -57,57 +48,18 @@ in
autoPrune.enable = true;
};
services = {
fwupd.enable = true;
tlp.enable = true;
fstrim.enable = true;
clipmenu.enable = true;
fonts.fonts = [ pkgs.powerline-fonts pkgs.weather-icons pkgs.material-icons ];
physlock = {
enable = true;
allowAnyUser = true;
};
printing = {
enable = true;
drivers = [ pkgs.epson-escpr pkgs.samsung-unified-linux-driver pkgs.splix ];
};
avahi = {
enable = true;
nssmdns = true;
};
restic.backups.home = {
passwordFile = "/etc/nixos/secrets/restic-password";
paths = [ "/home" ];
repository = "sftp:fetcher@brix:/mnt/data/backup-targets";
timerConfig = { OnCalendar = "hourly"; };
};
xserver = {
enable = true;
layout = "pl";
libinput = {
enable = true;
naturalScrolling = false;
clickMethod = "clickfinger";
};
displayManager.sddm = {
enable = true;
enableHidpi = true;
};
};
nix = {
autoOptimiseStore = true;
daemonIONiceLevel = 7;
daemonNiceLevel = 19;
gc.automatic = true;
optimise.automatic = true;
};
fonts.fonts = [ pkgs.powerline-fonts ];
nix.gc.automatic = true;
nix.autoOptimiseStore = true;
nix.optimise.automatic = true;
nix.daemonIONiceLevel = 7;
nix.daemonNiceLevel = 19;
system.autoUpgrade.enable = true;
system.stateVersion = "19.03";
system = {
autoUpgrade.enable = true;
stateVersion = "19.03";
};
}

View file

@ -2,6 +2,7 @@
let
unstableTarball = fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz;
dotfiles = "/home/cyryl/dev/dotfiles";
in
{
nixpkgs.config = {
@ -24,12 +25,17 @@ in
(wine.override { wineBuild = "wineWow"; }) winetricks
yubico-piv-tool yubikey-personalization yubikey-personalization-gui yubikey-manager-qt
mono calcurse calibre fbreader file python37Packages.binwalk-full
disk_indicator
];
home.sessionVariables = {
TERMINAL="alacritty";
CM_LAUNCHER="rofi";
};
home.file = {
".disk-indicator".source = "${dotfiles}/disk-indicator";
};
imports = [
./programs/tmux.nix
./programs/zsh.nix

View file

@ -17,6 +17,7 @@ in
{ command = "exec autorandr -c"; always = true; notification = false; }
{ command = "exec i3-sensible-terminal"; always = false; notification = false; }
{ command = "exec $HOME/dev/dotfiles/lock.sh"; always = false; notification = false; }
{ command = "exec ${pkgs.disk_indicator}/bin/disk-indicator"; always = false; notification = false; }
];
window = {
hideEdgeBorders = "horizontal";

View file

@ -14,6 +14,5 @@ in
enable = true;
enableExtensionPack = true;
enableHardening = false;
package = pkgs.virtualbox.override { enable32bitGuests = false; };
};
}