From 28187c3b8f34c0912d9f8ce5f74f415a6b77a1c2 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 26 Oct 2023 12:50:59 +0000 Subject: [PATCH 01/46] overlays: add 'gruvbox-nvim-better-diff' I dislike the new style of diff [1]. After somebody wrote a patch [2] I finally started experimenting with what looked best to me. This is using the old vibrant colours, which I like better. And avoids using `reverse = true` to not break high-lighting during visual selection. This is using an overlay as it is _much_ easier to refer to the internal colours in a `dark`/`light` agnostic way that way instead of the intended "use the palette way" (due to breaking changes in [3] which, incidentally, is the MR which changed diff high-lighting). [1]: https://github.com/ellisonleao/gruvbox.nvim/issues/290 [2]: https://github.com/ellisonleao/gruvbox.nvim/pull/291 [3]: https://github.com/ellisonleao/gruvbox.nvim/pull/280 --- .../gruvbox-nvim-better-diff/colours.patch | 28 +++++++++++++++++++ overlays/gruvbox-nvim-better-diff/default.nix | 4 +++ .../gruvbox-nvim-better-diff/generated.nix | 24 ++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 overlays/gruvbox-nvim-better-diff/colours.patch create mode 100644 overlays/gruvbox-nvim-better-diff/default.nix create mode 100644 overlays/gruvbox-nvim-better-diff/generated.nix 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/"; + }; + }; +} From 516df86b3f1fd64bbc29a109179d593e3af26e38 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 18 Oct 2023 15:26:35 +0000 Subject: [PATCH 02/46] home: vim: migrate to 'none-ls-nvim' This is the community-maintained fork of the plug-in. --- home/vim/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/vim/default.nix b/home/vim/default.nix index ec18f5c..871bf40 100644 --- a/home/vim/default.nix +++ b/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 From bd69e281434f4a4a129b5b08a2e7c287f3aba9b0 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 26 Oct 2023 13:47:29 +0000 Subject: [PATCH 03/46] home: firefox: migrate deprecated option --- home/firefox/default.nix | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/home/firefox/default.nix b/home/firefox/default.nix index 7374b63..85a1d59 100644 --- a/home/firefox/default.nix +++ b/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 ); }; From c01f657e8d46f213ac5906924ff37013275830e3 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 26 Oct 2023 19:36:32 +0100 Subject: [PATCH 04/46] lib: lists: add 'nullableToList' --- lib/lists.nix | 6 ++++++ 1 file changed, 6 insertions(+) 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 [ ]; } From 3a1ccea1425fdfe60584b6729014d3f12799c87d Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 26 Oct 2023 19:37:04 +0100 Subject: [PATCH 05/46] home: tmux: add 'trueColorTerminals' This uses the recommended way of enabling true-color [1]. [1]: https://github.com/tmux/tmux/wiki/FAQ#how-do-i-use-rgb-colour --- home/tmux/default.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/home/tmux/default.nix b/home/tmux/default.nix index e554fd0..08aeb55 100644 --- a/home/tmux/default.nix +++ b/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 + } ''; }; } From 42ab12179e16e7af7e467365d76607d5ae7ca15f Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 26 Oct 2023 19:39:44 +0100 Subject: [PATCH 06/46] hosts: homes: mousqueton: use 'trueColorTerminals' Ah, much better with an actual option for this :-). --- hosts/homes/ambroisie@mousqueton/default.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hosts/homes/ambroisie@mousqueton/default.nix b/hosts/homes/ambroisie@mousqueton/default.nix index ac73da6..7f9d659 100644 --- a/hosts/homes/ambroisie@mousqueton/default.nix +++ b/hosts/homes/ambroisie@mousqueton/default.nix @@ -20,8 +20,6 @@ # I use scripts that use the passthrough sequence often on this host my.home.tmux.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 + my.home.tmux.trueColorTerminals = [ "xterm-256color" ]; } From 6a8f93df1ffb9abe172fae8c6f228bb461096084 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 28 Oct 2023 12:14:42 +0100 Subject: [PATCH 07/46] modules: services: nginx: fix obsolete doc It's annoying to keep it in sync when adding a new incompatible option. --- modules/services/nginx/default.nix | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/services/nginx/default.nix b/modules/services/nginx/default.nix index dcaaa0f..6ca2e42 100644 --- a/modules/services/nginx/default.nix +++ b/modules/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. ''; }; From ca4fac3c546725014b20778c4b4eca6663356cac Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 30 Oct 2023 13:33:27 +0000 Subject: [PATCH 08/46] hosts: nixos: porthos: fix tmux 24-bit color Well at least this fixes it for the usual client (my laptop). --- hosts/nixos/porthos/home.nix | 6 ++++++ 1 file changed, 6 insertions(+) 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; }; From 9b71708e3a49563e4fe8ded452db8ff0c63f1edd Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 31 Oct 2023 11:56:39 +0000 Subject: [PATCH 09/46] flake: bump inputs --- flake.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) 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": { From 249ee14d39515928a87915b78226033385ec3eb6 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 31 Oct 2023 12:12:20 +0000 Subject: [PATCH 10/46] overlays: add 'tandoor-recipes-bump-allauth' This should only be temporary until they release a new version which _does_ support the middleware (see [1]). [1]: https://github.com/TandoorRecipes/recipes/pull/2706 --- .../bump-allauth.patch | 38 +++++++++++++++++++ .../tandoor-recipes-bump-allauth/default.nix | 9 +++++ 2 files changed, 47 insertions(+) create mode 100644 overlays/tandoor-recipes-bump-allauth/bump-allauth.patch create mode 100644 overlays/tandoor-recipes-bump-allauth/default.nix 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 + ]; + }); +} From 8ad02dd74daad3010b20ab9f2c661906066521d2 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 31 Oct 2023 14:00:47 +0000 Subject: [PATCH 11/46] hosts: nixos: porthos: system: disable cache We're never going to get a cache hit, since this is the host for that cache. --- hosts/nixos/porthos/default.nix | 1 + hosts/nixos/porthos/system.nix | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 hosts/nixos/porthos/system.nix 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/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; + }; + }; + }; +} From 7f857ab6617f3f0717bcfbdf3137526a10ed40f9 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 31 Oct 2023 14:56:18 +0000 Subject: [PATCH 12/46] hosts: homes: mousqueton: fix formatting --- hosts/homes/ambroisie@mousqueton/default.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/hosts/homes/ambroisie@mousqueton/default.nix b/hosts/homes/ambroisie@mousqueton/default.nix index 7f9d659..7fcd356 100644 --- a/hosts/homes/ambroisie@mousqueton/default.nix +++ b/hosts/homes/ambroisie@mousqueton/default.nix @@ -17,9 +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; - # HTerm uses `xterm-256color` as its `$TERM`, so use that here - my.home.tmux.trueColorTerminals = [ "xterm-256color" ]; + # HTerm uses `xterm-256color` as its `$TERM`, so use that here + trueColorTerminals = [ "xterm-256color" ]; + }; + }; } From 830e7bb8650baa2707a4e58f4a4c3050c8e5404c Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 6 Nov 2023 20:54:40 +0000 Subject: [PATCH 13/46] modules: services: woodpecker: fix interpolation --- modules/services/woodpecker/server/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/services/woodpecker/server/default.nix b/modules/services/woodpecker/server/default.nix index 152e707..161f76c 100644 --- a/modules/services/woodpecker/server/default.nix +++ b/modules/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}"; From cc331b73c7f925a5c37a7f7a508ccda13919c9f2 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 6 Nov 2023 20:55:53 +0000 Subject: [PATCH 14/46] treewide: fix postgres service dependencies Some were missing a `requires` even though they had `after`, and woodpecker was missing it entirely. --- modules/services/drone/server/default.nix | 1 + modules/services/tandoor-recipes/default.nix | 1 + modules/services/woodpecker/server/default.nix | 3 +++ 3 files changed, 5 insertions(+) diff --git a/modules/services/drone/server/default.nix b/modules/services/drone/server/default.nix index 1202010..0f56d29 100644 --- a/modules/services/drone/server/default.nix +++ b/modules/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/tandoor-recipes/default.nix b/modules/services/tandoor-recipes/default.nix index d78bef3..83177c8 100644 --- a/modules/services/tandoor-recipes/default.nix +++ b/modules/services/tandoor-recipes/default.nix @@ -50,6 +50,7 @@ in systemd.services = { tandoor-recipes = { after = [ "postgresql.service" ]; + requires = [ "postgresql.service" ]; serviceConfig = { EnvironmentFile = cfg.secretKeyFile; diff --git a/modules/services/woodpecker/server/default.nix b/modules/services/woodpecker/server/default.nix index 161f76c..d9f723b 100644 --- a/modules/services/woodpecker/server/default.nix +++ b/modules/services/woodpecker/server/default.nix @@ -24,6 +24,9 @@ in }; systemd.services.woodpecker-server = { + after = [ "postgresql.service" ]; + requires = [ "postgresql.service" ]; + serviceConfig = { # Set username for DB access User = "woodpecker"; From 32ec402ad0b239eade07003821bdd00ac9960fc9 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 7 Nov 2023 16:51:34 +0000 Subject: [PATCH 15/46] pkgs: remove volantes-cursors It has been packaged upstream. --- pkgs/default.nix | 2 -- pkgs/volantes-cursors/default.nix | 44 ------------------------------- 2 files changed, 46 deletions(-) delete mode 100644 pkgs/volantes-cursors/default.nix 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; - }; -} From 27564cad42cfd075c5ddc28129e09c14c9e3f6a6 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 11 Nov 2023 17:56:56 +0000 Subject: [PATCH 16/46] modules: system: printing: move from 'profiles' This isn't really a cross-cutting module, it should be a module rather than a profile. --- hosts/nixos/aramis/default.nix | 1 + hosts/nixos/aramis/profiles.nix | 2 -- hosts/nixos/aramis/system.nix | 10 ++++++++++ modules/system/default.nix | 1 + {profiles => modules/system}/printing/default.nix | 6 +++--- profiles/default.nix | 1 - 6 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 hosts/nixos/aramis/system.nix rename {profiles => modules/system}/printing/default.nix (90%) 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/modules/system/default.nix b/modules/system/default.nix index 9fe3b57..e7a4dd3 100644 --- a/modules/system/default.nix +++ b/modules/system/default.nix @@ -10,6 +10,7 @@ ./nix ./packages ./podman + ./printing ./users ]; } diff --git a/profiles/printing/default.nix b/modules/system/printing/default.nix similarity index 90% rename from profiles/printing/default.nix rename to modules/system/printing/default.nix index 9965797..a4547ef 100644 --- a/profiles/printing/default.nix +++ b/modules/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/profiles/default.nix b/profiles/default.nix index f7914a1..43d5a84 100644 --- a/profiles/default.nix +++ b/profiles/default.nix @@ -6,7 +6,6 @@ ./devices ./gtk ./laptop - ./printing ./wm ./x ]; From b52e56ed08bea277ceaad9d6454ebc4ff33a29e3 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 9 Nov 2023 13:40:58 +0000 Subject: [PATCH 17/46] modules: home: use 'self'-relative import --- modules/home/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/default.nix b/modules/home/default.nix index 1e0e0aa..4849ab2 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -14,7 +14,7 @@ in 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; + users.${config.my.user.name} = import "${inputs.self}/home"; # Nix Flakes compatibility useGlobalPkgs = true; From c856933803d090a882f2cdb449e354cb65646ade Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 9 Nov 2023 13:37:46 +0000 Subject: [PATCH 18/46] nixos: create 'modules/nixos' folder Let's consolidate all modules under one path, so that NixOS, home-manager, and nix-darwin (if I ever end up using it down the line) would go under the same folder. --- flake/nixos.nix | 2 +- modules/{ => nixos}/default.nix | 0 modules/{ => nixos}/hardware/bluetooth/default.nix | 0 modules/{ => nixos}/hardware/default.nix | 0 modules/{ => nixos}/hardware/ergodox/default.nix | 0 modules/{ => nixos}/hardware/firmware/default.nix | 0 modules/{ => nixos}/hardware/mx-ergo/default.nix | 0 modules/{ => nixos}/hardware/networking/default.nix | 0 modules/{ => nixos}/hardware/sound/default.nix | 0 modules/{ => nixos}/hardware/upower/default.nix | 0 modules/{ => nixos}/home/default.nix | 0 modules/{ => nixos}/programs/default.nix | 0 modules/{ => nixos}/programs/steam/default.nix | 0 modules/{ => nixos}/secrets/default.nix | 0 modules/{ => nixos}/secrets/secrets.nix | 0 .../secrets/users/ambroisie/hashed-password.age | 0 .../secrets/users/root/hashed-password.age | Bin modules/{ => nixos}/services/adblock/default.nix | 0 modules/{ => nixos}/services/backup/default.nix | 0 modules/{ => nixos}/services/blog/default.nix | 0 .../{ => nixos}/services/calibre-web/default.nix | 0 modules/{ => nixos}/services/default.nix | 0 modules/{ => nixos}/services/drone/default.nix | 0 .../services/drone/runner-docker/default.nix | 0 .../services/drone/runner-exec/default.nix | 0 .../{ => nixos}/services/drone/server/default.nix | 0 modules/{ => nixos}/services/fail2ban/default.nix | 0 modules/{ => nixos}/services/flood/default.nix | 0 modules/{ => nixos}/services/gitea/default.nix | 0 modules/{ => nixos}/services/grocy/default.nix | 0 modules/{ => nixos}/services/indexers/default.nix | 0 modules/{ => nixos}/services/jellyfin/default.nix | 0 modules/{ => nixos}/services/lohr/default.nix | 0 modules/{ => nixos}/services/matrix/default.nix | 0 modules/{ => nixos}/services/miniflux/default.nix | 0 modules/{ => nixos}/services/monitoring/default.nix | 0 modules/{ => nixos}/services/navidrome/default.nix | 0 modules/{ => nixos}/services/nextcloud/default.nix | 0 modules/{ => nixos}/services/nginx/default.nix | 0 modules/{ => nixos}/services/nginx/sso/default.nix | 0 modules/{ => nixos}/services/nix-cache/default.nix | 0 modules/{ => nixos}/services/paperless/default.nix | 0 modules/{ => nixos}/services/pirate/default.nix | 0 modules/{ => nixos}/services/podgrab/default.nix | 0 .../services/postgresql-backup/default.nix | 0 modules/{ => nixos}/services/postgresql/default.nix | 0 modules/{ => nixos}/services/quassel/default.nix | 0 modules/{ => nixos}/services/rss-bridge/default.nix | 0 modules/{ => nixos}/services/sabnzbd/default.nix | 0 modules/{ => nixos}/services/ssh-server/default.nix | 0 .../services/tandoor-recipes/default.nix | 0 modules/{ => nixos}/services/tlp/default.nix | 0 .../{ => nixos}/services/transmission/default.nix | 0 modules/{ => nixos}/services/vikunja/default.nix | 0 modules/{ => nixos}/services/wireguard/default.nix | 0 .../services/wireguard/keys/milady/private-key.age | 0 .../wireguard/keys/richelieu/private-key.age | 0 .../{ => nixos}/services/wireguard/keys/secrets.nix | 0 .../services/woodpecker/agent-docker/default.nix | 0 .../services/woodpecker/agent-exec/default.nix | 0 modules/{ => nixos}/services/woodpecker/default.nix | 0 .../services/woodpecker/server/default.nix | 0 modules/{ => nixos}/system/boot/default.nix | 0 modules/{ => nixos}/system/default.nix | 0 modules/{ => nixos}/system/docker/default.nix | 0 .../{ => nixos}/system/documentation/default.nix | 0 modules/{ => nixos}/system/language/default.nix | 0 modules/{ => nixos}/system/nix/default.nix | 0 modules/{ => nixos}/system/packages/default.nix | 0 modules/{ => nixos}/system/podman/default.nix | 0 modules/{ => nixos}/system/printing/default.nix | 0 modules/{ => nixos}/system/users/default.nix | 0 modules/{ => nixos}/system/users/ssh/aramis.pub | 0 modules/{ => nixos}/system/users/ssh/shared.pub | 0 74 files changed, 1 insertion(+), 1 deletion(-) rename modules/{ => nixos}/default.nix (100%) rename modules/{ => nixos}/hardware/bluetooth/default.nix (100%) rename modules/{ => nixos}/hardware/default.nix (100%) rename modules/{ => nixos}/hardware/ergodox/default.nix (100%) rename modules/{ => nixos}/hardware/firmware/default.nix (100%) rename modules/{ => nixos}/hardware/mx-ergo/default.nix (100%) rename modules/{ => nixos}/hardware/networking/default.nix (100%) rename modules/{ => nixos}/hardware/sound/default.nix (100%) rename modules/{ => nixos}/hardware/upower/default.nix (100%) rename modules/{ => nixos}/home/default.nix (100%) rename modules/{ => nixos}/programs/default.nix (100%) rename modules/{ => nixos}/programs/steam/default.nix (100%) rename modules/{ => nixos}/secrets/default.nix (100%) rename modules/{ => nixos}/secrets/secrets.nix (100%) rename modules/{ => nixos}/secrets/users/ambroisie/hashed-password.age (100%) rename modules/{ => nixos}/secrets/users/root/hashed-password.age (100%) rename modules/{ => nixos}/services/adblock/default.nix (100%) rename modules/{ => nixos}/services/backup/default.nix (100%) rename modules/{ => nixos}/services/blog/default.nix (100%) rename modules/{ => nixos}/services/calibre-web/default.nix (100%) rename modules/{ => nixos}/services/default.nix (100%) rename modules/{ => nixos}/services/drone/default.nix (100%) rename modules/{ => nixos}/services/drone/runner-docker/default.nix (100%) rename modules/{ => nixos}/services/drone/runner-exec/default.nix (100%) rename modules/{ => nixos}/services/drone/server/default.nix (100%) rename modules/{ => nixos}/services/fail2ban/default.nix (100%) rename modules/{ => nixos}/services/flood/default.nix (100%) rename modules/{ => nixos}/services/gitea/default.nix (100%) rename modules/{ => nixos}/services/grocy/default.nix (100%) rename modules/{ => nixos}/services/indexers/default.nix (100%) rename modules/{ => nixos}/services/jellyfin/default.nix (100%) rename modules/{ => nixos}/services/lohr/default.nix (100%) rename modules/{ => nixos}/services/matrix/default.nix (100%) rename modules/{ => nixos}/services/miniflux/default.nix (100%) rename modules/{ => nixos}/services/monitoring/default.nix (100%) rename modules/{ => nixos}/services/navidrome/default.nix (100%) rename modules/{ => nixos}/services/nextcloud/default.nix (100%) rename modules/{ => nixos}/services/nginx/default.nix (100%) rename modules/{ => nixos}/services/nginx/sso/default.nix (100%) rename modules/{ => nixos}/services/nix-cache/default.nix (100%) rename modules/{ => nixos}/services/paperless/default.nix (100%) rename modules/{ => nixos}/services/pirate/default.nix (100%) rename modules/{ => nixos}/services/podgrab/default.nix (100%) rename modules/{ => nixos}/services/postgresql-backup/default.nix (100%) rename modules/{ => nixos}/services/postgresql/default.nix (100%) rename modules/{ => nixos}/services/quassel/default.nix (100%) rename modules/{ => nixos}/services/rss-bridge/default.nix (100%) rename modules/{ => nixos}/services/sabnzbd/default.nix (100%) rename modules/{ => nixos}/services/ssh-server/default.nix (100%) rename modules/{ => nixos}/services/tandoor-recipes/default.nix (100%) rename modules/{ => nixos}/services/tlp/default.nix (100%) rename modules/{ => nixos}/services/transmission/default.nix (100%) rename modules/{ => nixos}/services/vikunja/default.nix (100%) rename modules/{ => nixos}/services/wireguard/default.nix (100%) rename modules/{ => nixos}/services/wireguard/keys/milady/private-key.age (100%) rename modules/{ => nixos}/services/wireguard/keys/richelieu/private-key.age (100%) rename modules/{ => nixos}/services/wireguard/keys/secrets.nix (100%) rename modules/{ => nixos}/services/woodpecker/agent-docker/default.nix (100%) rename modules/{ => nixos}/services/woodpecker/agent-exec/default.nix (100%) rename modules/{ => nixos}/services/woodpecker/default.nix (100%) rename modules/{ => nixos}/services/woodpecker/server/default.nix (100%) rename modules/{ => nixos}/system/boot/default.nix (100%) rename modules/{ => nixos}/system/default.nix (100%) rename modules/{ => nixos}/system/docker/default.nix (100%) rename modules/{ => nixos}/system/documentation/default.nix (100%) rename modules/{ => nixos}/system/language/default.nix (100%) rename modules/{ => nixos}/system/nix/default.nix (100%) rename modules/{ => nixos}/system/packages/default.nix (100%) rename modules/{ => nixos}/system/podman/default.nix (100%) rename modules/{ => nixos}/system/printing/default.nix (100%) rename modules/{ => nixos}/system/users/default.nix (100%) rename modules/{ => nixos}/system/users/ssh/aramis.pub (100%) rename modules/{ => nixos}/system/users/ssh/shared.pub (100%) diff --git a/flake/nixos.nix b/flake/nixos.nix index 9eb6388..541e658 100644 --- a/flake/nixos.nix +++ b/flake/nixos.nix @@ -13,7 +13,7 @@ let ]; } # Include generic settings - "${self}/modules" + "${self}/modules/nixos" # Include bundles of settings "${self}/profiles" ]; diff --git a/modules/default.nix b/modules/nixos/default.nix similarity index 100% rename from modules/default.nix rename to modules/nixos/default.nix diff --git a/modules/hardware/bluetooth/default.nix b/modules/nixos/hardware/bluetooth/default.nix similarity index 100% rename from modules/hardware/bluetooth/default.nix rename to modules/nixos/hardware/bluetooth/default.nix 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 100% rename from modules/hardware/networking/default.nix rename to modules/nixos/hardware/networking/default.nix 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/home/default.nix b/modules/nixos/home/default.nix similarity index 100% rename from modules/home/default.nix rename to modules/nixos/home/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 100% rename from modules/services/blog/default.nix rename to modules/nixos/services/blog/default.nix diff --git a/modules/services/calibre-web/default.nix b/modules/nixos/services/calibre-web/default.nix similarity index 100% rename from modules/services/calibre-web/default.nix rename to modules/nixos/services/calibre-web/default.nix 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 100% rename from modules/services/drone/server/default.nix rename to modules/nixos/services/drone/server/default.nix 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 100% rename from modules/services/flood/default.nix rename to modules/nixos/services/flood/default.nix diff --git a/modules/services/gitea/default.nix b/modules/nixos/services/gitea/default.nix similarity index 100% rename from modules/services/gitea/default.nix rename to modules/nixos/services/gitea/default.nix diff --git a/modules/services/grocy/default.nix b/modules/nixos/services/grocy/default.nix similarity index 100% rename from modules/services/grocy/default.nix rename to modules/nixos/services/grocy/default.nix diff --git a/modules/services/indexers/default.nix b/modules/nixos/services/indexers/default.nix similarity index 100% rename from modules/services/indexers/default.nix rename to modules/nixos/services/indexers/default.nix diff --git a/modules/services/jellyfin/default.nix b/modules/nixos/services/jellyfin/default.nix similarity index 100% rename from modules/services/jellyfin/default.nix rename to modules/nixos/services/jellyfin/default.nix diff --git a/modules/services/lohr/default.nix b/modules/nixos/services/lohr/default.nix similarity index 100% rename from modules/services/lohr/default.nix rename to modules/nixos/services/lohr/default.nix diff --git a/modules/services/matrix/default.nix b/modules/nixos/services/matrix/default.nix similarity index 100% rename from modules/services/matrix/default.nix rename to modules/nixos/services/matrix/default.nix diff --git a/modules/services/miniflux/default.nix b/modules/nixos/services/miniflux/default.nix similarity index 100% rename from modules/services/miniflux/default.nix rename to modules/nixos/services/miniflux/default.nix diff --git a/modules/services/monitoring/default.nix b/modules/nixos/services/monitoring/default.nix similarity index 100% rename from modules/services/monitoring/default.nix rename to modules/nixos/services/monitoring/default.nix diff --git a/modules/services/navidrome/default.nix b/modules/nixos/services/navidrome/default.nix similarity index 100% rename from modules/services/navidrome/default.nix rename to modules/nixos/services/navidrome/default.nix diff --git a/modules/services/nextcloud/default.nix b/modules/nixos/services/nextcloud/default.nix similarity index 100% rename from modules/services/nextcloud/default.nix rename to modules/nixos/services/nextcloud/default.nix diff --git a/modules/services/nginx/default.nix b/modules/nixos/services/nginx/default.nix similarity index 100% rename from modules/services/nginx/default.nix rename to modules/nixos/services/nginx/default.nix 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 100% rename from modules/services/paperless/default.nix rename to modules/nixos/services/paperless/default.nix diff --git a/modules/services/pirate/default.nix b/modules/nixos/services/pirate/default.nix similarity index 100% rename from modules/services/pirate/default.nix rename to modules/nixos/services/pirate/default.nix diff --git a/modules/services/podgrab/default.nix b/modules/nixos/services/podgrab/default.nix similarity index 100% rename from modules/services/podgrab/default.nix rename to modules/nixos/services/podgrab/default.nix diff --git a/modules/services/postgresql-backup/default.nix b/modules/nixos/services/postgresql-backup/default.nix similarity index 100% rename from modules/services/postgresql-backup/default.nix rename to modules/nixos/services/postgresql-backup/default.nix diff --git a/modules/services/postgresql/default.nix b/modules/nixos/services/postgresql/default.nix similarity index 100% rename from modules/services/postgresql/default.nix rename to modules/nixos/services/postgresql/default.nix diff --git a/modules/services/quassel/default.nix b/modules/nixos/services/quassel/default.nix similarity index 100% rename from modules/services/quassel/default.nix rename to modules/nixos/services/quassel/default.nix diff --git a/modules/services/rss-bridge/default.nix b/modules/nixos/services/rss-bridge/default.nix similarity index 100% rename from modules/services/rss-bridge/default.nix rename to modules/nixos/services/rss-bridge/default.nix diff --git a/modules/services/sabnzbd/default.nix b/modules/nixos/services/sabnzbd/default.nix similarity index 100% rename from modules/services/sabnzbd/default.nix rename to modules/nixos/services/sabnzbd/default.nix diff --git a/modules/services/ssh-server/default.nix b/modules/nixos/services/ssh-server/default.nix similarity index 100% rename from modules/services/ssh-server/default.nix rename to modules/nixos/services/ssh-server/default.nix diff --git a/modules/services/tandoor-recipes/default.nix b/modules/nixos/services/tandoor-recipes/default.nix similarity index 100% rename from modules/services/tandoor-recipes/default.nix rename to modules/nixos/services/tandoor-recipes/default.nix 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 100% rename from modules/services/transmission/default.nix rename to modules/nixos/services/transmission/default.nix diff --git a/modules/services/vikunja/default.nix b/modules/nixos/services/vikunja/default.nix similarity index 100% rename from modules/services/vikunja/default.nix rename to modules/nixos/services/vikunja/default.nix 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 100% rename from modules/services/woodpecker/server/default.nix rename to modules/nixos/services/woodpecker/server/default.nix 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 100% rename from modules/system/default.nix rename to modules/nixos/system/default.nix 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/modules/system/printing/default.nix b/modules/nixos/system/printing/default.nix similarity index 100% rename from modules/system/printing/default.nix rename to modules/nixos/system/printing/default.nix 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 From 65a8f7c4813dd442da29639766e6d6e8ccff5a1d Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 9 Nov 2023 13:43:55 +0000 Subject: [PATCH 19/46] home: create 'modules/home' folder Consolidating all modules under the same path, to clear out the top-level directory. --- flake/home-manager.nix | 2 +- {home => modules/home}/aliases/default.nix | 0 {home => modules/home}/atuin/default.nix | 0 {home => modules/home}/bat/default.nix | 0 {home => modules/home}/bitwarden/default.nix | 0 {home => modules/home}/bluetooth/default.nix | 0 {home => modules/home}/calibre/default.nix | 0 {home => modules/home}/comma/default.nix | 0 {home => modules/home}/default.nix | 0 {home => modules/home}/dircolors/default.nix | 0 {home => modules/home}/direnv/default.nix | 0 {home => modules/home}/direnv/lib/nix.sh | 0 {home => modules/home}/direnv/lib/postgres.sh | 0 {home => modules/home}/direnv/lib/python.sh | 0 {home => modules/home}/discord/default.nix | 0 {home => modules/home}/documentation/default.nix | 0 {home => modules/home}/feh/default.nix | 0 {home => modules/home}/firefox/default.nix | 0 .../home}/firefox/tridactyl/default.nix | 0 .../home}/firefox/tridactyl/tridactylrc | 0 {home => modules/home}/flameshot/default.nix | 0 {home => modules/home}/fzf/default.nix | 0 {home => modules/home}/gammastep/default.nix | 0 {home => modules/home}/gdb/default.nix | 0 {home => modules/home}/gdb/gdbinit | 0 {home => modules/home}/git/default.ignore | 0 {home => modules/home}/git/default.nix | 0 {home => modules/home}/gpg/default.nix | 0 {home => modules/home}/gtk/default.nix | 0 {home => modules/home}/htop/default.nix | 0 {home => modules/home}/jq/default.nix | 0 {home => modules/home}/mail/accounts/default.nix | 0 {home => modules/home}/mail/default.nix | 0 {home => modules/home}/mail/himalaya/default.nix | 0 {home => modules/home}/mail/msmtp/default.nix | 0 {home => modules/home}/mpv/default.nix | 0 {home => modules/home}/nix-index/default.nix | 0 {home => modules/home}/nix/default.nix | 0 {home => modules/home}/nixpkgs/default.nix | 0 {home => modules/home}/nm-applet/default.nix | 0 {home => modules/home}/packages/default.nix | 0 {home => modules/home}/pager/default.nix | 0 {home => modules/home}/power-alert/default.nix | 0 {home => modules/home}/secrets/default.nix | 0 {home => modules/home}/secrets/github/token.age | Bin {home => modules/home}/secrets/secrets.nix | 0 {home => modules/home}/ssh/default.nix | 0 .../home}/terminal/alacritty/default.nix | 0 {home => modules/home}/terminal/default.nix | 0 {home => modules/home}/terminal/termite/default.nix | 0 {home => modules/home}/tmux/default.nix | 0 {home => modules/home}/udiskie/default.nix | 0 .../home}/vim/after/ftplugin/beancount.vim | 0 {home => modules/home}/vim/after/ftplugin/cmake.vim | 0 .../home}/vim/after/ftplugin/fugitive.vim | 0 .../home}/vim/after/ftplugin/gitcommit.vim | 0 .../home}/vim/after/ftplugin/gitconfig.vim | 0 .../home}/vim/after/ftplugin/haskell.vim | 0 {home => modules/home}/vim/after/ftplugin/help.vim | 0 {home => modules/home}/vim/after/ftplugin/mail.vim | 0 {home => modules/home}/vim/after/ftplugin/make.vim | 0 .../home}/vim/after/ftplugin/markdown.vim | 0 {home => modules/home}/vim/after/ftplugin/netrw.vim | 0 {home => modules/home}/vim/after/ftplugin/nix.vim | 0 .../home}/vim/after/ftplugin/python.vim | 0 {home => modules/home}/vim/after/ftplugin/rust.vim | 0 {home => modules/home}/vim/after/ftplugin/tex.vim | 0 {home => modules/home}/vim/after/ftplugin/tiger.vim | 0 {home => modules/home}/vim/after/ftplugin/yaml.vim | 0 .../home}/vim/after/plugin/mappings/commentary.lua | 0 .../home}/vim/after/plugin/mappings/misc.lua | 0 .../home}/vim/after/plugin/mappings/telescope.lua | 0 .../plugin/mappings/tree-sitter-textobjects.lua | 0 .../home}/vim/after/plugin/mappings/unimpaired.lua | 0 {home => modules/home}/vim/autoload/ftplugined.vim | 0 {home => modules/home}/vim/default.nix | 0 {home => modules/home}/vim/ftdetect/automake.lua | 0 {home => modules/home}/vim/ftdetect/direnv.lua | 0 {home => modules/home}/vim/ftdetect/kbuild.lua | 0 {home => modules/home}/vim/ftdetect/kconfig.lua | 0 {home => modules/home}/vim/ftdetect/tiger.lua | 0 {home => modules/home}/vim/ftdetect/tikz.lua | 0 {home => modules/home}/vim/init.vim | 0 {home => modules/home}/vim/lua/ambroisie/lsp.lua | 0 {home => modules/home}/vim/lua/ambroisie/utils.lua | 0 {home => modules/home}/vim/plugin/abbreviations.lua | 0 {home => modules/home}/vim/plugin/numbertoggle.lua | 0 .../home}/vim/plugin/settings/completion.lua | 0 .../home}/vim/plugin/settings/dressing.lua | 0 .../home}/vim/plugin/settings/fastfold.lua | 0 .../home}/vim/plugin/settings/formatting.lua | 0 {home => modules/home}/vim/plugin/settings/git.lua | 0 .../home}/vim/plugin/settings/lsp-lines.lua | 0 .../home}/vim/plugin/settings/lspconfig.lua | 0 .../home}/vim/plugin/settings/lualine.lua | 0 .../home}/vim/plugin/settings/luasnip.lua | 0 .../home}/vim/plugin/settings/null-ls.lua | 0 {home => modules/home}/vim/plugin/settings/ssh.lua | 0 .../home}/vim/plugin/settings/surround.lua | 0 .../home}/vim/plugin/settings/telescope.lua | 0 .../home}/vim/plugin/settings/tree-sitter.lua | 0 .../home}/vim/plugin/settings/which-key.lua | 0 {home => modules/home}/vim/plugin/signtoggle.lua | 0 {home => modules/home}/wm/cursor/default.nix | 0 {home => modules/home}/wm/default.nix | 0 {home => modules/home}/wm/dunst/default.nix | 0 {home => modules/home}/wm/i3/default.nix | 0 {home => modules/home}/wm/i3bar/default.nix | 0 {home => modules/home}/wm/rofi/default.nix | 0 {home => modules/home}/wm/screen-lock/default.nix | 0 {home => modules/home}/x/default.nix | 0 {home => modules/home}/x/keyboard/default.nix | 0 {home => modules/home}/xdg/default.nix | 0 {home => modules/home}/zathura/default.nix | 0 {home => modules/home}/zsh/completion-styles.zsh | 0 {home => modules/home}/zsh/default.nix | 0 {home => modules/home}/zsh/extra-mappings.zsh | 0 {home => modules/home}/zsh/options.zsh | 0 modules/nixos/home/default.nix | 2 +- 119 files changed, 2 insertions(+), 2 deletions(-) rename {home => modules/home}/aliases/default.nix (100%) rename {home => modules/home}/atuin/default.nix (100%) rename {home => modules/home}/bat/default.nix (100%) rename {home => modules/home}/bitwarden/default.nix (100%) rename {home => modules/home}/bluetooth/default.nix (100%) rename {home => modules/home}/calibre/default.nix (100%) rename {home => modules/home}/comma/default.nix (100%) rename {home => modules/home}/default.nix (100%) rename {home => modules/home}/dircolors/default.nix (100%) rename {home => modules/home}/direnv/default.nix (100%) rename {home => modules/home}/direnv/lib/nix.sh (100%) rename {home => modules/home}/direnv/lib/postgres.sh (100%) rename {home => modules/home}/direnv/lib/python.sh (100%) rename {home => modules/home}/discord/default.nix (100%) rename {home => modules/home}/documentation/default.nix (100%) rename {home => modules/home}/feh/default.nix (100%) rename {home => modules/home}/firefox/default.nix (100%) rename {home => modules/home}/firefox/tridactyl/default.nix (100%) rename {home => modules/home}/firefox/tridactyl/tridactylrc (100%) rename {home => modules/home}/flameshot/default.nix (100%) rename {home => modules/home}/fzf/default.nix (100%) rename {home => modules/home}/gammastep/default.nix (100%) rename {home => modules/home}/gdb/default.nix (100%) rename {home => modules/home}/gdb/gdbinit (100%) rename {home => modules/home}/git/default.ignore (100%) rename {home => modules/home}/git/default.nix (100%) rename {home => modules/home}/gpg/default.nix (100%) rename {home => modules/home}/gtk/default.nix (100%) rename {home => modules/home}/htop/default.nix (100%) rename {home => modules/home}/jq/default.nix (100%) rename {home => modules/home}/mail/accounts/default.nix (100%) rename {home => modules/home}/mail/default.nix (100%) rename {home => modules/home}/mail/himalaya/default.nix (100%) rename {home => modules/home}/mail/msmtp/default.nix (100%) rename {home => modules/home}/mpv/default.nix (100%) rename {home => modules/home}/nix-index/default.nix (100%) rename {home => modules/home}/nix/default.nix (100%) rename {home => modules/home}/nixpkgs/default.nix (100%) rename {home => modules/home}/nm-applet/default.nix (100%) rename {home => modules/home}/packages/default.nix (100%) rename {home => modules/home}/pager/default.nix (100%) rename {home => modules/home}/power-alert/default.nix (100%) rename {home => modules/home}/secrets/default.nix (100%) rename {home => modules/home}/secrets/github/token.age (100%) rename {home => modules/home}/secrets/secrets.nix (100%) rename {home => modules/home}/ssh/default.nix (100%) rename {home => modules/home}/terminal/alacritty/default.nix (100%) rename {home => modules/home}/terminal/default.nix (100%) rename {home => modules/home}/terminal/termite/default.nix (100%) rename {home => modules/home}/tmux/default.nix (100%) rename {home => modules/home}/udiskie/default.nix (100%) rename {home => modules/home}/vim/after/ftplugin/beancount.vim (100%) rename {home => modules/home}/vim/after/ftplugin/cmake.vim (100%) rename {home => modules/home}/vim/after/ftplugin/fugitive.vim (100%) rename {home => modules/home}/vim/after/ftplugin/gitcommit.vim (100%) rename {home => modules/home}/vim/after/ftplugin/gitconfig.vim (100%) rename {home => modules/home}/vim/after/ftplugin/haskell.vim (100%) rename {home => modules/home}/vim/after/ftplugin/help.vim (100%) rename {home => modules/home}/vim/after/ftplugin/mail.vim (100%) rename {home => modules/home}/vim/after/ftplugin/make.vim (100%) rename {home => modules/home}/vim/after/ftplugin/markdown.vim (100%) rename {home => modules/home}/vim/after/ftplugin/netrw.vim (100%) rename {home => modules/home}/vim/after/ftplugin/nix.vim (100%) rename {home => modules/home}/vim/after/ftplugin/python.vim (100%) rename {home => modules/home}/vim/after/ftplugin/rust.vim (100%) rename {home => modules/home}/vim/after/ftplugin/tex.vim (100%) rename {home => modules/home}/vim/after/ftplugin/tiger.vim (100%) rename {home => modules/home}/vim/after/ftplugin/yaml.vim (100%) rename {home => modules/home}/vim/after/plugin/mappings/commentary.lua (100%) rename {home => modules/home}/vim/after/plugin/mappings/misc.lua (100%) rename {home => modules/home}/vim/after/plugin/mappings/telescope.lua (100%) rename {home => modules/home}/vim/after/plugin/mappings/tree-sitter-textobjects.lua (100%) rename {home => modules/home}/vim/after/plugin/mappings/unimpaired.lua (100%) rename {home => modules/home}/vim/autoload/ftplugined.vim (100%) rename {home => modules/home}/vim/default.nix (100%) rename {home => modules/home}/vim/ftdetect/automake.lua (100%) rename {home => modules/home}/vim/ftdetect/direnv.lua (100%) rename {home => modules/home}/vim/ftdetect/kbuild.lua (100%) rename {home => modules/home}/vim/ftdetect/kconfig.lua (100%) rename {home => modules/home}/vim/ftdetect/tiger.lua (100%) rename {home => modules/home}/vim/ftdetect/tikz.lua (100%) rename {home => modules/home}/vim/init.vim (100%) rename {home => modules/home}/vim/lua/ambroisie/lsp.lua (100%) rename {home => modules/home}/vim/lua/ambroisie/utils.lua (100%) rename {home => modules/home}/vim/plugin/abbreviations.lua (100%) rename {home => modules/home}/vim/plugin/numbertoggle.lua (100%) rename {home => modules/home}/vim/plugin/settings/completion.lua (100%) rename {home => modules/home}/vim/plugin/settings/dressing.lua (100%) rename {home => modules/home}/vim/plugin/settings/fastfold.lua (100%) rename {home => modules/home}/vim/plugin/settings/formatting.lua (100%) rename {home => modules/home}/vim/plugin/settings/git.lua (100%) rename {home => modules/home}/vim/plugin/settings/lsp-lines.lua (100%) rename {home => modules/home}/vim/plugin/settings/lspconfig.lua (100%) rename {home => modules/home}/vim/plugin/settings/lualine.lua (100%) rename {home => modules/home}/vim/plugin/settings/luasnip.lua (100%) rename {home => modules/home}/vim/plugin/settings/null-ls.lua (100%) rename {home => modules/home}/vim/plugin/settings/ssh.lua (100%) rename {home => modules/home}/vim/plugin/settings/surround.lua (100%) rename {home => modules/home}/vim/plugin/settings/telescope.lua (100%) rename {home => modules/home}/vim/plugin/settings/tree-sitter.lua (100%) rename {home => modules/home}/vim/plugin/settings/which-key.lua (100%) rename {home => modules/home}/vim/plugin/signtoggle.lua (100%) rename {home => modules/home}/wm/cursor/default.nix (100%) rename {home => modules/home}/wm/default.nix (100%) rename {home => modules/home}/wm/dunst/default.nix (100%) rename {home => modules/home}/wm/i3/default.nix (100%) rename {home => modules/home}/wm/i3bar/default.nix (100%) rename {home => modules/home}/wm/rofi/default.nix (100%) rename {home => modules/home}/wm/screen-lock/default.nix (100%) rename {home => modules/home}/x/default.nix (100%) rename {home => modules/home}/x/keyboard/default.nix (100%) rename {home => modules/home}/xdg/default.nix (100%) rename {home => modules/home}/zathura/default.nix (100%) rename {home => modules/home}/zsh/completion-styles.zsh (100%) rename {home => modules/home}/zsh/default.nix (100%) rename {home => modules/home}/zsh/extra-mappings.zsh (100%) rename {home => modules/home}/zsh/options.zsh (100%) 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/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/home/default.nix b/modules/home/default.nix similarity index 100% rename from home/default.nix rename to modules/home/default.nix 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 100% rename from home/firefox/default.nix rename to modules/home/firefox/default.nix 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 100% rename from home/tmux/default.nix rename to modules/home/tmux/default.nix 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 100% rename from home/vim/default.nix rename to modules/home/vim/default.nix 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/nixos/home/default.nix b/modules/nixos/home/default.nix index 4849ab2..fe00704 100644 --- a/modules/nixos/home/default.nix +++ b/modules/nixos/home/default.nix @@ -14,7 +14,7 @@ in 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}/home"; + users.${config.my.user.name} = import "${inputs.self}/modules/home"; # Nix Flakes compatibility useGlobalPkgs = true; From 570349e80ffe18f991593e74642b738119411117 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 9 Nov 2023 13:47:30 +0000 Subject: [PATCH 20/46] nixos: profiles: move from top-level My profiles are actually just "special" NixOS modules in that they orchestrate settings that usually span the NixOS/home-manager boundary, or otherwise set up configurations from multiple modules at once. --- flake/nixos.nix | 2 -- modules/nixos/default.nix | 1 + {profiles => modules/nixos/profiles}/bluetooth/default.nix | 0 {profiles => modules/nixos/profiles}/default.nix | 0 {profiles => modules/nixos/profiles}/devices/default.nix | 0 {profiles => modules/nixos/profiles}/gtk/default.nix | 0 {profiles => modules/nixos/profiles}/laptop/default.nix | 0 {profiles => modules/nixos/profiles}/wm/default.nix | 0 {profiles => modules/nixos/profiles}/x/default.nix | 0 9 files changed, 1 insertion(+), 2 deletions(-) rename {profiles => modules/nixos/profiles}/bluetooth/default.nix (100%) rename {profiles => modules/nixos/profiles}/default.nix (100%) rename {profiles => modules/nixos/profiles}/devices/default.nix (100%) rename {profiles => modules/nixos/profiles}/gtk/default.nix (100%) rename {profiles => modules/nixos/profiles}/laptop/default.nix (100%) rename {profiles => modules/nixos/profiles}/wm/default.nix (100%) rename {profiles => modules/nixos/profiles}/x/default.nix (100%) diff --git a/flake/nixos.nix b/flake/nixos.nix index 541e658..fe124d7 100644 --- a/flake/nixos.nix +++ b/flake/nixos.nix @@ -14,8 +14,6 @@ let } # Include generic settings "${self}/modules/nixos" - # Include bundles of settings - "${self}/profiles" ]; buildHost = name: system: lib.nixosSystem { diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 2eaa2e6..3648631 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -5,6 +5,7 @@ imports = [ ./hardware ./home + ./profiles ./programs ./secrets ./services 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 100% rename from profiles/default.nix rename to modules/nixos/profiles/default.nix 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 From c8d0e2ad972731097819798e57a75664ee8d471a Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 22 Oct 2021 13:52:04 +0200 Subject: [PATCH 21/46] WIP: nixos: systems: add persist This is the module that takes care of configuring impermanence at the system level. WIP: * address FIXMEs * activate home-manager persistence? * set `programs.fuse.userAllowOther = true;` ? * point `age` to persisted paths [1] ? * make sure all services and modules are persisted correctly... [1]: https://github.com/lovesegfault/nix-config/commit/b1d18d25b8cc1e50c521020442b907de377a147d --- modules/nixos/system/default.nix | 1 + modules/system/persist/default.nix | 67 ++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 modules/system/persist/default.nix diff --git a/modules/nixos/system/default.nix b/modules/nixos/system/default.nix index e7a4dd3..e317d96 100644 --- a/modules/nixos/system/default.nix +++ b/modules/nixos/system/default.nix @@ -9,6 +9,7 @@ ./language ./nix ./packages + ./persist ./podman ./printing ./users diff --git a/modules/system/persist/default.nix b/modules/system/persist/default.nix new file mode 100644 index 0000000..4c0682c --- /dev/null +++ b/modules/system/persist/default.nix @@ -0,0 +1,67 @@ +# 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" + ]) + ++ cfg.directories + ; + }; + }; +} From 8bafea77f5677446d97ba611e12edc2397cb4599 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 22 Oct 2021 14:05:42 +0200 Subject: [PATCH 22/46] nixos: services: ssh-server: persist host keys --- modules/nixos/services/ssh-server/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/nixos/services/ssh-server/default.nix b/modules/nixos/services/ssh-server/default.nix index 9ae0fa8..0cabc6f 100644 --- a/modules/nixos/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; }; From b8d1fc917bd9db1ec22931215bb1b5fa638b2123 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 22 Oct 2021 14:06:03 +0200 Subject: [PATCH 23/46] nixos: hardware: netowrking persist connections --- modules/nixos/hardware/networking/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/nixos/hardware/networking/default.nix b/modules/nixos/hardware/networking/default.nix index f0806fe..51dcfce 100644 --- a/modules/nixos/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" + ]; }) ]; } From 20bf05ccb8263eb855a0796bbc87beea65407cb7 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 22 Oct 2021 14:06:26 +0200 Subject: [PATCH 24/46] nixos: hardware: bluetooth: persist connections --- modules/nixos/hardware/bluetooth/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/nixos/hardware/bluetooth/default.nix b/modules/nixos/hardware/bluetooth/default.nix index 2d840f9..3dd44e6 100644 --- a/modules/nixos/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 = { From 54dc2a97fceb8ec33ebb056713240ebd67079597 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 22 Oct 2021 14:19:57 +0200 Subject: [PATCH 25/46] nixos: services: blog: persist website data --- modules/nixos/services/blog/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/nixos/services/blog/default.nix b/modules/nixos/services/blog/default.nix index 4b646c3..6752ac2 100644 --- a/modules/nixos/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" + ]; }; } From 56da44d85bd1c0522280707b7613f93f772d1cb4 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 3 Nov 2021 14:43:05 +0100 Subject: [PATCH 26/46] nixos: services: calibre-web: persist library --- modules/nixos/services/calibre-web/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/nixos/services/calibre-web/default.nix b/modules/nixos/services/calibre-web/default.nix index 858851c..b6e70d8 100644 --- a/modules/nixos/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 From b8ac79e8451b0e9965afb981623e37a999a8dc15 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 3 Nov 2021 14:43:16 +0100 Subject: [PATCH 27/46] nixos: services: flood: persist data --- modules/nixos/services/flood/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/nixos/services/flood/default.nix b/modules/nixos/services/flood/default.nix index ff5d941..79b6c75 100644 --- a/modules/nixos/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}" + ]; }; } From f8487b23dc4a1ea23b4e8965122135295b9cafe6 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 3 Nov 2021 14:43:28 +0100 Subject: [PATCH 28/46] nixos: services: gitea: persist repositories --- modules/nixos/services/gitea/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/nixos/services/gitea/default.nix b/modules/nixos/services/gitea/default.nix index 28a448d..93edf57 100644 --- a/modules/nixos/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 From e1c037e3934b6cc7775e6c7fc18692387d740db6 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 3 Nov 2021 17:12:32 +0100 Subject: [PATCH 29/46] nixos: services: matrix: persist data --- modules/nixos/services/matrix/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/nixos/services/matrix/default.nix b/modules/nixos/services/matrix/default.nix index 52b60c5..87494c9 100644 --- a/modules/nixos/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 + ]; }; } From c4289b480c9384ae78dc3b7ce370e69a656360a4 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 3 Nov 2021 17:12:42 +0100 Subject: [PATCH 30/46] nixos: services: paperless: persist data --- modules/nixos/services/paperless/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/nixos/services/paperless/default.nix b/modules/nixos/services/paperless/default.nix index 1ca1f66..702627d 100644 --- a/modules/nixos/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 + ]; }; } From 605abffcc833d26e89330a07d7b2e14ae4856e61 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 3 Nov 2021 17:12:58 +0100 Subject: [PATCH 31/46] nixos: services: postgresql-backup: persist data --- modules/nixos/services/postgresql-backup/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/nixos/services/postgresql-backup/default.nix b/modules/nixos/services/postgresql-backup/default.nix index dff5494..3d6c03b 100644 --- a/modules/nixos/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 + ]; }; } From 6f05315ddaf6f8893f8ee1a9d9ea21e7f2f2ce75 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 3 Nov 2021 17:13:13 +0100 Subject: [PATCH 32/46] nixos: services: postgresql: persist data --- modules/nixos/services/postgresql/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/nixos/services/postgresql/default.nix b/modules/nixos/services/postgresql/default.nix index 6f51f3e..175c1ce 100644 --- a/modules/nixos/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 = { From d450f77e21ccbda2f2da593237b10b41254733b9 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 5 Nov 2021 14:30:25 +0100 Subject: [PATCH 33/46] nixos: services: indexers: persist data --- modules/nixos/services/indexers/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/nixos/services/indexers/default.nix b/modules/nixos/services/indexers/default.nix index fb06a0b..28a7007 100644 --- a/modules/nixos/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 From fbaf6ea860f0d7af414d3e7483830255f0a26862 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 5 Nov 2021 15:11:05 +0100 Subject: [PATCH 34/46] nixos: services: jellyfin: persist data --- modules/nixos/services/jellyfin/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/nixos/services/jellyfin/default.nix b/modules/nixos/services/jellyfin/default.nix index 2fcf51e..0692dcc 100644 --- a/modules/nixos/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}" + ]; }; } From 8056ca5ad5d8cf3c1bb13b0198106225662a75b2 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 5 Nov 2021 15:11:12 +0100 Subject: [PATCH 35/46] nixos: services: lohr: persist data --- modules/nixos/services/lohr/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/nixos/services/lohr/default.nix b/modules/nixos/services/lohr/default.nix index 245567c..7aac1ac 100644 --- a/modules/nixos/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}" + ]; }; } From d245a1423b9888ec7b814ad8513b031897c05849 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 5 Nov 2021 15:11:23 +0100 Subject: [PATCH 36/46] nixos: services: navidrome: persist data --- modules/nixos/services/navidrome/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/nixos/services/navidrome/default.nix b/modules/nixos/services/navidrome/default.nix index 6c001fd..08c6a88 100644 --- a/modules/nixos/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}" + ]; }; } From 256feb9e2f245ad92e3aaa91c67167da95cda0c7 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 5 Nov 2021 15:11:35 +0100 Subject: [PATCH 37/46] nixos: services: nextcloud: persist data --- modules/nixos/services/nextcloud/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/nixos/services/nextcloud/default.nix b/modules/nixos/services/nextcloud/default.nix index 260e73e..b9578f8 100644 --- a/modules/nixos/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 + ]; }; } From eab7092f5d44a4905c2bb9552cec1a62288d1ad8 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 5 Nov 2021 15:20:11 +0100 Subject: [PATCH 38/46] nixos: services: podgrab: persist data --- modules/nixos/services/podgrab/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/nixos/services/podgrab/default.nix b/modules/nixos/services/podgrab/default.nix index 9793d60..2994fc8 100644 --- a/modules/nixos/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; }; } From 8d63a2276ec0155fd2326fced77f16d0fd8475f7 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 5 Nov 2021 15:21:42 +0100 Subject: [PATCH 39/46] nixos: services: rss-bridge: persist data --- modules/nixos/services/rss-bridge/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/nixos/services/rss-bridge/default.nix b/modules/nixos/services/rss-bridge/default.nix index 85e37c2..66858dc 100644 --- a/modules/nixos/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 + ]; }; } From 94ead402ccf8a3bd9c0c5744dd84da39d83d75c7 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 5 Nov 2021 15:25:44 +0100 Subject: [PATCH 40/46] nixos: services: sabnzbd: persist data --- modules/nixos/services/sabnzbd/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/nixos/services/sabnzbd/default.nix b/modules/nixos/services/sabnzbd/default.nix index 7ab145f..ef13d4b 100644 --- a/modules/nixos/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 From da72154eb845512c5628d450b5277e30542f137a Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 5 Nov 2021 15:25:50 +0100 Subject: [PATCH 41/46] nixos: services: transmission: persist data --- modules/nixos/services/transmission/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/nixos/services/transmission/default.nix b/modules/nixos/services/transmission/default.nix index 28df477..37e4f0f 100644 --- a/modules/nixos/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 + ]; }; } From 1c746cd2bbcb6474b0f6c1f1a17bbfa4abdf2d84 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 5 Nov 2021 15:37:51 +0100 Subject: [PATCH 42/46] nixos: services: nginx: persist SSL certificates --- modules/nixos/services/nginx/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/nixos/services/nginx/default.nix b/modules/nixos/services/nginx/default.nix index 6ca2e42..a28c2be 100644 --- a/modules/nixos/services/nginx/default.nix +++ b/modules/nixos/services/nginx/default.nix @@ -467,5 +467,9 @@ in } ]; }; + + my.system.persist.directories = [ + config.users.user.acme.home + ]; }; } From 8febd2fdbeea80ec4463b802780dd6557b645d1c Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 5 Nov 2021 15:40:29 +0100 Subject: [PATCH 43/46] nixos: services: monitoring: persist data --- modules/nixos/services/monitoring/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/nixos/services/monitoring/default.nix b/modules/nixos/services/monitoring/default.nix index 829bfe0..c7489f4 100644 --- a/modules/nixos/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}" + ]; }; } From 7b9263f9ed2cbc63a1ac42d26634f47ac7309b33 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 5 Nov 2021 15:58:07 +0100 Subject: [PATCH 44/46] nixos: services: pirate: persist data --- modules/nixos/services/pirate/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/nixos/services/pirate/default.nix b/modules/nixos/services/pirate/default.nix index 59f9794..cfabc90 100644 --- a/modules/nixos/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: { From be62fe7e4de51fe6bfc2d1f666d2ed749c03ffcd Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 5 Nov 2021 21:51:04 +0100 Subject: [PATCH 45/46] nixos: services: quassel: persist data --- modules/nixos/services/quassel/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/nixos/services/quassel/default.nix b/modules/nixos/services/quassel/default.nix index ec686e1..18d084a 100644 --- a/modules/nixos/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 + ]; }; } From 0d378431408c69b1fdbdcbe92a4ee99c2b609994 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 21 Sep 2023 15:55:56 +0000 Subject: [PATCH 46/46] WIP: add notes for missing persistence/backup TODO: * Look at for more inspiration https://github.com/nix-community/impermanence/pull/108 * Do home-manager * Common files https://github.com/nix-community/impermanence/issues/10 --- modules/nixos/services/grocy/default.nix | 3 +++ modules/nixos/services/miniflux/default.nix | 3 +++ modules/nixos/services/tandoor-recipes/default.nix | 3 +++ modules/nixos/services/vikunja/default.nix | 2 ++ modules/system/persist/default.nix | 1 + 5 files changed, 12 insertions(+) diff --git a/modules/nixos/services/grocy/default.nix b/modules/nixos/services/grocy/default.nix index 87927d6..4a3183e 100644 --- a/modules/nixos/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/nixos/services/miniflux/default.nix b/modules/nixos/services/miniflux/default.nix index 6d9ffc8..4667912 100644 --- a/modules/nixos/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/nixos/services/tandoor-recipes/default.nix b/modules/nixos/services/tandoor-recipes/default.nix index 83177c8..3688363 100644 --- a/modules/nixos/services/tandoor-recipes/default.nix +++ b/modules/nixos/services/tandoor-recipes/default.nix @@ -76,5 +76,8 @@ in inherit (cfg) port; } ]; + + # FIXME: backup + # FIXME: persistence }; } diff --git a/modules/nixos/services/vikunja/default.nix b/modules/nixos/services/vikunja/default.nix index 1cdef5f..076dd4a 100644 --- a/modules/nixos/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/system/persist/default.nix b/modules/system/persist/default.nix index 4c0682c..18302f3 100644 --- a/modules/system/persist/default.nix +++ b/modules/system/persist/default.nix @@ -60,6 +60,7 @@ in ++ (lib.optionals config.virtualisation.docker.enable [ "/var/lib/docker" ]) + # FIXME: podman ++ cfg.directories ; };