diff --git a/modules/desktop/i3.nix b/modules/desktop/i3.nix index 8f7ba29..b95b2c2 100644 --- a/modules/desktop/i3.nix +++ b/modules/desktop/i3.nix @@ -1,5 +1,8 @@ { pkgs, ... }: { + # Requires Xorg to work + imports = [ ./xorg.nix ]; + services.xserver.windowManager = { i3 = { enable = true; }; }; environment.systemPackages = with pkgs; [ diff --git a/modules/hardware/monitors.nix b/modules/hardware/monitors.nix index b062190..f53cd89 100644 --- a/modules/hardware/monitors.nix +++ b/modules/hardware/monitors.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{ pkgs, user, ... }: { # Timezone required for Redshift schedule imports = [ ../system/timezone.nix ]; @@ -20,6 +20,9 @@ # Detect monitors (brightness) hardware.i2c.enable = true; + # Grant user access to external monitors + users.users.${user}.extraGroups = [ "i2c" ]; + services.xserver.displayManager = { # Put the login screen on the left monitor diff --git a/modules/mail/himalaya.nix b/modules/mail/himalaya.nix new file mode 100644 index 0000000..7e39458 --- /dev/null +++ b/modules/mail/himalaya.nix @@ -0,0 +1,28 @@ +{ pkgs, lib, user, ... }: { + + home-manager.users.${user} = { + + home.packages = with pkgs; [ himalaya ]; + + programs.himalaya = { + enable = true; + settings = { + name = "${name}"; + downloads-dir = "~/Downloads"; + home = { + default = true; + email = "censored"; + imap-host = "censored"; + imap-port = 993; + imap-login = "censored"; + imap-passwd-cmd = "cat ~/.config/himalaya/passwd"; + smtp-host = "censored"; + smtp-port = 587; + smtp-login = "censored"; + smtp-passwd-cmd = "cat ~/.config/himalaya/passwd"; + }; + }; + }; + }; +} + diff --git a/modules/system/doas.nix b/modules/system/doas.nix index 3fdcdef..b6d7eef 100644 --- a/modules/system/doas.nix +++ b/modules/system/doas.nix @@ -1,28 +1,26 @@ # Replace sudo with doas -{ config, ... }: { +{ ... }: { - config = { - security = { + security = { - # Remove sudo - sudo.enable = false; + # Remove sudo + sudo.enable = false; - # Add doas - doas = { - enable = true; + # Add doas + doas = { + enable = true; - # No password required - wheelNeedsPassword = false; + # No password required + wheelNeedsPassword = false; - # Pass environment variables from user to root - # Also requires removing password here - extraRules = [{ - groups = [ "wheel" ]; - noPass = true; - keepEnv = true; - }]; - }; + # Pass environment variables from user to root + # Also requires removing password here + extraRules = [{ + groups = [ "wheel" ]; + noPass = true; + keepEnv = true; + }]; }; }; } diff --git a/modules/system/user.nix b/modules/system/user.nix index 947492e..7571f14 100644 --- a/modules/system/user.nix +++ b/modules/system/user.nix @@ -9,10 +9,8 @@ # Automatically create a password to start initialPassword = "changeme"; - # Enable sudo privileges extraGroups = [ "wheel" # Sudo privileges - "i2c" # Access to external monitors ]; }; diff --git a/nixos/home.nix b/nixos/home.nix index 79982ba..a74daf8 100644 --- a/nixos/home.nix +++ b/nixos/home.nix @@ -5,7 +5,6 @@ home.packages = with pkgs; [ # neomutt - himalaya # Email qbittorrent # Encryption @@ -19,25 +18,5 @@ NOTES_PATH = "$HOME/dev/personal/notes"; }; - # Email - # programs.himalaya = { - # enable = true; - # settings = { - # name = "${name}"; - # downloads-dir = "~/Downloads"; - # home = { - # default = true; - # email = "censored"; - # imap-host = "censored"; - # imap-port = 993; - # imap-login = "censored"; - # imap-passwd-cmd = "cat ~/.config/himalaya/passwd"; - # smtp-host = "censored"; - # smtp-port = 587; - # smtp-login = "censored"; - # smtp-passwd-cmd = "cat ~/.config/himalaya/passwd"; - # }; - # }; - # }; }; }