diff --git a/machines/servo/services/freshrss.nix b/machines/servo/services/freshrss.nix index ba24623e..3690e020 100644 --- a/machines/servo/services/freshrss.nix +++ b/machines/servo/services/freshrss.nix @@ -30,7 +30,7 @@ systemd.services.freshrss-import-feeds = let fresh = config.systemd.services.freshrss-config; - feeds = import ../../../modules/universal/env/home-manager/feeds.nix { inherit lib; }; + feeds = import ../../../modules/universal/home-manager/feeds.nix { inherit lib; }; opml = pkgs.writeText "sane-freshrss.opml" (feeds.feedsToOpml feeds.all); in { inherit (fresh) wantedBy environment; diff --git a/modules/universal/default.nix b/modules/universal/default.nix index e54eeed3..ca2ea615 100644 --- a/modules/universal/default.nix +++ b/modules/universal/default.nix @@ -3,16 +3,24 @@ { imports = [ ./allocations.nix - ./env ./fs.nix + ./home-manager + ./home-packages.nix ./net.nix ./secrets.nix + ./system-packages.nix ./users.nix ./vpn.nix ]; time.timeZone = "America/Los_Angeles"; + # allow `nix flake ...` command + nix.extraOptions = '' + experimental-features = nix-command flakes + ''; + + # TODO: move this into home-manager? fonts = { enableDefaultFonts = true; fonts = with pkgs; [ font-awesome twitter-color-emoji hack-font ]; @@ -25,9 +33,30 @@ }; }; - # allow `nix flake ...` command - nix.extraOptions = '' - experimental-features = nix-command flakes - ''; + # programs.vim.defaultEditor = true; + environment.variables = { + EDITOR = "vim"; + # git claims it should use EDITOR, but it doesn't! + GIT_EDITOR = "vim"; + # TODO: these should be moved to `home.sessionVariables` (home-manager) + # Electron apps should use native wayland backend: + # https://nixos.wiki/wiki/Slack#Wayland + # Discord under sway crashes with this. + # NIXOS_OZONE_WL = "1"; + # LIBGL_ALWAYS_SOFTWARE = "1"; + }; + # enable zsh completions + environment.pathsToLink = [ "/share/zsh" ]; + environment.systemPackages = with pkgs; [ + # required for pam_mount + gocryptfs + ]; + + security.pam.mount.enable = true; + # security.pam.mount.debugLevel = 1; + # security.pam.enableSSHAgentAuth = true; # ?? + # needed for `allow_other` in e.g. gocryptfs mounts + # or i guess going through mount.fuse sets suid so that's not necessary? + # programs.fuse.userAllowOther = true; } diff --git a/modules/universal/env/default.nix b/modules/universal/env/default.nix deleted file mode 100644 index 44987782..00000000 --- a/modules/universal/env/default.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ pkgs, ... }: - -{ - imports = [ - ./home-manager - ./home-packages.nix - ./system-packages.nix - ]; - - # programs.vim.defaultEditor = true; - environment.variables = { - EDITOR = "vim"; - # git claims it should use EDITOR, but it doesn't! - GIT_EDITOR = "vim"; - # TODO: these should be moved to `home.sessionVariables` (home-manager) - # Electron apps should use native wayland backend: - # https://nixos.wiki/wiki/Slack#Wayland - # Discord under sway crashes with this. - # NIXOS_OZONE_WL = "1"; - # LIBGL_ALWAYS_SOFTWARE = "1"; - }; - # enable zsh completions - environment.pathsToLink = [ "/share/zsh" ]; - environment.systemPackages = with pkgs; [ - # required for pam_mount - gocryptfs - ]; - - security.pam.mount.enable = true; - # security.pam.mount.debugLevel = 1; - # security.pam.enableSSHAgentAuth = true; # ?? - # needed for `allow_other` in e.g. gocryptfs mounts - # or i guess going through mount.fuse sets suid so that's not necessary? - # programs.fuse.userAllowOther = true; -} - diff --git a/modules/universal/env/home-manager/aerc.nix b/modules/universal/home-manager/aerc.nix similarity index 85% rename from modules/universal/env/home-manager/aerc.nix rename to modules/universal/home-manager/aerc.nix index 3c86d0e4..b5d110aa 100644 --- a/modules/universal/env/home-manager/aerc.nix +++ b/modules/universal/home-manager/aerc.nix @@ -3,7 +3,7 @@ { sops.secrets."aerc_accounts" = { owner = config.users.users.colin.name; - sopsFile = ../../../../secrets/universal/aerc_accounts.conf; + sopsFile = ../../../secrets/universal/aerc_accounts.conf; format = "binary"; }; home-manager.users.colin = let sysconfig = config; in { config, ... }: { diff --git a/modules/universal/env/home-manager/default.nix b/modules/universal/home-manager/default.nix similarity index 99% rename from modules/universal/env/home-manager/default.nix rename to modules/universal/home-manager/default.nix index 08ca8972..4056a41f 100644 --- a/modules/universal/env/home-manager/default.nix +++ b/modules/universal/home-manager/default.nix @@ -92,7 +92,7 @@ in initKeyring = { after = ["writeBoundary"]; before = []; - data = "${../../../../scripts/init-keyring}"; + data = "${../../../scripts/init-keyring}"; }; }; diff --git a/modules/universal/env/home-manager/discord.nix b/modules/universal/home-manager/discord.nix similarity index 100% rename from modules/universal/env/home-manager/discord.nix rename to modules/universal/home-manager/discord.nix diff --git a/modules/universal/env/home-manager/feeds.nix b/modules/universal/home-manager/feeds.nix similarity index 100% rename from modules/universal/env/home-manager/feeds.nix rename to modules/universal/home-manager/feeds.nix diff --git a/modules/universal/env/home-manager/git.nix b/modules/universal/home-manager/git.nix similarity index 100% rename from modules/universal/env/home-manager/git.nix rename to modules/universal/home-manager/git.nix diff --git a/modules/universal/env/home-manager/kitty.nix b/modules/universal/home-manager/kitty.nix similarity index 100% rename from modules/universal/env/home-manager/kitty.nix rename to modules/universal/home-manager/kitty.nix diff --git a/modules/universal/env/home-manager/librewolf.nix b/modules/universal/home-manager/librewolf.nix similarity index 100% rename from modules/universal/env/home-manager/librewolf.nix rename to modules/universal/home-manager/librewolf.nix diff --git a/modules/universal/env/home-manager/mpv.nix b/modules/universal/home-manager/mpv.nix similarity index 100% rename from modules/universal/env/home-manager/mpv.nix rename to modules/universal/home-manager/mpv.nix diff --git a/modules/universal/env/home-manager/nb.nix b/modules/universal/home-manager/nb.nix similarity index 100% rename from modules/universal/env/home-manager/nb.nix rename to modules/universal/home-manager/nb.nix diff --git a/modules/universal/env/home-manager/neovim.nix b/modules/universal/home-manager/neovim.nix similarity index 100% rename from modules/universal/env/home-manager/neovim.nix rename to modules/universal/home-manager/neovim.nix diff --git a/modules/universal/env/home-manager/sublime-music.nix b/modules/universal/home-manager/sublime-music.nix similarity index 85% rename from modules/universal/env/home-manager/sublime-music.nix rename to modules/universal/home-manager/sublime-music.nix index 4b7a4fdc..7245b872 100644 --- a/modules/universal/env/home-manager/sublime-music.nix +++ b/modules/universal/home-manager/sublime-music.nix @@ -3,7 +3,7 @@ # TODO: this should only be shipped on gui platforms sops.secrets."sublime_music_config" = { owner = config.users.users.colin.name; - sopsFile = ../../../../secrets/universal/sublime_music_config.json.bin; + sopsFile = ../../../secrets/universal/sublime_music_config.json.bin; format = "binary"; }; home-manager.users.colin = let sysconfig = config; in { config, ... }: { diff --git a/modules/universal/env/home-manager/vlc.nix b/modules/universal/home-manager/vlc.nix similarity index 100% rename from modules/universal/env/home-manager/vlc.nix rename to modules/universal/home-manager/vlc.nix diff --git a/modules/universal/env/home-manager/zsh.nix b/modules/universal/home-manager/zsh.nix similarity index 100% rename from modules/universal/env/home-manager/zsh.nix rename to modules/universal/home-manager/zsh.nix diff --git a/modules/universal/env/home-packages.nix b/modules/universal/home-packages.nix similarity index 100% rename from modules/universal/env/home-packages.nix rename to modules/universal/home-packages.nix diff --git a/modules/universal/env/system-packages.nix b/modules/universal/system-packages.nix similarity index 100% rename from modules/universal/env/system-packages.nix rename to modules/universal/system-packages.nix