summaryrefslogtreecommitdiff
path: root/hostnix/elmo
diff options
context:
space:
mode:
authorJoe Mou <dev@mou.fo>2024-02-13 22:25:19 -0500
committerJoe Mou <dev@mou.fo>2024-02-13 22:27:27 -0500
commite12fb7e7d533be78312c8fa52e1f07ed516e9131 (patch)
tree396fbc36efe4a18d378630720e03f082ed3e2c50 /hostnix/elmo
parentdd076148cc59eb4a613d951e5e0b929c3cb3cbfd (diff)
Refactor elmo default configs
Diffstat (limited to 'hostnix/elmo')
-rw-r--r--hostnix/elmo/configuration.nix70
-rw-r--r--hostnix/elmo/desktop.nix39
-rw-r--r--hostnix/elmo/system.nix35
3 files changed, 76 insertions, 68 deletions
diff --git a/hostnix/elmo/configuration.nix b/hostnix/elmo/configuration.nix
index fe544ed..3ab9922 100644
--- a/hostnix/elmo/configuration.nix
+++ b/hostnix/elmo/configuration.nix
@@ -7,77 +7,11 @@
{
imports =
[ # Include the results of the hardware scan.
+ ./desktop.nix
./hardware-configuration.nix
+ ./system.nix
];
- # Bootloader.
- boot.loader.systemd-boot.enable = true;
- boot.loader.efi.canTouchEfiVariables = true;
-
- networking.hostName = "elmo"; # Define your hostname.
- # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
-
- # Configure network proxy if necessary
- # networking.proxy.default = "http://user:password@proxy:port/";
- # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
-
- # Enable networking
- networking.networkmanager.enable = true;
-
- # Set your time zone.
- time.timeZone = "America/New_York";
-
- # Select internationalisation properties.
- i18n.defaultLocale = "en_US.UTF-8";
-
- i18n.extraLocaleSettings = {
- LC_ADDRESS = "en_US.UTF-8";
- LC_IDENTIFICATION = "en_US.UTF-8";
- LC_MEASUREMENT = "en_US.UTF-8";
- LC_MONETARY = "en_US.UTF-8";
- LC_NAME = "en_US.UTF-8";
- LC_NUMERIC = "en_US.UTF-8";
- LC_PAPER = "en_US.UTF-8";
- LC_TELEPHONE = "en_US.UTF-8";
- LC_TIME = "en_US.UTF-8";
- };
-
- # Enable the X11 windowing system.
- services.xserver.enable = true;
-
- # Enable the Pantheon Desktop Environment.
- services.xserver.displayManager.lightdm.enable = true;
- services.xserver.desktopManager.pantheon.enable = true;
-
- # Configure keymap in X11
- services.xserver = {
- layout = "us";
- xkbVariant = "";
- };
-
- # Enable CUPS to print documents.
- services.printing.enable = true;
-
- # Enable sound with pipewire.
- sound.enable = true;
- hardware.pulseaudio.enable = false;
- security.rtkit.enable = true;
- services.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 touchpad support (enabled default in most desktopManager).
- # services.xserver.libinput.enable = true;
-
security.sudo.wheelNeedsPassword = false;
# Define a user account. Don't forget to set a password with ‘passwd’.
diff --git a/hostnix/elmo/desktop.nix b/hostnix/elmo/desktop.nix
new file mode 100644
index 0000000..376cbbf
--- /dev/null
+++ b/hostnix/elmo/desktop.nix
@@ -0,0 +1,39 @@
+{ ... }:
+
+{
+ # Enable the X11 windowing system.
+ services.xserver.enable = true;
+
+ # Enable the Pantheon Desktop Environment.
+ services.xserver.displayManager.lightdm.enable = true;
+ services.xserver.desktopManager.pantheon.enable = true;
+
+ # Configure keymap in X11
+ services.xserver = {
+ layout = "us";
+ xkbVariant = "";
+ };
+
+ # Enable CUPS to print documents.
+ services.printing.enable = true;
+
+ # Enable sound with pipewire.
+ sound.enable = true;
+ hardware.pulseaudio.enable = false;
+ security.rtkit.enable = true;
+ services.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 touchpad support (enabled default in most desktopManager).
+ # services.xserver.libinput.enable = true;
+}
diff --git a/hostnix/elmo/system.nix b/hostnix/elmo/system.nix
new file mode 100644
index 0000000..6ef89d1
--- /dev/null
+++ b/hostnix/elmo/system.nix
@@ -0,0 +1,35 @@
+{ config, pkgs, ... }:
+
+{
+ # Bootloader.
+ boot.loader.systemd-boot.enable = true;
+ boot.loader.efi.canTouchEfiVariables = true;
+
+ networking.hostName = "elmo"; # Define your hostname.
+ # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
+
+ # Configure network proxy if necessary
+ # networking.proxy.default = "http://user:password@proxy:port/";
+ # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
+
+ # Enable networking
+ networking.networkmanager.enable = true;
+
+ # Set your time zone.
+ time.timeZone = "America/New_York";
+
+ # Select internationalisation properties.
+ i18n.defaultLocale = "en_US.UTF-8";
+
+ i18n.extraLocaleSettings = {
+ LC_ADDRESS = "en_US.UTF-8";
+ LC_IDENTIFICATION = "en_US.UTF-8";
+ LC_MEASUREMENT = "en_US.UTF-8";
+ LC_MONETARY = "en_US.UTF-8";
+ LC_NAME = "en_US.UTF-8";
+ LC_NUMERIC = "en_US.UTF-8";
+ LC_PAPER = "en_US.UTF-8";
+ LC_TELEPHONE = "en_US.UTF-8";
+ LC_TIME = "en_US.UTF-8";
+ };
+}