diff --git a/home-manager/luna/home.nix b/home-manager/luna/hummingbird.nix similarity index 76% rename from home-manager/luna/home.nix rename to home-manager/luna/hummingbird.nix index e90f757..6697cb0 100644 --- a/home-manager/luna/home.nix +++ b/home-manager/luna/hummingbird.nix @@ -12,8 +12,7 @@ # The home.packages option allows you to install Nix packages into your # environment. - home.packages = [ - alejandra # formatter - fd-find + home.packages = with pkgs; [ + alejandra ]; } diff --git a/hosts/common/global/locales.nix b/hosts/common/global/locales.nix index 76e8617..c09ea64 100644 --- a/hosts/common/global/locales.nix +++ b/hosts/common/global/locales.nix @@ -16,4 +16,4 @@ # Set your time zone. time.timeZone = "Europe/Berlin"; -} \ No newline at end of file +} diff --git a/hosts/common/global/nix-ld.nix b/hosts/common/global/nix-ld.nix index a211eeb..92ae248 100644 --- a/hosts/common/global/nix-ld.nix +++ b/hosts/common/global/nix-ld.nix @@ -1,4 +1,4 @@ -{ +{pkgs, ...}: { # dynamic linking programs.nix-ld.enable = true; programs.nix-ld.libraries = with pkgs; [ diff --git a/hosts/common/global/nix.nix b/hosts/common/global/nix.nix index 4aa2671..21b2c49 100644 --- a/hosts/common/global/nix.nix +++ b/hosts/common/global/nix.nix @@ -1,11 +1,21 @@ { - inputs, - lib, - ... + inputs, + lib, + ... }: { # flakes - nix.settings.experimental-features = [ - "nix-command" - "flakes" - ]; -} \ No newline at end of file + nix = { + settings = { + experimental-features = [ + "nix-command" + "flakes" + ]; + warn-dirty = false; + }; + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than +7"; + }; + }; +} diff --git a/hosts/common/optional/gnome.nix b/hosts/common/optional/gnome.nix index 9b749ed..0e67e8a 100644 --- a/hosts/common/optional/gnome.nix +++ b/hosts/common/optional/gnome.nix @@ -2,14 +2,14 @@ # Enable the GNOME Desktop Environment. services = { xserver = { + enable = true; + desktopManager.gnome = { enable = true; - desktopManager.gnome = { - enable = true; - }; - displayManager.gdm = { - enable = true; - autoSuspend = false; - } + }; + displayManager.gdm = { + enable = true; + autoSuspend = false; + }; }; }; -} \ No newline at end of file +} diff --git a/hosts/common/optional/pipewire.nix b/hosts/common/optional/pipewire.nix index e6fcfc7..9134b21 100644 --- a/hosts/common/optional/pipewire.nix +++ b/hosts/common/optional/pipewire.nix @@ -14,4 +14,4 @@ # no need to redefine it in your config for now) #media-session.enable = true; }; -} \ No newline at end of file +} diff --git a/hosts/common/users/luna/default.nix b/hosts/common/users/luna/default.nix new file mode 100644 index 0000000..c52cc35 --- /dev/null +++ b/hosts/common/users/luna/default.nix @@ -0,0 +1,28 @@ +{ + pkgs, + config, + lib, + ... +}: { + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.luna = { + isNormalUser = true; + description = "luna"; + extraGroups = [ + "networkmanager" + "wheel" + ]; + packages = with pkgs; [ + # thunderbird + gnome-software + git + neovim + rustup + vscode.fhs + nix-inspect + protonvpn-gui + ]; + }; + + home-manager.users.luna = import ../../../../home-manager/luna/${config.networking.hostName}.nix; +} diff --git a/hosts/hummingbird/configuration.nix b/hosts/hummingbird/configuration.nix index a6385f0..ec27bc8 100644 --- a/hosts/hummingbird/configuration.nix +++ b/hosts/hummingbird/configuration.nix @@ -10,13 +10,14 @@ }: { imports = [ inputs.home-manager.nixosModules.home-manager + ../common/global + ../common/users/luna # optional stuff ../common/optional/gnome.nix ../common/optional/pipewire.nix - # Include the results of the hardware scan. ./hardware-configuration.nix ]; @@ -45,28 +46,6 @@ # Enable CUPS to print documents. services.printing.enable = true; - - - # Enable touchpad support (enabled default in most desktopManager). - # services.xserver.libinput.enable = true; - - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.luna = { - isNormalUser = true; - description = "luna"; - extraGroups = ["networkmanager" "wheel"]; - packages = with pkgs; [ - # thunderbird - gnome-software - git - neovim - rustup - vscode.fhs - nix-inspect - protonvpn-gui - ]; - }; - # flatpak services.flatpak.enable = true;