diff --git a/hosts/default.nix b/hosts/default.nix index fb18e47..4b8d74c 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -32,11 +32,19 @@ let { nixpkgs.config.allowUnfree = true; } + ../modules ./${host}/default.nix ] ++ map (p: ../profiles/${p}.nix) profiles ++ extraModules; - specialArgs = { inherit inputs username unstable; }; + specialArgs = { + inherit + inputs + username + unstable + host + ; + }; }; in { diff --git a/modules/applications/gtk/default.nix b/modules/applications/gtk/default.nix index 9c8d388..bc3bb9b 100644 --- a/modules/applications/gtk/default.nix +++ b/modules/applications/gtk/default.nix @@ -14,8 +14,6 @@ in options.my.applications.gtk = { enable = lib.mkEnableOption "GTK theme configuration"; - system.enable = lib.mkEnableOption "GTK system configuration"; - homeManager.enable = lib.mkEnableOption "GTK home-manager configuration"; }; config = lib.mkIf cfg.enable { diff --git a/modules/applications/java/default.nix b/modules/applications/java/default.nix index 253a984..ef8ecb5 100644 --- a/modules/applications/java/default.nix +++ b/modules/applications/java/default.nix @@ -14,8 +14,6 @@ in options.my.applications.java = { enable = lib.mkEnableOption "Java runtime"; - system.enable = lib.mkEnableOption "Java system configuration"; - homeManager.enable = lib.mkEnableOption "Java home-manager configuration"; }; config = lib.mkIf cfg.enable { diff --git a/modules/applications/ssh/default.nix b/modules/applications/ssh/default.nix index 89e6c85..f3debb2 100644 --- a/modules/applications/ssh/default.nix +++ b/modules/applications/ssh/default.nix @@ -14,8 +14,6 @@ in options.my.applications.ssh = { enable = lib.mkEnableOption "OpenSSH client"; - system.enable = lib.mkEnableOption "SSH system configuration"; - homeManager.enable = lib.mkEnableOption "SSH home-manager configuration"; defaultIdentityFile = lib.mkOption { type = lib.types.str; diff --git a/modules/applications/vim/home/default.nix b/modules/applications/vim/home/default.nix index 59ab1f1..b2a1060 100644 --- a/modules/applications/vim/home/default.nix +++ b/modules/applications/vim/home/default.nix @@ -30,6 +30,11 @@ in viAlias = true; withNodeJs = true; + nixpkgs = { + source = pkgs.path; + config.allowUnfree = true; + }; + extraPackages = with pkgs; [ git ripgrep diff --git a/modules/applications/vscode/home.nix b/modules/applications/vscode/home.nix index d61a0b0..c744a45 100644 --- a/modules/applications/vscode/home.nix +++ b/modules/applications/vscode/home.nix @@ -44,7 +44,7 @@ let name = "hadolint"; publisher = "exiasr"; version = "1.1.2"; - hash = "sha256-6GO1f8SP4CE8yYl87/tm60FdGHqHsJA4c2B6ukVdpgM="; + hash = "sha256-6GO1f8SP4CE8yYl87/tm60FdGHqHsJA4c2B6UKVdpgM="; } { name = "chatgpt"; diff --git a/modules/applications/zsh/default.nix b/modules/applications/zsh/default.nix index 10ee585..ce95586 100644 --- a/modules/applications/zsh/default.nix +++ b/modules/applications/zsh/default.nix @@ -14,8 +14,6 @@ in options.my.applications.zsh = { enable = lib.mkEnableOption "Zsh shell"; - system.enable = lib.mkEnableOption "Zsh system configuration"; - homeManager.enable = lib.mkEnableOption "Zsh home-manager configuration"; }; config = lib.mkIf cfg.enable { diff --git a/modules/features/identity/ssh-default-key.nix b/modules/features/identity/ssh-default-key.nix index c1da00a..eeef32b 100644 --- a/modules/features/identity/ssh-default-key.nix +++ b/modules/features/identity/ssh-default-key.nix @@ -13,19 +13,22 @@ in }; config.home-manager.sharedModules = [ - { - config = lib.mkIf cfg.enable { - home.activation.generateSshKey = lib.hm.dag.entryAfter [ "writeBoundary" ] '' - key="$HOME/.ssh/id_ed25519" - if [ ! -f "$key" ]; then - umask 077 - mkdir -p "$HOME/.ssh" - ${pkgs.openssh}/bin/ssh-keygen -t ed25519 -N "" -f "$key" \ - -C "moons@$(${pkgs.hostname}/bin/hostname || echo host)" - echo "Generated SSH key at $key" - fi - ''; - }; - } + ( + { lib, ... }: + { + config = lib.mkIf cfg.enable { + home.activation.generateSshKey = lib.hm.dag.entryAfter [ "writeBoundary" ] '' + key="$HOME/.ssh/id_ed25519" + if [ ! -f "$key" ]; then + umask 077 + mkdir -p "$HOME/.ssh" + ${pkgs.openssh}/bin/ssh-keygen -t ed25519 -N "" -f "$key" \ + -C "moons@$(${pkgs.hostname}/bin/hostname || echo host)" + echo "Generated SSH key at $key" + fi + ''; + }; + } + ) ]; } diff --git a/modules/integrations/home-manager.nix b/modules/integrations/home-manager.nix index 8dde697..600f1d4 100644 --- a/modules/integrations/home-manager.nix +++ b/modules/integrations/home-manager.nix @@ -15,6 +15,8 @@ backupFileExtension = "backup"; users.${username} = { + nixpkgs.config.allowUnfree = true; + home = { inherit username; homeDirectory = "/home/${username}"; diff --git a/modules/system/boot/nfs.nix b/modules/system/boot/nfs.nix index 7a84414..7c9bc27 100644 --- a/modules/system/boot/nfs.nix +++ b/modules/system/boot/nfs.nix @@ -13,7 +13,7 @@ in config = lib.mkIf cfg.enable { boot.supportedFilesystems = [ "nfs" ]; - fuse.userAllowOther = true; + programs.fuse.userAllowOther = true; services.rpcbind.enable = true; }; } diff --git a/modules/system/hardware/bluetooth.nix b/modules/system/hardware/bluetooth.nix index f3685b7..6b0f8a8 100644 --- a/modules/system/hardware/bluetooth.nix +++ b/modules/system/hardware/bluetooth.nix @@ -12,15 +12,11 @@ in }; config = lib.mkIf cfg.enable { - hardware = { - bluetooth.enable = true; - bluetooth.powerOnBoot = true; + hardware.bluetooth = { + enable = true; + powerOnBoot = true; }; - services = { - bluetooth.enable = true; - bluetooth.startWhenNeeded = true; - blueman.enable = true; - }; + services.blueman.enable = true; }; }