From ac318199ea06232b039645d74bed9ab6de171bcd Mon Sep 17 00:00:00 2001 From: Cameron Reed Date: Sun, 31 Dec 2023 12:11:11 -0700 Subject: [PATCH] 12 31 23 --- bootloader.nix | 8 +++++--- configuration.nix | 3 +++ desktop.nix | 19 +++++++++++++++++++ login-manager.nix | 13 +++++++++++++ packages.nix | 28 +++++----------------------- power.nix | 7 +++++++ printing.nix | 2 +- xserver.nix | 8 ++------ 8 files changed, 55 insertions(+), 33 deletions(-) create mode 100644 desktop.nix create mode 100644 login-manager.nix create mode 100644 power.nix diff --git a/bootloader.nix b/bootloader.nix index b2a09d2..b89b691 100644 --- a/bootloader.nix +++ b/bootloader.nix @@ -1,4 +1,4 @@ -{ ... }: +{ pkgs, ... }: { boot.loader = { @@ -9,9 +9,11 @@ editor = false; configurationLimit = 5; extraInstallCommands = '' - sed -i 's/^version Generation \([0-9]\+\).*$/version Generation \1/' /boot/loader/entries/nixos-generation-* - sed -i 's/^default .*$/default 00-arch.conf/' /boot/loader/loader.conf + ${pkgs.gnused}/bin/sed -i 's/^version Generation \([0-9]\+\).*$/version Generation \1/' /boot/loader/entries/nixos-generation-* + ${pkgs.gnused}/bin/sed -i 's/^default .*$/default 00-arch.conf/' /boot/loader/loader.conf ''; }; }; + + boot.kernelParams = [ "quiet" "splash" ]; } diff --git a/configuration.nix b/configuration.nix index e83961c..b64d80f 100644 --- a/configuration.nix +++ b/configuration.nix @@ -17,6 +17,9 @@ ./xserver.nix ./printing.nix ./sound.nix + ./power.nix + ./login-manager.nix + ./desktop.nix ./packages.nix # User configuration diff --git a/desktop.nix b/desktop.nix new file mode 100644 index 0000000..4a2c75d --- /dev/null +++ b/desktop.nix @@ -0,0 +1,19 @@ +{ pkgs, ... }: + +{ + programs = { + sway = { + enable = true; + + extraPackages = with pkgs; [ + swaylock + swayidle + dmenu + wmenu + i3status + brightnessctl + wob + ]; + }; + }; +} diff --git a/login-manager.nix b/login-manager.nix new file mode 100644 index 0000000..7e02fc0 --- /dev/null +++ b/login-manager.nix @@ -0,0 +1,13 @@ +{ pkgs, ... }: + +{ + services.greetd = { + enable = true; + settings = { + default_session = { + command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd sway"; + user = "greeter"; + }; + }; + }; +} diff --git a/packages.nix b/packages.nix index e1fb897..482fb70 100644 --- a/packages.nix +++ b/packages.nix @@ -4,38 +4,20 @@ programs = { zsh.enable = true; vim.defaultEditor = true; - - sway = { - enable = true; - - extraPackages = with pkgs; [ - swaylock - swayidle - dmenu - wmenu - i3status - brightnessctl - wob - ]; - }; }; - environment.systemPackages = with pkgs; [ + environment.systemPackages = (with pkgs; [ vim + neovim git wget kitty ranger + lf firefox - gnome.gnome-tweaks - ]; - environment.gnome.excludePackages = with pkgs; [ - gnome-tour - gnome-console - epiphany - gnome.geary - ]; + greetd.tuigreet + ]); environment.shells = with pkgs; [ bash zsh ]; diff --git a/power.nix b/power.nix new file mode 100644 index 0000000..79e3b20 --- /dev/null +++ b/power.nix @@ -0,0 +1,7 @@ +{ ... }: + +{ + services.tlp = { + enable = true; + }; +} diff --git a/printing.nix b/printing.nix index 341912b..97c105e 100644 --- a/printing.nix +++ b/printing.nix @@ -2,6 +2,6 @@ { services.printing = { - enable = true; + enable = false; }; } diff --git a/xserver.nix b/xserver.nix index 178e010..7cacdbe 100644 --- a/xserver.nix +++ b/xserver.nix @@ -2,8 +2,8 @@ { services.xserver = { - # Enable X11. GDM won't launch without it - enable = true; + # Disable X11. Don't need it with tuigreet and sway + enable = false; layout = "us"; libinput = { @@ -12,10 +12,6 @@ }; }; - # Enable GNOME and its display manager, GDM - desktopManager.gnome.enable = true; - displayManager.gdm.enable = true; - # I don't need xterm excludePackages = [ pkgs.xterm ]; };