diff --git a/flake.lock b/flake.lock index d2f2e6d..1c7b71b 100644 --- a/flake.lock +++ b/flake.lock @@ -70,11 +70,11 @@ ] }, "locked": { - "lastModified": 1698579227, - "narHash": "sha256-KVWjFZky+gRuWennKsbo6cWyo7c/z/VgCte5pR9pEKg=", + "lastModified": 1696343447, + "narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "f76e870d64779109e41370848074ac4eaa1606ec", + "rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4", "type": "github" }, "original": { @@ -131,11 +131,11 @@ ] }, "locked": { - "lastModified": 1698670511, - "narHash": "sha256-jQIu3UhBMPHXzVkHQO1O2gg8SVo5lqAVoC6mOaLQcLQ=", + "lastModified": 1698250431, + "narHash": "sha256-qs2gTeH4wpnWPO6Oi6sOhp2IhG0i0DzcnrJxIY3/CP8=", "owner": "nix-community", "repo": "home-manager", - "rev": "8e5416b478e465985eec274bc3a018024435c106", + "rev": "09587fbbc6a669f7725613e044c2577dc5d43ab5", "type": "github" }, "original": { @@ -145,13 +145,29 @@ "type": "github" } }, + "impermanence": { + "locked": { + "lastModified": 1694622745, + "narHash": "sha256-z397+eDhKx9c2qNafL1xv75lC0Q4nOaFlhaU1TINqb8=", + "owner": "nix-community", + "repo": "impermanence", + "rev": "e9643d08d0d193a2e074a19d4d90c67a874d932e", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "master", + "repo": "impermanence", + "type": "github" + } + }, "nixpkgs": { "locked": { - "lastModified": 1698611440, - "narHash": "sha256-jPjHjrerhYDy3q9+s5EAsuhyhuknNfowY6yt6pjn9pc=", + "lastModified": 1698134075, + "narHash": "sha256-foCD+nuKzfh49bIoiCBur4+Fx1nozo+4C/6k8BYk4sg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0cbe9f69c234a7700596e943bfae7ef27a31b735", + "rev": "8efd5d1e283604f75a808a20e6cde0ef313d07d4", "type": "github" }, "original": { @@ -163,11 +179,11 @@ }, "nur": { "locked": { - "lastModified": 1698745553, - "narHash": "sha256-Fdip7ewCtZTjOu7ATDFUAy3OqrgcyvzDElLXhr4YmmI=", + "lastModified": 1698317227, + "narHash": "sha256-jzSJjjxJr/IPvoPSWB1ZobmlAKku6eeggh9ffGV7Sig=", "owner": "nix-community", "repo": "NUR", - "rev": "dfbf198236d40e9741db76936088f05107e19013", + "rev": "32a38be31067b0a2f4919fd9e7a49bbefc34d25f", "type": "github" }, "original": { @@ -212,6 +228,7 @@ "flake-parts": "flake-parts", "futils": "futils", "home-manager": "home-manager", + "impermanence": "impermanence", "nixpkgs": "nixpkgs", "nur": "nur", "pre-commit-hooks": "pre-commit-hooks" diff --git a/flake.nix b/flake.nix index 8e46ea3..7970759 100644 --- a/flake.nix +++ b/flake.nix @@ -39,6 +39,13 @@ }; }; + impermanence = { + type = "github"; + owner = "nix-community"; + repo = "impermanence"; + ref = "master"; + }; + nixpkgs = { type = "github"; owner = "NixOS"; diff --git a/flake/home-manager.nix b/flake/home-manager.nix index 61c9f6e..2c5b65a 100644 --- a/flake/home-manager.nix +++ b/flake/home-manager.nix @@ -2,7 +2,7 @@ let defaultModules = [ # Include generic settings - "${self}/modules/home" + "${self}/home" { # Basic user information defaults home.username = lib.mkDefault "ambroisie"; diff --git a/flake/nixos.nix b/flake/nixos.nix index fe124d7..9eb6388 100644 --- a/flake/nixos.nix +++ b/flake/nixos.nix @@ -13,7 +13,9 @@ let ]; } # Include generic settings - "${self}/modules/nixos" + "${self}/modules" + # Include bundles of settings + "${self}/profiles" ]; buildHost = name: system: lib.nixosSystem { diff --git a/modules/home/aliases/default.nix b/home/aliases/default.nix similarity index 100% rename from modules/home/aliases/default.nix rename to home/aliases/default.nix diff --git a/modules/home/atuin/default.nix b/home/atuin/default.nix similarity index 100% rename from modules/home/atuin/default.nix rename to home/atuin/default.nix diff --git a/modules/home/bat/default.nix b/home/bat/default.nix similarity index 100% rename from modules/home/bat/default.nix rename to home/bat/default.nix diff --git a/modules/home/bitwarden/default.nix b/home/bitwarden/default.nix similarity index 100% rename from modules/home/bitwarden/default.nix rename to home/bitwarden/default.nix diff --git a/modules/home/bluetooth/default.nix b/home/bluetooth/default.nix similarity index 100% rename from modules/home/bluetooth/default.nix rename to home/bluetooth/default.nix diff --git a/modules/home/calibre/default.nix b/home/calibre/default.nix similarity index 100% rename from modules/home/calibre/default.nix rename to home/calibre/default.nix diff --git a/modules/home/comma/default.nix b/home/comma/default.nix similarity index 100% rename from modules/home/comma/default.nix rename to home/comma/default.nix diff --git a/home/default.nix b/home/default.nix new file mode 100644 index 0000000..8ba3a8d --- /dev/null +++ b/home/default.nix @@ -0,0 +1,56 @@ +{ ... }: +{ + imports = [ + ./aliases + ./atuin + ./bat + ./bitwarden + ./bluetooth + ./calibre + ./comma + ./dircolors + ./direnv + ./discord + ./documentation + ./feh + ./firefox + ./flameshot + ./fzf + ./gammastep + ./gdb + ./git + ./gpg + ./gtk + ./htop + ./jq + ./mail + ./mpv + ./nix + ./nix-index + ./nixpkgs + ./nm-applet + ./packages + ./pager + ./power-alert + ./secrets + ./ssh + ./terminal + ./tmux + ./udiskie + ./vim + ./wm + ./x + ./xdg + ./zathura + ./zsh + ]; + + # First sane reproducible version + home.stateVersion = "20.09"; + + # Who am I? + home.username = "ambroisie"; + + # Start services automatically + systemd.user.startServices = "sd-switch"; +} diff --git a/modules/home/dircolors/default.nix b/home/dircolors/default.nix similarity index 100% rename from modules/home/dircolors/default.nix rename to home/dircolors/default.nix diff --git a/modules/home/direnv/default.nix b/home/direnv/default.nix similarity index 100% rename from modules/home/direnv/default.nix rename to home/direnv/default.nix diff --git a/modules/home/direnv/lib/nix.sh b/home/direnv/lib/nix.sh similarity index 100% rename from modules/home/direnv/lib/nix.sh rename to home/direnv/lib/nix.sh diff --git a/modules/home/direnv/lib/postgres.sh b/home/direnv/lib/postgres.sh similarity index 100% rename from modules/home/direnv/lib/postgres.sh rename to home/direnv/lib/postgres.sh diff --git a/modules/home/direnv/lib/python.sh b/home/direnv/lib/python.sh similarity index 100% rename from modules/home/direnv/lib/python.sh rename to home/direnv/lib/python.sh diff --git a/modules/home/discord/default.nix b/home/discord/default.nix similarity index 100% rename from modules/home/discord/default.nix rename to home/discord/default.nix diff --git a/modules/home/documentation/default.nix b/home/documentation/default.nix similarity index 100% rename from modules/home/documentation/default.nix rename to home/documentation/default.nix diff --git a/modules/home/feh/default.nix b/home/feh/default.nix similarity index 100% rename from modules/home/feh/default.nix rename to home/feh/default.nix diff --git a/modules/home/firefox/default.nix b/home/firefox/default.nix similarity index 100% rename from modules/home/firefox/default.nix rename to home/firefox/default.nix diff --git a/modules/home/firefox/tridactyl/default.nix b/home/firefox/tridactyl/default.nix similarity index 100% rename from modules/home/firefox/tridactyl/default.nix rename to home/firefox/tridactyl/default.nix diff --git a/modules/home/firefox/tridactyl/tridactylrc b/home/firefox/tridactyl/tridactylrc similarity index 100% rename from modules/home/firefox/tridactyl/tridactylrc rename to home/firefox/tridactyl/tridactylrc diff --git a/modules/home/flameshot/default.nix b/home/flameshot/default.nix similarity index 100% rename from modules/home/flameshot/default.nix rename to home/flameshot/default.nix diff --git a/modules/home/fzf/default.nix b/home/fzf/default.nix similarity index 100% rename from modules/home/fzf/default.nix rename to home/fzf/default.nix diff --git a/modules/home/gammastep/default.nix b/home/gammastep/default.nix similarity index 100% rename from modules/home/gammastep/default.nix rename to home/gammastep/default.nix diff --git a/modules/home/gdb/default.nix b/home/gdb/default.nix similarity index 100% rename from modules/home/gdb/default.nix rename to home/gdb/default.nix diff --git a/modules/home/gdb/gdbinit b/home/gdb/gdbinit similarity index 100% rename from modules/home/gdb/gdbinit rename to home/gdb/gdbinit diff --git a/modules/home/git/default.ignore b/home/git/default.ignore similarity index 100% rename from modules/home/git/default.ignore rename to home/git/default.ignore diff --git a/modules/home/git/default.nix b/home/git/default.nix similarity index 100% rename from modules/home/git/default.nix rename to home/git/default.nix diff --git a/modules/home/gpg/default.nix b/home/gpg/default.nix similarity index 100% rename from modules/home/gpg/default.nix rename to home/gpg/default.nix diff --git a/modules/home/gtk/default.nix b/home/gtk/default.nix similarity index 100% rename from modules/home/gtk/default.nix rename to home/gtk/default.nix diff --git a/modules/home/htop/default.nix b/home/htop/default.nix similarity index 100% rename from modules/home/htop/default.nix rename to home/htop/default.nix diff --git a/modules/home/jq/default.nix b/home/jq/default.nix similarity index 100% rename from modules/home/jq/default.nix rename to home/jq/default.nix diff --git a/modules/home/mail/accounts/default.nix b/home/mail/accounts/default.nix similarity index 100% rename from modules/home/mail/accounts/default.nix rename to home/mail/accounts/default.nix diff --git a/modules/home/mail/default.nix b/home/mail/default.nix similarity index 100% rename from modules/home/mail/default.nix rename to home/mail/default.nix diff --git a/modules/home/mail/himalaya/default.nix b/home/mail/himalaya/default.nix similarity index 100% rename from modules/home/mail/himalaya/default.nix rename to home/mail/himalaya/default.nix diff --git a/modules/home/mail/msmtp/default.nix b/home/mail/msmtp/default.nix similarity index 100% rename from modules/home/mail/msmtp/default.nix rename to home/mail/msmtp/default.nix diff --git a/modules/home/mpv/default.nix b/home/mpv/default.nix similarity index 100% rename from modules/home/mpv/default.nix rename to home/mpv/default.nix diff --git a/modules/home/nix-index/default.nix b/home/nix-index/default.nix similarity index 100% rename from modules/home/nix-index/default.nix rename to home/nix-index/default.nix diff --git a/modules/home/nix/default.nix b/home/nix/default.nix similarity index 100% rename from modules/home/nix/default.nix rename to home/nix/default.nix diff --git a/modules/home/nixpkgs/default.nix b/home/nixpkgs/default.nix similarity index 100% rename from modules/home/nixpkgs/default.nix rename to home/nixpkgs/default.nix diff --git a/modules/home/nm-applet/default.nix b/home/nm-applet/default.nix similarity index 100% rename from modules/home/nm-applet/default.nix rename to home/nm-applet/default.nix diff --git a/modules/home/packages/default.nix b/home/packages/default.nix similarity index 100% rename from modules/home/packages/default.nix rename to home/packages/default.nix diff --git a/modules/home/pager/default.nix b/home/pager/default.nix similarity index 100% rename from modules/home/pager/default.nix rename to home/pager/default.nix diff --git a/modules/home/power-alert/default.nix b/home/power-alert/default.nix similarity index 100% rename from modules/home/power-alert/default.nix rename to home/power-alert/default.nix diff --git a/modules/home/secrets/default.nix b/home/secrets/default.nix similarity index 100% rename from modules/home/secrets/default.nix rename to home/secrets/default.nix diff --git a/modules/home/secrets/github/token.age b/home/secrets/github/token.age similarity index 100% rename from modules/home/secrets/github/token.age rename to home/secrets/github/token.age diff --git a/modules/home/secrets/secrets.nix b/home/secrets/secrets.nix similarity index 100% rename from modules/home/secrets/secrets.nix rename to home/secrets/secrets.nix diff --git a/modules/home/ssh/default.nix b/home/ssh/default.nix similarity index 100% rename from modules/home/ssh/default.nix rename to home/ssh/default.nix diff --git a/modules/home/terminal/alacritty/default.nix b/home/terminal/alacritty/default.nix similarity index 100% rename from modules/home/terminal/alacritty/default.nix rename to home/terminal/alacritty/default.nix diff --git a/modules/home/terminal/default.nix b/home/terminal/default.nix similarity index 100% rename from modules/home/terminal/default.nix rename to home/terminal/default.nix diff --git a/modules/home/terminal/termite/default.nix b/home/terminal/termite/default.nix similarity index 100% rename from modules/home/terminal/termite/default.nix rename to home/terminal/termite/default.nix diff --git a/modules/home/tmux/default.nix b/home/tmux/default.nix similarity index 77% rename from modules/home/tmux/default.nix rename to home/tmux/default.nix index 08aeb55..e554fd0 100644 --- a/modules/home/tmux/default.nix +++ b/home/tmux/default.nix @@ -11,19 +11,6 @@ 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 { @@ -88,14 +75,6 @@ in set -g allow-passthrough on '' } - - # Force 24-bit color for each relevant $TERM - ${ - let - mkTcFlag = term: ''set -as terminal-features ",${term}:RGB"''; - in - lib.concatMapStringsSep "\n" mkTcFlag cfg.trueColorTerminals - } ''; }; } diff --git a/modules/home/udiskie/default.nix b/home/udiskie/default.nix similarity index 100% rename from modules/home/udiskie/default.nix rename to home/udiskie/default.nix diff --git a/modules/home/vim/after/ftplugin/beancount.vim b/home/vim/after/ftplugin/beancount.vim similarity index 100% rename from modules/home/vim/after/ftplugin/beancount.vim rename to home/vim/after/ftplugin/beancount.vim diff --git a/modules/home/vim/after/ftplugin/cmake.vim b/home/vim/after/ftplugin/cmake.vim similarity index 100% rename from modules/home/vim/after/ftplugin/cmake.vim rename to home/vim/after/ftplugin/cmake.vim diff --git a/modules/home/vim/after/ftplugin/fugitive.vim b/home/vim/after/ftplugin/fugitive.vim similarity index 100% rename from modules/home/vim/after/ftplugin/fugitive.vim rename to home/vim/after/ftplugin/fugitive.vim diff --git a/modules/home/vim/after/ftplugin/gitcommit.vim b/home/vim/after/ftplugin/gitcommit.vim similarity index 100% rename from modules/home/vim/after/ftplugin/gitcommit.vim rename to home/vim/after/ftplugin/gitcommit.vim diff --git a/modules/home/vim/after/ftplugin/gitconfig.vim b/home/vim/after/ftplugin/gitconfig.vim similarity index 100% rename from modules/home/vim/after/ftplugin/gitconfig.vim rename to home/vim/after/ftplugin/gitconfig.vim diff --git a/modules/home/vim/after/ftplugin/haskell.vim b/home/vim/after/ftplugin/haskell.vim similarity index 100% rename from modules/home/vim/after/ftplugin/haskell.vim rename to home/vim/after/ftplugin/haskell.vim diff --git a/modules/home/vim/after/ftplugin/help.vim b/home/vim/after/ftplugin/help.vim similarity index 100% rename from modules/home/vim/after/ftplugin/help.vim rename to home/vim/after/ftplugin/help.vim diff --git a/modules/home/vim/after/ftplugin/mail.vim b/home/vim/after/ftplugin/mail.vim similarity index 100% rename from modules/home/vim/after/ftplugin/mail.vim rename to home/vim/after/ftplugin/mail.vim diff --git a/modules/home/vim/after/ftplugin/make.vim b/home/vim/after/ftplugin/make.vim similarity index 100% rename from modules/home/vim/after/ftplugin/make.vim rename to home/vim/after/ftplugin/make.vim diff --git a/modules/home/vim/after/ftplugin/markdown.vim b/home/vim/after/ftplugin/markdown.vim similarity index 100% rename from modules/home/vim/after/ftplugin/markdown.vim rename to home/vim/after/ftplugin/markdown.vim diff --git a/modules/home/vim/after/ftplugin/netrw.vim b/home/vim/after/ftplugin/netrw.vim similarity index 100% rename from modules/home/vim/after/ftplugin/netrw.vim rename to home/vim/after/ftplugin/netrw.vim diff --git a/modules/home/vim/after/ftplugin/nix.vim b/home/vim/after/ftplugin/nix.vim similarity index 100% rename from modules/home/vim/after/ftplugin/nix.vim rename to home/vim/after/ftplugin/nix.vim diff --git a/modules/home/vim/after/ftplugin/python.vim b/home/vim/after/ftplugin/python.vim similarity index 100% rename from modules/home/vim/after/ftplugin/python.vim rename to home/vim/after/ftplugin/python.vim diff --git a/modules/home/vim/after/ftplugin/rust.vim b/home/vim/after/ftplugin/rust.vim similarity index 100% rename from modules/home/vim/after/ftplugin/rust.vim rename to home/vim/after/ftplugin/rust.vim diff --git a/modules/home/vim/after/ftplugin/tex.vim b/home/vim/after/ftplugin/tex.vim similarity index 100% rename from modules/home/vim/after/ftplugin/tex.vim rename to home/vim/after/ftplugin/tex.vim diff --git a/modules/home/vim/after/ftplugin/tiger.vim b/home/vim/after/ftplugin/tiger.vim similarity index 100% rename from modules/home/vim/after/ftplugin/tiger.vim rename to home/vim/after/ftplugin/tiger.vim diff --git a/modules/home/vim/after/ftplugin/yaml.vim b/home/vim/after/ftplugin/yaml.vim similarity index 100% rename from modules/home/vim/after/ftplugin/yaml.vim rename to home/vim/after/ftplugin/yaml.vim diff --git a/modules/home/vim/after/plugin/mappings/commentary.lua b/home/vim/after/plugin/mappings/commentary.lua similarity index 100% rename from modules/home/vim/after/plugin/mappings/commentary.lua rename to home/vim/after/plugin/mappings/commentary.lua diff --git a/modules/home/vim/after/plugin/mappings/misc.lua b/home/vim/after/plugin/mappings/misc.lua similarity index 100% rename from modules/home/vim/after/plugin/mappings/misc.lua rename to home/vim/after/plugin/mappings/misc.lua diff --git a/modules/home/vim/after/plugin/mappings/telescope.lua b/home/vim/after/plugin/mappings/telescope.lua similarity index 100% rename from modules/home/vim/after/plugin/mappings/telescope.lua rename to home/vim/after/plugin/mappings/telescope.lua diff --git a/modules/home/vim/after/plugin/mappings/tree-sitter-textobjects.lua b/home/vim/after/plugin/mappings/tree-sitter-textobjects.lua similarity index 100% rename from modules/home/vim/after/plugin/mappings/tree-sitter-textobjects.lua rename to home/vim/after/plugin/mappings/tree-sitter-textobjects.lua diff --git a/modules/home/vim/after/plugin/mappings/unimpaired.lua b/home/vim/after/plugin/mappings/unimpaired.lua similarity index 100% rename from modules/home/vim/after/plugin/mappings/unimpaired.lua rename to home/vim/after/plugin/mappings/unimpaired.lua diff --git a/modules/home/vim/autoload/ftplugined.vim b/home/vim/autoload/ftplugined.vim similarity index 100% rename from modules/home/vim/autoload/ftplugined.vim rename to home/vim/autoload/ftplugined.vim diff --git a/modules/home/vim/default.nix b/home/vim/default.nix similarity index 100% rename from modules/home/vim/default.nix rename to home/vim/default.nix diff --git a/modules/home/vim/ftdetect/automake.lua b/home/vim/ftdetect/automake.lua similarity index 100% rename from modules/home/vim/ftdetect/automake.lua rename to home/vim/ftdetect/automake.lua diff --git a/modules/home/vim/ftdetect/direnv.lua b/home/vim/ftdetect/direnv.lua similarity index 100% rename from modules/home/vim/ftdetect/direnv.lua rename to home/vim/ftdetect/direnv.lua diff --git a/modules/home/vim/ftdetect/kbuild.lua b/home/vim/ftdetect/kbuild.lua similarity index 100% rename from modules/home/vim/ftdetect/kbuild.lua rename to home/vim/ftdetect/kbuild.lua diff --git a/modules/home/vim/ftdetect/kconfig.lua b/home/vim/ftdetect/kconfig.lua similarity index 100% rename from modules/home/vim/ftdetect/kconfig.lua rename to home/vim/ftdetect/kconfig.lua diff --git a/modules/home/vim/ftdetect/tiger.lua b/home/vim/ftdetect/tiger.lua similarity index 100% rename from modules/home/vim/ftdetect/tiger.lua rename to home/vim/ftdetect/tiger.lua diff --git a/modules/home/vim/ftdetect/tikz.lua b/home/vim/ftdetect/tikz.lua similarity index 100% rename from modules/home/vim/ftdetect/tikz.lua rename to home/vim/ftdetect/tikz.lua diff --git a/modules/home/vim/init.vim b/home/vim/init.vim similarity index 100% rename from modules/home/vim/init.vim rename to home/vim/init.vim diff --git a/modules/home/vim/lua/ambroisie/lsp.lua b/home/vim/lua/ambroisie/lsp.lua similarity index 100% rename from modules/home/vim/lua/ambroisie/lsp.lua rename to home/vim/lua/ambroisie/lsp.lua diff --git a/modules/home/vim/lua/ambroisie/utils.lua b/home/vim/lua/ambroisie/utils.lua similarity index 100% rename from modules/home/vim/lua/ambroisie/utils.lua rename to home/vim/lua/ambroisie/utils.lua diff --git a/modules/home/vim/plugin/abbreviations.lua b/home/vim/plugin/abbreviations.lua similarity index 100% rename from modules/home/vim/plugin/abbreviations.lua rename to home/vim/plugin/abbreviations.lua diff --git a/modules/home/vim/plugin/numbertoggle.lua b/home/vim/plugin/numbertoggle.lua similarity index 100% rename from modules/home/vim/plugin/numbertoggle.lua rename to home/vim/plugin/numbertoggle.lua diff --git a/modules/home/vim/plugin/settings/completion.lua b/home/vim/plugin/settings/completion.lua similarity index 100% rename from modules/home/vim/plugin/settings/completion.lua rename to home/vim/plugin/settings/completion.lua diff --git a/modules/home/vim/plugin/settings/dressing.lua b/home/vim/plugin/settings/dressing.lua similarity index 100% rename from modules/home/vim/plugin/settings/dressing.lua rename to home/vim/plugin/settings/dressing.lua diff --git a/modules/home/vim/plugin/settings/fastfold.lua b/home/vim/plugin/settings/fastfold.lua similarity index 100% rename from modules/home/vim/plugin/settings/fastfold.lua rename to home/vim/plugin/settings/fastfold.lua diff --git a/modules/home/vim/plugin/settings/formatting.lua b/home/vim/plugin/settings/formatting.lua similarity index 100% rename from modules/home/vim/plugin/settings/formatting.lua rename to home/vim/plugin/settings/formatting.lua diff --git a/modules/home/vim/plugin/settings/git.lua b/home/vim/plugin/settings/git.lua similarity index 100% rename from modules/home/vim/plugin/settings/git.lua rename to home/vim/plugin/settings/git.lua diff --git a/modules/home/vim/plugin/settings/lsp-lines.lua b/home/vim/plugin/settings/lsp-lines.lua similarity index 100% rename from modules/home/vim/plugin/settings/lsp-lines.lua rename to home/vim/plugin/settings/lsp-lines.lua diff --git a/modules/home/vim/plugin/settings/lspconfig.lua b/home/vim/plugin/settings/lspconfig.lua similarity index 100% rename from modules/home/vim/plugin/settings/lspconfig.lua rename to home/vim/plugin/settings/lspconfig.lua diff --git a/modules/home/vim/plugin/settings/lualine.lua b/home/vim/plugin/settings/lualine.lua similarity index 100% rename from modules/home/vim/plugin/settings/lualine.lua rename to home/vim/plugin/settings/lualine.lua diff --git a/modules/home/vim/plugin/settings/luasnip.lua b/home/vim/plugin/settings/luasnip.lua similarity index 100% rename from modules/home/vim/plugin/settings/luasnip.lua rename to home/vim/plugin/settings/luasnip.lua diff --git a/modules/home/vim/plugin/settings/null-ls.lua b/home/vim/plugin/settings/null-ls.lua similarity index 100% rename from modules/home/vim/plugin/settings/null-ls.lua rename to home/vim/plugin/settings/null-ls.lua diff --git a/modules/home/vim/plugin/settings/ssh.lua b/home/vim/plugin/settings/ssh.lua similarity index 100% rename from modules/home/vim/plugin/settings/ssh.lua rename to home/vim/plugin/settings/ssh.lua diff --git a/modules/home/vim/plugin/settings/surround.lua b/home/vim/plugin/settings/surround.lua similarity index 100% rename from modules/home/vim/plugin/settings/surround.lua rename to home/vim/plugin/settings/surround.lua diff --git a/modules/home/vim/plugin/settings/telescope.lua b/home/vim/plugin/settings/telescope.lua similarity index 100% rename from modules/home/vim/plugin/settings/telescope.lua rename to home/vim/plugin/settings/telescope.lua diff --git a/modules/home/vim/plugin/settings/tree-sitter.lua b/home/vim/plugin/settings/tree-sitter.lua similarity index 100% rename from modules/home/vim/plugin/settings/tree-sitter.lua rename to home/vim/plugin/settings/tree-sitter.lua diff --git a/modules/home/vim/plugin/settings/which-key.lua b/home/vim/plugin/settings/which-key.lua similarity index 100% rename from modules/home/vim/plugin/settings/which-key.lua rename to home/vim/plugin/settings/which-key.lua diff --git a/modules/home/vim/plugin/signtoggle.lua b/home/vim/plugin/signtoggle.lua similarity index 100% rename from modules/home/vim/plugin/signtoggle.lua rename to home/vim/plugin/signtoggle.lua diff --git a/modules/home/wm/cursor/default.nix b/home/wm/cursor/default.nix similarity index 100% rename from modules/home/wm/cursor/default.nix rename to home/wm/cursor/default.nix diff --git a/modules/home/wm/default.nix b/home/wm/default.nix similarity index 100% rename from modules/home/wm/default.nix rename to home/wm/default.nix diff --git a/modules/home/wm/dunst/default.nix b/home/wm/dunst/default.nix similarity index 100% rename from modules/home/wm/dunst/default.nix rename to home/wm/dunst/default.nix diff --git a/modules/home/wm/i3/default.nix b/home/wm/i3/default.nix similarity index 100% rename from modules/home/wm/i3/default.nix rename to home/wm/i3/default.nix diff --git a/modules/home/wm/i3bar/default.nix b/home/wm/i3bar/default.nix similarity index 100% rename from modules/home/wm/i3bar/default.nix rename to home/wm/i3bar/default.nix diff --git a/modules/home/wm/rofi/default.nix b/home/wm/rofi/default.nix similarity index 100% rename from modules/home/wm/rofi/default.nix rename to home/wm/rofi/default.nix diff --git a/modules/home/wm/screen-lock/default.nix b/home/wm/screen-lock/default.nix similarity index 100% rename from modules/home/wm/screen-lock/default.nix rename to home/wm/screen-lock/default.nix diff --git a/modules/home/x/default.nix b/home/x/default.nix similarity index 100% rename from modules/home/x/default.nix rename to home/x/default.nix diff --git a/modules/home/x/keyboard/default.nix b/home/x/keyboard/default.nix similarity index 100% rename from modules/home/x/keyboard/default.nix rename to home/x/keyboard/default.nix diff --git a/modules/home/xdg/default.nix b/home/xdg/default.nix similarity index 100% rename from modules/home/xdg/default.nix rename to home/xdg/default.nix diff --git a/modules/home/zathura/default.nix b/home/zathura/default.nix similarity index 100% rename from modules/home/zathura/default.nix rename to home/zathura/default.nix diff --git a/modules/home/zsh/completion-styles.zsh b/home/zsh/completion-styles.zsh similarity index 100% rename from modules/home/zsh/completion-styles.zsh rename to home/zsh/completion-styles.zsh diff --git a/modules/home/zsh/default.nix b/home/zsh/default.nix similarity index 100% rename from modules/home/zsh/default.nix rename to home/zsh/default.nix diff --git a/modules/home/zsh/extra-mappings.zsh b/home/zsh/extra-mappings.zsh similarity index 100% rename from modules/home/zsh/extra-mappings.zsh rename to home/zsh/extra-mappings.zsh diff --git a/modules/home/zsh/options.zsh b/home/zsh/options.zsh similarity index 100% rename from modules/home/zsh/options.zsh rename to home/zsh/options.zsh diff --git a/hosts/homes/ambroisie@mousqueton/default.nix b/hosts/homes/ambroisie@mousqueton/default.nix index 7fcd356..ac73da6 100644 --- a/hosts/homes/ambroisie@mousqueton/default.nix +++ b/hosts/homes/ambroisie@mousqueton/default.nix @@ -17,13 +17,11 @@ services.gpg-agent.enable = lib.mkForce false; - my.home = { - tmux = { - # I use scripts that use the passthrough sequence often on this host - enablePassthrough = true; + # I use scripts that use the passthrough sequence often on this host + my.home.tmux.enablePassthrough = true; - # HTerm uses `xterm-256color` as its `$TERM`, so use that here - trueColorTerminals = [ "xterm-256color" ]; - }; - }; + programs.tmux.extraConfig = '' + # Setup 24-bit color explicitly, as the default terminfo entry does not + set-option -sa terminal-overrides ",xterm-256color:Tc" + ''; } diff --git a/hosts/nixos/aramis/default.nix b/hosts/nixos/aramis/default.nix index 6e0304f..c72fb11 100644 --- a/hosts/nixos/aramis/default.nix +++ b/hosts/nixos/aramis/default.nix @@ -15,7 +15,6 @@ ./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 4d2ac7d..d86da5a 100644 --- a/hosts/nixos/aramis/profiles.nix +++ b/hosts/nixos/aramis/profiles.nix @@ -9,6 +9,8 @@ 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 deleted file mode 100644 index 5e69222..0000000 --- a/hosts/nixos/aramis/system.nix +++ /dev/null @@ -1,10 +0,0 @@ -# Core system configuration -{ ... }: -{ - my.system = { - # Printers are hell, but so is the unability to print - printing = { - enable = true; - }; - }; -} diff --git a/hosts/nixos/porthos/default.nix b/hosts/nixos/porthos/default.nix index 2dea899..326d1cd 100644 --- a/hosts/nixos/porthos/default.nix +++ b/hosts/nixos/porthos/default.nix @@ -9,7 +9,6 @@ ./networking.nix ./secrets ./services.nix - ./system.nix ./users.nix ]; diff --git a/hosts/nixos/porthos/home.nix b/hosts/nixos/porthos/home.nix index 90aa0ec..53d5d25 100644 --- a/hosts/nixos/porthos/home.nix +++ b/hosts/nixos/porthos/home.nix @@ -1,12 +1,6 @@ { ... }: { my.home = { - # Allow using 24bit color when SSH-ing from various clients - tmux.trueColorTerminals = [ - # My usual terminal, e.g: on laptop - "alacritty" - ]; - # Always start a tmux session when opening a shell session zsh.launchTmux = true; }; diff --git a/hosts/nixos/porthos/system.nix b/hosts/nixos/porthos/system.nix deleted file mode 100644 index 07b9947..0000000 --- a/hosts/nixos/porthos/system.nix +++ /dev/null @@ -1,12 +0,0 @@ -# Core system configuration -{ ... }: -{ - my.system = { - nix = { - cache = { - # This server is the one serving the cache, don't try to query it - selfHosted = false; - }; - }; - }; -} diff --git a/lib/lists.nix b/lib/lists.nix index 6c2fadd..190198e 100644 --- a/lib/lists.nix +++ b/lib/lists.nix @@ -24,10 +24,4 @@ in # (any -> value) # [ any ] mapFilter = pred: f: attrs: filter pred (map f attrs); - - # Transform a nullable value into a list of zero/one element. - # - # nullableToList :: - # (nullable a) -> [ a ] - nullableToList = x: if x != null then [ x ] else [ ]; } diff --git a/modules/nixos/default.nix b/modules/default.nix similarity index 96% rename from modules/nixos/default.nix rename to modules/default.nix index 3648631..2eaa2e6 100644 --- a/modules/nixos/default.nix +++ b/modules/default.nix @@ -5,7 +5,6 @@ imports = [ ./hardware ./home - ./profiles ./programs ./secrets ./services diff --git a/modules/nixos/hardware/bluetooth/default.nix b/modules/hardware/bluetooth/default.nix similarity index 100% rename from modules/nixos/hardware/bluetooth/default.nix rename to modules/hardware/bluetooth/default.nix diff --git a/modules/nixos/hardware/default.nix b/modules/hardware/default.nix similarity index 100% rename from modules/nixos/hardware/default.nix rename to modules/hardware/default.nix diff --git a/modules/nixos/hardware/ergodox/default.nix b/modules/hardware/ergodox/default.nix similarity index 100% rename from modules/nixos/hardware/ergodox/default.nix rename to modules/hardware/ergodox/default.nix diff --git a/modules/nixos/hardware/firmware/default.nix b/modules/hardware/firmware/default.nix similarity index 100% rename from modules/nixos/hardware/firmware/default.nix rename to modules/hardware/firmware/default.nix diff --git a/modules/nixos/hardware/mx-ergo/default.nix b/modules/hardware/mx-ergo/default.nix similarity index 100% rename from modules/nixos/hardware/mx-ergo/default.nix rename to modules/hardware/mx-ergo/default.nix diff --git a/modules/nixos/hardware/networking/default.nix b/modules/hardware/networking/default.nix similarity index 100% rename from modules/nixos/hardware/networking/default.nix rename to modules/hardware/networking/default.nix diff --git a/modules/nixos/hardware/sound/default.nix b/modules/hardware/sound/default.nix similarity index 100% rename from modules/nixos/hardware/sound/default.nix rename to modules/hardware/sound/default.nix diff --git a/modules/nixos/hardware/upower/default.nix b/modules/hardware/upower/default.nix similarity index 100% rename from modules/nixos/hardware/upower/default.nix rename to modules/hardware/upower/default.nix diff --git a/modules/home/default.nix b/modules/home/default.nix index 8ba3a8d..1e0e0aa 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -1,56 +1,29 @@ -{ ... }: +{ config, inputs, lib, ... }: +let + actualPath = [ "home-manager" "users" config.my.user.name "my" "home" ]; + aliasPath = [ "my" "home" ]; + + cfg = config.my.user.home; +in { imports = [ - ./aliases - ./atuin - ./bat - ./bitwarden - ./bluetooth - ./calibre - ./comma - ./dircolors - ./direnv - ./discord - ./documentation - ./feh - ./firefox - ./flameshot - ./fzf - ./gammastep - ./gdb - ./git - ./gpg - ./gtk - ./htop - ./jq - ./mail - ./mpv - ./nix - ./nix-index - ./nixpkgs - ./nm-applet - ./packages - ./pager - ./power-alert - ./secrets - ./ssh - ./terminal - ./tmux - ./udiskie - ./vim - ./wm - ./x - ./xdg - ./zathura - ./zsh + inputs.home-manager.nixosModules.home-manager # enable home-manager options + (lib.mkAliasOptionModule aliasPath actualPath) # simplify setting home options ]; - # First sane reproducible version - home.stateVersion = "20.09"; + 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; - # Who am I? - home.username = "ambroisie"; + # Nix Flakes compatibility + useGlobalPkgs = true; + useUserPackages = true; - # Start services automatically - systemd.user.startServices = "sd-switch"; + # Forward inputs to home-manager configuration + extraSpecialArgs = { + inherit inputs; + }; + }; + }; } diff --git a/modules/nixos/home/default.nix b/modules/nixos/home/default.nix deleted file mode 100644 index fe00704..0000000 --- a/modules/nixos/home/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ config, inputs, lib, ... }: -let - actualPath = [ "home-manager" "users" config.my.user.name "my" "home" ]; - aliasPath = [ "my" "home" ]; - - cfg = config.my.user.home; -in -{ - imports = [ - inputs.home-manager.nixosModules.home-manager # enable home-manager options - (lib.mkAliasOptionModule aliasPath actualPath) # simplify setting home options - ]; - - config = lib.mkIf cfg.enable { - home-manager = { - # Not a fan of out-of-directory imports, but this is a good exception - users.${config.my.user.name} = import "${inputs.self}/modules/home"; - - # Nix Flakes compatibility - useGlobalPkgs = true; - useUserPackages = true; - - # Forward inputs to home-manager configuration - extraSpecialArgs = { - inherit inputs; - }; - }; - }; -} diff --git a/modules/nixos/programs/default.nix b/modules/programs/default.nix similarity index 100% rename from modules/nixos/programs/default.nix rename to modules/programs/default.nix diff --git a/modules/nixos/programs/steam/default.nix b/modules/programs/steam/default.nix similarity index 100% rename from modules/nixos/programs/steam/default.nix rename to modules/programs/steam/default.nix diff --git a/modules/nixos/secrets/default.nix b/modules/secrets/default.nix similarity index 100% rename from modules/nixos/secrets/default.nix rename to modules/secrets/default.nix diff --git a/modules/nixos/secrets/secrets.nix b/modules/secrets/secrets.nix similarity index 100% rename from modules/nixos/secrets/secrets.nix rename to modules/secrets/secrets.nix diff --git a/modules/nixos/secrets/users/ambroisie/hashed-password.age b/modules/secrets/users/ambroisie/hashed-password.age similarity index 100% rename from modules/nixos/secrets/users/ambroisie/hashed-password.age rename to modules/secrets/users/ambroisie/hashed-password.age diff --git a/modules/nixos/secrets/users/root/hashed-password.age b/modules/secrets/users/root/hashed-password.age similarity index 100% rename from modules/nixos/secrets/users/root/hashed-password.age rename to modules/secrets/users/root/hashed-password.age diff --git a/modules/nixos/services/adblock/default.nix b/modules/services/adblock/default.nix similarity index 100% rename from modules/nixos/services/adblock/default.nix rename to modules/services/adblock/default.nix diff --git a/modules/nixos/services/backup/default.nix b/modules/services/backup/default.nix similarity index 100% rename from modules/nixos/services/backup/default.nix rename to modules/services/backup/default.nix diff --git a/modules/nixos/services/blog/default.nix b/modules/services/blog/default.nix similarity index 100% rename from modules/nixos/services/blog/default.nix rename to modules/services/blog/default.nix diff --git a/modules/nixos/services/calibre-web/default.nix b/modules/services/calibre-web/default.nix similarity index 100% rename from modules/nixos/services/calibre-web/default.nix rename to modules/services/calibre-web/default.nix diff --git a/modules/nixos/services/default.nix b/modules/services/default.nix similarity index 100% rename from modules/nixos/services/default.nix rename to modules/services/default.nix diff --git a/modules/nixos/services/drone/default.nix b/modules/services/drone/default.nix similarity index 100% rename from modules/nixos/services/drone/default.nix rename to modules/services/drone/default.nix diff --git a/modules/nixos/services/drone/runner-docker/default.nix b/modules/services/drone/runner-docker/default.nix similarity index 100% rename from modules/nixos/services/drone/runner-docker/default.nix rename to modules/services/drone/runner-docker/default.nix diff --git a/modules/nixos/services/drone/runner-exec/default.nix b/modules/services/drone/runner-exec/default.nix similarity index 100% rename from modules/nixos/services/drone/runner-exec/default.nix rename to modules/services/drone/runner-exec/default.nix diff --git a/modules/nixos/services/drone/server/default.nix b/modules/services/drone/server/default.nix similarity index 97% rename from modules/nixos/services/drone/server/default.nix rename to modules/services/drone/server/default.nix index 0f56d29..1202010 100644 --- a/modules/nixos/services/drone/server/default.nix +++ b/modules/services/drone/server/default.nix @@ -7,7 +7,6 @@ in systemd.services.drone-server = { wantedBy = [ "multi-user.target" ]; after = [ "postgresql.service" ]; - requires = [ "postgresql.service" ]; serviceConfig = { EnvironmentFile = [ cfg.secretFile diff --git a/modules/nixos/services/fail2ban/default.nix b/modules/services/fail2ban/default.nix similarity index 100% rename from modules/nixos/services/fail2ban/default.nix rename to modules/services/fail2ban/default.nix diff --git a/modules/nixos/services/flood/default.nix b/modules/services/flood/default.nix similarity index 100% rename from modules/nixos/services/flood/default.nix rename to modules/services/flood/default.nix diff --git a/modules/nixos/services/gitea/default.nix b/modules/services/gitea/default.nix similarity index 100% rename from modules/nixos/services/gitea/default.nix rename to modules/services/gitea/default.nix diff --git a/modules/nixos/services/grocy/default.nix b/modules/services/grocy/default.nix similarity index 100% rename from modules/nixos/services/grocy/default.nix rename to modules/services/grocy/default.nix diff --git a/modules/nixos/services/indexers/default.nix b/modules/services/indexers/default.nix similarity index 100% rename from modules/nixos/services/indexers/default.nix rename to modules/services/indexers/default.nix diff --git a/modules/nixos/services/jellyfin/default.nix b/modules/services/jellyfin/default.nix similarity index 100% rename from modules/nixos/services/jellyfin/default.nix rename to modules/services/jellyfin/default.nix diff --git a/modules/nixos/services/lohr/default.nix b/modules/services/lohr/default.nix similarity index 100% rename from modules/nixos/services/lohr/default.nix rename to modules/services/lohr/default.nix diff --git a/modules/nixos/services/matrix/default.nix b/modules/services/matrix/default.nix similarity index 100% rename from modules/nixos/services/matrix/default.nix rename to modules/services/matrix/default.nix diff --git a/modules/nixos/services/miniflux/default.nix b/modules/services/miniflux/default.nix similarity index 100% rename from modules/nixos/services/miniflux/default.nix rename to modules/services/miniflux/default.nix diff --git a/modules/nixos/services/monitoring/default.nix b/modules/services/monitoring/default.nix similarity index 100% rename from modules/nixos/services/monitoring/default.nix rename to modules/services/monitoring/default.nix diff --git a/modules/nixos/services/navidrome/default.nix b/modules/services/navidrome/default.nix similarity index 100% rename from modules/nixos/services/navidrome/default.nix rename to modules/services/navidrome/default.nix diff --git a/modules/nixos/services/nextcloud/default.nix b/modules/services/nextcloud/default.nix similarity index 100% rename from modules/nixos/services/nextcloud/default.nix rename to modules/services/nextcloud/default.nix diff --git a/modules/nixos/services/nginx/default.nix b/modules/services/nginx/default.nix similarity index 98% rename from modules/nixos/services/nginx/default.nix rename to modules/services/nginx/default.nix index a28c2be..a2f357f 100644 --- a/modules/nixos/services/nginx/default.nix +++ b/modules/services/nginx/default.nix @@ -22,6 +22,7 @@ let example = 8080; description = '' Which port to proxy to, through 127.0.0.1, for this virtual host. + This option is incompatible with `root`. ''; }; @@ -39,7 +40,8 @@ let default = null; example = "/var/www/blog"; description = '' - The root folder for this virtual host. + The root folder for this virtual host. This option is incompatible + with `port`. ''; }; @@ -48,7 +50,8 @@ let default = null; example = "FIXME"; description = '' - The UNIX socket for this virtual host. + The UNIX socket for this virtual host. This option is incompatible + with `port`. ''; }; diff --git a/modules/nixos/services/nginx/sso/default.nix b/modules/services/nginx/sso/default.nix similarity index 100% rename from modules/nixos/services/nginx/sso/default.nix rename to modules/services/nginx/sso/default.nix diff --git a/modules/nixos/services/nix-cache/default.nix b/modules/services/nix-cache/default.nix similarity index 100% rename from modules/nixos/services/nix-cache/default.nix rename to modules/services/nix-cache/default.nix diff --git a/modules/nixos/services/paperless/default.nix b/modules/services/paperless/default.nix similarity index 100% rename from modules/nixos/services/paperless/default.nix rename to modules/services/paperless/default.nix diff --git a/modules/nixos/services/pirate/default.nix b/modules/services/pirate/default.nix similarity index 100% rename from modules/nixos/services/pirate/default.nix rename to modules/services/pirate/default.nix diff --git a/modules/nixos/services/podgrab/default.nix b/modules/services/podgrab/default.nix similarity index 100% rename from modules/nixos/services/podgrab/default.nix rename to modules/services/podgrab/default.nix diff --git a/modules/nixos/services/postgresql-backup/default.nix b/modules/services/postgresql-backup/default.nix similarity index 100% rename from modules/nixos/services/postgresql-backup/default.nix rename to modules/services/postgresql-backup/default.nix diff --git a/modules/nixos/services/postgresql/default.nix b/modules/services/postgresql/default.nix similarity index 100% rename from modules/nixos/services/postgresql/default.nix rename to modules/services/postgresql/default.nix diff --git a/modules/nixos/services/quassel/default.nix b/modules/services/quassel/default.nix similarity index 100% rename from modules/nixos/services/quassel/default.nix rename to modules/services/quassel/default.nix diff --git a/modules/nixos/services/rss-bridge/default.nix b/modules/services/rss-bridge/default.nix similarity index 100% rename from modules/nixos/services/rss-bridge/default.nix rename to modules/services/rss-bridge/default.nix diff --git a/modules/nixos/services/sabnzbd/default.nix b/modules/services/sabnzbd/default.nix similarity index 100% rename from modules/nixos/services/sabnzbd/default.nix rename to modules/services/sabnzbd/default.nix diff --git a/modules/nixos/services/ssh-server/default.nix b/modules/services/ssh-server/default.nix similarity index 100% rename from modules/nixos/services/ssh-server/default.nix rename to modules/services/ssh-server/default.nix diff --git a/modules/nixos/services/tandoor-recipes/default.nix b/modules/services/tandoor-recipes/default.nix similarity index 97% rename from modules/nixos/services/tandoor-recipes/default.nix rename to modules/services/tandoor-recipes/default.nix index 3688363..82350d7 100644 --- a/modules/nixos/services/tandoor-recipes/default.nix +++ b/modules/services/tandoor-recipes/default.nix @@ -50,7 +50,6 @@ in systemd.services = { tandoor-recipes = { after = [ "postgresql.service" ]; - requires = [ "postgresql.service" ]; serviceConfig = { EnvironmentFile = cfg.secretKeyFile; diff --git a/modules/nixos/services/tlp/default.nix b/modules/services/tlp/default.nix similarity index 100% rename from modules/nixos/services/tlp/default.nix rename to modules/services/tlp/default.nix diff --git a/modules/nixos/services/transmission/default.nix b/modules/services/transmission/default.nix similarity index 100% rename from modules/nixos/services/transmission/default.nix rename to modules/services/transmission/default.nix diff --git a/modules/nixos/services/vikunja/default.nix b/modules/services/vikunja/default.nix similarity index 100% rename from modules/nixos/services/vikunja/default.nix rename to modules/services/vikunja/default.nix diff --git a/modules/nixos/services/wireguard/default.nix b/modules/services/wireguard/default.nix similarity index 100% rename from modules/nixos/services/wireguard/default.nix rename to modules/services/wireguard/default.nix diff --git a/modules/nixos/services/wireguard/keys/milady/private-key.age b/modules/services/wireguard/keys/milady/private-key.age similarity index 100% rename from modules/nixos/services/wireguard/keys/milady/private-key.age rename to modules/services/wireguard/keys/milady/private-key.age diff --git a/modules/nixos/services/wireguard/keys/richelieu/private-key.age b/modules/services/wireguard/keys/richelieu/private-key.age similarity index 100% rename from modules/nixos/services/wireguard/keys/richelieu/private-key.age rename to modules/services/wireguard/keys/richelieu/private-key.age diff --git a/modules/nixos/services/wireguard/keys/secrets.nix b/modules/services/wireguard/keys/secrets.nix similarity index 100% rename from modules/nixos/services/wireguard/keys/secrets.nix rename to modules/services/wireguard/keys/secrets.nix diff --git a/modules/nixos/services/woodpecker/agent-docker/default.nix b/modules/services/woodpecker/agent-docker/default.nix similarity index 100% rename from modules/nixos/services/woodpecker/agent-docker/default.nix rename to modules/services/woodpecker/agent-docker/default.nix diff --git a/modules/nixos/services/woodpecker/agent-exec/default.nix b/modules/services/woodpecker/agent-exec/default.nix similarity index 100% rename from modules/nixos/services/woodpecker/agent-exec/default.nix rename to modules/services/woodpecker/agent-exec/default.nix diff --git a/modules/nixos/services/woodpecker/default.nix b/modules/services/woodpecker/default.nix similarity index 100% rename from modules/nixos/services/woodpecker/default.nix rename to modules/services/woodpecker/default.nix diff --git a/modules/nixos/services/woodpecker/server/default.nix b/modules/services/woodpecker/server/default.nix similarity index 92% rename from modules/nixos/services/woodpecker/server/default.nix rename to modules/services/woodpecker/server/default.nix index d9f723b..152e707 100644 --- a/modules/nixos/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}"; @@ -24,9 +24,6 @@ in }; systemd.services.woodpecker-server = { - after = [ "postgresql.service" ]; - requires = [ "postgresql.service" ]; - serviceConfig = { # Set username for DB access User = "woodpecker"; diff --git a/modules/nixos/system/boot/default.nix b/modules/system/boot/default.nix similarity index 100% rename from modules/nixos/system/boot/default.nix rename to modules/system/boot/default.nix diff --git a/modules/nixos/system/default.nix b/modules/system/default.nix similarity index 92% rename from modules/nixos/system/default.nix rename to modules/system/default.nix index e317d96..b3d9385 100644 --- a/modules/nixos/system/default.nix +++ b/modules/system/default.nix @@ -11,7 +11,6 @@ ./packages ./persist ./podman - ./printing ./users ]; } diff --git a/modules/nixos/system/docker/default.nix b/modules/system/docker/default.nix similarity index 100% rename from modules/nixos/system/docker/default.nix rename to modules/system/docker/default.nix diff --git a/modules/nixos/system/documentation/default.nix b/modules/system/documentation/default.nix similarity index 100% rename from modules/nixos/system/documentation/default.nix rename to modules/system/documentation/default.nix diff --git a/modules/nixos/system/language/default.nix b/modules/system/language/default.nix similarity index 100% rename from modules/nixos/system/language/default.nix rename to modules/system/language/default.nix diff --git a/modules/nixos/system/nix/default.nix b/modules/system/nix/default.nix similarity index 100% rename from modules/nixos/system/nix/default.nix rename to modules/system/nix/default.nix diff --git a/modules/nixos/system/packages/default.nix b/modules/system/packages/default.nix similarity index 100% rename from modules/nixos/system/packages/default.nix rename to modules/system/packages/default.nix diff --git a/modules/nixos/system/podman/default.nix b/modules/system/podman/default.nix similarity index 100% rename from modules/nixos/system/podman/default.nix rename to modules/system/podman/default.nix diff --git a/modules/nixos/system/users/default.nix b/modules/system/users/default.nix similarity index 100% rename from modules/nixos/system/users/default.nix rename to modules/system/users/default.nix diff --git a/modules/nixos/system/users/ssh/aramis.pub b/modules/system/users/ssh/aramis.pub similarity index 100% rename from modules/nixos/system/users/ssh/aramis.pub rename to modules/system/users/ssh/aramis.pub diff --git a/modules/nixos/system/users/ssh/shared.pub b/modules/system/users/ssh/shared.pub similarity index 100% rename from modules/nixos/system/users/ssh/shared.pub rename to modules/system/users/ssh/shared.pub diff --git a/overlays/gruvbox-nvim-better-diff/default.nix b/overlays/gruvbox-nvim-old-diff/default.nix similarity index 100% rename from overlays/gruvbox-nvim-better-diff/default.nix rename to overlays/gruvbox-nvim-old-diff/default.nix diff --git a/overlays/gruvbox-nvim-better-diff/generated.nix b/overlays/gruvbox-nvim-old-diff/generated.nix similarity index 95% rename from overlays/gruvbox-nvim-better-diff/generated.nix rename to overlays/gruvbox-nvim-old-diff/generated.nix index 50ea4ad..05f6271 100644 --- a/overlays/gruvbox-nvim-better-diff/generated.nix +++ b/overlays/gruvbox-nvim-old-diff/generated.nix @@ -14,7 +14,7 @@ _final: _prev: { patches = [ # Inspired by https://github.com/ellisonleao/gruvbox.nvim/pull/291 - ./colours.patch + ./old-colours.patch ]; meta = { diff --git a/overlays/gruvbox-nvim-better-diff/colours.patch b/overlays/gruvbox-nvim-old-diff/old-colours.patch similarity index 69% rename from overlays/gruvbox-nvim-better-diff/colours.patch rename to overlays/gruvbox-nvim-old-diff/old-colours.patch index 5b0d61a..99c39b4 100644 --- a/overlays/gruvbox-nvim-better-diff/colours.patch +++ b/overlays/gruvbox-nvim-old-diff/old-colours.patch @@ -1,7 +1,7 @@ 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 +Subject: feat: make invert_diff configurable --- README.md | 3 ++- @@ -20,9 +20,9 @@ index ceba0735..a319fc6a 100644 - 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 }, ++ DiffDelete = { fg = colors.bg0, bg = colors.red, reverse = config.inverse }, ++ DiffAdd = { fg = colors.bg0, bg = colors.green, reverse = config.inverse }, ++ DiffChange = { fg = colors.bg0, bg = colors.aqua, reverse = config.inverse }, ++ DiffText = { bg = colors.yellow, fg = colors.bg0, reverse = config.inverse }, SpellCap = { link = "GruvboxBlueUnderline" }, SpellBad = { link = "GruvboxRedUnderline" }, diff --git a/overlays/tandoor-recipes-bump-allauth/bump-allauth.patch b/overlays/tandoor-recipes-bump-allauth/bump-allauth.patch deleted file mode 100644 index 84dfaee..0000000 --- a/overlays/tandoor-recipes-bump-allauth/bump-allauth.patch +++ /dev/null @@ -1,38 +0,0 @@ -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 deleted file mode 100644 index dfbfec9..0000000 --- a/overlays/tandoor-recipes-bump-allauth/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -_self: prev: -{ - tandoor-recipes = prev.tandoor-recipes.overrideAttrs (oa: { - patches = (oa.patches or [ ]) ++ [ - # https://github.com/TandoorRecipes/recipes/pull/2706 - ./bump-allauth.patch - ]; - }); -} diff --git a/pkgs/default.nix b/pkgs/default.nix index 664b5a4..6558026 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -36,6 +36,8 @@ 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 new file mode 100644 index 0000000..b2c7865 --- /dev/null +++ b/pkgs/volantes-cursors/default.nix @@ -0,0 +1,44 @@ +{ 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; + }; +} diff --git a/modules/nixos/profiles/bluetooth/default.nix b/profiles/bluetooth/default.nix similarity index 100% rename from modules/nixos/profiles/bluetooth/default.nix rename to profiles/bluetooth/default.nix diff --git a/modules/nixos/profiles/default.nix b/profiles/default.nix similarity index 92% rename from modules/nixos/profiles/default.nix rename to profiles/default.nix index 43d5a84..f7914a1 100644 --- a/modules/nixos/profiles/default.nix +++ b/profiles/default.nix @@ -6,6 +6,7 @@ ./devices ./gtk ./laptop + ./printing ./wm ./x ]; diff --git a/modules/nixos/profiles/devices/default.nix b/profiles/devices/default.nix similarity index 100% rename from modules/nixos/profiles/devices/default.nix rename to profiles/devices/default.nix diff --git a/modules/nixos/profiles/gtk/default.nix b/profiles/gtk/default.nix similarity index 100% rename from modules/nixos/profiles/gtk/default.nix rename to profiles/gtk/default.nix diff --git a/modules/nixos/profiles/laptop/default.nix b/profiles/laptop/default.nix similarity index 100% rename from modules/nixos/profiles/laptop/default.nix rename to profiles/laptop/default.nix diff --git a/modules/nixos/system/printing/default.nix b/profiles/printing/default.nix similarity index 90% rename from modules/nixos/system/printing/default.nix rename to profiles/printing/default.nix index a4547ef..9965797 100644 --- a/modules/nixos/system/printing/default.nix +++ b/profiles/printing/default.nix @@ -1,10 +1,10 @@ { config, lib, pkgs, ... }: let - cfg = config.my.system.printing; + cfg = config.my.profiles.printing; in { - options.my.system.printing = with lib; { - enable = mkEnableOption "printing configuration"; + options.my.profiles.printing = with lib; { + enable = mkEnableOption "printing profile"; papersize = mkOption { type = with types; either str (enum [ diff --git a/modules/nixos/profiles/wm/default.nix b/profiles/wm/default.nix similarity index 100% rename from modules/nixos/profiles/wm/default.nix rename to profiles/wm/default.nix diff --git a/modules/nixos/profiles/x/default.nix b/profiles/x/default.nix similarity index 100% rename from modules/nixos/profiles/x/default.nix rename to profiles/x/default.nix