From 60bda7ed7abcf42f26c0e7718e144ad521ab449e Mon Sep 17 00:00:00 2001 From: coolneng Date: Sat, 23 May 2020 15:43:54 +0200 Subject: [PATCH] Enable auto-upgrade and automount external storage --- configuration.nix | 6 ++++++ modules/audio.nix | 8 ++++++-- modules/development.nix | 2 +- modules/gui.nix | 32 ++++++++++++++++++++++++++++++++ modules/software.nix | 1 + 5 files changed, 46 insertions(+), 3 deletions(-) diff --git a/configuration.nix b/configuration.nix index 1f1559d..9d19b18 100644 --- a/configuration.nix +++ b/configuration.nix @@ -87,6 +87,12 @@ ]; }; + # Auto-upgrade the system + system.autoUpgrade = { + enable = true; + dates = "14:00"; + }; + # Import other configuration modules imports = [ ./modules/software.nix diff --git a/modules/audio.nix b/modules/audio.nix index 435f095..7fa89e9 100644 --- a/modules/audio.nix +++ b/modules/audio.nix @@ -16,8 +16,12 @@ # Set up Mopidy services.mopidy = { enable = true; - extensionPackages = - [ pkgs.mopidy-mpd pkgs.mopidy-soundcloud pkgs.mopidy-youtube ]; + extensionPackages = [ + pkgs.mopidy-mpd + # pkgs.mopidy-soundcloud + # pkgs.mopidy-youtube + # pkgs.mopidy-somafm + ]; configuration = '' [audio] mixer = none diff --git a/modules/development.nix b/modules/development.nix index 144ac4b..75a12f8 100644 --- a/modules/development.nix +++ b/modules/development.nix @@ -6,7 +6,7 @@ # Enable virtualisation virtualisation.libvirtd = { - enable = true; + enable = false; onBoot = "ignore"; onShutdown = "shutdown"; qemuPackage = pkgs.qemu_kvm; diff --git a/modules/gui.nix b/modules/gui.nix index 1e402ed..08d9b8b 100644 --- a/modules/gui.nix +++ b/modules/gui.nix @@ -170,4 +170,36 @@ setw -g window-status-current-format "#[fg=#1e2132,bg=#2e3244,nobold,nounderscore,noitalics]#[fg=#c6c8d1,bg=#2e3244] #I  #W #[fg=#2e3244,bg=#1e2132,nobold,nounderscore,noitalics]" ''; }; + + # Automount external storage + systemd.mounts = [ + # USB + { + what = "/dev/sdb1"; + where = "/usb"; + mountConfig = { TimeoutSec = "5"; }; + } + # SD card + { + what = "/dev/mmcblk0p1"; + where = "/sdcard"; + mountConfig = { TimeoutSec = "5"; }; + } + ]; + + systemd.automounts = [ + # USB + { + where = "/usb"; + automountConfig = { TimeoutIdleSec = "5"; }; + wantedBy = [ "default.target" ]; + } + # SD card + { + where = "/sdcard"; + automountConfig = { TimeoutIdleSec = "5"; }; + wantedBy = [ "default.target" ]; + } + ]; + } diff --git a/modules/software.nix b/modules/software.nix index f221f6d..bf8a8e0 100644 --- a/modules/software.nix +++ b/modules/software.nix @@ -35,6 +35,7 @@ podman-compose shellcheck android-studio + gnumake # Rice adapta-gtk-theme paper-icon-theme