diff --git a/hosts/ni/default.nix b/hosts/ni/default.nix index 57cc1d6e..6c26b868 100644 --- a/hosts/ni/default.nix +++ b/hosts/ni/default.nix @@ -16,6 +16,7 @@ desktop = { enable = true; audio.enable = true; + fonts.enable = true; }; dev = { enable = true; @@ -23,6 +24,7 @@ }; editors = { emacs.enable = true; + emacs.doom.enable = true; neovim.enable = true; }; themes.a-happy-gnome.enable = true; @@ -54,8 +56,6 @@ # Enable touchpad support (enabled default in most desktopManager). hardware.opentabletdriver.enable = true; - # List packages installed in system profile. To search, run: - # $ nix search wget environment.systemPackages = with pkgs; [ git wget brave lf fd ripgrep ]; # Some programs need SUID wrappers, can be configured further or are @@ -80,7 +80,7 @@ system.stateVersion = "21.11"; # Did you read the comment? # This is my external hard disk so it has to be non-blocking. - fileSystems."/mnt/archive" = { + fileSystems."/mnt/external-storage" = { device = "/dev/disk/by-uuid/665A391C5A38EB07"; fsType = "ntfs"; noCheck = true; @@ -88,8 +88,12 @@ "nofail" "noauto" "user" - "x.systemd.automount" - "x.systemd.device.timeout=1ms" + + # See systemd.mount.5 and systemd.automount.5 manual page for more + # details. + "x-systemd.automount" + "x-systemd.device-timeout=2" + "x-systemd.idle-timeout=2" ]; }; @@ -110,7 +114,7 @@ ]; doInit = false; removableDevice = true; - repo = "/archive/backups"; + repo = "/mnt/external-storage/backups"; paths = [ "~/dotfiles" "~/library" "~/writings" ]; encryption = { mode = "repokey"; diff --git a/modules/editors.nix b/modules/editors.nix index 77a8f04d..00c8b2d7 100644 --- a/modules/editors.nix +++ b/modules/editors.nix @@ -31,7 +31,7 @@ in { # :checkers spell aspell aspellDicts.en - aspellDicts.en-computer + aspellDicts.en-computers # :tools lookup wordnet diff --git a/modules/users.nix b/modules/users.nix index f222fd28..45c0cdcc 100644 --- a/modules/users.nix +++ b/modules/users.nix @@ -2,8 +2,11 @@ let cfg = config.modules.users; - users = lib.attrNames (lib.filesToAttr ../users); + userModules = lib.filesToAttr ../users; + + users = lib.attrNames userModules; nonexistentUsers = lib.filter (name: !lib.elem name users) cfg.users; + validUsers = lib.filterAttrs (n: v: lib.elem n users) userModules; in { options.modules.users = { @@ -14,13 +17,12 @@ in }; }; - imports = [ inputs.home-manager.nixosModules.home-manager ]; - config = lib.mkMerge [ - ({ - assertions = [{ - assertion = (builtins.length nonexistentUsers) > 1; - message = "${lib.concatStringsSep "," users} ${lib.concatStringsSep "," nonexistentUsers} is not found in the directory."; - }]; - }) - ]; + imports = [ inputs.home-manager.nixosModules.home-manager ] ++ (lib.attrValues validUsers); + + config = { + assertions = [{ + assertion = (builtins.length nonexistentUsers) < 1; + message = "${lib.concatMapStringsSep ", " (u: "'${u}'") nonexistentUsers} is not found in the `./users` directory."; + }]; + }; } diff --git a/users/foo-dogsquared/default.nix b/users/foo-dogsquared/default.nix index 6cf4e767..16d9be51 100644 --- a/users/foo-dogsquared/default.nix +++ b/users/foo-dogsquared/default.nix @@ -1,3 +1,5 @@ +{ config, options, lib, pkgs, ... }: + { # Define a user account. Don't forget to set a password with ‘passwd’. users.users.foo-dogsquared = {