commented/tidied sync.nix & regreet.nix
This commit is contained in:
parent
86640e26ce
commit
cfef8df3d8
2 changed files with 11 additions and 50 deletions
|
|
@ -1,39 +1,34 @@
|
|||
{ pkgs, primaryUser, homeDir, flakePath, ... }:
|
||||
|
||||
## Allows regreet to be bootstrapped by sway
|
||||
let
|
||||
|
||||
swayConfig = pkgs.writeText "greetd-sway-config" ''
|
||||
exec "${pkgs.greetd.regreet}/bin/regreet; swaymsg exit"
|
||||
-t warning \
|
||||
-m 'What do you want to do?' \
|
||||
'';
|
||||
|
||||
in {
|
||||
|
||||
services = {
|
||||
|
||||
## Login greeter/display manager,
|
||||
## wayland native. ReGreet on top of greetd.
|
||||
greetd = {
|
||||
greetd = { # enables greetd native wayland display manager
|
||||
enable = true;
|
||||
#package = [ ];
|
||||
restart = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "${pkgs.sway}/bin/sway --config ${swayConfig}";
|
||||
user = "greeter";
|
||||
command =
|
||||
"${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 = ''
|
||||
sway
|
||||
fish
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
## ReGreet specific configuration and theme
|
||||
|
|
@ -47,39 +42,31 @@ in {
|
|||
size = 16;
|
||||
package = pkgs.spleen;
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
name = "Flat-Remix-Grey-Darkest";
|
||||
package = pkgs.flat-remix-icon-theme;
|
||||
};
|
||||
|
||||
cursorTheme = {
|
||||
name = "Bibata-Modern-Classic";
|
||||
package = pkgs.bibata-cursors;
|
||||
};
|
||||
|
||||
theme = {
|
||||
name = "Colloid-Dark";
|
||||
package = pkgs.colloid-gtk-theme;
|
||||
};
|
||||
|
||||
#extraCss = '''';
|
||||
|
||||
settings = {
|
||||
# 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/NixOS/nixpkgs/issues/335082#issuecomment-2293304283
|
||||
|
||||
appearance = { # ... this is ALL appearance ? tf bruh
|
||||
greeting_msg = "Welcome !";
|
||||
};
|
||||
|
||||
background = {
|
||||
path =
|
||||
"${flakePath}/home/resources/wallpapers/attunement-HelveticaBlanc.png";
|
||||
fit = "Cover";
|
||||
};
|
||||
|
||||
GTK = { # why this shit needs to be declared twice i do not know
|
||||
application_prefer_dark_theme = true;
|
||||
cursor_theme_name = "Bibata-Modern-Classic";
|
||||
|
|
@ -87,7 +74,6 @@ in {
|
|||
icon_theme_name = "Flat-Remix-Grey-Darkest";
|
||||
theme_name = "Colloid-Dark";
|
||||
};
|
||||
|
||||
widget.clock = {
|
||||
format = "%a, %D %H:%M"; # Thursday 13/02/24, 01:36
|
||||
resolution = "500ms";
|
||||
|
|
@ -100,10 +86,8 @@ in {
|
|||
reboot = [ "systemctl" "reboot" ];
|
||||
poweroff = [ "systemctl" "poweroff" ];
|
||||
};
|
||||
|
||||
env = { GTK_USE_PORTAL = "0"; };
|
||||
};
|
||||
|
||||
cageArgs =
|
||||
[ "-s" ]; # https://github.com/cage-kiosk/cage/blob/master/cage.1.scd
|
||||
|
||||
|
|
|
|||
33
core/zfs.nix
33
core/zfs.nix
|
|
@ -1,13 +1,9 @@
|
|||
# # 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, ... }:
|
||||
|
||||
## Black magic wizardry from https://wiki.nixos.org/wiki/ZFS
|
||||
## - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
let
|
||||
|
||||
zfsCompatibleKernelPackages = lib.filterAttrs (name: kernelPackages:
|
||||
(builtins.match "linux_[0-9]+_[0-9]+" name) != null
|
||||
&& (builtins.tryEval kernelPackages).success
|
||||
|
|
@ -16,10 +12,8 @@ let
|
|||
latestKernelPackage = lib.last
|
||||
(lib.sort (a: b: (lib.versionOlder a.kernel.version b.kernel.version))
|
||||
(builtins.attrValues zfsCompatibleKernelPackages));
|
||||
|
||||
in {
|
||||
|
||||
imports = [ ];
|
||||
## - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
## Enable zfs in kernel and boot
|
||||
boot = {
|
||||
|
|
@ -33,12 +27,7 @@ in {
|
|||
forceImportRoot = false;
|
||||
};
|
||||
};
|
||||
|
||||
#fileSystems."/run/media/serenity/Orcus" = {
|
||||
#device = "orcus";
|
||||
#fsType = "zfs";
|
||||
#options = [ "users" ];
|
||||
#};
|
||||
networking = { hostId = "603b0c8b"; }; # Unsure why this is here actually ?
|
||||
|
||||
## Adding ZFS package to system just in case
|
||||
environment.systemPackages = with pkgs; [ zfs ];
|
||||
|
|
@ -46,21 +35,9 @@ in {
|
|||
## Enable trim for ZFS SSDs
|
||||
services = {
|
||||
zfs = {
|
||||
## Trim for SSSds with ZFS
|
||||
#trim.enable = true;
|
||||
## Autoscrub data integrity ZFS service,
|
||||
## more to be added soon
|
||||
autoScrub = { enable = true; };
|
||||
#trim.enable = true; # zfs trim service for SSDS
|
||||
autoScrub = { enable = true; }; # autoscrub data integrity ZFS service,
|
||||
};
|
||||
};
|
||||
|
||||
## 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"; };
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue