From fa3cb19c0bdd752d158454f82dcec7fe9d75269f Mon Sep 17 00:00:00 2001 From: Leyla Becker Date: Sun, 24 Nov 2024 13:07:15 -0600 Subject: [PATCH] moved more out of common config --- enviroments/client/default.nix | 51 ------------- homes/leyla/default.nix | 125 +------------------------------ hosts/defiant/configuration.nix | 2 + hosts/horizon/configuration.nix | 2 + hosts/twilight/configuration.nix | 2 + modules/desktop.nix | 38 ++++++++++ modules/nix-development.nix | 14 ++++ 7 files changed, 60 insertions(+), 174 deletions(-) create mode 100644 modules/desktop.nix create mode 100644 modules/nix-development.nix diff --git a/enviroments/client/default.nix b/enviroments/client/default.nix index 16e3263..8f3c2cf 100644 --- a/enviroments/client/default.nix +++ b/enviroments/client/default.nix @@ -7,55 +7,7 @@ ../common ]; - nix = { - nixPath = ["nixpkgs=${inputs.nixpkgs}"]; - }; - - services = { - # Enable CUPS to print documents. - printing.enable = true; - - xserver = { - # Enable the X11 windowing system. - enable = true; - - # Enable the GNOME Desktop Environment. - displayManager.gdm.enable = true; - desktopManager = { - gnome.enable = true; - xterm.enable = false; - }; - - # Get rid of xTerm - excludePackages = [pkgs.xterm]; - - # Configure keymap in X11 - xkb = { - layout = "us,it,de"; - variant = ""; - }; - }; - - pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - # If you want to use JACK applications, uncomment this - #jack.enable = true; - - # use the example session manager (no others are packaged yet so this is enabled by default, - # no need to redefine it in your config for now) - #media-session.enable = true; - }; - - # tailscale = { - # enable = true; - # }; - }; - # Enable sound with pipewire. - hardware.pulseaudio.enable = false; hardware.flipperzero.enable = true; security.rtkit.enable = true; @@ -63,9 +15,6 @@ # helvetica font aileron - # nix langauge server - nixd - cachefilesd gnomeExtensions.dash-to-dock diff --git a/homes/leyla/default.nix b/homes/leyla/default.nix index fe90ccd..9886335 100644 --- a/homes/leyla/default.nix +++ b/homes/leyla/default.nix @@ -58,6 +58,8 @@ }; }; + keyboard.layout = "us,it,de"; + # Home Manager can also manage your environment variables through # 'home.sessionVariables'. If you don't want to manage your shell through Home # Manager then you have to manually source 'hm-session-vars.sh' located at @@ -101,129 +103,6 @@ }; }; bash.enable = true; - - # firefox = { - # enable = true; - # profiles.leyla = { - - # settings = { - # "browser.search.defaultenginename" = "Searx"; - # "browser.search.order.1" = "Searx"; - # }; - - # search = { - # force = true; - # default = "Searx"; - # engines = { - # "Nix Packages" = { - # urls = [{ - # template = "https://search.nixos.org/packages"; - # params = [ - # { name = "type"; value = "packages"; } - # { name = "query"; value = "{searchTerms}"; } - # ]; - # }]; - # icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - # definedAliases = [ "@np" ]; - # }; - # "NixOS Wiki" = { - # urls = [{ template = "https://nixos.wiki/index.php?search={searchTerms}"; }]; - # iconUpdateURL = "https://nixos.wiki/favicon.png"; - # updateInterval = 24 * 60 * 60 * 1000; # every day - # definedAliases = [ "@nw" ]; - # }; - # "Searx" = { - # urls = [{ template = "https://search.jan-leila.com/?q={searchTerms}"; }]; - # iconUpdateURL = "https://nixos.wiki/favicon.png"; - # updateInterval = 24 * 60 * 60 * 1000; # every day - # definedAliases = [ "@searx" ]; - # }; - # }; - # }; - - # extentions = with pkgs.nur.repos.rycee.firefox-addons; [ - # ublock-origin - # bitwarden - - # ]; - - # bookmarks = [ - # { - # name = "Media"; - # url = "https://jellyfin.jan-leila.com/"; - # keyword = ""; - # tags = [""]; - # } - # { - # name = "Drive"; - # url = "https://drive.jan-leila.com/"; - # keyword = ""; - # tags = [""]; - # } - # { - # name = "Git"; - # url = "https://git.jan-leila.com/"; - # keyword = ""; - # tags = [""]; - # } - # { - # name = "Home Automation"; - # url = "https://home-assistant.jan-leila.com/"; - # keyword = ""; - # tags = [""]; - # } - # { - # name = "Mail"; - # url = "https://mail.protonmail.com"; - # keyword = ""; - # tags = [""]; - # } - # { - # name = "Open Street Map"; - # url = "https://www.openstreetmap.org/"; - # keyword = ""; - # tags = [""]; - # } - # { - # name = "Password Manager"; - # url = "https://vault.bitwarden.com/"; - # keyword = ""; - # tags = [""]; - # } - # { - # name = "Mastodon"; - # url = "https://tech.lgbt"; - # keyword = ""; - # tags = [""]; - # } - # { - # name = "Linked In"; - # url = "https://www.linkedin.com/"; - # keyword = ""; - # tags = [""]; - # } - # { - # name = "Job Search"; - # url = "https://www.jobsinnetwork.com/?state=cleaned_history&language%5B%5D=en&query=react&locations.countryCode%5B%5D=IT&locations.countryCode%5B%5D=DE&locations.countryCode%5B%5D=NL&experience%5B%5D=medior&experience%5B%5D=junior&page=1"; - # keyword = ""; - # tags = [""]; - # } - # { - # name = "React Docs"; - # url = "https://react.dev/"; - # keyword = ""; - # tags = [""]; - # } - # # Template - # # { - # # name = ""; - # # url = ""; - # # keyword = ""; - # # tags = [""]; - # # } - # ]; - # }; - # } }; dconf = { diff --git a/hosts/defiant/configuration.nix b/hosts/defiant/configuration.nix index c52fd74..cd76cdf 100644 --- a/hosts/defiant/configuration.nix +++ b/hosts/defiant/configuration.nix @@ -10,6 +10,8 @@ ../../modules/hardware.nix ../../modules/users.nix + ../../modules/desktop.nix + ../../modules/nix-development.nix ]; nixpkgs.config.allowUnfree = true; diff --git a/hosts/horizon/configuration.nix b/hosts/horizon/configuration.nix index 529417d..a656840 100644 --- a/hosts/horizon/configuration.nix +++ b/hosts/horizon/configuration.nix @@ -5,6 +5,8 @@ ../../enviroments/client ../../modules/hardware.nix ../../modules/users.nix + ../../modules/desktop.nix + ../../modules/nix-development.nix ]; nixpkgs.config.allowUnfree = true; diff --git a/hosts/twilight/configuration.nix b/hosts/twilight/configuration.nix index a958cca..b49baa5 100644 --- a/hosts/twilight/configuration.nix +++ b/hosts/twilight/configuration.nix @@ -4,6 +4,8 @@ ../../modules/hardware.nix ../../modules/users.nix + ../../modules/desktop.nix + ../../modules/nix-development.nix ]; nixpkgs.config.allowUnfree = true; diff --git a/modules/desktop.nix b/modules/desktop.nix new file mode 100644 index 0000000..f67407d --- /dev/null +++ b/modules/desktop.nix @@ -0,0 +1,38 @@ +{pkgs, ...}: { + services = { + # Enable CUPS to print documents. + printing.enable = true; + + xserver = { + # Enable the X11 windowing system. + enable = true; + + # Enable the GNOME Desktop Environment. + displayManager.gdm.enable = true; + desktopManager = { + gnome.enable = true; + }; + + # Get rid of xTerm + desktopManager.xterm.enable = false; + excludePackages = [pkgs.xterm]; + }; + + pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + + # If you want to use JACK applications, uncomment this + #jack.enable = true; + + # use the example session manager (no others are packaged yet so this is enabled by default, + # no need to redefine it in your config for now) + #media-session.enable = true; + }; + }; + + # Enable sound with pipewire. + hardware.pulseaudio.enable = false; +} diff --git a/modules/nix-development.nix b/modules/nix-development.nix new file mode 100644 index 0000000..c4eacac --- /dev/null +++ b/modules/nix-development.nix @@ -0,0 +1,14 @@ +{ + inputs, + pkgs, + ... +}: { + nix = { + nixPath = ["nixpkgs=${inputs.nixpkgs}"]; + }; + + environment.systemPackages = with pkgs; [ + # nix langauge server + nixd + ]; +}