diff --git a/flake.nix b/flake.nix index 6b91667..7a66712 100644 --- a/flake.nix +++ b/flake.nix @@ -26,7 +26,6 @@ imports = [ wrappers.flakeModules.wrappers ./modules/theme.nix - ./modules/programs/emacs/emacs.nix ./hosts.nix ]; diff --git a/hosts.nix b/hosts.nix index 43bd10b..02474eb 100644 --- a/hosts.nix +++ b/hosts.nix @@ -6,18 +6,26 @@ in flake.nixosConfigurations.nerv = inputs.nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs; }; modules = [ - inputs.base16.nixosModules - { scheme = "${inputs.tt-schemes}/base16/${themeName}"; } - config.wrappers.emacs.install - ./configuration.nix - ./modules/theme.nix - ./modules/programs/emacs/emacs.nix + inputs.base16.nixosModule + { scheme = "${inputs.tt-schemes}/base16/${themeName}.yaml"; } + ./modules/hosts/nerv/configuration.nix + ./modules/home.nix inputs.home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit inputs; }; } + { + imports = [ + (inputs.wrappers.lib.getInstallModule { + name = "emacs"; + value = inputs.wrappers.lib.wrapperModules.emacs; + }) + ./modules/programs/emacs/emacs.nix + ]; + + } ]; }; } diff --git a/modules/hosts/nerv/configuration.nix b/modules/hosts/nerv/configuration.nix index 258f6fa..d4df98f 100644 --- a/modules/hosts/nerv/configuration.nix +++ b/modules/hosts/nerv/configuration.nix @@ -1,10 +1,14 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: { - imports = - [ - ./hardware-configuration.nix - ]; + imports = [ + ./hardware-configuration.nix + ]; boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; @@ -19,43 +23,42 @@ hardware.graphics.enable = true; services.xserver.videoDrivers = [ "nvidia" ]; hardware.nvidia = { - modesetting.enable = true; - powerManagement.enable = false; - open = true; - nvidiaSettings = true; - package = config.boot.kernelPackages.nvidiaPackages.stable; -}; + modesetting.enable = true; + powerManagement.enable = false; + open = true; + nvidiaSettings = true; + package = config.boot.kernelPackages.nvidiaPackages.stable; + }; # Set your time zone. time.timeZone = "Europe/Berlin"; - i18n.defaultLocale = "en_US.UTF-8"; - services.desktopManager.gnome.enable = true; - services.displayManager.gdm.enable = true; - services.xserver.xkb.layout = "us"; - services.pipewire = { - enable = true; - pulse.enable = true; + i18n.defaultLocale = "en_US.UTF-8"; + services.desktopManager.gnome.enable = true; + services.displayManager.gdm.enable = true; + services.xserver.xkb.layout = "us"; + services.pipewire = { + enable = true; + pulse.enable = true; }; nixpkgs.config.allowUnfree = true; - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.lucy = { - isNormalUser = true; - extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. - packages = with pkgs; [ - vesktop - google-chrome - ]; - }; + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.lucy = { + isNormalUser = true; + extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. + packages = with pkgs; [ + vesktop + google-chrome + ]; + }; - environment.systemPackages = with pkgs; [ - fastfetch - wget - git - clang - ]; + environment.systemPackages = with pkgs; [ + fastfetch + wget + git + clang + ]; system.stateVersion = "26.05"; # Did you read the comment? } - diff --git a/modules/hosts/nerv/theme.nix b/modules/hosts/nerv/theme.nix deleted file mode 100644 index 0186fc3..0000000 --- a/modules/hosts/nerv/theme.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ - inputs, - config, - lib, - ... -}: -let - schemeName = config.theme.name; -in -{ - config, - lib, - pkgs, - ... -}: -let - scheme = (pkgs.callPackage inputs.base16.lib { }).mkSchemeAttrs schemeName; -in -{ - options.scheme = lib.mkOption {type = lib.types.str; }; - config.scheme = scheme; -} diff --git a/modules/programs/emacs/emacs.nix b/modules/programs/emacs/emacs.nix index 81d8c6b..8d6e2b1 100644 --- a/modules/programs/emacs/emacs.nix +++ b/modules/programs/emacs/emacs.nix @@ -5,10 +5,10 @@ ... }: let - schemeName = config.theme.name; + schemeName = config.scheme; in { - flake.wrappers.emacs = + wrappers.emacs = { pkgs, wlib, @@ -17,7 +17,8 @@ in let scheme = (pkgs.callPackage inputs.base16.lib { }).mkSchemeAttrs schemeName; in - { + { + enable = true; imports = [ wlib.wrapperModules.emacs ];