diff --git a/flake.lock b/flake.lock index 1c7b71b..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": { @@ -145,29 +145,13 @@ "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": 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": { @@ -179,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": { @@ -228,7 +212,6 @@ "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 7970759..8e46ea3 100644 --- a/flake.nix +++ b/flake.nix @@ -39,13 +39,6 @@ }; }; - 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 2c5b65a..61c9f6e 100644 --- a/flake/home-manager.nix +++ b/flake/home-manager.nix @@ -2,7 +2,7 @@ let defaultModules = [ # Include generic settings - "${self}/home" + "${self}/modules/home" { # Basic user information defaults home.username = lib.mkDefault "ambroisie"; diff --git a/flake/nixos.nix b/flake/nixos.nix index 9eb6388..fe124d7 100644 --- a/flake/nixos.nix +++ b/flake/nixos.nix @@ -13,9 +13,7 @@ let ]; } # Include generic settings - "${self}/modules" - # Include bundles of settings - "${self}/profiles" + "${self}/modules/nixos" ]; buildHost = name: system: lib.nixosSystem { diff --git a/home/default.nix b/home/default.nix deleted file mode 100644 index 8ba3a8d..0000000 --- a/home/default.nix +++ /dev/null @@ -1,56 +0,0 @@ -{ ... }: -{ - imports = [ - ./aliases - ./atuin - ./bat - ./bitwarden - ./bluetooth - ./calibre - ./comma - ./dircolors - ./direnv - ./discord - ./documentation - ./feh - ./firefox - ./flameshot - ./fzf - ./gammastep - ./gdb - ./git - ./gpg - ./gtk - ./htop - ./jq - ./mail - ./mpv - ./nix - ./nix-index - ./nixpkgs - ./nm-applet - ./packages - ./pager - ./power-alert - ./secrets - ./ssh - ./terminal - ./tmux - ./udiskie - ./vim - ./wm - ./x - ./xdg - ./zathura - ./zsh - ]; - - # First sane reproducible version - home.stateVersion = "20.09"; - - # Who am I? - home.username = "ambroisie"; - - # Start services automatically - systemd.user.startServices = "sd-switch"; -} diff --git a/hosts/homes/ambroisie@mousqueton/default.nix b/hosts/homes/ambroisie@mousqueton/default.nix index ac73da6..7fcd356 100644 --- a/hosts/homes/ambroisie@mousqueton/default.nix +++ b/hosts/homes/ambroisie@mousqueton/default.nix @@ -17,11 +17,13 @@ services.gpg-agent.enable = lib.mkForce false; - # I use scripts that use the passthrough sequence often on this host - my.home.tmux.enablePassthrough = true; + my.home = { + tmux = { + # I use scripts that use the passthrough sequence often on this host + enablePassthrough = true; - programs.tmux.extraConfig = '' - # Setup 24-bit color explicitly, as the default terminfo entry does not - set-option -sa terminal-overrides ",xterm-256color:Tc" - ''; + # HTerm uses `xterm-256color` as its `$TERM`, so use that here + trueColorTerminals = [ "xterm-256color" ]; + }; + }; } diff --git a/hosts/nixos/aramis/default.nix b/hosts/nixos/aramis/default.nix index c72fb11..6e0304f 100644 --- a/hosts/nixos/aramis/default.nix +++ b/hosts/nixos/aramis/default.nix @@ -15,6 +15,7 @@ ./secrets ./services.nix ./sound.nix + ./system.nix ]; # Set your time zone. diff --git a/hosts/nixos/aramis/profiles.nix b/hosts/nixos/aramis/profiles.nix index d86da5a..4d2ac7d 100644 --- a/hosts/nixos/aramis/profiles.nix +++ b/hosts/nixos/aramis/profiles.nix @@ -9,8 +9,6 @@ gtk.enable = true; # Laptop specific configuration laptop.enable = true; - # Printers are hell, but so is the unability to print - printing.enable = true; # i3 configuration wm.windowManager = "i3"; # X configuration diff --git a/hosts/nixos/aramis/system.nix b/hosts/nixos/aramis/system.nix new file mode 100644 index 0000000..5e69222 --- /dev/null +++ b/hosts/nixos/aramis/system.nix @@ -0,0 +1,10 @@ +# Core system configuration +{ ... }: +{ + my.system = { + # Printers are hell, but so is the unability to print + printing = { + enable = true; + }; + }; +} diff --git a/hosts/nixos/porthos/default.nix b/hosts/nixos/porthos/default.nix index 326d1cd..2dea899 100644 --- a/hosts/nixos/porthos/default.nix +++ b/hosts/nixos/porthos/default.nix @@ -9,6 +9,7 @@ ./networking.nix ./secrets ./services.nix + ./system.nix ./users.nix ]; diff --git a/hosts/nixos/porthos/home.nix b/hosts/nixos/porthos/home.nix index 53d5d25..90aa0ec 100644 --- a/hosts/nixos/porthos/home.nix +++ b/hosts/nixos/porthos/home.nix @@ -1,6 +1,12 @@ { ... }: { my.home = { + # Allow using 24bit color when SSH-ing from various clients + tmux.trueColorTerminals = [ + # My usual terminal, e.g: on laptop + "alacritty" + ]; + # Always start a tmux session when opening a shell session zsh.launchTmux = true; }; diff --git a/hosts/nixos/porthos/system.nix b/hosts/nixos/porthos/system.nix new file mode 100644 index 0000000..07b9947 --- /dev/null +++ b/hosts/nixos/porthos/system.nix @@ -0,0 +1,12 @@ +# Core system configuration +{ ... }: +{ + my.system = { + nix = { + cache = { + # This server is the one serving the cache, don't try to query it + selfHosted = false; + }; + }; + }; +} diff --git a/lib/lists.nix b/lib/lists.nix index 190198e..6c2fadd 100644 --- a/lib/lists.nix +++ b/lib/lists.nix @@ -24,4 +24,10 @@ in # (any -> value) # [ any ] mapFilter = pred: f: attrs: filter pred (map f attrs); + + # Transform a nullable value into a list of zero/one element. + # + # nullableToList :: + # (nullable a) -> [ a ] + nullableToList = x: if x != null then [ x ] else [ ]; } diff --git a/home/aliases/default.nix b/modules/home/aliases/default.nix similarity index 100% rename from home/aliases/default.nix rename to modules/home/aliases/default.nix diff --git a/home/atuin/default.nix b/modules/home/atuin/default.nix similarity index 100% rename from home/atuin/default.nix rename to modules/home/atuin/default.nix diff --git a/home/bat/default.nix b/modules/home/bat/default.nix similarity index 100% rename from home/bat/default.nix rename to modules/home/bat/default.nix diff --git a/home/bitwarden/default.nix b/modules/home/bitwarden/default.nix similarity index 100% rename from home/bitwarden/default.nix rename to modules/home/bitwarden/default.nix diff --git a/home/bluetooth/default.nix b/modules/home/bluetooth/default.nix similarity index 100% rename from home/bluetooth/default.nix rename to modules/home/bluetooth/default.nix diff --git a/home/calibre/default.nix b/modules/home/calibre/default.nix similarity index 100% rename from home/calibre/default.nix rename to modules/home/calibre/default.nix diff --git a/home/comma/default.nix b/modules/home/comma/default.nix similarity index 100% rename from home/comma/default.nix rename to modules/home/comma/default.nix diff --git a/modules/home/default.nix b/modules/home/default.nix index 1e0e0aa..8ba3a8d 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -1,29 +1,56 @@ -{ config, inputs, lib, ... }: -let - actualPath = [ "home-manager" "users" config.my.user.name "my" "home" ]; - aliasPath = [ "my" "home" ]; - - cfg = config.my.user.home; -in +{ ... }: { imports = [ - inputs.home-manager.nixosModules.home-manager # enable home-manager options - (lib.mkAliasOptionModule aliasPath actualPath) # simplify setting home options + ./aliases + ./atuin + ./bat + ./bitwarden + ./bluetooth + ./calibre + ./comma + ./dircolors + ./direnv + ./discord + ./documentation + ./feh + ./firefox + ./flameshot + ./fzf + ./gammastep + ./gdb + ./git + ./gpg + ./gtk + ./htop + ./jq + ./mail + ./mpv + ./nix + ./nix-index + ./nixpkgs + ./nm-applet + ./packages + ./pager + ./power-alert + ./secrets + ./ssh + ./terminal + ./tmux + ./udiskie + ./vim + ./wm + ./x + ./xdg + ./zathura + ./zsh ]; - config = lib.mkIf cfg.enable { - home-manager = { - # Not a fan of out-of-directory imports, but this is a good exception - users.${config.my.user.name} = import ../../home; + # First sane reproducible version + home.stateVersion = "20.09"; - # Nix Flakes compatibility - useGlobalPkgs = true; - useUserPackages = true; + # Who am I? + home.username = "ambroisie"; - # Forward inputs to home-manager configuration - extraSpecialArgs = { - inherit inputs; - }; - }; - }; + # Start services automatically + systemd.user.startServices = "sd-switch"; } diff --git a/home/dircolors/default.nix b/modules/home/dircolors/default.nix similarity index 100% rename from home/dircolors/default.nix rename to modules/home/dircolors/default.nix diff --git a/home/direnv/default.nix b/modules/home/direnv/default.nix similarity index 100% rename from home/direnv/default.nix rename to modules/home/direnv/default.nix diff --git a/home/direnv/lib/nix.sh b/modules/home/direnv/lib/nix.sh similarity index 100% rename from home/direnv/lib/nix.sh rename to modules/home/direnv/lib/nix.sh diff --git a/home/direnv/lib/postgres.sh b/modules/home/direnv/lib/postgres.sh similarity index 100% rename from home/direnv/lib/postgres.sh rename to modules/home/direnv/lib/postgres.sh diff --git a/home/direnv/lib/python.sh b/modules/home/direnv/lib/python.sh similarity index 100% rename from home/direnv/lib/python.sh rename to modules/home/direnv/lib/python.sh diff --git a/home/discord/default.nix b/modules/home/discord/default.nix similarity index 100% rename from home/discord/default.nix rename to modules/home/discord/default.nix diff --git a/home/documentation/default.nix b/modules/home/documentation/default.nix similarity index 100% rename from home/documentation/default.nix rename to modules/home/documentation/default.nix diff --git a/home/feh/default.nix b/modules/home/feh/default.nix similarity index 100% rename from home/feh/default.nix rename to modules/home/feh/default.nix diff --git a/home/firefox/default.nix b/modules/home/firefox/default.nix similarity index 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 77% rename from home/tmux/default.nix rename to modules/home/tmux/default.nix index e554fd0..08aeb55 100644 --- a/home/tmux/default.nix +++ b/modules/home/tmux/default.nix @@ -11,6 +11,19 @@ in enable = my.mkDisableOption "tmux terminal multiplexer"; enablePassthrough = mkEnableOption "tmux DCS passthrough sequence"; + + trueColorTerminals = mkOption { + type = with types; listOf str; + default = lib.my.nullableToList config.my.home.terminal.program; + defaultText = '' + `[ config.my.home.terminal.program ]` if it is non-null, otherwise an + empty list. + ''; + example = [ "xterm-256color" ]; + description = '' + $TERM values which should be considered to always support 24-bit color. + ''; + }; }; config.programs.tmux = lib.mkIf cfg.enable { @@ -75,6 +88,14 @@ in set -g allow-passthrough on '' } + + # Force 24-bit color for each relevant $TERM + ${ + let + mkTcFlag = term: ''set -as terminal-features ",${term}:RGB"''; + in + lib.concatMapStringsSep "\n" mkTcFlag cfg.trueColorTerminals + } ''; }; } diff --git a/home/udiskie/default.nix b/modules/home/udiskie/default.nix similarity index 100% rename from home/udiskie/default.nix rename to modules/home/udiskie/default.nix diff --git a/home/vim/after/ftplugin/beancount.vim b/modules/home/vim/after/ftplugin/beancount.vim similarity index 100% rename from home/vim/after/ftplugin/beancount.vim rename to modules/home/vim/after/ftplugin/beancount.vim diff --git a/home/vim/after/ftplugin/cmake.vim b/modules/home/vim/after/ftplugin/cmake.vim similarity index 100% rename from home/vim/after/ftplugin/cmake.vim rename to modules/home/vim/after/ftplugin/cmake.vim diff --git a/home/vim/after/ftplugin/fugitive.vim b/modules/home/vim/after/ftplugin/fugitive.vim similarity index 100% rename from home/vim/after/ftplugin/fugitive.vim rename to modules/home/vim/after/ftplugin/fugitive.vim diff --git a/home/vim/after/ftplugin/gitcommit.vim b/modules/home/vim/after/ftplugin/gitcommit.vim similarity index 100% rename from home/vim/after/ftplugin/gitcommit.vim rename to modules/home/vim/after/ftplugin/gitcommit.vim diff --git a/home/vim/after/ftplugin/gitconfig.vim b/modules/home/vim/after/ftplugin/gitconfig.vim similarity index 100% rename from home/vim/after/ftplugin/gitconfig.vim rename to modules/home/vim/after/ftplugin/gitconfig.vim diff --git a/home/vim/after/ftplugin/haskell.vim b/modules/home/vim/after/ftplugin/haskell.vim similarity index 100% rename from home/vim/after/ftplugin/haskell.vim rename to modules/home/vim/after/ftplugin/haskell.vim diff --git a/home/vim/after/ftplugin/help.vim b/modules/home/vim/after/ftplugin/help.vim similarity index 100% rename from home/vim/after/ftplugin/help.vim rename to modules/home/vim/after/ftplugin/help.vim diff --git a/home/vim/after/ftplugin/mail.vim b/modules/home/vim/after/ftplugin/mail.vim similarity index 100% rename from home/vim/after/ftplugin/mail.vim rename to modules/home/vim/after/ftplugin/mail.vim diff --git a/home/vim/after/ftplugin/make.vim b/modules/home/vim/after/ftplugin/make.vim similarity index 100% rename from home/vim/after/ftplugin/make.vim rename to modules/home/vim/after/ftplugin/make.vim diff --git a/home/vim/after/ftplugin/markdown.vim b/modules/home/vim/after/ftplugin/markdown.vim similarity index 100% rename from home/vim/after/ftplugin/markdown.vim rename to modules/home/vim/after/ftplugin/markdown.vim diff --git a/home/vim/after/ftplugin/netrw.vim b/modules/home/vim/after/ftplugin/netrw.vim similarity index 100% rename from home/vim/after/ftplugin/netrw.vim rename to modules/home/vim/after/ftplugin/netrw.vim diff --git a/home/vim/after/ftplugin/nix.vim b/modules/home/vim/after/ftplugin/nix.vim similarity index 100% rename from home/vim/after/ftplugin/nix.vim rename to modules/home/vim/after/ftplugin/nix.vim diff --git a/home/vim/after/ftplugin/python.vim b/modules/home/vim/after/ftplugin/python.vim similarity index 100% rename from home/vim/after/ftplugin/python.vim rename to modules/home/vim/after/ftplugin/python.vim diff --git a/home/vim/after/ftplugin/rust.vim b/modules/home/vim/after/ftplugin/rust.vim similarity index 100% rename from home/vim/after/ftplugin/rust.vim rename to modules/home/vim/after/ftplugin/rust.vim diff --git a/home/vim/after/ftplugin/tex.vim b/modules/home/vim/after/ftplugin/tex.vim similarity index 100% rename from home/vim/after/ftplugin/tex.vim rename to modules/home/vim/after/ftplugin/tex.vim diff --git a/home/vim/after/ftplugin/tiger.vim b/modules/home/vim/after/ftplugin/tiger.vim similarity index 100% rename from home/vim/after/ftplugin/tiger.vim rename to modules/home/vim/after/ftplugin/tiger.vim diff --git a/home/vim/after/ftplugin/yaml.vim b/modules/home/vim/after/ftplugin/yaml.vim similarity index 100% rename from home/vim/after/ftplugin/yaml.vim rename to modules/home/vim/after/ftplugin/yaml.vim diff --git a/home/vim/after/plugin/mappings/commentary.lua b/modules/home/vim/after/plugin/mappings/commentary.lua similarity index 100% rename from home/vim/after/plugin/mappings/commentary.lua rename to modules/home/vim/after/plugin/mappings/commentary.lua diff --git a/home/vim/after/plugin/mappings/misc.lua b/modules/home/vim/after/plugin/mappings/misc.lua similarity index 100% rename from home/vim/after/plugin/mappings/misc.lua rename to modules/home/vim/after/plugin/mappings/misc.lua diff --git a/home/vim/after/plugin/mappings/telescope.lua b/modules/home/vim/after/plugin/mappings/telescope.lua similarity index 100% rename from home/vim/after/plugin/mappings/telescope.lua rename to modules/home/vim/after/plugin/mappings/telescope.lua diff --git a/home/vim/after/plugin/mappings/tree-sitter-textobjects.lua b/modules/home/vim/after/plugin/mappings/tree-sitter-textobjects.lua similarity index 100% rename from home/vim/after/plugin/mappings/tree-sitter-textobjects.lua rename to modules/home/vim/after/plugin/mappings/tree-sitter-textobjects.lua diff --git a/home/vim/after/plugin/mappings/unimpaired.lua b/modules/home/vim/after/plugin/mappings/unimpaired.lua similarity index 100% rename from home/vim/after/plugin/mappings/unimpaired.lua rename to modules/home/vim/after/plugin/mappings/unimpaired.lua diff --git a/home/vim/autoload/ftplugined.vim b/modules/home/vim/autoload/ftplugined.vim similarity index 100% rename from home/vim/autoload/ftplugined.vim rename to modules/home/vim/autoload/ftplugined.vim diff --git a/home/vim/default.nix b/modules/home/vim/default.nix similarity index 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/default.nix b/modules/nixos/default.nix similarity index 96% rename from modules/default.nix rename to modules/nixos/default.nix index 2eaa2e6..3648631 100644 --- a/modules/default.nix +++ b/modules/nixos/default.nix @@ -5,6 +5,7 @@ imports = [ ./hardware ./home + ./profiles ./programs ./secrets ./services diff --git a/modules/hardware/bluetooth/default.nix b/modules/nixos/hardware/bluetooth/default.nix similarity index 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/nixos/home/default.nix b/modules/nixos/home/default.nix new file mode 100644 index 0000000..fe00704 --- /dev/null +++ b/modules/nixos/home/default.nix @@ -0,0 +1,29 @@ +{ config, inputs, lib, ... }: +let + actualPath = [ "home-manager" "users" config.my.user.name "my" "home" ]; + aliasPath = [ "my" "home" ]; + + cfg = config.my.user.home; +in +{ + imports = [ + inputs.home-manager.nixosModules.home-manager # enable home-manager options + (lib.mkAliasOptionModule aliasPath actualPath) # simplify setting home options + ]; + + config = lib.mkIf cfg.enable { + home-manager = { + # Not a fan of out-of-directory imports, but this is a good exception + users.${config.my.user.name} = import "${inputs.self}/modules/home"; + + # Nix Flakes compatibility + useGlobalPkgs = true; + useUserPackages = true; + + # Forward inputs to home-manager configuration + extraSpecialArgs = { + inherit inputs; + }; + }; + }; +} diff --git a/profiles/bluetooth/default.nix b/modules/nixos/profiles/bluetooth/default.nix similarity index 100% rename from profiles/bluetooth/default.nix rename to modules/nixos/profiles/bluetooth/default.nix diff --git a/profiles/default.nix b/modules/nixos/profiles/default.nix similarity index 92% rename from profiles/default.nix rename to modules/nixos/profiles/default.nix index f7914a1..43d5a84 100644 --- a/profiles/default.nix +++ b/modules/nixos/profiles/default.nix @@ -6,7 +6,6 @@ ./devices ./gtk ./laptop - ./printing ./wm ./x ]; diff --git a/profiles/devices/default.nix b/modules/nixos/profiles/devices/default.nix similarity index 100% rename from profiles/devices/default.nix rename to modules/nixos/profiles/devices/default.nix diff --git a/profiles/gtk/default.nix b/modules/nixos/profiles/gtk/default.nix similarity index 100% rename from profiles/gtk/default.nix rename to modules/nixos/profiles/gtk/default.nix diff --git a/profiles/laptop/default.nix b/modules/nixos/profiles/laptop/default.nix similarity index 100% rename from profiles/laptop/default.nix rename to modules/nixos/profiles/laptop/default.nix diff --git a/profiles/wm/default.nix b/modules/nixos/profiles/wm/default.nix similarity index 100% rename from profiles/wm/default.nix rename to modules/nixos/profiles/wm/default.nix diff --git a/profiles/x/default.nix b/modules/nixos/profiles/x/default.nix similarity index 100% rename from profiles/x/default.nix rename to modules/nixos/profiles/x/default.nix diff --git a/modules/programs/default.nix b/modules/nixos/programs/default.nix similarity index 100% rename from modules/programs/default.nix rename to modules/nixos/programs/default.nix diff --git a/modules/programs/steam/default.nix b/modules/nixos/programs/steam/default.nix similarity index 100% rename from modules/programs/steam/default.nix rename to modules/nixos/programs/steam/default.nix diff --git a/modules/secrets/default.nix b/modules/nixos/secrets/default.nix similarity index 100% rename from modules/secrets/default.nix rename to modules/nixos/secrets/default.nix diff --git a/modules/secrets/secrets.nix b/modules/nixos/secrets/secrets.nix similarity index 100% rename from modules/secrets/secrets.nix rename to modules/nixos/secrets/secrets.nix diff --git a/modules/secrets/users/ambroisie/hashed-password.age b/modules/nixos/secrets/users/ambroisie/hashed-password.age similarity index 100% rename from modules/secrets/users/ambroisie/hashed-password.age rename to modules/nixos/secrets/users/ambroisie/hashed-password.age diff --git a/modules/secrets/users/root/hashed-password.age b/modules/nixos/secrets/users/root/hashed-password.age similarity index 100% rename from modules/secrets/users/root/hashed-password.age rename to modules/nixos/secrets/users/root/hashed-password.age diff --git a/modules/services/adblock/default.nix b/modules/nixos/services/adblock/default.nix similarity index 100% rename from modules/services/adblock/default.nix rename to modules/nixos/services/adblock/default.nix diff --git a/modules/services/backup/default.nix b/modules/nixos/services/backup/default.nix similarity index 100% rename from modules/services/backup/default.nix rename to modules/nixos/services/backup/default.nix diff --git a/modules/services/blog/default.nix b/modules/nixos/services/blog/default.nix similarity index 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 97% rename from modules/services/drone/server/default.nix rename to modules/nixos/services/drone/server/default.nix index 1202010..0f56d29 100644 --- a/modules/services/drone/server/default.nix +++ b/modules/nixos/services/drone/server/default.nix @@ -7,6 +7,7 @@ in systemd.services.drone-server = { wantedBy = [ "multi-user.target" ]; after = [ "postgresql.service" ]; + requires = [ "postgresql.service" ]; serviceConfig = { EnvironmentFile = [ cfg.secretFile diff --git a/modules/services/fail2ban/default.nix b/modules/nixos/services/fail2ban/default.nix similarity index 100% rename from modules/services/fail2ban/default.nix rename to modules/nixos/services/fail2ban/default.nix diff --git a/modules/services/flood/default.nix b/modules/nixos/services/flood/default.nix similarity index 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 98% rename from modules/services/nginx/default.nix rename to modules/nixos/services/nginx/default.nix index a2f357f..a28c2be 100644 --- a/modules/services/nginx/default.nix +++ b/modules/nixos/services/nginx/default.nix @@ -22,7 +22,6 @@ let example = 8080; description = '' Which port to proxy to, through 127.0.0.1, for this virtual host. - This option is incompatible with `root`. ''; }; @@ -40,8 +39,7 @@ let default = null; example = "/var/www/blog"; description = '' - The root folder for this virtual host. This option is incompatible - with `port`. + The root folder for this virtual host. ''; }; @@ -50,8 +48,7 @@ let default = null; example = "FIXME"; description = '' - The UNIX socket for this virtual host. This option is incompatible - with `port`. + The UNIX socket for this virtual host. ''; }; 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 97% rename from modules/services/tandoor-recipes/default.nix rename to modules/nixos/services/tandoor-recipes/default.nix index 82350d7..3688363 100644 --- a/modules/services/tandoor-recipes/default.nix +++ b/modules/nixos/services/tandoor-recipes/default.nix @@ -50,6 +50,7 @@ in systemd.services = { tandoor-recipes = { after = [ "postgresql.service" ]; + requires = [ "postgresql.service" ]; serviceConfig = { EnvironmentFile = cfg.secretKeyFile; 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 92% rename from modules/services/woodpecker/server/default.nix rename to modules/nixos/services/woodpecker/server/default.nix index 152e707..d9f723b 100644 --- a/modules/services/woodpecker/server/default.nix +++ b/modules/nixos/services/woodpecker/server/default.nix @@ -12,7 +12,7 @@ in WOODPECKER_HOST = "https://woodpecker.${config.networking.domain}"; WOODPECKER_DATABASE_DRIVER = "postgres"; WOODPECKER_DATABASE_DATASOURCE = "postgres:///woodpecker?host=/run/postgresql"; - WOODPECKER_ADMIN = "${cfg.admin}"; + WOODPECKER_ADMIN = cfg.admin; WOODPECKER_SERVER_ADDR = ":${toString cfg.port}"; WOODPECKER_GRPC_ADDR = ":${toString cfg.rpcPort}"; @@ -24,6 +24,9 @@ in }; systemd.services.woodpecker-server = { + after = [ "postgresql.service" ]; + requires = [ "postgresql.service" ]; + serviceConfig = { # Set username for DB access User = "woodpecker"; diff --git a/modules/system/boot/default.nix b/modules/nixos/system/boot/default.nix similarity index 100% rename from modules/system/boot/default.nix rename to modules/nixos/system/boot/default.nix diff --git a/modules/system/default.nix b/modules/nixos/system/default.nix similarity index 92% rename from modules/system/default.nix rename to modules/nixos/system/default.nix index b3d9385..e317d96 100644 --- a/modules/system/default.nix +++ b/modules/nixos/system/default.nix @@ -11,6 +11,7 @@ ./packages ./persist ./podman + ./printing ./users ]; } diff --git a/modules/system/docker/default.nix b/modules/nixos/system/docker/default.nix similarity index 100% rename from modules/system/docker/default.nix rename to modules/nixos/system/docker/default.nix diff --git a/modules/system/documentation/default.nix b/modules/nixos/system/documentation/default.nix similarity index 100% rename from modules/system/documentation/default.nix rename to modules/nixos/system/documentation/default.nix diff --git a/modules/system/language/default.nix b/modules/nixos/system/language/default.nix similarity index 100% rename from modules/system/language/default.nix rename to modules/nixos/system/language/default.nix diff --git a/modules/system/nix/default.nix b/modules/nixos/system/nix/default.nix similarity index 100% rename from modules/system/nix/default.nix rename to modules/nixos/system/nix/default.nix diff --git a/modules/system/packages/default.nix b/modules/nixos/system/packages/default.nix similarity index 100% rename from modules/system/packages/default.nix rename to modules/nixos/system/packages/default.nix diff --git a/modules/system/podman/default.nix b/modules/nixos/system/podman/default.nix similarity index 100% rename from modules/system/podman/default.nix rename to modules/nixos/system/podman/default.nix diff --git a/profiles/printing/default.nix b/modules/nixos/system/printing/default.nix similarity index 90% rename from profiles/printing/default.nix rename to modules/nixos/system/printing/default.nix index 9965797..a4547ef 100644 --- a/profiles/printing/default.nix +++ b/modules/nixos/system/printing/default.nix @@ -1,10 +1,10 @@ { config, lib, pkgs, ... }: let - cfg = config.my.profiles.printing; + cfg = config.my.system.printing; in { - options.my.profiles.printing = with lib; { - enable = mkEnableOption "printing profile"; + options.my.system.printing = with lib; { + enable = mkEnableOption "printing configuration"; papersize = mkOption { type = with types; either str (enum [ diff --git a/modules/system/users/default.nix b/modules/nixos/system/users/default.nix similarity index 100% rename from modules/system/users/default.nix rename to modules/nixos/system/users/default.nix diff --git a/modules/system/users/ssh/aramis.pub b/modules/nixos/system/users/ssh/aramis.pub similarity index 100% rename from modules/system/users/ssh/aramis.pub rename to modules/nixos/system/users/ssh/aramis.pub diff --git a/modules/system/users/ssh/shared.pub b/modules/nixos/system/users/ssh/shared.pub similarity index 100% rename from modules/system/users/ssh/shared.pub rename to modules/nixos/system/users/ssh/shared.pub diff --git a/overlays/gruvbox-nvim-old-diff/old-colours.patch b/overlays/gruvbox-nvim-better-diff/colours.patch similarity index 69% rename from overlays/gruvbox-nvim-old-diff/old-colours.patch rename to overlays/gruvbox-nvim-better-diff/colours.patch index 99c39b4..5b0d61a 100644 --- a/overlays/gruvbox-nvim-old-diff/old-colours.patch +++ b/overlays/gruvbox-nvim-better-diff/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: feat: make invert_diff configurable +Subject: Use better diff colours --- 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.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 }, ++ 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-old-diff/default.nix b/overlays/gruvbox-nvim-better-diff/default.nix similarity index 100% rename from overlays/gruvbox-nvim-old-diff/default.nix rename to overlays/gruvbox-nvim-better-diff/default.nix diff --git a/overlays/gruvbox-nvim-old-diff/generated.nix b/overlays/gruvbox-nvim-better-diff/generated.nix similarity index 95% rename from overlays/gruvbox-nvim-old-diff/generated.nix rename to overlays/gruvbox-nvim-better-diff/generated.nix index 05f6271..50ea4ad 100644 --- a/overlays/gruvbox-nvim-old-diff/generated.nix +++ b/overlays/gruvbox-nvim-better-diff/generated.nix @@ -14,7 +14,7 @@ _final: _prev: { patches = [ # Inspired by https://github.com/ellisonleao/gruvbox.nvim/pull/291 - ./old-colours.patch + ./colours.patch ]; meta = { diff --git a/overlays/tandoor-recipes-bump-allauth/bump-allauth.patch b/overlays/tandoor-recipes-bump-allauth/bump-allauth.patch new file mode 100644 index 0000000..84dfaee --- /dev/null +++ b/overlays/tandoor-recipes-bump-allauth/bump-allauth.patch @@ -0,0 +1,38 @@ +From 8f66f5c3ca61751a80cc133ff4c59019d6fca406 Mon Sep 17 00:00:00 2001 +From: Bruno BELANYI +Date: Tue, 31 Oct 2023 12:15:30 +0000 +Subject: [PATCH] Bump django-allauth from 0.54.0 to 0.58.1 + +See the backwards incompatible changes [1]. + +[1]: https://docs.allauth.org/en/latest/release-notes/recent.html#id10 +--- + recipes/settings.py | 1 + + requirements.txt | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/recipes/settings.py b/recipes/settings.py +index df2c2b1de..b836ea656 100644 +--- a/recipes/settings.py ++++ b/recipes/settings.py +@@ -218,6 +218,7 @@ + 'django.middleware.locale.LocaleMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', + 'cookbook.helper.scope_middleware.ScopeMiddleware', ++ 'allauth.account.middleware.AccountMiddleware', + ] + + if DEBUG_TOOLBAR: +diff --git a/requirements.txt b/requirements.txt +index 26d81b471..09ed2381a 100644 +--- a/requirements.txt ++++ b/requirements.txt +@@ -29,7 +29,7 @@ microdata==0.8.0 + Jinja2==3.1.2 + django-webpack-loader==1.8.1 + git+https://github.com/BITSOLVER/django-js-reverse@071e304fd600107bc64bbde6f2491f1fe049ec82 +-django-allauth==0.54.0 ++django-allauth==0.58.1 + recipe-scrapers==14.36.1 + django-scopes==2.0.0 + pytest==7.3.1 diff --git a/overlays/tandoor-recipes-bump-allauth/default.nix b/overlays/tandoor-recipes-bump-allauth/default.nix new file mode 100644 index 0000000..dfbfec9 --- /dev/null +++ b/overlays/tandoor-recipes-bump-allauth/default.nix @@ -0,0 +1,9 @@ +_self: prev: +{ + tandoor-recipes = prev.tandoor-recipes.overrideAttrs (oa: { + patches = (oa.patches or [ ]) ++ [ + # https://github.com/TandoorRecipes/recipes/pull/2706 + ./bump-allauth.patch + ]; + }); +} diff --git a/pkgs/default.nix b/pkgs/default.nix index 6558026..664b5a4 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -36,8 +36,6 @@ pkgs.lib.makeScope pkgs.newScope (pkgs: { vimix-cursors = pkgs.callPackage ./vimix-cursors { }; - volantes-cursors = pkgs.callPackage ./volantes-cursors { }; - wifi-qr = pkgs.callPackage ./wifi-qr { }; zsh-done = pkgs.callPackage ./zsh-done { }; diff --git a/pkgs/volantes-cursors/default.nix b/pkgs/volantes-cursors/default.nix deleted file mode 100644 index b2c7865..0000000 --- a/pkgs/volantes-cursors/default.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ lib, fetchFromGitHub, inkscape, stdenvNoCC, xcursorgen }: -stdenvNoCC.mkDerivation rec { - pname = "volantes-cursors"; - version = "unstable-2020-06-06"; - - src = fetchFromGitHub { - owner = "varlesh"; - repo = pname; - rev = "d1d290ff42cc4fa643716551bd0b02582b90fd2f"; - hash = "sha256-irMN/enoo90nYLfvSOScZoYdvhZKvqqp+grZB2BQD9o="; - }; - - nativeBuildInputs = [ - inkscape - xcursorgen - ]; - - postPatch = '' - patchShebangs . - # The script tries to build in its source directory... - substituteInPlace build.sh --replace \ - ': "''${BUILD_DIR:="$SCRIPT_DIR"/build}"' \ - "BUILD_DIR=$(pwd)/build" - substituteInPlace build.sh --replace \ - ': "''${OUT_DIR:="$SCRIPT_DIR"/dist}"' \ - "OUT_DIR=$(pwd)/dist" - ''; - - buildPhase = '' - HOME="$NIX_BUILD_ROOT" ./build.sh - ''; - - installPhase = '' - make install PREFIX= DESTDIR=$out/ - ''; - - meta = with lib; { - description = "Classic cursor with a flying style"; - homepage = "https://github.com/varlesh/volantes-cursors"; - license = licenses.gpl2Only; - maintainers = with maintainers; [ ambroisie ]; - platforms = platforms.linux; - }; -}