feat: move modules, init greetd, and sway idle script

This commit is contained in:
notohh 2023-03-26 06:12:19 -04:00
parent 7e390c64d9
commit de9e79180e
Signed by: notohh
GPG key ID: BD47506D475EE86D
13 changed files with 51 additions and 29 deletions

View file

@ -1,8 +1,5 @@
{ {
config,
pkgs, pkgs,
lib,
inputs,
... ...
}: }:
@ -20,6 +17,11 @@ let
}; };
in in
{ {
imports = [
../../modules/greetd.nix
];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
dbus-hyprland-environment dbus-hyprland-environment
wayland wayland
@ -64,17 +66,6 @@ let
]; ];
}; };
services.greetd = {
enable = true;
settings = rec {
initial_session = {
command = "Hyprland";
user = "notoh";
};
default_session = initial_session;
};
};
environment.etc."greetd/environments".text = '' environment.etc."greetd/environments".text = ''
Hyprland Hyprland
''; '';

View file

@ -5,5 +5,5 @@ my different hosts, each with their own unique configurations and purposes.
Name | Description Name | Description
--------------- | ----------- --------------- | -----------
`hime` | portainer vm, hosting a ton of docker services `hime` | portainer vm, hosting a ton of docker services
`sutakku` | (currently) my *arr stack vm `sutakku` | (currently) my *arr stack / seedbox vm
`tsuki` | my main machine running hyprland `tsuki` | my main machine running hyprland

View file

@ -4,7 +4,7 @@
imports = imports =
[ [
./hardware-configuration.nix ./hardware-configuration.nix
../../modules/services ../../modules
]; ];
boot.loader = { boot.loader = {

View file

@ -4,7 +4,7 @@
imports = imports =
[ [
./hardware-configuration.nix ./hardware-configuration.nix
../../modules/services ../../modules
]; ];
boot.loader = { boot.loader = {

View file

@ -5,7 +5,7 @@
[ [
./hardware-configuration.nix ./hardware-configuration.nix
../../home/wayland ../../home/wayland
../../modules/services ../../modules
]; ];
# bootloader # bootloader
@ -21,8 +21,7 @@
}; };
boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = pkgs.linuxPackages_latest;
boot.extraModulePackages = with config.boot.kernelPackages; boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback.out ];
[ v4l2loopback.out ];
boot.kernelModules = [ "v4l2loopback" "kvm-intel" ]; boot.kernelModules = [ "v4l2loopback" "kvm-intel" ];
virtualisation.libvirtd.enable = true; virtualisation.libvirtd.enable = true;
@ -147,9 +146,11 @@
sumneko-lua-language-server sumneko-lua-language-server
marksman marksman
texlab texlab
jre8
jdk17
jdk8
nodePackages_latest.yaml-language-server nodePackages_latest.yaml-language-server
python310Packages.python-lsp-server python310Packages.python-lsp-server
]; ];
fonts = { fonts = {
@ -171,7 +172,7 @@
enable = true; enable = true;
allowBitmaps = true; allowBitmaps = true;
defaultFonts = { defaultFonts = {
monospace = ["JetBrainsMono Nerd Font Regular"]; monospace = ["JetBrainsMono Nerd Font"];
sansSerif = ["Google Sans Text"]; sansSerif = ["Google Sans Text"];
}; };
hinting.style = "hintfull"; hinting.style = "hintfull";

View file

@ -13,6 +13,7 @@ imports = [
../../home/mpv ../../home/mpv
../../home/waybar ../../home/waybar
../../home/wayland/hyprland ../../home/wayland/hyprland
../../modules/swayidle.nix
]; ];
systemd.user.startServices = "sd-switch"; systemd.user.startServices = "sd-switch";
@ -23,6 +24,7 @@ imports = [
homeDirectory = "/home/notoh"; homeDirectory = "/home/notoh";
packages = with pkgs; [ packages = with pkgs; [
firefox firefox
chromium
bitwarden bitwarden
discord discord
spotify-player spotify-player
@ -36,10 +38,8 @@ imports = [
appimage-run appimage-run
qbittorrent qbittorrent
gdu gdu
nb eww-wayland
cryptomator cryptomator
jetbrains.pycharm-community
chromium
ventoy-bin-full ventoy-bin-full
yt-dlp yt-dlp
plex-media-player plex-media-player

View file

@ -1,7 +1,4 @@
<h1 align="center">:electric_plug: modules</h1> <h1 align="center">:electric_plug: modules</h1>
not doing much here yet, but this currently hosts some common services / security tweaks used on all hosts. not doing much here yet, but this currently hosts some common services / security tweaks used on (most) hosts.
Name | Description
--------------- | -----------
`services` | inits security tweaks, and tailscale to all systems

18
modules/greetd.nix Normal file
View file

@ -0,0 +1,18 @@
{
default,
...
}: {
services.greetd = {
enable = true;
settings = rec {
initial_session = {
command = "Hyprland";
user = "notoh";
};
default_session = initial_session;
};
};
}

15
modules/swayidle.nix Normal file
View file

@ -0,0 +1,15 @@
{
pkgs,
...
}: {
home.file.".local/bin/lock" = {
executable = true;
text = ''
swayidle -w \
timeout 600 'swaylock -f --image ~/Pictures/wallpapers/anny.jpg --clock --grace 5 --ring-color f5c2e7 --inside-color 1e1e2e --line-color 11111b' \
timeout 800 'hyprctl dispatch dpms off' \
resume 'hyprctl dispatch dpms on' \
before-sleep 'swaylock -f --image ~/Picture/wallpapers/anny.jpg --clock --ring-color f5c2e7 --inside-color 1e1e2e --line-color 11111b'
'';
};
}