diff --git a/flake.lock b/flake.lock index 5fd6c45..d2f2e6d 100644 --- a/flake.lock +++ b/flake.lock @@ -70,11 +70,11 @@ ] }, "locked": { - "lastModified": 1696343447, - "narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=", + "lastModified": 1698579227, + "narHash": "sha256-KVWjFZky+gRuWennKsbo6cWyo7c/z/VgCte5pR9pEKg=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4", + "rev": "f76e870d64779109e41370848074ac4eaa1606ec", "type": "github" }, "original": { @@ -131,11 +131,11 @@ ] }, "locked": { - "lastModified": 1698250431, - "narHash": "sha256-qs2gTeH4wpnWPO6Oi6sOhp2IhG0i0DzcnrJxIY3/CP8=", + "lastModified": 1698670511, + "narHash": "sha256-jQIu3UhBMPHXzVkHQO1O2gg8SVo5lqAVoC6mOaLQcLQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "09587fbbc6a669f7725613e044c2577dc5d43ab5", + "rev": "8e5416b478e465985eec274bc3a018024435c106", "type": "github" }, "original": { @@ -147,11 +147,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1698134075, - "narHash": "sha256-foCD+nuKzfh49bIoiCBur4+Fx1nozo+4C/6k8BYk4sg=", + "lastModified": 1698611440, + "narHash": "sha256-jPjHjrerhYDy3q9+s5EAsuhyhuknNfowY6yt6pjn9pc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8efd5d1e283604f75a808a20e6cde0ef313d07d4", + "rev": "0cbe9f69c234a7700596e943bfae7ef27a31b735", "type": "github" }, "original": { @@ -163,11 +163,11 @@ }, "nur": { "locked": { - "lastModified": 1698317227, - "narHash": "sha256-jzSJjjxJr/IPvoPSWB1ZobmlAKku6eeggh9ffGV7Sig=", + "lastModified": 1698745553, + "narHash": "sha256-Fdip7ewCtZTjOu7ATDFUAy3OqrgcyvzDElLXhr4YmmI=", "owner": "nix-community", "repo": "NUR", - "rev": "32a38be31067b0a2f4919fd9e7a49bbefc34d25f", + "rev": "dfbf198236d40e9741db76936088f05107e19013", "type": "github" }, "original": { diff --git a/flake/home-manager.nix b/flake/home-manager.nix index 2c5b65a..61c9f6e 100644 --- a/flake/home-manager.nix +++ b/flake/home-manager.nix @@ -2,7 +2,7 @@ let defaultModules = [ # Include generic settings - "${self}/home" + "${self}/modules/home" { # Basic user information defaults home.username = lib.mkDefault "ambroisie"; diff --git a/flake/nixos.nix b/flake/nixos.nix index 9eb6388..fe124d7 100644 --- a/flake/nixos.nix +++ b/flake/nixos.nix @@ -13,9 +13,7 @@ let ]; } # Include generic settings - "${self}/modules" - # Include bundles of settings - "${self}/profiles" + "${self}/modules/nixos" ]; buildHost = name: system: lib.nixosSystem { diff --git a/home/default.nix b/home/default.nix deleted file mode 100644 index 8ba3a8d..0000000 --- a/home/default.nix +++ /dev/null @@ -1,56 +0,0 @@ -{ ... }: -{ - imports = [ - ./aliases - ./atuin - ./bat - ./bitwarden - ./bluetooth - ./calibre - ./comma - ./dircolors - ./direnv - ./discord - ./documentation - ./feh - ./firefox - ./flameshot - ./fzf - ./gammastep - ./gdb - ./git - ./gpg - ./gtk - ./htop - ./jq - ./mail - ./mpv - ./nix - ./nix-index - ./nixpkgs - ./nm-applet - ./packages - ./pager - ./power-alert - ./secrets - ./ssh - ./terminal - ./tmux - ./udiskie - ./vim - ./wm - ./x - ./xdg - ./zathura - ./zsh - ]; - - # First sane reproducible version - home.stateVersion = "20.09"; - - # Who am I? - home.username = "ambroisie"; - - # Start services automatically - systemd.user.startServices = "sd-switch"; -} diff --git a/hosts/homes/ambroisie@mousqueton/default.nix b/hosts/homes/ambroisie@mousqueton/default.nix index ac73da6..7fcd356 100644 --- a/hosts/homes/ambroisie@mousqueton/default.nix +++ b/hosts/homes/ambroisie@mousqueton/default.nix @@ -17,11 +17,13 @@ services.gpg-agent.enable = lib.mkForce false; - # I use scripts that use the passthrough sequence often on this host - my.home.tmux.enablePassthrough = true; + my.home = { + tmux = { + # I use scripts that use the passthrough sequence often on this host + enablePassthrough = true; - programs.tmux.extraConfig = '' - # Setup 24-bit color explicitly, as the default terminfo entry does not - set-option -sa terminal-overrides ",xterm-256color:Tc" - ''; + # HTerm uses `xterm-256color` as its `$TERM`, so use that here + trueColorTerminals = [ "xterm-256color" ]; + }; + }; } diff --git a/hosts/nixos/aramis/default.nix b/hosts/nixos/aramis/default.nix index c72fb11..6e0304f 100644 --- a/hosts/nixos/aramis/default.nix +++ b/hosts/nixos/aramis/default.nix @@ -15,6 +15,7 @@ ./secrets ./services.nix ./sound.nix + ./system.nix ]; # Set your time zone. diff --git a/hosts/nixos/aramis/profiles.nix b/hosts/nixos/aramis/profiles.nix index d86da5a..4d2ac7d 100644 --- a/hosts/nixos/aramis/profiles.nix +++ b/hosts/nixos/aramis/profiles.nix @@ -9,8 +9,6 @@ gtk.enable = true; # Laptop specific configuration laptop.enable = true; - # Printers are hell, but so is the unability to print - printing.enable = true; # i3 configuration wm.windowManager = "i3"; # X configuration diff --git a/hosts/nixos/aramis/system.nix b/hosts/nixos/aramis/system.nix new file mode 100644 index 0000000..5e69222 --- /dev/null +++ b/hosts/nixos/aramis/system.nix @@ -0,0 +1,10 @@ +# Core system configuration +{ ... }: +{ + my.system = { + # Printers are hell, but so is the unability to print + printing = { + enable = true; + }; + }; +} diff --git a/hosts/nixos/porthos/default.nix b/hosts/nixos/porthos/default.nix index 326d1cd..2dea899 100644 --- a/hosts/nixos/porthos/default.nix +++ b/hosts/nixos/porthos/default.nix @@ -9,6 +9,7 @@ ./networking.nix ./secrets ./services.nix + ./system.nix ./users.nix ]; diff --git a/hosts/nixos/porthos/home.nix b/hosts/nixos/porthos/home.nix index 53d5d25..90aa0ec 100644 --- a/hosts/nixos/porthos/home.nix +++ b/hosts/nixos/porthos/home.nix @@ -1,6 +1,12 @@ { ... }: { my.home = { + # Allow using 24bit color when SSH-ing from various clients + tmux.trueColorTerminals = [ + # My usual terminal, e.g: on laptop + "alacritty" + ]; + # Always start a tmux session when opening a shell session zsh.launchTmux = true; }; diff --git a/hosts/nixos/porthos/system.nix b/hosts/nixos/porthos/system.nix new file mode 100644 index 0000000..07b9947 --- /dev/null +++ b/hosts/nixos/porthos/system.nix @@ -0,0 +1,12 @@ +# Core system configuration +{ ... }: +{ + my.system = { + nix = { + cache = { + # This server is the one serving the cache, don't try to query it + selfHosted = false; + }; + }; + }; +} diff --git a/lib/lists.nix b/lib/lists.nix index 190198e..6c2fadd 100644 --- a/lib/lists.nix +++ b/lib/lists.nix @@ -24,4 +24,10 @@ in # (any -> value) # [ any ] mapFilter = pred: f: attrs: filter pred (map f attrs); + + # Transform a nullable value into a list of zero/one element. + # + # nullableToList :: + # (nullable a) -> [ a ] + nullableToList = x: if x != null then [ x ] else [ ]; } diff --git a/home/aliases/default.nix b/modules/home/aliases/default.nix similarity index 100% rename from home/aliases/default.nix rename to modules/home/aliases/default.nix diff --git a/home/atuin/default.nix b/modules/home/atuin/default.nix similarity index 100% rename from home/atuin/default.nix rename to modules/home/atuin/default.nix diff --git a/home/bat/default.nix b/modules/home/bat/default.nix similarity index 100% rename from home/bat/default.nix rename to modules/home/bat/default.nix diff --git a/home/bitwarden/default.nix b/modules/home/bitwarden/default.nix similarity index 100% rename from home/bitwarden/default.nix rename to modules/home/bitwarden/default.nix diff --git a/home/bluetooth/default.nix b/modules/home/bluetooth/default.nix similarity index 100% rename from home/bluetooth/default.nix rename to modules/home/bluetooth/default.nix diff --git a/home/calibre/default.nix b/modules/home/calibre/default.nix similarity index 100% rename from home/calibre/default.nix rename to modules/home/calibre/default.nix diff --git a/home/comma/default.nix b/modules/home/comma/default.nix similarity index 100% rename from home/comma/default.nix rename to modules/home/comma/default.nix diff --git a/modules/home/default.nix b/modules/home/default.nix index 1e0e0aa..8ba3a8d 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -1,29 +1,56 @@ -{ config, inputs, lib, ... }: -let - actualPath = [ "home-manager" "users" config.my.user.name "my" "home" ]; - aliasPath = [ "my" "home" ]; - - cfg = config.my.user.home; -in +{ ... }: { imports = [ - inputs.home-manager.nixosModules.home-manager # enable home-manager options - (lib.mkAliasOptionModule aliasPath actualPath) # simplify setting home options + ./aliases + ./atuin + ./bat + ./bitwarden + ./bluetooth + ./calibre + ./comma + ./dircolors + ./direnv + ./discord + ./documentation + ./feh + ./firefox + ./flameshot + ./fzf + ./gammastep + ./gdb + ./git + ./gpg + ./gtk + ./htop + ./jq + ./mail + ./mpv + ./nix + ./nix-index + ./nixpkgs + ./nm-applet + ./packages + ./pager + ./power-alert + ./secrets + ./ssh + ./terminal + ./tmux + ./udiskie + ./vim + ./wm + ./x + ./xdg + ./zathura + ./zsh ]; - config = lib.mkIf cfg.enable { - home-manager = { - # Not a fan of out-of-directory imports, but this is a good exception - users.${config.my.user.name} = import ../../home; + # First sane reproducible version + home.stateVersion = "20.09"; - # Nix Flakes compatibility - useGlobalPkgs = true; - useUserPackages = true; + # Who am I? + home.username = "ambroisie"; - # Forward inputs to home-manager configuration - extraSpecialArgs = { - inherit inputs; - }; - }; - }; + # Start services automatically + systemd.user.startServices = "sd-switch"; } diff --git a/home/dircolors/default.nix b/modules/home/dircolors/default.nix similarity index 100% rename from home/dircolors/default.nix rename to modules/home/dircolors/default.nix diff --git a/home/direnv/default.nix b/modules/home/direnv/default.nix similarity index 100% rename from home/direnv/default.nix rename to modules/home/direnv/default.nix diff --git a/home/direnv/lib/nix.sh b/modules/home/direnv/lib/nix.sh similarity index 100% rename from home/direnv/lib/nix.sh rename to modules/home/direnv/lib/nix.sh diff --git a/home/direnv/lib/postgres.sh b/modules/home/direnv/lib/postgres.sh similarity index 100% rename from home/direnv/lib/postgres.sh rename to modules/home/direnv/lib/postgres.sh diff --git a/home/direnv/lib/python.sh b/modules/home/direnv/lib/python.sh similarity index 100% rename from home/direnv/lib/python.sh rename to modules/home/direnv/lib/python.sh diff --git a/home/discord/default.nix b/modules/home/discord/default.nix similarity index 100% rename from home/discord/default.nix rename to modules/home/discord/default.nix diff --git a/home/documentation/default.nix b/modules/home/documentation/default.nix similarity index 100% rename from home/documentation/default.nix rename to modules/home/documentation/default.nix diff --git a/home/feh/default.nix b/modules/home/feh/default.nix similarity index 100% rename from home/feh/default.nix rename to modules/home/feh/default.nix diff --git a/home/firefox/default.nix b/modules/home/firefox/default.nix similarity index 92% rename from home/firefox/default.nix rename to modules/home/firefox/default.nix index 7374b63..85a1d59 100644 --- a/home/firefox/default.nix +++ b/modules/home/firefox/default.nix @@ -33,13 +33,10 @@ in enable = true; package = pkgs.firefox.override { - cfg = { - enableTridactylNative = cfg.tridactyl.enable; - }; - - extraNativeMessagingHosts = with pkgs; ([ ] + nativeMessagingHosts = ([ ] + ++ lib.optional cfg.tridactyl.enable pkgs.tridactyl-native # Watch videos using mpv - ++ lib.optional cfg.ff2mpv.enable ambroisie.ff2mpv-go + ++ lib.optional cfg.ff2mpv.enable pkgs.ambroisie.ff2mpv-go ); }; diff --git a/home/firefox/tridactyl/default.nix b/modules/home/firefox/tridactyl/default.nix similarity index 100% rename from home/firefox/tridactyl/default.nix rename to modules/home/firefox/tridactyl/default.nix diff --git a/home/firefox/tridactyl/tridactylrc b/modules/home/firefox/tridactyl/tridactylrc similarity index 100% rename from home/firefox/tridactyl/tridactylrc rename to modules/home/firefox/tridactyl/tridactylrc diff --git a/home/flameshot/default.nix b/modules/home/flameshot/default.nix similarity index 100% rename from home/flameshot/default.nix rename to modules/home/flameshot/default.nix diff --git a/home/fzf/default.nix b/modules/home/fzf/default.nix similarity index 100% rename from home/fzf/default.nix rename to modules/home/fzf/default.nix diff --git a/home/gammastep/default.nix b/modules/home/gammastep/default.nix similarity index 100% rename from home/gammastep/default.nix rename to modules/home/gammastep/default.nix diff --git a/home/gdb/default.nix b/modules/home/gdb/default.nix similarity index 100% rename from home/gdb/default.nix rename to modules/home/gdb/default.nix diff --git a/home/gdb/gdbinit b/modules/home/gdb/gdbinit similarity index 100% rename from home/gdb/gdbinit rename to modules/home/gdb/gdbinit diff --git a/home/git/default.ignore b/modules/home/git/default.ignore similarity index 100% rename from home/git/default.ignore rename to modules/home/git/default.ignore diff --git a/home/git/default.nix b/modules/home/git/default.nix similarity index 100% rename from home/git/default.nix rename to modules/home/git/default.nix diff --git a/home/gpg/default.nix b/modules/home/gpg/default.nix similarity index 100% rename from home/gpg/default.nix rename to modules/home/gpg/default.nix diff --git a/home/gtk/default.nix b/modules/home/gtk/default.nix similarity index 100% rename from home/gtk/default.nix rename to modules/home/gtk/default.nix diff --git a/home/htop/default.nix b/modules/home/htop/default.nix similarity index 100% rename from home/htop/default.nix rename to modules/home/htop/default.nix diff --git a/home/jq/default.nix b/modules/home/jq/default.nix similarity index 100% rename from home/jq/default.nix rename to modules/home/jq/default.nix diff --git a/home/mail/accounts/default.nix b/modules/home/mail/accounts/default.nix similarity index 100% rename from home/mail/accounts/default.nix rename to modules/home/mail/accounts/default.nix diff --git a/home/mail/default.nix b/modules/home/mail/default.nix similarity index 100% rename from home/mail/default.nix rename to modules/home/mail/default.nix diff --git a/home/mail/himalaya/default.nix b/modules/home/mail/himalaya/default.nix similarity index 100% rename from home/mail/himalaya/default.nix rename to modules/home/mail/himalaya/default.nix diff --git a/home/mail/msmtp/default.nix b/modules/home/mail/msmtp/default.nix similarity index 100% rename from home/mail/msmtp/default.nix rename to modules/home/mail/msmtp/default.nix diff --git a/home/mpv/default.nix b/modules/home/mpv/default.nix similarity index 100% rename from home/mpv/default.nix rename to modules/home/mpv/default.nix diff --git a/home/nix-index/default.nix b/modules/home/nix-index/default.nix similarity index 100% rename from home/nix-index/default.nix rename to modules/home/nix-index/default.nix diff --git a/home/nix/default.nix b/modules/home/nix/default.nix similarity index 100% rename from home/nix/default.nix rename to modules/home/nix/default.nix diff --git a/home/nixpkgs/default.nix b/modules/home/nixpkgs/default.nix similarity index 100% rename from home/nixpkgs/default.nix rename to modules/home/nixpkgs/default.nix diff --git a/home/nm-applet/default.nix b/modules/home/nm-applet/default.nix similarity index 100% rename from home/nm-applet/default.nix rename to modules/home/nm-applet/default.nix diff --git a/home/packages/default.nix b/modules/home/packages/default.nix similarity index 100% rename from home/packages/default.nix rename to modules/home/packages/default.nix diff --git a/home/pager/default.nix b/modules/home/pager/default.nix similarity index 100% rename from home/pager/default.nix rename to modules/home/pager/default.nix diff --git a/home/power-alert/default.nix b/modules/home/power-alert/default.nix similarity index 100% rename from home/power-alert/default.nix rename to modules/home/power-alert/default.nix diff --git a/home/secrets/default.nix b/modules/home/secrets/default.nix similarity index 100% rename from home/secrets/default.nix rename to modules/home/secrets/default.nix diff --git a/home/secrets/github/token.age b/modules/home/secrets/github/token.age similarity index 100% rename from home/secrets/github/token.age rename to modules/home/secrets/github/token.age diff --git a/home/secrets/secrets.nix b/modules/home/secrets/secrets.nix similarity index 100% rename from home/secrets/secrets.nix rename to modules/home/secrets/secrets.nix diff --git a/home/ssh/default.nix b/modules/home/ssh/default.nix similarity index 100% rename from home/ssh/default.nix rename to modules/home/ssh/default.nix diff --git a/home/terminal/alacritty/default.nix b/modules/home/terminal/alacritty/default.nix similarity index 100% rename from home/terminal/alacritty/default.nix rename to modules/home/terminal/alacritty/default.nix diff --git a/home/terminal/default.nix b/modules/home/terminal/default.nix similarity index 100% rename from home/terminal/default.nix rename to modules/home/terminal/default.nix diff --git a/home/terminal/termite/default.nix b/modules/home/terminal/termite/default.nix similarity index 100% rename from home/terminal/termite/default.nix rename to modules/home/terminal/termite/default.nix diff --git a/home/tmux/default.nix b/modules/home/tmux/default.nix similarity index 77% rename from home/tmux/default.nix rename to modules/home/tmux/default.nix index e554fd0..08aeb55 100644 --- a/home/tmux/default.nix +++ b/modules/home/tmux/default.nix @@ -11,6 +11,19 @@ in enable = my.mkDisableOption "tmux terminal multiplexer"; enablePassthrough = mkEnableOption "tmux DCS passthrough sequence"; + + trueColorTerminals = mkOption { + type = with types; listOf str; + default = lib.my.nullableToList config.my.home.terminal.program; + defaultText = '' + `[ config.my.home.terminal.program ]` if it is non-null, otherwise an + empty list. + ''; + example = [ "xterm-256color" ]; + description = '' + $TERM values which should be considered to always support 24-bit color. + ''; + }; }; config.programs.tmux = lib.mkIf cfg.enable { @@ -75,6 +88,14 @@ in set -g allow-passthrough on '' } + + # Force 24-bit color for each relevant $TERM + ${ + let + mkTcFlag = term: ''set -as terminal-features ",${term}:RGB"''; + in + lib.concatMapStringsSep "\n" mkTcFlag cfg.trueColorTerminals + } ''; }; } diff --git a/home/udiskie/default.nix b/modules/home/udiskie/default.nix similarity index 100% rename from home/udiskie/default.nix rename to modules/home/udiskie/default.nix diff --git a/home/vim/after/ftplugin/beancount.vim b/modules/home/vim/after/ftplugin/beancount.vim similarity index 100% rename from home/vim/after/ftplugin/beancount.vim rename to modules/home/vim/after/ftplugin/beancount.vim diff --git a/home/vim/after/ftplugin/cmake.vim b/modules/home/vim/after/ftplugin/cmake.vim similarity index 100% rename from home/vim/after/ftplugin/cmake.vim rename to modules/home/vim/after/ftplugin/cmake.vim diff --git a/home/vim/after/ftplugin/fugitive.vim b/modules/home/vim/after/ftplugin/fugitive.vim similarity index 100% rename from home/vim/after/ftplugin/fugitive.vim rename to modules/home/vim/after/ftplugin/fugitive.vim diff --git a/home/vim/after/ftplugin/gitcommit.vim b/modules/home/vim/after/ftplugin/gitcommit.vim similarity index 100% rename from home/vim/after/ftplugin/gitcommit.vim rename to modules/home/vim/after/ftplugin/gitcommit.vim diff --git a/home/vim/after/ftplugin/gitconfig.vim b/modules/home/vim/after/ftplugin/gitconfig.vim similarity index 100% rename from home/vim/after/ftplugin/gitconfig.vim rename to modules/home/vim/after/ftplugin/gitconfig.vim diff --git a/home/vim/after/ftplugin/haskell.vim b/modules/home/vim/after/ftplugin/haskell.vim similarity index 100% rename from home/vim/after/ftplugin/haskell.vim rename to modules/home/vim/after/ftplugin/haskell.vim diff --git a/home/vim/after/ftplugin/help.vim b/modules/home/vim/after/ftplugin/help.vim similarity index 100% rename from home/vim/after/ftplugin/help.vim rename to modules/home/vim/after/ftplugin/help.vim diff --git a/home/vim/after/ftplugin/mail.vim b/modules/home/vim/after/ftplugin/mail.vim similarity index 100% rename from home/vim/after/ftplugin/mail.vim rename to modules/home/vim/after/ftplugin/mail.vim diff --git a/home/vim/after/ftplugin/make.vim b/modules/home/vim/after/ftplugin/make.vim similarity index 100% rename from home/vim/after/ftplugin/make.vim rename to modules/home/vim/after/ftplugin/make.vim diff --git a/home/vim/after/ftplugin/markdown.vim b/modules/home/vim/after/ftplugin/markdown.vim similarity index 100% rename from home/vim/after/ftplugin/markdown.vim rename to modules/home/vim/after/ftplugin/markdown.vim diff --git a/home/vim/after/ftplugin/netrw.vim b/modules/home/vim/after/ftplugin/netrw.vim similarity index 100% rename from home/vim/after/ftplugin/netrw.vim rename to modules/home/vim/after/ftplugin/netrw.vim diff --git a/home/vim/after/ftplugin/nix.vim b/modules/home/vim/after/ftplugin/nix.vim similarity index 100% rename from home/vim/after/ftplugin/nix.vim rename to modules/home/vim/after/ftplugin/nix.vim diff --git a/home/vim/after/ftplugin/python.vim b/modules/home/vim/after/ftplugin/python.vim similarity index 100% rename from home/vim/after/ftplugin/python.vim rename to modules/home/vim/after/ftplugin/python.vim diff --git a/home/vim/after/ftplugin/rust.vim b/modules/home/vim/after/ftplugin/rust.vim similarity index 100% rename from home/vim/after/ftplugin/rust.vim rename to modules/home/vim/after/ftplugin/rust.vim diff --git a/home/vim/after/ftplugin/tex.vim b/modules/home/vim/after/ftplugin/tex.vim similarity index 100% rename from home/vim/after/ftplugin/tex.vim rename to modules/home/vim/after/ftplugin/tex.vim diff --git a/home/vim/after/ftplugin/tiger.vim b/modules/home/vim/after/ftplugin/tiger.vim similarity index 100% rename from home/vim/after/ftplugin/tiger.vim rename to modules/home/vim/after/ftplugin/tiger.vim diff --git a/home/vim/after/ftplugin/yaml.vim b/modules/home/vim/after/ftplugin/yaml.vim similarity index 100% rename from home/vim/after/ftplugin/yaml.vim rename to modules/home/vim/after/ftplugin/yaml.vim diff --git a/home/vim/after/plugin/mappings/commentary.lua b/modules/home/vim/after/plugin/mappings/commentary.lua similarity index 100% rename from home/vim/after/plugin/mappings/commentary.lua rename to modules/home/vim/after/plugin/mappings/commentary.lua diff --git a/home/vim/after/plugin/mappings/misc.lua b/modules/home/vim/after/plugin/mappings/misc.lua similarity index 100% rename from home/vim/after/plugin/mappings/misc.lua rename to modules/home/vim/after/plugin/mappings/misc.lua diff --git a/home/vim/after/plugin/mappings/telescope.lua b/modules/home/vim/after/plugin/mappings/telescope.lua similarity index 100% rename from home/vim/after/plugin/mappings/telescope.lua rename to modules/home/vim/after/plugin/mappings/telescope.lua diff --git a/home/vim/after/plugin/mappings/tree-sitter-textobjects.lua b/modules/home/vim/after/plugin/mappings/tree-sitter-textobjects.lua similarity index 100% rename from home/vim/after/plugin/mappings/tree-sitter-textobjects.lua rename to modules/home/vim/after/plugin/mappings/tree-sitter-textobjects.lua diff --git a/home/vim/after/plugin/mappings/unimpaired.lua b/modules/home/vim/after/plugin/mappings/unimpaired.lua similarity index 100% rename from home/vim/after/plugin/mappings/unimpaired.lua rename to modules/home/vim/after/plugin/mappings/unimpaired.lua diff --git a/home/vim/autoload/ftplugined.vim b/modules/home/vim/autoload/ftplugined.vim similarity index 100% rename from home/vim/autoload/ftplugined.vim rename to modules/home/vim/autoload/ftplugined.vim diff --git a/home/vim/default.nix b/modules/home/vim/default.nix similarity index 98% rename from home/vim/default.nix rename to modules/home/vim/default.nix index ec18f5c..871bf40 100644 --- a/home/vim/default.nix +++ b/modules/home/vim/default.nix @@ -67,7 +67,7 @@ in nvim-lspconfig # Easy LSP configuration lsp-format-nvim # Simplified formatting configuration lsp_lines-nvim # Show diagnostics *over* regions - null-ls-nvim # LSP integration for linters and formatters + none-ls-nvim # LSP integration for linters and formatters nvim-treesitter.withAllGrammars # Better highlighting nvim-treesitter-textobjects # More textobjects nvim-ts-context-commentstring # Comment string in nested language blocks diff --git a/home/vim/ftdetect/automake.lua b/modules/home/vim/ftdetect/automake.lua similarity index 100% rename from home/vim/ftdetect/automake.lua rename to modules/home/vim/ftdetect/automake.lua diff --git a/home/vim/ftdetect/direnv.lua b/modules/home/vim/ftdetect/direnv.lua similarity index 100% rename from home/vim/ftdetect/direnv.lua rename to modules/home/vim/ftdetect/direnv.lua diff --git a/home/vim/ftdetect/kbuild.lua b/modules/home/vim/ftdetect/kbuild.lua similarity index 100% rename from home/vim/ftdetect/kbuild.lua rename to modules/home/vim/ftdetect/kbuild.lua diff --git a/home/vim/ftdetect/kconfig.lua b/modules/home/vim/ftdetect/kconfig.lua similarity index 100% rename from home/vim/ftdetect/kconfig.lua rename to modules/home/vim/ftdetect/kconfig.lua diff --git a/home/vim/ftdetect/tiger.lua b/modules/home/vim/ftdetect/tiger.lua similarity index 100% rename from home/vim/ftdetect/tiger.lua rename to modules/home/vim/ftdetect/tiger.lua diff --git a/home/vim/ftdetect/tikz.lua b/modules/home/vim/ftdetect/tikz.lua similarity index 100% rename from home/vim/ftdetect/tikz.lua rename to modules/home/vim/ftdetect/tikz.lua diff --git a/home/vim/init.vim b/modules/home/vim/init.vim similarity index 100% rename from home/vim/init.vim rename to modules/home/vim/init.vim diff --git a/home/vim/lua/ambroisie/lsp.lua b/modules/home/vim/lua/ambroisie/lsp.lua similarity index 100% rename from home/vim/lua/ambroisie/lsp.lua rename to modules/home/vim/lua/ambroisie/lsp.lua diff --git a/home/vim/lua/ambroisie/utils.lua b/modules/home/vim/lua/ambroisie/utils.lua similarity index 100% rename from home/vim/lua/ambroisie/utils.lua rename to modules/home/vim/lua/ambroisie/utils.lua diff --git a/home/vim/plugin/abbreviations.lua b/modules/home/vim/plugin/abbreviations.lua similarity index 100% rename from home/vim/plugin/abbreviations.lua rename to modules/home/vim/plugin/abbreviations.lua diff --git a/home/vim/plugin/numbertoggle.lua b/modules/home/vim/plugin/numbertoggle.lua similarity index 100% rename from home/vim/plugin/numbertoggle.lua rename to modules/home/vim/plugin/numbertoggle.lua diff --git a/home/vim/plugin/settings/completion.lua b/modules/home/vim/plugin/settings/completion.lua similarity index 100% rename from home/vim/plugin/settings/completion.lua rename to modules/home/vim/plugin/settings/completion.lua diff --git a/home/vim/plugin/settings/dressing.lua b/modules/home/vim/plugin/settings/dressing.lua similarity index 100% rename from home/vim/plugin/settings/dressing.lua rename to modules/home/vim/plugin/settings/dressing.lua diff --git a/home/vim/plugin/settings/fastfold.lua b/modules/home/vim/plugin/settings/fastfold.lua similarity index 100% rename from home/vim/plugin/settings/fastfold.lua rename to modules/home/vim/plugin/settings/fastfold.lua diff --git a/home/vim/plugin/settings/formatting.lua b/modules/home/vim/plugin/settings/formatting.lua similarity index 100% rename from home/vim/plugin/settings/formatting.lua rename to modules/home/vim/plugin/settings/formatting.lua diff --git a/home/vim/plugin/settings/git.lua b/modules/home/vim/plugin/settings/git.lua similarity index 100% rename from home/vim/plugin/settings/git.lua rename to modules/home/vim/plugin/settings/git.lua diff --git a/home/vim/plugin/settings/lsp-lines.lua b/modules/home/vim/plugin/settings/lsp-lines.lua similarity index 100% rename from home/vim/plugin/settings/lsp-lines.lua rename to modules/home/vim/plugin/settings/lsp-lines.lua diff --git a/home/vim/plugin/settings/lspconfig.lua b/modules/home/vim/plugin/settings/lspconfig.lua similarity index 100% rename from home/vim/plugin/settings/lspconfig.lua rename to modules/home/vim/plugin/settings/lspconfig.lua diff --git a/home/vim/plugin/settings/lualine.lua b/modules/home/vim/plugin/settings/lualine.lua similarity index 100% rename from home/vim/plugin/settings/lualine.lua rename to modules/home/vim/plugin/settings/lualine.lua diff --git a/home/vim/plugin/settings/luasnip.lua b/modules/home/vim/plugin/settings/luasnip.lua similarity index 100% rename from home/vim/plugin/settings/luasnip.lua rename to modules/home/vim/plugin/settings/luasnip.lua diff --git a/home/vim/plugin/settings/null-ls.lua b/modules/home/vim/plugin/settings/null-ls.lua similarity index 100% rename from home/vim/plugin/settings/null-ls.lua rename to modules/home/vim/plugin/settings/null-ls.lua diff --git a/home/vim/plugin/settings/ssh.lua b/modules/home/vim/plugin/settings/ssh.lua similarity index 100% rename from home/vim/plugin/settings/ssh.lua rename to modules/home/vim/plugin/settings/ssh.lua diff --git a/home/vim/plugin/settings/surround.lua b/modules/home/vim/plugin/settings/surround.lua similarity index 100% rename from home/vim/plugin/settings/surround.lua rename to modules/home/vim/plugin/settings/surround.lua diff --git a/home/vim/plugin/settings/telescope.lua b/modules/home/vim/plugin/settings/telescope.lua similarity index 100% rename from home/vim/plugin/settings/telescope.lua rename to modules/home/vim/plugin/settings/telescope.lua diff --git a/home/vim/plugin/settings/tree-sitter.lua b/modules/home/vim/plugin/settings/tree-sitter.lua similarity index 100% rename from home/vim/plugin/settings/tree-sitter.lua rename to modules/home/vim/plugin/settings/tree-sitter.lua diff --git a/home/vim/plugin/settings/which-key.lua b/modules/home/vim/plugin/settings/which-key.lua similarity index 100% rename from home/vim/plugin/settings/which-key.lua rename to modules/home/vim/plugin/settings/which-key.lua diff --git a/home/vim/plugin/signtoggle.lua b/modules/home/vim/plugin/signtoggle.lua similarity index 100% rename from home/vim/plugin/signtoggle.lua rename to modules/home/vim/plugin/signtoggle.lua diff --git a/home/wm/cursor/default.nix b/modules/home/wm/cursor/default.nix similarity index 100% rename from home/wm/cursor/default.nix rename to modules/home/wm/cursor/default.nix diff --git a/home/wm/default.nix b/modules/home/wm/default.nix similarity index 100% rename from home/wm/default.nix rename to modules/home/wm/default.nix diff --git a/home/wm/dunst/default.nix b/modules/home/wm/dunst/default.nix similarity index 100% rename from home/wm/dunst/default.nix rename to modules/home/wm/dunst/default.nix diff --git a/home/wm/i3/default.nix b/modules/home/wm/i3/default.nix similarity index 100% rename from home/wm/i3/default.nix rename to modules/home/wm/i3/default.nix diff --git a/home/wm/i3bar/default.nix b/modules/home/wm/i3bar/default.nix similarity index 100% rename from home/wm/i3bar/default.nix rename to modules/home/wm/i3bar/default.nix diff --git a/home/wm/rofi/default.nix b/modules/home/wm/rofi/default.nix similarity index 100% rename from home/wm/rofi/default.nix rename to modules/home/wm/rofi/default.nix diff --git a/home/wm/screen-lock/default.nix b/modules/home/wm/screen-lock/default.nix similarity index 100% rename from home/wm/screen-lock/default.nix rename to modules/home/wm/screen-lock/default.nix diff --git a/home/x/default.nix b/modules/home/x/default.nix similarity index 100% rename from home/x/default.nix rename to modules/home/x/default.nix diff --git a/home/x/keyboard/default.nix b/modules/home/x/keyboard/default.nix similarity index 100% rename from home/x/keyboard/default.nix rename to modules/home/x/keyboard/default.nix diff --git a/home/xdg/default.nix b/modules/home/xdg/default.nix similarity index 100% rename from home/xdg/default.nix rename to modules/home/xdg/default.nix diff --git a/home/zathura/default.nix b/modules/home/zathura/default.nix similarity index 100% rename from home/zathura/default.nix rename to modules/home/zathura/default.nix diff --git a/home/zsh/completion-styles.zsh b/modules/home/zsh/completion-styles.zsh similarity index 100% rename from home/zsh/completion-styles.zsh rename to modules/home/zsh/completion-styles.zsh diff --git a/home/zsh/default.nix b/modules/home/zsh/default.nix similarity index 100% rename from home/zsh/default.nix rename to modules/home/zsh/default.nix diff --git a/home/zsh/extra-mappings.zsh b/modules/home/zsh/extra-mappings.zsh similarity index 100% rename from home/zsh/extra-mappings.zsh rename to modules/home/zsh/extra-mappings.zsh diff --git a/home/zsh/options.zsh b/modules/home/zsh/options.zsh similarity index 100% rename from home/zsh/options.zsh rename to modules/home/zsh/options.zsh diff --git a/modules/default.nix b/modules/nixos/default.nix similarity index 96% rename from modules/default.nix rename to modules/nixos/default.nix index 2eaa2e6..3648631 100644 --- a/modules/default.nix +++ b/modules/nixos/default.nix @@ -5,6 +5,7 @@ imports = [ ./hardware ./home + ./profiles ./programs ./secrets ./services diff --git a/modules/hardware/bluetooth/default.nix b/modules/nixos/hardware/bluetooth/default.nix similarity index 92% rename from modules/hardware/bluetooth/default.nix rename to modules/nixos/hardware/bluetooth/default.nix index 2d840f9..3dd44e6 100644 --- a/modules/hardware/bluetooth/default.nix +++ b/modules/nixos/hardware/bluetooth/default.nix @@ -18,6 +18,13 @@ in services.blueman.enable = true; } + # Persist bluetooth files + { + my.system.persist.directories = [ + "/var/lib/bluetooth" + ]; + } + # Support for additional bluetooth codecs (lib.mkIf cfg.loadExtraCodecs { hardware.pulseaudio = { diff --git a/modules/hardware/default.nix b/modules/nixos/hardware/default.nix similarity index 100% rename from modules/hardware/default.nix rename to modules/nixos/hardware/default.nix diff --git a/modules/hardware/ergodox/default.nix b/modules/nixos/hardware/ergodox/default.nix similarity index 100% rename from modules/hardware/ergodox/default.nix rename to modules/nixos/hardware/ergodox/default.nix diff --git a/modules/hardware/firmware/default.nix b/modules/nixos/hardware/firmware/default.nix similarity index 100% rename from modules/hardware/firmware/default.nix rename to modules/nixos/hardware/firmware/default.nix diff --git a/modules/hardware/mx-ergo/default.nix b/modules/nixos/hardware/mx-ergo/default.nix similarity index 100% rename from modules/hardware/mx-ergo/default.nix rename to modules/nixos/hardware/mx-ergo/default.nix diff --git a/modules/hardware/networking/default.nix b/modules/nixos/hardware/networking/default.nix similarity index 81% rename from modules/hardware/networking/default.nix rename to modules/nixos/hardware/networking/default.nix index f0806fe..51dcfce 100644 --- a/modules/hardware/networking/default.nix +++ b/modules/nixos/hardware/networking/default.nix @@ -22,6 +22,11 @@ in config = lib.mkMerge [ (lib.mkIf cfg.wireless.enable { networking.networkmanager.enable = true; + + # Persist NetworkManager files + my.system.persist.directories = [ + "/etc/NetworkManager/system-connections" + ]; }) ]; } diff --git a/modules/hardware/sound/default.nix b/modules/nixos/hardware/sound/default.nix similarity index 100% rename from modules/hardware/sound/default.nix rename to modules/nixos/hardware/sound/default.nix diff --git a/modules/hardware/upower/default.nix b/modules/nixos/hardware/upower/default.nix similarity index 100% rename from modules/hardware/upower/default.nix rename to modules/nixos/hardware/upower/default.nix diff --git a/modules/nixos/home/default.nix b/modules/nixos/home/default.nix new file mode 100644 index 0000000..fe00704 --- /dev/null +++ b/modules/nixos/home/default.nix @@ -0,0 +1,29 @@ +{ config, inputs, lib, ... }: +let + actualPath = [ "home-manager" "users" config.my.user.name "my" "home" ]; + aliasPath = [ "my" "home" ]; + + cfg = config.my.user.home; +in +{ + imports = [ + inputs.home-manager.nixosModules.home-manager # enable home-manager options + (lib.mkAliasOptionModule aliasPath actualPath) # simplify setting home options + ]; + + config = lib.mkIf cfg.enable { + home-manager = { + # Not a fan of out-of-directory imports, but this is a good exception + users.${config.my.user.name} = import "${inputs.self}/modules/home"; + + # Nix Flakes compatibility + useGlobalPkgs = true; + useUserPackages = true; + + # Forward inputs to home-manager configuration + extraSpecialArgs = { + inherit inputs; + }; + }; + }; +} diff --git a/profiles/bluetooth/default.nix b/modules/nixos/profiles/bluetooth/default.nix similarity index 100% rename from profiles/bluetooth/default.nix rename to modules/nixos/profiles/bluetooth/default.nix diff --git a/profiles/default.nix b/modules/nixos/profiles/default.nix similarity index 92% rename from profiles/default.nix rename to modules/nixos/profiles/default.nix index f7914a1..43d5a84 100644 --- a/profiles/default.nix +++ b/modules/nixos/profiles/default.nix @@ -6,7 +6,6 @@ ./devices ./gtk ./laptop - ./printing ./wm ./x ]; diff --git a/profiles/devices/default.nix b/modules/nixos/profiles/devices/default.nix similarity index 100% rename from profiles/devices/default.nix rename to modules/nixos/profiles/devices/default.nix diff --git a/profiles/gtk/default.nix b/modules/nixos/profiles/gtk/default.nix similarity index 100% rename from profiles/gtk/default.nix rename to modules/nixos/profiles/gtk/default.nix diff --git a/profiles/laptop/default.nix b/modules/nixos/profiles/laptop/default.nix similarity index 100% rename from profiles/laptop/default.nix rename to modules/nixos/profiles/laptop/default.nix diff --git a/profiles/wm/default.nix b/modules/nixos/profiles/wm/default.nix similarity index 100% rename from profiles/wm/default.nix rename to modules/nixos/profiles/wm/default.nix diff --git a/profiles/x/default.nix b/modules/nixos/profiles/x/default.nix similarity index 100% rename from profiles/x/default.nix rename to modules/nixos/profiles/x/default.nix diff --git a/modules/programs/default.nix b/modules/nixos/programs/default.nix similarity index 100% rename from modules/programs/default.nix rename to modules/nixos/programs/default.nix diff --git a/modules/programs/steam/default.nix b/modules/nixos/programs/steam/default.nix similarity index 100% rename from modules/programs/steam/default.nix rename to modules/nixos/programs/steam/default.nix diff --git a/modules/secrets/default.nix b/modules/nixos/secrets/default.nix similarity index 100% rename from modules/secrets/default.nix rename to modules/nixos/secrets/default.nix diff --git a/modules/secrets/secrets.nix b/modules/nixos/secrets/secrets.nix similarity index 100% rename from modules/secrets/secrets.nix rename to modules/nixos/secrets/secrets.nix diff --git a/modules/secrets/users/ambroisie/hashed-password.age b/modules/nixos/secrets/users/ambroisie/hashed-password.age similarity index 100% rename from modules/secrets/users/ambroisie/hashed-password.age rename to modules/nixos/secrets/users/ambroisie/hashed-password.age diff --git a/modules/secrets/users/root/hashed-password.age b/modules/nixos/secrets/users/root/hashed-password.age similarity index 100% rename from modules/secrets/users/root/hashed-password.age rename to modules/nixos/secrets/users/root/hashed-password.age diff --git a/modules/services/adblock/default.nix b/modules/nixos/services/adblock/default.nix similarity index 100% rename from modules/services/adblock/default.nix rename to modules/nixos/services/adblock/default.nix diff --git a/modules/services/backup/default.nix b/modules/nixos/services/backup/default.nix similarity index 100% rename from modules/services/backup/default.nix rename to modules/nixos/services/backup/default.nix diff --git a/modules/services/blog/default.nix b/modules/nixos/services/blog/default.nix similarity index 89% rename from modules/services/blog/default.nix rename to modules/nixos/services/blog/default.nix index 4b646c3..6752ac2 100644 --- a/modules/services/blog/default.nix +++ b/modules/nixos/services/blog/default.nix @@ -42,5 +42,12 @@ in # Those are all subdomains, no problem my.services.nginx.virtualHosts = hostsInfo; + + my.system.persist.directories = [ + "/var/www/blog" + "/var/www/cv" + "/var/www/dev" + "/var/www/key" + ]; }; } diff --git a/modules/services/calibre-web/default.nix b/modules/nixos/services/calibre-web/default.nix similarity index 92% rename from modules/services/calibre-web/default.nix rename to modules/nixos/services/calibre-web/default.nix index 858851c..b6e70d8 100644 --- a/modules/services/calibre-web/default.nix +++ b/modules/nixos/services/calibre-web/default.nix @@ -54,6 +54,11 @@ in ]; }; + my.system.persist.directories = [ + "/var/lib/${config.services.calibre-web.dataDir}" + cfg.libraryPath + ]; + services.fail2ban.jails = { calibre-web = '' enabled = true diff --git a/modules/services/default.nix b/modules/nixos/services/default.nix similarity index 100% rename from modules/services/default.nix rename to modules/nixos/services/default.nix diff --git a/modules/services/drone/default.nix b/modules/nixos/services/drone/default.nix similarity index 100% rename from modules/services/drone/default.nix rename to modules/nixos/services/drone/default.nix diff --git a/modules/services/drone/runner-docker/default.nix b/modules/nixos/services/drone/runner-docker/default.nix similarity index 100% rename from modules/services/drone/runner-docker/default.nix rename to modules/nixos/services/drone/runner-docker/default.nix diff --git a/modules/services/drone/runner-exec/default.nix b/modules/nixos/services/drone/runner-exec/default.nix similarity index 100% rename from modules/services/drone/runner-exec/default.nix rename to modules/nixos/services/drone/runner-exec/default.nix diff --git a/modules/services/drone/server/default.nix b/modules/nixos/services/drone/server/default.nix similarity index 97% rename from modules/services/drone/server/default.nix rename to modules/nixos/services/drone/server/default.nix index 1202010..0f56d29 100644 --- a/modules/services/drone/server/default.nix +++ b/modules/nixos/services/drone/server/default.nix @@ -7,6 +7,7 @@ in systemd.services.drone-server = { wantedBy = [ "multi-user.target" ]; after = [ "postgresql.service" ]; + requires = [ "postgresql.service" ]; serviceConfig = { EnvironmentFile = [ cfg.secretFile diff --git a/modules/services/fail2ban/default.nix b/modules/nixos/services/fail2ban/default.nix similarity index 100% rename from modules/services/fail2ban/default.nix rename to modules/nixos/services/fail2ban/default.nix diff --git a/modules/services/flood/default.nix b/modules/nixos/services/flood/default.nix similarity index 93% rename from modules/services/flood/default.nix rename to modules/nixos/services/flood/default.nix index ff5d941..79b6c75 100644 --- a/modules/services/flood/default.nix +++ b/modules/nixos/services/flood/default.nix @@ -46,5 +46,9 @@ in inherit (cfg) port; } ]; + + my.system.persist.directories = [ + "/var/lib/${cfg.stateDir}" + ]; }; } diff --git a/modules/services/gitea/default.nix b/modules/nixos/services/gitea/default.nix similarity index 96% rename from modules/services/gitea/default.nix rename to modules/nixos/services/gitea/default.nix index 28a448d..93edf57 100644 --- a/modules/services/gitea/default.nix +++ b/modules/nixos/services/gitea/default.nix @@ -135,6 +135,11 @@ in ]; }; + my.system.persist.directories = [ + config.services.gitea.lfs.contentDir + config.services.gitea.repositoryRoot + ]; + services.fail2ban.jails = { gitea = '' enabled = true diff --git a/modules/services/grocy/default.nix b/modules/nixos/services/grocy/default.nix similarity index 94% rename from modules/services/grocy/default.nix rename to modules/nixos/services/grocy/default.nix index 87927d6..4a3183e 100644 --- a/modules/services/grocy/default.nix +++ b/modules/nixos/services/grocy/default.nix @@ -36,5 +36,8 @@ in forceSSL = true; useACMEHost = config.networking.domain; }; + + # FIXME: backup + # FIXME: persistence }; } diff --git a/modules/services/indexers/default.nix b/modules/nixos/services/indexers/default.nix similarity index 85% rename from modules/services/indexers/default.nix rename to modules/nixos/services/indexers/default.nix index fb06a0b..28a7007 100644 --- a/modules/services/indexers/default.nix +++ b/modules/nixos/services/indexers/default.nix @@ -34,6 +34,10 @@ in port = jackettPort; } ]; + + my.system.persist.directories = [ + config.services.jackett.dataDir + ]; }) (lib.mkIf cfg.nzbhydra.enable { @@ -47,6 +51,10 @@ in port = nzbhydraPort; } ]; + + my.system.persist.directories = [ + config.services.nzbhydra2.dataDir + ]; }) (lib.mkIf cfg.prowlarr.enable { @@ -61,6 +69,10 @@ in } ]; + my.system.persist.directories = [ + "/var/lib/${config.systemd.services.prowlarr.serviceConfig.StateDirectory}" + ]; + services.fail2ban.jails = { prowlarr = '' enabled = true diff --git a/modules/services/jellyfin/default.nix b/modules/nixos/services/jellyfin/default.nix similarity index 86% rename from modules/services/jellyfin/default.nix rename to modules/nixos/services/jellyfin/default.nix index 2fcf51e..0692dcc 100644 --- a/modules/services/jellyfin/default.nix +++ b/modules/nixos/services/jellyfin/default.nix @@ -35,5 +35,9 @@ in }; } ]; + + my.system.persist.directories = [ + "/var/lib/${config.systemd.services.jellyfin.serviceConfig.StateDirectory}" + ]; }; } diff --git a/modules/services/lohr/default.nix b/modules/nixos/services/lohr/default.nix similarity index 95% rename from modules/services/lohr/default.nix rename to modules/nixos/services/lohr/default.nix index 245567c..7aac1ac 100644 --- a/modules/services/lohr/default.nix +++ b/modules/nixos/services/lohr/default.nix @@ -104,5 +104,9 @@ in inherit (cfg) port; } ]; + + my.system.persist.directories = [ + "/var/lib/${config.systemd.services.lohr.serviceConfig.StateDirectory}" + ]; }; } diff --git a/modules/services/matrix/default.nix b/modules/nixos/services/matrix/default.nix similarity index 98% rename from modules/services/matrix/default.nix rename to modules/nixos/services/matrix/default.nix index 52b60c5..87494c9 100644 --- a/modules/services/matrix/default.nix +++ b/modules/nixos/services/matrix/default.nix @@ -257,5 +257,9 @@ in config.services.matrix-synapse.dataDir ]; }; + + my.system.persist.directories = [ + config.services.matrix-synapse.dataDir + ]; }; } diff --git a/modules/services/miniflux/default.nix b/modules/nixos/services/miniflux/default.nix similarity index 96% rename from modules/services/miniflux/default.nix rename to modules/nixos/services/miniflux/default.nix index 6d9ffc8..4667912 100644 --- a/modules/services/miniflux/default.nix +++ b/modules/nixos/services/miniflux/default.nix @@ -49,5 +49,8 @@ in inherit (cfg) port; } ]; + + # FIXME: backup + # FIXME: persistence }; } diff --git a/modules/services/monitoring/default.nix b/modules/nixos/services/monitoring/default.nix similarity index 95% rename from modules/services/monitoring/default.nix rename to modules/nixos/services/monitoring/default.nix index 829bfe0..c7489f4 100644 --- a/modules/services/monitoring/default.nix +++ b/modules/nixos/services/monitoring/default.nix @@ -131,5 +131,10 @@ in inherit (cfg.grafana) port; } ]; + + my.system.persist.directories = [ + config.services.grafana.dataDir + "/var/lib/${config.services.prometheus.stateDir}" + ]; }; } diff --git a/modules/services/navidrome/default.nix b/modules/nixos/services/navidrome/default.nix similarity index 90% rename from modules/services/navidrome/default.nix rename to modules/nixos/services/navidrome/default.nix index 6c001fd..08c6a88 100644 --- a/modules/services/navidrome/default.nix +++ b/modules/nixos/services/navidrome/default.nix @@ -53,5 +53,9 @@ in inherit (cfg) port; } ]; + + my.system.persist.directories = [ + "/var/lib/${config.systemd.services.navidrome.serviceConfig.StateDirectory}" + ]; }; } diff --git a/modules/services/nextcloud/default.nix b/modules/nixos/services/nextcloud/default.nix similarity index 94% rename from modules/services/nextcloud/default.nix rename to modules/nixos/services/nextcloud/default.nix index 260e73e..b9578f8 100644 --- a/modules/services/nextcloud/default.nix +++ b/modules/nixos/services/nextcloud/default.nix @@ -82,5 +82,10 @@ in "${config.services.nextcloud.home}/data/appdata_*/preview" ]; }; + + my.system.persist.directories = [ + config.services.nextcloud.home + config.services.nextcloud.datadir + ]; }; } diff --git a/modules/services/nginx/default.nix b/modules/nixos/services/nginx/default.nix similarity index 98% rename from modules/services/nginx/default.nix rename to modules/nixos/services/nginx/default.nix index dcaaa0f..a28c2be 100644 --- a/modules/services/nginx/default.nix +++ b/modules/nixos/services/nginx/default.nix @@ -22,7 +22,6 @@ let example = 8080; description = '' Which port to proxy to, through 127.0.0.1, for this virtual host. - This option is incompatible with `root`. ''; }; @@ -40,8 +39,7 @@ let default = null; example = "/var/www/blog"; description = '' - The root folder for this virtual host. This option is incompatible - with `port`. + The root folder for this virtual host. ''; }; @@ -50,8 +48,7 @@ let default = null; example = "FIXME"; description = '' - The UNIX socket for this virtual host. This option is incompatible - with `port`. + The UNIX socket for this virtual host. ''; }; @@ -470,5 +467,9 @@ in } ]; }; + + my.system.persist.directories = [ + config.users.user.acme.home + ]; }; } diff --git a/modules/services/nginx/sso/default.nix b/modules/nixos/services/nginx/sso/default.nix similarity index 100% rename from modules/services/nginx/sso/default.nix rename to modules/nixos/services/nginx/sso/default.nix diff --git a/modules/services/nix-cache/default.nix b/modules/nixos/services/nix-cache/default.nix similarity index 100% rename from modules/services/nix-cache/default.nix rename to modules/nixos/services/nix-cache/default.nix diff --git a/modules/services/paperless/default.nix b/modules/nixos/services/paperless/default.nix similarity index 96% rename from modules/services/paperless/default.nix rename to modules/nixos/services/paperless/default.nix index 1ca1f66..702627d 100644 --- a/modules/services/paperless/default.nix +++ b/modules/nixos/services/paperless/default.nix @@ -164,5 +164,10 @@ in config.services.paperless.mediaDir ]; }; + + my.system.persist.directories = [ + config.services.paperless-ng.dataDir + config.services.paperless-ng.mediaDir + ]; }; } diff --git a/modules/services/pirate/default.nix b/modules/nixos/services/pirate/default.nix similarity index 92% rename from modules/services/pirate/default.nix rename to modules/nixos/services/pirate/default.nix index 59f9794..cfabc90 100644 --- a/modules/services/pirate/default.nix +++ b/modules/nixos/services/pirate/default.nix @@ -18,6 +18,11 @@ let enable = true; group = "media"; }; + + # Thankfully those old style services all define users with homes + my.system.persist.directories = [ + config.users.user.${service}.home + ]; }; mkRedirection = service: { diff --git a/modules/services/podgrab/default.nix b/modules/nixos/services/podgrab/default.nix similarity index 86% rename from modules/services/podgrab/default.nix rename to modules/nixos/services/podgrab/default.nix index 9793d60..2994fc8 100644 --- a/modules/services/podgrab/default.nix +++ b/modules/nixos/services/podgrab/default.nix @@ -37,5 +37,10 @@ in inherit (cfg) port; } ]; + + my.system.persist.directories = + builtins.map + (d: "/var/lib/${d}") + config.systemd.services.podgrab.serviceConfig.StateDirectory; }; } diff --git a/modules/services/postgresql-backup/default.nix b/modules/nixos/services/postgresql-backup/default.nix similarity index 87% rename from modules/services/postgresql-backup/default.nix rename to modules/nixos/services/postgresql-backup/default.nix index dff5494..3d6c03b 100644 --- a/modules/services/postgresql-backup/default.nix +++ b/modules/nixos/services/postgresql-backup/default.nix @@ -24,5 +24,9 @@ in (config.services.postgresqlBackup.location + "/*.prev.sql.gz") ]; }; + + my.system.persist.directories = [ + config.services.postgresqlBackup.location + ]; }; } diff --git a/modules/services/postgresql/default.nix b/modules/nixos/services/postgresql/default.nix similarity index 89% rename from modules/services/postgresql/default.nix rename to modules/nixos/services/postgresql/default.nix index 6f51f3e..175c1ce 100644 --- a/modules/services/postgresql/default.nix +++ b/modules/nixos/services/postgresql/default.nix @@ -18,6 +18,13 @@ in }; }) + # Only persist directory if the actual service is enabled + (lib.mkIf config.services.postgresql.enable { + my.system.persist.directories = [ + config.services.postgresql.dataDir + ]; + }) + # Taken from the manual (lib.mkIf cfg.upgradeScript { containers.temp-pg.config.services.postgresql = { diff --git a/modules/services/quassel/default.nix b/modules/nixos/services/quassel/default.nix similarity index 94% rename from modules/services/quassel/default.nix rename to modules/nixos/services/quassel/default.nix index ec686e1..18d084a 100644 --- a/modules/services/quassel/default.nix +++ b/modules/nixos/services/quassel/default.nix @@ -46,5 +46,9 @@ in # Because Quassel does not use the socket, I simply trust its connection authentication = "host quassel quassel localhost trust"; }; + + my.system.persist.directories = [ + config.services.quassel.dataDir + ]; }; } diff --git a/modules/services/rss-bridge/default.nix b/modules/nixos/services/rss-bridge/default.nix similarity index 88% rename from modules/services/rss-bridge/default.nix rename to modules/nixos/services/rss-bridge/default.nix index 85e37c2..66858dc 100644 --- a/modules/services/rss-bridge/default.nix +++ b/modules/nixos/services/rss-bridge/default.nix @@ -20,5 +20,9 @@ in forceSSL = true; useACMEHost = config.networking.domain; }; + + my.system.persist.directories = [ + config.services.rss-bridge.dataDir + ]; }; } diff --git a/modules/services/sabnzbd/default.nix b/modules/nixos/services/sabnzbd/default.nix similarity index 96% rename from modules/services/sabnzbd/default.nix rename to modules/nixos/services/sabnzbd/default.nix index 7ab145f..ef13d4b 100644 --- a/modules/services/sabnzbd/default.nix +++ b/modules/nixos/services/sabnzbd/default.nix @@ -25,6 +25,10 @@ in } ]; + my.system.persist.files = [ + config.services.sabnzbd.configFile + ]; + services.fail2ban.jails = { sabnzbd = '' enabled = true diff --git a/modules/services/ssh-server/default.nix b/modules/nixos/services/ssh-server/default.nix similarity index 70% rename from modules/services/ssh-server/default.nix rename to modules/nixos/services/ssh-server/default.nix index 9ae0fa8..0cabc6f 100644 --- a/modules/services/ssh-server/default.nix +++ b/modules/nixos/services/ssh-server/default.nix @@ -20,6 +20,14 @@ in }; }; + # Persist SSH keys + my.system.persist.files = [ + "/etc/ssh/ssh_host_ed25519_key" + "/etc/ssh/ssh_host_ed25519_key.pub" + "/etc/ssh/ssh_host_rsa_key" + "/etc/ssh/ssh_host_rsa_key.pub" + ]; + # Opens the relevant UDP ports. programs.mosh.enable = true; }; diff --git a/modules/services/tandoor-recipes/default.nix b/modules/nixos/services/tandoor-recipes/default.nix similarity index 95% rename from modules/services/tandoor-recipes/default.nix rename to modules/nixos/services/tandoor-recipes/default.nix index d78bef3..3688363 100644 --- a/modules/services/tandoor-recipes/default.nix +++ b/modules/nixos/services/tandoor-recipes/default.nix @@ -50,6 +50,7 @@ in systemd.services = { tandoor-recipes = { after = [ "postgresql.service" ]; + requires = [ "postgresql.service" ]; serviceConfig = { EnvironmentFile = cfg.secretKeyFile; @@ -75,5 +76,8 @@ in inherit (cfg) port; } ]; + + # FIXME: backup + # FIXME: persistence }; } diff --git a/modules/services/tlp/default.nix b/modules/nixos/services/tlp/default.nix similarity index 100% rename from modules/services/tlp/default.nix rename to modules/nixos/services/tlp/default.nix diff --git a/modules/services/transmission/default.nix b/modules/nixos/services/transmission/default.nix similarity index 96% rename from modules/services/transmission/default.nix rename to modules/nixos/services/transmission/default.nix index 28df477..37e4f0f 100644 --- a/modules/services/transmission/default.nix +++ b/modules/nixos/services/transmission/default.nix @@ -91,5 +91,9 @@ in allowedTCPPorts = [ cfg.peerPort ]; allowedUDPPorts = [ cfg.peerPort ]; }; + + my.system.persist.directories = [ + config.services.transmission.home + ]; }; } diff --git a/modules/services/vikunja/default.nix b/modules/nixos/services/vikunja/default.nix similarity index 99% rename from modules/services/vikunja/default.nix rename to modules/nixos/services/vikunja/default.nix index 1cdef5f..076dd4a 100644 --- a/modules/services/vikunja/default.nix +++ b/modules/nixos/services/vikunja/default.nix @@ -119,5 +119,7 @@ in config.services.vikunja.settings.files.basepath ]; }; + + # FIXME: persistence }; } diff --git a/modules/services/wireguard/default.nix b/modules/nixos/services/wireguard/default.nix similarity index 100% rename from modules/services/wireguard/default.nix rename to modules/nixos/services/wireguard/default.nix diff --git a/modules/services/wireguard/keys/milady/private-key.age b/modules/nixos/services/wireguard/keys/milady/private-key.age similarity index 100% rename from modules/services/wireguard/keys/milady/private-key.age rename to modules/nixos/services/wireguard/keys/milady/private-key.age diff --git a/modules/services/wireguard/keys/richelieu/private-key.age b/modules/nixos/services/wireguard/keys/richelieu/private-key.age similarity index 100% rename from modules/services/wireguard/keys/richelieu/private-key.age rename to modules/nixos/services/wireguard/keys/richelieu/private-key.age diff --git a/modules/services/wireguard/keys/secrets.nix b/modules/nixos/services/wireguard/keys/secrets.nix similarity index 100% rename from modules/services/wireguard/keys/secrets.nix rename to modules/nixos/services/wireguard/keys/secrets.nix diff --git a/modules/services/woodpecker/agent-docker/default.nix b/modules/nixos/services/woodpecker/agent-docker/default.nix similarity index 100% rename from modules/services/woodpecker/agent-docker/default.nix rename to modules/nixos/services/woodpecker/agent-docker/default.nix diff --git a/modules/services/woodpecker/agent-exec/default.nix b/modules/nixos/services/woodpecker/agent-exec/default.nix similarity index 100% rename from modules/services/woodpecker/agent-exec/default.nix rename to modules/nixos/services/woodpecker/agent-exec/default.nix diff --git a/modules/services/woodpecker/default.nix b/modules/nixos/services/woodpecker/default.nix similarity index 100% rename from modules/services/woodpecker/default.nix rename to modules/nixos/services/woodpecker/default.nix diff --git a/modules/services/woodpecker/server/default.nix b/modules/nixos/services/woodpecker/server/default.nix similarity index 92% rename from modules/services/woodpecker/server/default.nix rename to modules/nixos/services/woodpecker/server/default.nix index 152e707..d9f723b 100644 --- a/modules/services/woodpecker/server/default.nix +++ b/modules/nixos/services/woodpecker/server/default.nix @@ -12,7 +12,7 @@ in WOODPECKER_HOST = "https://woodpecker.${config.networking.domain}"; WOODPECKER_DATABASE_DRIVER = "postgres"; WOODPECKER_DATABASE_DATASOURCE = "postgres:///woodpecker?host=/run/postgresql"; - WOODPECKER_ADMIN = "${cfg.admin}"; + WOODPECKER_ADMIN = cfg.admin; WOODPECKER_SERVER_ADDR = ":${toString cfg.port}"; WOODPECKER_GRPC_ADDR = ":${toString cfg.rpcPort}"; @@ -24,6 +24,9 @@ in }; systemd.services.woodpecker-server = { + after = [ "postgresql.service" ]; + requires = [ "postgresql.service" ]; + serviceConfig = { # Set username for DB access User = "woodpecker"; diff --git a/modules/system/boot/default.nix b/modules/nixos/system/boot/default.nix similarity index 100% rename from modules/system/boot/default.nix rename to modules/nixos/system/boot/default.nix diff --git a/modules/system/default.nix b/modules/nixos/system/default.nix similarity index 85% rename from modules/system/default.nix rename to modules/nixos/system/default.nix index 9fe3b57..e317d96 100644 --- a/modules/system/default.nix +++ b/modules/nixos/system/default.nix @@ -9,7 +9,9 @@ ./language ./nix ./packages + ./persist ./podman + ./printing ./users ]; } diff --git a/modules/system/docker/default.nix b/modules/nixos/system/docker/default.nix similarity index 100% rename from modules/system/docker/default.nix rename to modules/nixos/system/docker/default.nix diff --git a/modules/system/documentation/default.nix b/modules/nixos/system/documentation/default.nix similarity index 100% rename from modules/system/documentation/default.nix rename to modules/nixos/system/documentation/default.nix diff --git a/modules/system/language/default.nix b/modules/nixos/system/language/default.nix similarity index 100% rename from modules/system/language/default.nix rename to modules/nixos/system/language/default.nix diff --git a/modules/system/nix/default.nix b/modules/nixos/system/nix/default.nix similarity index 100% rename from modules/system/nix/default.nix rename to modules/nixos/system/nix/default.nix diff --git a/modules/system/packages/default.nix b/modules/nixos/system/packages/default.nix similarity index 100% rename from modules/system/packages/default.nix rename to modules/nixos/system/packages/default.nix diff --git a/modules/system/podman/default.nix b/modules/nixos/system/podman/default.nix similarity index 100% rename from modules/system/podman/default.nix rename to modules/nixos/system/podman/default.nix diff --git a/profiles/printing/default.nix b/modules/nixos/system/printing/default.nix similarity index 90% rename from profiles/printing/default.nix rename to modules/nixos/system/printing/default.nix index 9965797..a4547ef 100644 --- a/profiles/printing/default.nix +++ b/modules/nixos/system/printing/default.nix @@ -1,10 +1,10 @@ { config, lib, pkgs, ... }: let - cfg = config.my.profiles.printing; + cfg = config.my.system.printing; in { - options.my.profiles.printing = with lib; { - enable = mkEnableOption "printing profile"; + options.my.system.printing = with lib; { + enable = mkEnableOption "printing configuration"; papersize = mkOption { type = with types; either str (enum [ diff --git a/modules/system/users/default.nix b/modules/nixos/system/users/default.nix similarity index 100% rename from modules/system/users/default.nix rename to modules/nixos/system/users/default.nix diff --git a/modules/system/users/ssh/aramis.pub b/modules/nixos/system/users/ssh/aramis.pub similarity index 100% rename from modules/system/users/ssh/aramis.pub rename to modules/nixos/system/users/ssh/aramis.pub diff --git a/modules/system/users/ssh/shared.pub b/modules/nixos/system/users/ssh/shared.pub similarity index 100% rename from modules/system/users/ssh/shared.pub rename to modules/nixos/system/users/ssh/shared.pub diff --git a/modules/system/persist/default.nix b/modules/system/persist/default.nix new file mode 100644 index 0000000..18302f3 --- /dev/null +++ b/modules/system/persist/default.nix @@ -0,0 +1,68 @@ +# Ephemeral root configuration +{ config, inputs, lib, ... }: +let + cfg = config.my.system.persist; +in +{ + imports = [ + inputs.impermanence.nixosModules.impermanence + ]; + + options.my.system.persist = with lib; { + enable = mkEnableOption "stateless system configuration"; + + mountPoint = lib.mkOption { + type = types.str; + default = "/persistent"; + example = "/etc/nix/persist"; + description = '' + Which mount point should be used to persist this system's files and + directories. + ''; + }; + + files = lib.mkOption { + type = with types; listOf str; + default = [ ]; + example = [ + "/etc/nix/id_rsa" + ]; + description = '' + Additional files in the root to link to persistent storage. + ''; + }; + + directories = lib.mkOption { + type = with types; listOf str; + default = [ ]; + example = [ + "/var/lib/libvirt" + ]; + description = '' + Additional directories in the root to link to persistent storage. + ''; + }; + }; + + config = lib.mkIf cfg.enable { + environment.persistence."${cfg.mountPoint}" = { + files = [ + "/etc/machine-id" + ] + ++ cfg.files + ; + + directories = [ + "/etc/nixos" + "/var/log" + "/var/lib/systemd/coredump" + ] + ++ (lib.optionals config.virtualisation.docker.enable [ + "/var/lib/docker" + ]) + # FIXME: podman + ++ cfg.directories + ; + }; + }; +} diff --git a/overlays/gruvbox-nvim-better-diff/colours.patch b/overlays/gruvbox-nvim-better-diff/colours.patch new file mode 100644 index 0000000..5b0d61a --- /dev/null +++ b/overlays/gruvbox-nvim-better-diff/colours.patch @@ -0,0 +1,28 @@ +From 416b3c9c5e783d173ac0fd5310a76c1b144b92c1 Mon Sep 17 00:00:00 2001 +From: eeeXun +Date: Thu, 19 Oct 2023 02:34:12 +0800 +Subject: Use better diff colours + +--- + README.md | 3 ++- + lua/gruvbox.lua | 7 ++++--- + 2 files changed, 6 insertions(+), 4 deletions(-) + +diff --git a/lua/gruvbox.lua b/lua/gruvbox.lua +index ceba0735..a319fc6a 100644 +--- a/lua/gruvbox.lua ++++ b/lua/gruvbox.lua +@@ -360,9 +361,9 @@ local function get_groups() + PmenuSel = { fg = colors.bg2, bg = colors.blue, bold = config.bold }, + PmenuSbar = { bg = colors.bg2 }, + PmenuThumb = { bg = colors.bg4 }, +- DiffDelete = { bg = colors.dark_red }, +- DiffAdd = { bg = colors.dark_green }, +- DiffChange = { bg = colors.dark_aqua }, +- DiffText = { bg = colors.yellow, fg = colors.bg0 }, ++ DiffDelete = { fg = colors.red }, ++ DiffAdd = { fg = colors.green }, ++ DiffChange = { fg = colors.aqua }, ++ DiffText = { fg = colors.yellow, bg = colors.bg0 }, + SpellCap = { link = "GruvboxBlueUnderline" }, + SpellBad = { link = "GruvboxRedUnderline" }, diff --git a/overlays/gruvbox-nvim-better-diff/default.nix b/overlays/gruvbox-nvim-better-diff/default.nix new file mode 100644 index 0000000..832e71d --- /dev/null +++ b/overlays/gruvbox-nvim-better-diff/default.nix @@ -0,0 +1,4 @@ +self: prev: +{ + vimPlugins = prev.vimPlugins.extend (self.callPackage ./generated.nix { }); +} diff --git a/overlays/gruvbox-nvim-better-diff/generated.nix b/overlays/gruvbox-nvim-better-diff/generated.nix new file mode 100644 index 0000000..50ea4ad --- /dev/null +++ b/overlays/gruvbox-nvim-better-diff/generated.nix @@ -0,0 +1,24 @@ +{ vimUtils, fetchFromGitHub }: + +_final: _prev: { + gruvbox-nvim = vimUtils.buildVimPlugin { + pname = "gruvbox.nvim"; + version = "2023-10-07"; + + src = fetchFromGitHub { + owner = "ellisonleao"; + repo = "gruvbox.nvim"; + rev = "477c62493c82684ed510c4f70eaf83802e398898"; + sha256 = "0250c24c6n6yri48l288irdawhqs16qna3y74rdkgjd2jvh66vdm"; + }; + + patches = [ + # Inspired by https://github.com/ellisonleao/gruvbox.nvim/pull/291 + ./colours.patch + ]; + + meta = { + homepage = "https://github.com/ellisonleao/gruvbox.nvim/"; + }; + }; +} diff --git a/overlays/tandoor-recipes-bump-allauth/bump-allauth.patch b/overlays/tandoor-recipes-bump-allauth/bump-allauth.patch new file mode 100644 index 0000000..84dfaee --- /dev/null +++ b/overlays/tandoor-recipes-bump-allauth/bump-allauth.patch @@ -0,0 +1,38 @@ +From 8f66f5c3ca61751a80cc133ff4c59019d6fca406 Mon Sep 17 00:00:00 2001 +From: Bruno BELANYI +Date: Tue, 31 Oct 2023 12:15:30 +0000 +Subject: [PATCH] Bump django-allauth from 0.54.0 to 0.58.1 + +See the backwards incompatible changes [1]. + +[1]: https://docs.allauth.org/en/latest/release-notes/recent.html#id10 +--- + recipes/settings.py | 1 + + requirements.txt | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/recipes/settings.py b/recipes/settings.py +index df2c2b1de..b836ea656 100644 +--- a/recipes/settings.py ++++ b/recipes/settings.py +@@ -218,6 +218,7 @@ + 'django.middleware.locale.LocaleMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', + 'cookbook.helper.scope_middleware.ScopeMiddleware', ++ 'allauth.account.middleware.AccountMiddleware', + ] + + if DEBUG_TOOLBAR: +diff --git a/requirements.txt b/requirements.txt +index 26d81b471..09ed2381a 100644 +--- a/requirements.txt ++++ b/requirements.txt +@@ -29,7 +29,7 @@ microdata==0.8.0 + Jinja2==3.1.2 + django-webpack-loader==1.8.1 + git+https://github.com/BITSOLVER/django-js-reverse@071e304fd600107bc64bbde6f2491f1fe049ec82 +-django-allauth==0.54.0 ++django-allauth==0.58.1 + recipe-scrapers==14.36.1 + django-scopes==2.0.0 + pytest==7.3.1 diff --git a/overlays/tandoor-recipes-bump-allauth/default.nix b/overlays/tandoor-recipes-bump-allauth/default.nix new file mode 100644 index 0000000..dfbfec9 --- /dev/null +++ b/overlays/tandoor-recipes-bump-allauth/default.nix @@ -0,0 +1,9 @@ +_self: prev: +{ + tandoor-recipes = prev.tandoor-recipes.overrideAttrs (oa: { + patches = (oa.patches or [ ]) ++ [ + # https://github.com/TandoorRecipes/recipes/pull/2706 + ./bump-allauth.patch + ]; + }); +} diff --git a/pkgs/default.nix b/pkgs/default.nix index 6558026..664b5a4 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -36,8 +36,6 @@ pkgs.lib.makeScope pkgs.newScope (pkgs: { vimix-cursors = pkgs.callPackage ./vimix-cursors { }; - volantes-cursors = pkgs.callPackage ./volantes-cursors { }; - wifi-qr = pkgs.callPackage ./wifi-qr { }; zsh-done = pkgs.callPackage ./zsh-done { }; diff --git a/pkgs/volantes-cursors/default.nix b/pkgs/volantes-cursors/default.nix deleted file mode 100644 index b2c7865..0000000 --- a/pkgs/volantes-cursors/default.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ lib, fetchFromGitHub, inkscape, stdenvNoCC, xcursorgen }: -stdenvNoCC.mkDerivation rec { - pname = "volantes-cursors"; - version = "unstable-2020-06-06"; - - src = fetchFromGitHub { - owner = "varlesh"; - repo = pname; - rev = "d1d290ff42cc4fa643716551bd0b02582b90fd2f"; - hash = "sha256-irMN/enoo90nYLfvSOScZoYdvhZKvqqp+grZB2BQD9o="; - }; - - nativeBuildInputs = [ - inkscape - xcursorgen - ]; - - postPatch = '' - patchShebangs . - # The script tries to build in its source directory... - substituteInPlace build.sh --replace \ - ': "''${BUILD_DIR:="$SCRIPT_DIR"/build}"' \ - "BUILD_DIR=$(pwd)/build" - substituteInPlace build.sh --replace \ - ': "''${OUT_DIR:="$SCRIPT_DIR"/dist}"' \ - "OUT_DIR=$(pwd)/dist" - ''; - - buildPhase = '' - HOME="$NIX_BUILD_ROOT" ./build.sh - ''; - - installPhase = '' - make install PREFIX= DESTDIR=$out/ - ''; - - meta = with lib; { - description = "Classic cursor with a flying style"; - homepage = "https://github.com/varlesh/volantes-cursors"; - license = licenses.gpl2Only; - maintainers = with maintainers; [ ambroisie ]; - platforms = platforms.linux; - }; -}