From d10d80bcc6874310a83e2ea849d30a92685fc6f5 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Sun, 28 Jan 2024 17:39:10 -0600 Subject: [PATCH] formatting --- hosts/mannaz/default.nix | 11 ++--- hosts/othalan/default.nix | 5 +-- modules/common.nix | 7 +++- modules/desktop/fonts.nix | 12 +++--- modules/desktop/gui.nix | 30 ++++++------- modules/desktop/lock/default.nix | 41 +++++++++--------- modules/desktop/window-managers/hyprland.nix | 1 - modules/desktop/window-managers/qtile.nix | 44 ++++++++++---------- modules/users/default.nix | 18 ++++---- 9 files changed, 81 insertions(+), 88 deletions(-) diff --git a/hosts/mannaz/default.nix b/hosts/mannaz/default.nix index cf76f90..ef00947 100644 --- a/hosts/mannaz/default.nix +++ b/hosts/mannaz/default.nix @@ -6,11 +6,11 @@ ... }: { imports = with inputs.self.nixosModules; [ - desktop - nix-ld ]; + desktop.enable = true; + cli.enable = true; # Enable the X11 windowing system. services.xserver = { enable = true; @@ -18,12 +18,9 @@ windowManager.qtile.enable = true; }; - cli.enable = true; users.users.daylin.extraGroups = ["docker"]; -programs.gnupg.agent = { + programs.gnupg.agent = { enable = true; enableSSHSupport = true; }; - - } - +} diff --git a/hosts/othalan/default.nix b/hosts/othalan/default.nix index 7ef513b..f773c92 100644 --- a/hosts/othalan/default.nix +++ b/hosts/othalan/default.nix @@ -5,7 +5,6 @@ ... }: { imports = with inputs.self.nixosModules; [ - nix-ld virtualbox restic @@ -14,7 +13,7 @@ cli.enable = true; desktop.enable = true; - languages = { + languages = { misc = true; python = true; nim = true; @@ -43,6 +42,6 @@ }; users.users.daylin.extraGroups = [ - "audio" + "audio" ]; } diff --git a/modules/common.nix b/modules/common.nix index 3794b4c..440f697 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -1,4 +1,8 @@ -{inputs, lib, ...}: { +{ + inputs, + lib, + ... +}: { imports = with inputs.self.nixosModules; [ users nix @@ -27,4 +31,3 @@ options.desktop.enable = lib.mkEnableOption "is desktop"; } - diff --git a/modules/desktop/fonts.nix b/modules/desktop/fonts.nix index 4e46a04..661bc58 100644 --- a/modules/desktop/fonts.nix +++ b/modules/desktop/fonts.nix @@ -4,14 +4,14 @@ config, lib, ... -}: let +}: let inherit (lib) mkIf; cfg = config.desktop; in { config = mkIf cfg.enable { - fonts.fontconfig.enable = true; - fonts.packages = with pkgs; [ - (nerdfonts.override {fonts = ["FiraCode"];}) - ]; -}; + fonts.fontconfig.enable = true; + fonts.packages = with pkgs; [ + (nerdfonts.override {fonts = ["FiraCode"];}) + ]; + }; } diff --git a/modules/desktop/gui.nix b/modules/desktop/gui.nix index 316ede4..ba356f2 100644 --- a/modules/desktop/gui.nix +++ b/modules/desktop/gui.nix @@ -9,22 +9,22 @@ cfg = config.desktop; in { config = mkIf cfg.enable { - environment.systemPackages = with pkgs; [ - inputs.wezterm.packages.${pkgs.system}.default - alacritty + environment.systemPackages = with pkgs; [ + inputs.wezterm.packages.${pkgs.system}.default + alacritty - inkscape - gimp + inkscape + gimp - libreoffice-qt - hunspell # spell check for libreoffice + libreoffice-qt + hunspell # spell check for libreoffice - (vivaldi.override { - commandLineArgs = [ - "--force-dark-mode" - ]; - proprietaryCodecs = true; - }) - ]; -}; + (vivaldi.override { + commandLineArgs = [ + "--force-dark-mode" + ]; + proprietaryCodecs = true; + }) + ]; + }; } diff --git a/modules/desktop/lock/default.nix b/modules/desktop/lock/default.nix index c6aa664..92a1814 100644 --- a/modules/desktop/lock/default.nix +++ b/modules/desktop/lock/default.nix @@ -8,30 +8,27 @@ inherit (lib) mkIf; cfg = config.services.xserver.windowManager.qtile; lock = pkgs.writeShellApplication { - name = "lock"; - runtimeInputs = with pkgs; [i3lock-color figlet procps]; - text = builtins.readFile ./lock.sh; - }; - - + name = "lock"; + runtimeInputs = with pkgs; [i3lock-color figlet procps]; + text = builtins.readFile ./lock.sh; + }; in { config = mkIf cfg.enable { - environment.systemPackages = with pkgs; [ - xss-lock - lock - ]; + environment.systemPackages = with pkgs; [ + xss-lock + lock + ]; - systemd.services.i3lock = { - wantedBy = ["sleep.target"]; - description = "Lock the screen using a custom lock script"; - before = ["suspend.target"]; - serviceConfig = { - User = "daylin"; - Type = "forking"; - Environment = "DISPLAY=:0"; - ExecStart = "${lock}/bin/lock"; - }; + systemd.services.i3lock = { + wantedBy = ["sleep.target"]; + description = "Lock the screen using a custom lock script"; + before = ["suspend.target"]; + serviceConfig = { + User = "daylin"; + Type = "forking"; + Environment = "DISPLAY=:0"; + ExecStart = "${lock}/bin/lock"; }; - }; - } + }; +} diff --git a/modules/desktop/window-managers/hyprland.nix b/modules/desktop/window-managers/hyprland.nix index 47a8df2..21fddfb 100644 --- a/modules/desktop/window-managers/hyprland.nix +++ b/modules/desktop/window-managers/hyprland.nix @@ -9,7 +9,6 @@ cfg = config.programs.hyprland; in { config = mkIf cfg.enable { - security.pam.services.swaylock = {}; programs.hyprland.package = inputs.hyprland.packages.${pkgs.system}.default; # Optional, hint electron apps to use wayland: diff --git a/modules/desktop/window-managers/qtile.nix b/modules/desktop/window-managers/qtile.nix index 27d35f4..d4a405d 100644 --- a/modules/desktop/window-managers/qtile.nix +++ b/modules/desktop/window-managers/qtile.nix @@ -9,33 +9,31 @@ cfg = config.services.xserver.windowManager.qtile; in { config = mkIf cfg.enable { + environment.systemPackages = with pkgs; [ + brightnessctl - environment.systemPackages = with pkgs; [ - brightnessctl + picom + # xorg utils + xdotool + xclip - picom - # xorg utils - xdotool - xclip + # xrandr friends + autorandr + arandr - # xrandr friends - autorandr - arandr + # notifications + libnotify + dunst - # notifications - libnotify - dunst + # qtile & friends + # qtile + eww + feh + rofi - # qtile & friends - # qtile - eww - feh - rofi - - flameshot - catppuccin-cursors.mochaDark - pavucontrol - - ]; + flameshot + catppuccin-cursors.mochaDark + pavucontrol + ]; }; } diff --git a/modules/users/default.nix b/modules/users/default.nix index 0498127..7893d8a 100644 --- a/modules/users/default.nix +++ b/modules/users/default.nix @@ -12,18 +12,18 @@ in { default = true; type = types.bool; description = '' - include default user "daylin" + include default user "daylin" ''; }; config = mkIf cfg { - users.users.daylin = { - isNormalUser = true; - shell = pkgs.zsh; - extraGroups = [ - "wheel" # sudo - ]; - initialPassword = "nix"; - }; + users.users.daylin = { + isNormalUser = true; + shell = pkgs.zsh; + extraGroups = [ + "wheel" # sudo + ]; + initialPassword = "nix"; + }; }; }