diff --git a/flake.nix b/flake.nix index 54b4616..31d3b07 100755 --- a/flake.nix +++ b/flake.nix @@ -54,23 +54,27 @@ nixosConfigurations = { nixos = nixpkgs.lib.nixosSystem { specialArgs = { + self = self; import-tree = import-tree; home-manager = home-manager; + nixpkgs = nixpkgs; + nixpkgs-unstable = nixpkgs-unstable; }; modules = [ + ./hosts/nixos/overlays.nix (import-tree ./hosts/common) - (import ./hosts/nixos/overlays.nix { inherit nixpkgs nixpkgs-unstable; }) (import-tree ./modules/system/nixos) (import-tree ./hosts/nixos/system) ] ++ [ - (import-tree ./hosts/common) + ./hosts/nixos/overlays.nix home-manager.nixosModules.home-manager - (import ./hosts/nixos/overlays.nix { inherit nixpkgs nixpkgs-unstable; }) + (import-tree ./hosts/common) + (import-tree ./modules/home/common) (import-tree ./modules/home/nixos) - (import-tree ./hosts/darwin/home) + (import-tree ./hosts/nixos/home) ]; }; }; @@ -84,18 +88,16 @@ homebrew-cask = homebrew-cask; }; modules = [ - (import-tree ./hosts/common) nix-homebrew.darwinModules.nix-homebrew - (import ./hosts/nixos/overlays.nix { inherit nixpkgs nixpkgs-unstable; }) - + (import-tree ./modules/system/darwin) + + (import-tree ./hosts/common) (import-tree ./hosts/darwin/system) ] ++ [ - (import-tree ./hosts/common) home-manager.darwinModules.home-manager - (import ./hosts/nixos/overlays.nix { inherit nixpkgs nixpkgs-unstable; }) - - (import-tree ./modules/home/darwin) + + (import-tree ./hosts/common) (import-tree ./hosts/darwin/home) ]; }; diff --git a/hosts/darwin/home/alistreaza.nix b/hosts/darwin/home/alistreaza.nix index 7b9d943..504a5ea 100644 --- a/hosts/darwin/home/alistreaza.nix +++ b/hosts/darwin/home/alistreaza.nix @@ -1,9 +1,9 @@ { import-tree, ... }: { home-manager.users.alistreaza = { - imports = [ - (import-tree ../../common) + (import-tree ../../../modules/home/common) + (import-tree ../../../modules/home/darwin) ]; home = { @@ -12,21 +12,11 @@ }; # Shell apps - home.shell.zsh = true; - home.shell.git = true; - home.shell.neovim = true; - home.shell.nh.enable = true; - home.shell.devenv.enable = true; - - # Homebrew apps - home.homebrew.iterm = true; - home.homebrew.zed = true; - home.homebrew.jetbrain = true; - home.homebrew.iina = true; - home.homebrew.zen = true; - home.homebrew.obsidian = true; - home.homebrew.microsoft = true; - home.homebrew.keka = true; + user.shell.zsh.enable = true; + user.shell.git.enable = true; + user.shell.neovim.enable = true; + user.shell.nh.enable = true; + user.shell.devenv.enable = true; # No Home Application Folders targets.darwin.linkApps.enable = false; diff --git a/hosts/darwin/system/os.nix b/hosts/darwin/system/os.nix index bc7fd62..7340212 100644 --- a/hosts/darwin/system/os.nix +++ b/hosts/darwin/system/os.nix @@ -2,6 +2,16 @@ { nixpkgs.hostPlatform = "aarch64-darwin"; + # Homebrew apps + os.homebrew.iterm.enable = true; + os.homebrew.zed.enable = true; + os.homebrew.jetbrain.enable = true; + os.homebrew.iina.enable = true; + os.homebrew.zen.enable = true; + os.homebrew.obsidian.enable = true; + os.homebrew.microsoft.enable = true; + os.homebrew.keka.enable = true; + # System version system.stateVersion = "25.11"; } diff --git a/hosts/nixos/home/alistreaza.nix b/hosts/nixos/home/alistreaza.nix index b9de6b3..b3c6df0 100644 --- a/hosts/nixos/home/alistreaza.nix +++ b/hosts/nixos/home/alistreaza.nix @@ -1,9 +1,9 @@ { import-tree, ... }: { home-manager.users.alistreaza = { - imports = [ - (import-tree ../../common) + (import-tree ../../../modules/home/common) + (import-tree ../../../modules/home/nixos) ]; home = { @@ -12,27 +12,27 @@ }; # Shell apps - home.shell.zsh = true; - home.shell.git = true; - home.shell.neovim = true; - home.shell.nh.enable = true; - home.shell.devenv.enable = true; + user.shell.zsh.enable = true; + user.shell.git.enable = true; + user.shell.neovim.enable = true; + user.shell.nh.enable = true; + user.shell.devenv.enable = true; # Code editor - home.ide.zed.enable = true; + user.ide.zed.enable = true; # IDE Jetbrains - home.ide.jetbrains.idea.enable = false; - home.ide.jetbrains.pycharm.enable = false; - home.ide.jetbrains.phpstorm.enable = false; - home.ide.jetbrains.rustrover.enable = false; + user.ide.jetbrains.idea.enable = false; + user.ide.jetbrains.pycharm.enable = false; + user.ide.jetbrains.phpstorm.enable = false; + user.ide.jetbrains.rustrover.enable = false; # IDE Data Jetbrains - home.ide.jetbrains.datagrip.enable = false; - home.ide.jetbrains.dataspell.enable = false; + user.ide.jetbrains.datagrip.enable = false; + user.ide.jetbrains.dataspell.enable = false; # Markdown Editor - home.editor.obsidian.enable = false; + user.editor.obsidian.enable = false; # The state version is required and should stay at the version you # originally installed. diff --git a/modules/home/common/devenv.nix b/modules/home/common/devenv.nix index cc99581..e8ba206 100644 --- a/modules/home/common/devenv.nix +++ b/modules/home/common/devenv.nix @@ -6,10 +6,10 @@ }: with lib; let - cfg = config.home.shell.devenv; + cfg = config.user.shell.devenv; in { - options.home.shell.devenv = { + options.user.shell.devenv = { enable = mkEnableOption "System devenv service"; }; config = mkIf cfg.enable { diff --git a/modules/home/common/git.nix b/modules/home/common/git.nix index 4bb8ab6..5ef5c65 100644 --- a/modules/home/common/git.nix +++ b/modules/home/common/git.nix @@ -5,16 +5,15 @@ }: with lib; let - cfg = config.home.shell.git; + cfg = config.user.shell.git; in { - options.home.shell.git = { + options.user.shell.git = { enable = mkEnableOption "Zen Editor options"; }; config = mkIf cfg.enable { programs.git = { - enable = true; config.init.defaultBranch = "main"; settings = { user = { diff --git a/modules/home/common/neovim.nix b/modules/home/common/neovim.nix index 93652ea..cf66cea 100644 --- a/modules/home/common/neovim.nix +++ b/modules/home/common/neovim.nix @@ -1,10 +1,10 @@ { lib, config, ... }: with lib; let - cfg = config.home.shell.neovim; + cfg = config.user.shell.neovim; in { - options.home.shell.neovim = { + options.user.shell.neovim = { enable = mkEnableOption "System neovim service"; }; config = mkIf cfg.enable { diff --git a/modules/home/common/nh.nix b/modules/home/common/nh.nix index ce2ca27..ed258c5 100644 --- a/modules/home/common/nh.nix +++ b/modules/home/common/nh.nix @@ -1,10 +1,10 @@ { lib, config, ... }: with lib; let - cfg = config.home.shell.nh; + cfg = config.user.shell.nh; in { - options.home.shell.nh = { + options.user.shell.nh = { enable = mkEnableOption "System nh service"; }; config = mkIf cfg.enable { diff --git a/modules/home/common/zsh.nix b/modules/home/common/zsh.nix index 170276e..bff3947 100644 --- a/modules/home/common/zsh.nix +++ b/modules/home/common/zsh.nix @@ -1,10 +1,10 @@ { lib, config, ... }: with lib; let - cfg = config.home.shell.zsh; + cfg = config.user.shell.zsh; in { - options.home.shell.zsh = { + options.user.shell.zsh = { enable = mkEnableOption "System zsh service"; }; config = mkIf cfg.enable { diff --git a/modules/home/nixos/jetbrains/clion.nix b/modules/home/nixos/jetbrains/clion.nix index ff9b3bd..e2d6368 100644 --- a/modules/home/nixos/jetbrains/clion.nix +++ b/modules/home/nixos/jetbrains/clion.nix @@ -6,10 +6,10 @@ }: with lib; let - cfg = config.home.ide.jetbrains.clion; + cfg = config.user.ide.jetbrains.clion; in { - options.home.ide.jetbrains.clion = { + options.user.ide.jetbrains.clion = { enable = mkEnableOption "JetBrains options"; }; config = mkIf cfg.enable { diff --git a/modules/home/nixos/jetbrains/datagrip.nix b/modules/home/nixos/jetbrains/datagrip.nix index 94c4391..e65ff14 100644 --- a/modules/home/nixos/jetbrains/datagrip.nix +++ b/modules/home/nixos/jetbrains/datagrip.nix @@ -6,10 +6,10 @@ }: with lib; let - cfg = config.home.ide.jetbrains.datagrip; + cfg = config.user.ide.jetbrains.datagrip; in { - options.home.ide.jetbrains.datagrip = { + options.user.ide.jetbrains.datagrip = { enable = mkEnableOption "JetBrains options"; }; config = mkIf cfg.enable { diff --git a/modules/home/nixos/jetbrains/dataspell.nix b/modules/home/nixos/jetbrains/dataspell.nix index ed47a25..0ec2963 100644 --- a/modules/home/nixos/jetbrains/dataspell.nix +++ b/modules/home/nixos/jetbrains/dataspell.nix @@ -6,10 +6,10 @@ }: with lib; let - cfg = config.home.ide.jetbrains.dataspell; + cfg = config.user.ide.jetbrains.dataspell; in { - options.home.ide.jetbrains.dataspell = { + options.user.ide.jetbrains.dataspell = { enable = mkEnableOption "JetBrains options"; }; config = mkIf cfg.enable { diff --git a/modules/home/nixos/jetbrains/goland.nix b/modules/home/nixos/jetbrains/goland.nix index b8cafc9..7058412 100644 --- a/modules/home/nixos/jetbrains/goland.nix +++ b/modules/home/nixos/jetbrains/goland.nix @@ -6,10 +6,10 @@ }: with lib; let - cfg = config.home.ide.jetbrains.goland; + cfg = config.user.ide.jetbrains.goland; in { - options.home.ide.jetbrains.goland = { + options.user.ide.jetbrains.goland = { enable = mkEnableOption "JetBrains options"; }; config = mkIf cfg.enable { diff --git a/modules/home/nixos/jetbrains/idea.nix b/modules/home/nixos/jetbrains/idea.nix index 37da7ee..b8f200c 100644 --- a/modules/home/nixos/jetbrains/idea.nix +++ b/modules/home/nixos/jetbrains/idea.nix @@ -6,10 +6,10 @@ }: with lib; let - cfg = config.home.ide.jetbrains.idea; + cfg = config.user.ide.jetbrains.idea; in { - options.home.ide.jetbrains.idea = { + options.user.ide.jetbrains.idea = { enable = mkEnableOption "JetBrains options"; }; config = mkIf cfg.enable { diff --git a/modules/home/nixos/jetbrains/phpstorm.nix b/modules/home/nixos/jetbrains/phpstorm.nix index 51785af..0c72d7d 100644 --- a/modules/home/nixos/jetbrains/phpstorm.nix +++ b/modules/home/nixos/jetbrains/phpstorm.nix @@ -6,10 +6,10 @@ }: with lib; let - cfg = config.home.ide.jetbrains.phpstorm; + cfg = config.user.ide.jetbrains.phpstorm; in { - options.home.ide.jetbrains.phpstorm = { + options.user.ide.jetbrains.phpstorm = { enable = mkEnableOption "JetBrains options"; }; config = mkIf cfg.enable { diff --git a/modules/home/nixos/jetbrains/pycharm.nix b/modules/home/nixos/jetbrains/pycharm.nix index a1391c2..1c58980 100644 --- a/modules/home/nixos/jetbrains/pycharm.nix +++ b/modules/home/nixos/jetbrains/pycharm.nix @@ -6,10 +6,10 @@ }: with lib; let - cfg = config.home.ide.jetbrains.pycharm; + cfg = config.user.ide.jetbrains.pycharm; in { - options.home.ide.jetbrains.pycharm = { + options.user.ide.jetbrains.pycharm = { enable = mkEnableOption "JetBrains options"; }; config = mkIf cfg.enable { diff --git a/modules/home/nixos/jetbrains/rider.nix b/modules/home/nixos/jetbrains/rider.nix index de69e34..f0d41a4 100644 --- a/modules/home/nixos/jetbrains/rider.nix +++ b/modules/home/nixos/jetbrains/rider.nix @@ -6,10 +6,10 @@ }: with lib; let - cfg = config.home.ide.jetbrains.rider; + cfg = config.user.ide.jetbrains.rider; in { - options.home.ide.jetbrains.rider = { + options.user.ide.jetbrains.rider = { enable = mkEnableOption "JetBrains options"; }; config = mkIf cfg.enable { diff --git a/modules/home/nixos/jetbrains/rubymine.nix b/modules/home/nixos/jetbrains/rubymine.nix index 56d5040..b2091ed 100644 --- a/modules/home/nixos/jetbrains/rubymine.nix +++ b/modules/home/nixos/jetbrains/rubymine.nix @@ -6,10 +6,10 @@ }: with lib; let - cfg = config.home.ide.jetbrains.rubymine; + cfg = config.user.ide.jetbrains.rubymine; in { - options.home.ide.jetbrains.rubymine = { + options.user.ide.jetbrains.rubymine = { enable = mkEnableOption "JetBrains options"; }; config = mkIf cfg.enable { diff --git a/modules/home/nixos/jetbrains/rustrover.nix b/modules/home/nixos/jetbrains/rustrover.nix index 3e17982..9cf5375 100644 --- a/modules/home/nixos/jetbrains/rustrover.nix +++ b/modules/home/nixos/jetbrains/rustrover.nix @@ -6,10 +6,10 @@ }: with lib; let - cfg = config.home.ide.jetbrains.rustrover; + cfg = config.user.ide.jetbrains.rustrover; in { - options.home.ide.jetbrains.rustrover = { + options.user.ide.jetbrains.rustrover = { enable = mkEnableOption "JetBrains options"; }; config = mkIf cfg.enable { diff --git a/modules/home/nixos/jetbrains/webstorm.nix b/modules/home/nixos/jetbrains/webstorm.nix index b6e7e89..6c8aeb2 100644 --- a/modules/home/nixos/jetbrains/webstorm.nix +++ b/modules/home/nixos/jetbrains/webstorm.nix @@ -6,10 +6,10 @@ }: with lib; let - cfg = config.home.ide.jetbrains.webstorm; + cfg = config.user.ide.jetbrains.webstorm; in { - options.home.ide.jetbrains.webstorm = { + options.user.ide.jetbrains.webstorm = { enable = mkEnableOption "JetBrains options"; }; config = mkIf cfg.enable { diff --git a/modules/home/nixos/obsidian.nix b/modules/home/nixos/obsidian.nix index 35daa59..364c1ec 100644 --- a/modules/home/nixos/obsidian.nix +++ b/modules/home/nixos/obsidian.nix @@ -6,10 +6,10 @@ }: with lib; let - cfg = config.home.editor.obsidian; + cfg = config.user.editor.obsidian; in { - options.home.editor.obsidian = { + options.user.editor.obsidian = { enable = mkEnableOption "Obsidian options"; }; config = mkIf cfg.enable { diff --git a/modules/home/nixos/zed.nix b/modules/home/nixos/zed.nix index 06cc209..460168c 100644 --- a/modules/home/nixos/zed.nix +++ b/modules/home/nixos/zed.nix @@ -6,10 +6,10 @@ }: with lib; let - cfg = config.home.ide.zed; + cfg = config.user.ide.zed; in { - options.home.ide.zed = { + options.user.ide.zed = { enable = mkEnableOption "Zen Editor options"; }; config = mkIf cfg.enable { diff --git a/modules/home/darwin/iina.nix b/modules/system/darwin/iina.nix similarity index 73% rename from modules/home/darwin/iina.nix rename to modules/system/darwin/iina.nix index 869a889..952d3f7 100644 --- a/modules/home/darwin/iina.nix +++ b/modules/system/darwin/iina.nix @@ -1,10 +1,10 @@ { lib, config, ... }: with lib; let - cfg = config.home.homebrew.iina; + cfg = config.os.homebrew.iina; in { - options.home.homebrew.iina = { + options.os.homebrew.iina = { enable = mkEnableOption "System iina homebrew service"; }; config = mkIf cfg.enable { diff --git a/modules/home/darwin/iterm.nix b/modules/system/darwin/iterm.nix similarity index 73% rename from modules/home/darwin/iterm.nix rename to modules/system/darwin/iterm.nix index 384f67b..c367aad 100644 --- a/modules/home/darwin/iterm.nix +++ b/modules/system/darwin/iterm.nix @@ -1,10 +1,10 @@ { lib, config, ... }: with lib; let - cfg = config.home.homebrew.iterm; + cfg = config.os.homebrew.iterm; in { - options.home.homebrew.iterm = { + options.os.homebrew.iterm = { enable = mkEnableOption "System iterm homebrew service"; }; config = mkIf cfg.enable { diff --git a/modules/home/darwin/jetbrain.nix b/modules/system/darwin/jetbrain.nix similarity index 80% rename from modules/home/darwin/jetbrain.nix rename to modules/system/darwin/jetbrain.nix index e134e9a..80f4310 100644 --- a/modules/home/darwin/jetbrain.nix +++ b/modules/system/darwin/jetbrain.nix @@ -1,10 +1,10 @@ { lib, config, ... }: with lib; let - cfg = config.home.homebrew.jetbrain; + cfg = config.os.homebrew.jetbrain; in { - options.home.homebrew.jetbrain = { + options.os.homebrew.jetbrain = { enable = mkEnableOption "System jetbrain homebrew service"; }; config = mkIf cfg.enable { diff --git a/modules/home/darwin/keka.nix b/modules/system/darwin/keka.nix similarity index 73% rename from modules/home/darwin/keka.nix rename to modules/system/darwin/keka.nix index 385fc43..3aa581f 100644 --- a/modules/home/darwin/keka.nix +++ b/modules/system/darwin/keka.nix @@ -1,10 +1,10 @@ { lib, config, ... }: with lib; let - cfg = config.home.homebrew.keka; + cfg = config.os.homebrew.keka; in { - options.home.homebrew.keka = { + options.os.homebrew.keka = { enable = mkEnableOption "System keka homebrew service"; }; config = mkIf cfg.enable { diff --git a/modules/home/darwin/microsoft.nix b/modules/system/darwin/microsoft.nix similarity index 78% rename from modules/home/darwin/microsoft.nix rename to modules/system/darwin/microsoft.nix index f8ad288..dd4edbf 100644 --- a/modules/home/darwin/microsoft.nix +++ b/modules/system/darwin/microsoft.nix @@ -1,10 +1,10 @@ { lib, config, ... }: with lib; let - cfg = config.home.homebrew.microsoft; + cfg = config.os.homebrew.microsoft; in { - options.home.homebrew.microsoft = { + options.os.homebrew.microsoft = { enable = mkEnableOption "System microsoft homebrew service"; }; config = mkIf cfg.enable { diff --git a/modules/home/darwin/obsidian.nix b/modules/system/darwin/obsidian.nix similarity index 71% rename from modules/home/darwin/obsidian.nix rename to modules/system/darwin/obsidian.nix index 6e05f52..d33b410 100644 --- a/modules/home/darwin/obsidian.nix +++ b/modules/system/darwin/obsidian.nix @@ -1,10 +1,10 @@ { lib, config, ... }: with lib; let - cfg = config.home.homebrew.obsidian; + cfg = config.os.homebrew.obsidian; in { - options.home.homebrew.obsidian = { + options.os.homebrew.obsidian = { enable = mkEnableOption "System obsidian homebrew service"; }; config = mkIf cfg.enable { diff --git a/modules/home/darwin/zed.nix b/modules/system/darwin/zed.nix similarity index 73% rename from modules/home/darwin/zed.nix rename to modules/system/darwin/zed.nix index 81d3ef5..b5ac251 100644 --- a/modules/home/darwin/zed.nix +++ b/modules/system/darwin/zed.nix @@ -1,10 +1,10 @@ { lib, config, ... }: with lib; let - cfg = config.home.homebrew.zed; + cfg = config.os.homebrew.zed; in { - options.home.homebrew.zed = { + options.os.homebrew.zed = { enable = mkEnableOption "System zed homebrew service"; }; config = mkIf cfg.enable { diff --git a/modules/home/darwin/zen.nix b/modules/system/darwin/zen.nix similarity index 73% rename from modules/home/darwin/zen.nix rename to modules/system/darwin/zen.nix index 1564db2..7ee9db7 100644 --- a/modules/home/darwin/zen.nix +++ b/modules/system/darwin/zen.nix @@ -1,10 +1,10 @@ { lib, config, ... }: with lib; let - cfg = config.home.homebrew.zen; + cfg = config.os.homebrew.zen; in { - options.home.homebrew.zen = { + options.os.homebrew.zen = { enable = mkEnableOption "System zen homebrew service"; }; config = mkIf cfg.enable {