commented/tidied sync.nix & regreet.nix

This commit is contained in:
serenity-F 2025-03-25 22:39:48 +10:00
parent 86640e26ce
commit cfef8df3d8
2 changed files with 11 additions and 50 deletions

View file

@ -1,39 +1,34 @@
{ pkgs, primaryUser, homeDir, flakePath, ... }: { pkgs, primaryUser, homeDir, flakePath, ... }:
## Allows regreet to be bootstrapped by sway
let let
swayConfig = pkgs.writeText "greetd-sway-config" '' swayConfig = pkgs.writeText "greetd-sway-config" ''
exec "${pkgs.greetd.regreet}/bin/regreet; swaymsg exit" exec "${pkgs.greetd.regreet}/bin/regreet; swaymsg exit"
-t warning \ -t warning \
-m 'What do you want to do?' \ -m 'What do you want to do?' \
''; '';
in { in {
services = { services = {
greetd = { # enables greetd native wayland display manager
## Login greeter/display manager,
## wayland native. ReGreet on top of greetd.
greetd = {
enable = true; enable = true;
#package = [ ]; #package = [ ];
restart = true; restart = true;
settings = { settings = {
default_session = { default_session = {
command = "${pkgs.sway}/bin/sway --config ${swayConfig}"; command =
user = "greeter"; "${pkgs.sway}/bin/sway --config ${swayConfig}"; # lets regreet(greetd) be bootstrapped by sway
user = "greeter"; # sets user to run under as "greeter"
}; };
}; };
}; };
}; };
environment = { environment = { # adds sway and fish environments to launch from regreet
etc."greetd/environments".text = '' etc."greetd/environments".text = ''
sway sway
fish fish
''; '';
}; };
## ReGreet specific configuration and theme ## ReGreet specific configuration and theme
@ -47,39 +42,31 @@ in {
size = 16; size = 16;
package = pkgs.spleen; package = pkgs.spleen;
}; };
iconTheme = { iconTheme = {
name = "Flat-Remix-Grey-Darkest"; name = "Flat-Remix-Grey-Darkest";
package = pkgs.flat-remix-icon-theme; package = pkgs.flat-remix-icon-theme;
}; };
cursorTheme = { cursorTheme = {
name = "Bibata-Modern-Classic"; name = "Bibata-Modern-Classic";
package = pkgs.bibata-cursors; package = pkgs.bibata-cursors;
}; };
theme = { theme = {
name = "Colloid-Dark"; name = "Colloid-Dark";
package = pkgs.colloid-gtk-theme; package = pkgs.colloid-gtk-theme;
}; };
#extraCss = ''''; #extraCss = '''';
settings = { settings = {
# Supposed to be toml, but idk how that works, apparently this is fine ? # Supposed to be toml, but idk how that works, apparently this is fine ?
# https://github.com/rharish101/ReGreet/blob/main/regreet.sample.toml # https://github.com/rharish101/ReGreet/blob/main/regreet.sample.toml
# https://github.com/NixOS/nixpkgs/issues/335082#issuecomment-2293304283 # https://github.com/NixOS/nixpkgs/issues/335082#issuecomment-2293304283
appearance = { # ... this is ALL appearance ? tf bruh appearance = { # ... this is ALL appearance ? tf bruh
greeting_msg = "Welcome !"; greeting_msg = "Welcome !";
}; };
background = { background = {
path = path =
"${flakePath}/home/resources/wallpapers/attunement-HelveticaBlanc.png"; "${flakePath}/home/resources/wallpapers/attunement-HelveticaBlanc.png";
fit = "Cover"; fit = "Cover";
}; };
GTK = { # why this shit needs to be declared twice i do not know GTK = { # why this shit needs to be declared twice i do not know
application_prefer_dark_theme = true; application_prefer_dark_theme = true;
cursor_theme_name = "Bibata-Modern-Classic"; cursor_theme_name = "Bibata-Modern-Classic";
@ -87,7 +74,6 @@ in {
icon_theme_name = "Flat-Remix-Grey-Darkest"; icon_theme_name = "Flat-Remix-Grey-Darkest";
theme_name = "Colloid-Dark"; theme_name = "Colloid-Dark";
}; };
widget.clock = { widget.clock = {
format = "%a, %D %H:%M"; # Thursday 13/02/24, 01:36 format = "%a, %D %H:%M"; # Thursday 13/02/24, 01:36
resolution = "500ms"; resolution = "500ms";
@ -100,10 +86,8 @@ in {
reboot = [ "systemctl" "reboot" ]; reboot = [ "systemctl" "reboot" ];
poweroff = [ "systemctl" "poweroff" ]; poweroff = [ "systemctl" "poweroff" ];
}; };
env = { GTK_USE_PORTAL = "0"; }; env = { GTK_USE_PORTAL = "0"; };
}; };
cageArgs = cageArgs =
[ "-s" ]; # https://github.com/cage-kiosk/cage/blob/master/cage.1.scd [ "-s" ]; # https://github.com/cage-kiosk/cage/blob/master/cage.1.scd

View file

@ -1,13 +1,9 @@
# # ZFS Support NixOS module # # ZFS Support NixOS module
## temporary location while we figure out how ZFS works,
## eventually this will be embedded into the flake in a better way
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
## Black magic wizardry from https://wiki.nixos.org/wiki/ZFS ## Black magic wizardry from https://wiki.nixos.org/wiki/ZFS
## - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
let let
zfsCompatibleKernelPackages = lib.filterAttrs (name: kernelPackages: zfsCompatibleKernelPackages = lib.filterAttrs (name: kernelPackages:
(builtins.match "linux_[0-9]+_[0-9]+" name) != null (builtins.match "linux_[0-9]+_[0-9]+" name) != null
&& (builtins.tryEval kernelPackages).success && (builtins.tryEval kernelPackages).success
@ -16,10 +12,8 @@ let
latestKernelPackage = lib.last latestKernelPackage = lib.last
(lib.sort (a: b: (lib.versionOlder a.kernel.version b.kernel.version)) (lib.sort (a: b: (lib.versionOlder a.kernel.version b.kernel.version))
(builtins.attrValues zfsCompatibleKernelPackages)); (builtins.attrValues zfsCompatibleKernelPackages));
in { in {
## - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
imports = [ ];
## Enable zfs in kernel and boot ## Enable zfs in kernel and boot
boot = { boot = {
@ -33,12 +27,7 @@ in {
forceImportRoot = false; forceImportRoot = false;
}; };
}; };
networking = { hostId = "603b0c8b"; }; # Unsure why this is here actually ?
#fileSystems."/run/media/serenity/Orcus" = {
#device = "orcus";
#fsType = "zfs";
#options = [ "users" ];
#};
## Adding ZFS package to system just in case ## Adding ZFS package to system just in case
environment.systemPackages = with pkgs; [ zfs ]; environment.systemPackages = with pkgs; [ zfs ];
@ -46,21 +35,9 @@ in {
## Enable trim for ZFS SSDs ## Enable trim for ZFS SSDs
services = { services = {
zfs = { zfs = {
## Trim for SSSds with ZFS #trim.enable = true; # zfs trim service for SSDS
#trim.enable = true; autoScrub = { enable = true; }; # autoscrub data integrity ZFS service,
## Autoscrub data integrity ZFS service,
## more to be added soon
autoScrub = { enable = true; };
}; };
}; };
## Automount service for the ZFS pools
## Is supposed to be enabled by default
#systemd.services.zfs-mount = {
#enable = true;
#};
## Unsure why this is here actually ?
networking = { hostId = "603b0c8b"; };
} }