From cd15174cd6e59a2e9333d38b14f55bca414477ff Mon Sep 17 00:00:00 2001 From: Till Date: Sun, 3 Dec 2023 01:12:50 +0100 Subject: [PATCH] removed superfluous mounts --- home/calendars/default.nix | 1 + home/default.nix | 1 + home/nvim/config.vim | 2 +- system/hardware-nova.nix | 53 +++++++++++++++----------------------- 4 files changed, 24 insertions(+), 33 deletions(-) diff --git a/home/calendars/default.nix b/home/calendars/default.nix index d095f96..9577c0a 100644 --- a/home/calendars/default.nix +++ b/home/calendars/default.nix @@ -22,6 +22,7 @@ in xdg.configFile."khal/config".source = ./khal.config; services.vdirsyncer.enable = true; programs.vdirsyncer.enable = true; + # programs.khal = { # enable = true; # locale = { diff --git a/home/default.nix b/home/default.nix index d29b762..e3cc4ea 100644 --- a/home/default.nix +++ b/home/default.nix @@ -98,6 +98,7 @@ castget freetube qbittorrent + mindustry rhythmbox vlc yt-dlp diff --git a/home/nvim/config.vim b/home/nvim/config.vim index 8247765..6f1484d 100644 --- a/home/nvim/config.vim +++ b/home/nvim/config.vim @@ -44,7 +44,7 @@ nnoremap l nnoremap :hide nnoremap m :make -nnoremap M :!home-manager --flake ~/omniflake switch +nnoremap M :!home-manager --flake ~/.config/omniflake switch tnoremap diff --git a/system/hardware-nova.nix b/system/hardware-nova.nix index 3557244..6e609ef 100644 --- a/system/hardware-nova.nix +++ b/system/hardware-nova.nix @@ -1,9 +1,14 @@ { config, lib, pkgs, modulesPath, ... }: +let + subvolume = { + device = "/dev/disk/by-uuid/6a0d25d4-0253-4467-85cc-ab3e0ef71f54"; + fsType = "btrfs"; + }; +in + { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ]; boot.initrd.kernelModules = [ ]; @@ -15,36 +20,27 @@ allowDiscards = true; }; - fileSystems."/" = { - device = "/dev/disk/by-uuid/6a0d25d4-0253-4467-85cc-ab3e0ef71f54"; - fsType = "btrfs"; + fileSystems."/" = subvolume // { options = [ "subvol=root" "compress=zstd" "discard=async" ]; }; - fileSystems."/home" = { - device = "/dev/disk/by-uuid/6a0d25d4-0253-4467-85cc-ab3e0ef71f54"; - fsType = "btrfs"; - options = [ "subvol=home" "compress=zstd" "discard=async" ]; - }; + # the following subvolumes are automatically mounted and won't be snapshotted: + # /home/till/.local/share/Steam + # /home/till/.cache + # /home/till/tmp - fileSystems."/home/till/.local/share/Steam" = { - device = "/dev/disk/by-uuid/6a0d25d4-0253-4467-85cc-ab3e0ef71f54"; - fsType = "btrfs"; - options = [ "subvol=home/till/.local/share/Steam" "compress=zstd" "discard=async" ]; - }; + # todo: + # /home/till/.mozilla/firefox + # /home/till/.config/Mattermost/Cache - fileSystems."/home/till/.cache" = { - device = "/dev/disk/by-uuid/6a0d25d4-0253-4467-85cc-ab3e0ef71f54"; - fsType = "btrfs"; - options = [ "subvol=home/till/.cache" "compress=zstd" "discard=async" ]; - }; - - fileSystems."/nix" = { - device = "/dev/disk/by-uuid/6a0d25d4-0253-4467-85cc-ab3e0ef71f54"; - fsType = "btrfs"; + fileSystems."/nix" = subvolume // { options = [ "subvol=nix" "compress=zstd" "noatime" "discard=async" ]; }; + fileSystems."/home" = subvolume // { + options = [ "subvol=home" "compress=zstd" "discard=async" ]; + }; + fileSystems."/boot" = { device = "/dev/disk/by-uuid/7362-C4C4"; fsType = "vfat"; @@ -55,18 +51,11 @@ size = 8 * 1045; }]; - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - hardware.trackpoint.enable = true; boot.kernelParams = [ "psmouse.elantech_smbus=0" ];