Compare commits

...

16 commits

Author SHA1 Message Date
f9f9abf279
feat: qt 2025-05-26 13:43:13 -07:00
0ba745d792
feat: add check recipes 2025-05-26 13:43:07 -07:00
ead6eb1832
feat: gtk 2025-05-26 13:37:06 -07:00
a813e5a010
style: move stylix.nix into shell/ 2025-05-26 13:30:59 -07:00
5ce5eb0a8f
feat: move misc.nix into default.nix's config = {} 2025-05-26 13:30:31 -07:00
6ea68a2b25
fix: force using unfree packages for whatsapp-emoji-font 2025-05-26 13:30:12 -07:00
106b0d752e
feat: wrap all config in config = {}
To make it easier to add other top level attrsets if needed
2025-05-26 13:29:52 -07:00
ccfb74fa5c
fix: allow unfree packages 2025-05-26 13:21:57 -07:00
540bd601e2
feat: home-manager stylix 2025-05-26 13:21:57 -07:00
6ab38a390f
feat: add default pinentry 2025-05-26 13:17:46 -07:00
181970f273
fix: imports 2025-05-26 13:16:54 -07:00
79d253f2d7
fix: use lib.mkMerge instead of //
// doesn't deep merge, so marleyos.openssh.enable didn't stay set to
true after the desktop profile was applied
2025-05-26 13:16:34 -07:00
2b98d371f1
fix: pass marleylib to home-manager 2025-05-26 13:15:20 -07:00
fc4764ef04
chore: remove unused nixGL 2025-05-26 11:30:09 -07:00
6be6e4db46
feat: xdg 2025-05-26 11:29:47 -07:00
93ba9bfdaa
style: reorganizing 2025-05-26 11:20:05 -07:00
47 changed files with 323 additions and 300 deletions

View file

@ -74,6 +74,14 @@ genFirefoxAddons:
secret name:
cd secrets && agenix --edit {{name}}.age --identity ~/.ssh/marley@nyx && cd -
[group('maintainence')]
check:
nix flake check
[group('maintainence')]
checkall:
nix flake check --all-systems
alias s := search
search this:
nh search {{this}}

View file

@ -1,4 +1,4 @@
let
{marleylib, ...}: let
my = {
name = "marley";
fullName = "Marley Rae";
@ -6,6 +6,7 @@ let
email = "marley@punkfairie.net";
};
in {
config = {
marleycfg.my = my;
home-manager = {
@ -18,5 +19,7 @@ in {
};
sharedModules = [../home];
extraSpecialArgs = {inherit marleylib;};
};
};
}

View file

@ -50,6 +50,10 @@
};
};
nixpkgs.config = {
allowUnfree = true;
};
# More useful repl.
environment.systemPackages = let
nrepl =

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
config = {
stylix = {
enable = true;
@ -18,4 +19,5 @@
};
};
};
};
}

View file

@ -1,9 +0,0 @@
{
nix = {
settings = {
trusted-users = [
"@darwin"
];
};
};
}

View file

@ -3,8 +3,11 @@
inputs.agenix.darwinModules.default
../base
./base
./home.nix
./stylix.nix
./system
./programs
];
}

View file

@ -0,0 +1,6 @@
{
imports = [
./homebrew.nix
./nix.nix
];
}

View file

@ -0,0 +1,11 @@
{
config = {
nix = {
settings = {
trusted-users = [
"@darwin"
];
};
};
};
}

View file

@ -5,8 +5,11 @@
./options
./home-manager.nix
./profile.nix
./system
./shell
./programs
./profiles.nix
];
}

View file

@ -1,8 +1,10 @@
{
config = {
programs.home-manager.enable = true;
home.language.base = "en_US.UTF-8";
# Autostart wanted systemd services on Linux.
systemd.user.startServices = true;
};
}

View file

@ -1,6 +1,7 @@
{osConfig, ...}: let
cfg = osConfig.marleycfg;
in {
config = {
marleycfg = {
profiles = {
inherit (cfg.profiles) desktop server;
@ -10,4 +11,5 @@ in {
inherit (cfg.my) name fullName username email git;
};
};
};
}

View file

@ -8,7 +8,7 @@
inherit (marleylib.module) enabled;
in {
marleyos =
marleyos = lib.mkMerge [
# Universal - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{
programs = {
@ -18,9 +18,10 @@ in {
#
#
# Graphical Desktop - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// (lib.optionalAttrs cfg.desktop {})
(lib.optionalAttrs cfg.desktop {})
#
#
# Server - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// (lib.optionalAttrs cfg.server {});
(lib.optionalAttrs cfg.server {})
];
}

View file

@ -1,17 +0,0 @@
{config, ...}: {
config.home = {
sessionPath = [
"${config.home.homeDirectory}/.local/bin"
];
sessionVariables = {
HACK = "${config.home.homeDirectory}/hackin";
};
shellAbbrs = {
c = "clear";
e = "${config.home.sessionVariables.EDITOR}";
v = "${config.home.sessionVariables.EDITOR}";
};
};
}

View file

@ -1,7 +1,7 @@
{
imports = [
./home.nix
./nix.nix
./stylix.nix
./gtk.nix
./qt.nix
];
}

View file

@ -2,12 +2,8 @@
lib,
config,
...
}: let
cfg = config.marleyos.appearance.gtk;
in {
options.marleyos.appearance.gtk.enable = lib.mkEnableOption "gtk";
config = lib.mkIf cfg.enable {
}: {
config = lib.mkIf config.marleycfg.profiles.desktop {
home.pointerCursor.gtk.enable = true;
gtk = {

11
modules/home/shell/qt.nix Normal file
View file

@ -0,0 +1,11 @@
{
lib,
config,
...
}: {
config = lib.mkIf config.marleycfg.profiles.desktop {
qt = {
enable = true;
};
};
}

View file

@ -0,0 +1,21 @@
{
lib,
pkgs,
...
}: {
config = {
stylix = {
iconTheme = {
package = pkgs.kora-icon-theme;
dark = "kora";
light = "kora-light-panel";
};
fonts.sizes.terminal = lib.mkIf pkgs.stdenv.isDarwin 14;
};
home.packages = with pkgs; [
kora-icon-theme
];
};
}

View file

@ -0,0 +1,6 @@
{
imports = [
./session.nix
./xdg.nix
];
}

View file

@ -0,0 +1,34 @@
{
config,
pkgs,
...
}: let
inherit (config.marleycfg) profiles;
in {
config = {
home = {
sessionPath = [
"${config.home.homeDirectory}/.local/bin"
];
sessionVariables = {
HACK = "${config.home.homeDirectory}/hackin";
};
shellAbbrs = {
c = "clear";
e = "${config.home.sessionVariables.EDITOR}";
v = "${config.home.sessionVariables.EDITOR}";
};
packages = [
config.marleycfg.apps.pinentry
];
};
marleycfg.apps.pinentry =
if profiles.desktop
then pkgs.pinentry-gtk2
else pkgs.pinentry-curses;
};
}

View file

@ -1,42 +1,39 @@
{
config,
lib,
system,
pkgs,
...
}: let
inherit (lib.snowfall.system) is-linux;
inherit (config.marleyos) isDesktop;
inherit (config.marleycfg) profiles;
in {
config = {
home.preferXdgDirectories = true;
xdg = let
homeDir = config.home.homeDirectory;
home = config.home.homeDirectory;
in
lib.mkMerge [
{
enable = true;
cacheHome = "${homeDir}/.cache";
configHome = "${homeDir}/.config";
dataHome = "${homeDir}/.local/share";
stateHome = "${homeDir}/.local/state";
cacheHome = "${home}/.cache";
configHome = "${home}/.config";
dataHome = "${home}/.local/share";
stateHome = "${home}/.local/state";
}
(lib.mkIf (isDesktop && (is-linux system)) {
(lib.mkIf (profiles.desktop && pkgs.stdenv.isLinux) {
userDirs = {
enable = true;
createDirectories = true;
desktop = "${homeDir}/desktop";
desktop = "${home}/desktop";
documents = null;
download = "${homeDir}/downloads";
download = "${home}/downloads";
music = null;
pictures = "${homeDir}/pictures";
pictures = "${home}/pictures";
templates = null;
videos = "${homeDir}/videos";
videos = "${home}/videos";
};
portal = {
@ -50,7 +47,7 @@ in {
enable = true;
associations.added = let
browser = "${lib.getName config.marleyos.apps.browser}";
browser = "${lib.getName config.marleycfg.apps.browser}";
in {
"application/json" = ["nvim.desktop"];
"application/pdf" = ["org.pwmt.zathura-pdf-mupdf.desktop"];

View file

@ -1,17 +0,0 @@
{
pkgs,
lib,
config,
...
}: {
boot = {
kernelPackages =
lib.mkIf (!config.marleycfg.profiles.server)
pkgs.linuxPackages_xanmod;
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
}

View file

@ -1,10 +0,0 @@
{pkgs, ...}: {
fonts = {
enableDefaultPackages = true;
packages = with pkgs; [
corefonts
noto-fonts
];
};
}

View file

@ -1,14 +0,0 @@
{
config,
inputs,
...
}: let
inherit (config.marleycfg.my) name;
in {
imports = [inputs.home-manager.nixosModules.home-manager];
config = {
home-manager.users."${name}" = {
home.homeDirectory = "/home/${name}";
};
};
}

View file

@ -1,15 +0,0 @@
{config, ...}: {
time.timeZone =
if config.marleycfg.profiles.server
then "UTC"
else "America/Los_Angeles";
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_MESSAGES = "en_US.UTF-8";
LC_TIME = "de_DE.UTF-8";
};
};
}

View file

@ -1,16 +0,0 @@
{
lib,
config,
...
}: {
networking = {
networkmanager.enable = true;
firewall = {
enable = true;
allowedTCPPorts = [80 443];
};
wireless.enable = lib.mkIf config.marleycfg.profiles.server false;
};
}

View file

@ -1,9 +0,0 @@
{
nix = {
settings = {
trusted-users = [
"@wheel"
];
};
};
}

View file

@ -1,42 +0,0 @@
{
lib,
config,
...
}: let
my = {
name = "marley";
username = "punkfairie";
fullName = "Marley Rae";
email = "marley@punkfairie.net";
};
desktopPass = "$y$j9T$ztWf9WeUCENC2T12qS4mi1$51ihV/5cQ8mdJJrNe7MMguk4hPB61S5xHawsfi.1hL3";
serverPass = "$y$j9T$8hA7OWZsdQMHqYIy8LkYQ1$hFeP2ak3QA4FtoIYIwqPg10//ZOSZrAw1PzJj0PuGSA";
in {
marleycfg.my = {
inherit (my) name username fullName email;
};
users = {
mutableUsers = false;
groups = {
"compat" = {
gid = 1000;
};
};
users."${my.name}" = {
isNormalUser = true;
description = my.fullName;
extraGroups =
["wheel" "compat"]
++ (lib.optional config.networking.networkmanager.enable "networkmanager")
++ (lib.optional config.virtualisation.docker.enable "docker");
hashedPassword =
if config.marleycfg.profiles.server
then serverPass
else desktopPass;
};
};
}

View file

@ -4,10 +4,12 @@
../base
./base
./hardware
./system
./shell
./users.nix
./programs
./services

View file

@ -3,7 +3,9 @@
./audio.nix
./mounts
./nvidia.nix
./misc.nix # try to use this as little as possible
];
config = {
services.printing.enable = true;
};
}

View file

@ -1,3 +0,0 @@
{
services.printing.enable = true;
}

View file

@ -1,7 +1,9 @@
{
config = {
boot.supportedFilesystems = {
ntfs = true;
};
services.udisks2.enable = true;
};
}

View file

@ -8,7 +8,7 @@
inherit (marleylib.module) enabled;
in {
marleyos =
marleyos = lib.mkMerge [
# Universal - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{
programs = {
@ -24,7 +24,7 @@ in {
#
#
# Graphical Desktop - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// (lib.optionalAttrs cfg.desktop {
(lib.optionalAttrs cfg.desktop {
mounts.babeshare = enabled;
shell = {
@ -40,9 +40,10 @@ in {
#
#
# Server - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// (lib.optionalAttrs cfg.server {
(lib.optionalAttrs cfg.server {
services = {
prometheus = enabled;
};
});
})
];
}

View file

@ -1,5 +1,8 @@
{
imports = [
./stylix.nix
./fonts.nix
./hyprlock.nix
./ly.nix
./niri.nix

View file

@ -0,0 +1,12 @@
{pkgs, ...}: {
config = {
fonts = {
enableDefaultPackages = true;
packages = with pkgs; [
corefonts
noto-fonts
];
};
};
}

View file

@ -1,11 +1,15 @@
{
inputs,
lib,
pkgs,
...
}: {
imports = [inputs.stylix.nixosModules.stylix];
config = {
# whatsapp-emoji-font is unfree.
nixpkgs.config.allowUnfree = lib.mkForce true;
stylix = {
enable = true;

View file

@ -0,0 +1,19 @@
{
pkgs,
lib,
config,
...
}: {
config = {
boot = {
kernelPackages =
lib.mkIf (!config.marleycfg.profiles.server)
pkgs.linuxPackages_xanmod;
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
};
}

View file

@ -1,12 +1,8 @@
{
imports = [
./boot.nix
./fonts.nix
./home.nix
./i18n.nix
./networking.nix
./nix.nix
./stylix.nix
./users.nix
];
}

View file

@ -0,0 +1,17 @@
{config, ...}: {
config = {
time.timeZone =
if config.marleycfg.profiles.server
then "UTC"
else "America/Los_Angeles";
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_MESSAGES = "en_US.UTF-8";
LC_TIME = "de_DE.UTF-8";
};
};
};
}

View file

@ -0,0 +1,18 @@
{
lib,
config,
...
}: {
config = {
networking = {
networkmanager.enable = true;
firewall = {
enable = true;
allowedTCPPorts = [80 443];
};
wireless.enable = lib.mkIf config.marleycfg.profiles.server false;
};
};
}

View file

@ -0,0 +1,11 @@
{
config = {
nix = {
settings = {
trusted-users = [
"@wheel"
];
};
};
};
}

51
modules/nixos/users.nix Normal file
View file

@ -0,0 +1,51 @@
{
inputs,
lib,
config,
...
}: let
my = {
name = "marley";
username = "punkfairie";
fullName = "Marley Rae";
email = "marley@punkfairie.net";
};
desktopPass = "$y$j9T$ztWf9WeUCENC2T12qS4mi1$51ihV/5cQ8mdJJrNe7MMguk4hPB61S5xHawsfi.1hL3";
serverPass = "$y$j9T$8hA7OWZsdQMHqYIy8LkYQ1$hFeP2ak3QA4FtoIYIwqPg10//ZOSZrAw1PzJj0PuGSA";
in {
imports = [inputs.home-manager.nixosModules.home-manager];
config = {
marleycfg.my = {
inherit (my) name username fullName email;
};
users = {
mutableUsers = false;
groups = {
"compat" = {
gid = 1000;
};
};
users."${my.name}" = {
isNormalUser = true;
description = my.fullName;
extraGroups =
["wheel" "compat"]
++ (lib.optional config.networking.networkmanager.enable "networkmanager")
++ (lib.optional config.virtualisation.docker.enable "docker");
hashedPassword =
if config.marleycfg.profiles.server
then serverPass
else desktopPass;
};
};
home-manager.users."${my.name}" = {
home.homeDirectory = "/home/${my.name}";
};
};
}

View file

@ -1,40 +0,0 @@
{
lib,
config,
pkgs,
system,
inputs,
...
}: let
inherit (lib.snowfall.system) is-darwin;
cfg = config.marleyos.appearance.base;
inherit (config.marleyos) isDesktop;
in {
options.marleyos.appearance.base.enable = lib.mkEnableOption "base";
config = lib.mkIf cfg.enable {
marleyos = {
apps = {
pinentry =
if isDesktop
then pkgs.pinentry-gtk2
else pkgs.pinentry-curses;
};
};
stylix = {
iconTheme = {
package = pkgs.kora-icon-theme;
dark = "kora";
light = "kora-light-panel";
};
fonts.sizes.terminal = lib.mkIf (is-darwin system) 14;
};
home.packages = with pkgs; [
kora-icon-theme
];
};
}

View file

@ -1,16 +0,0 @@
{
lib,
config,
inputs,
...
}: let
cfg = config.marleyos.appearance.qt;
in {
options.marleyos.appearance.qt.enable = lib.mkEnableOption "qt";
config = lib.mkIf cfg.enable {
qt = {
enable = true;
};
};
}

View file

@ -1,17 +0,0 @@
{
lib,
config,
inputs,
...
}: let
cfg = config.marleyos.nixGL;
in {
options.marleyos.nixGL.enable = lib.mkEnableOption "nixGL";
config = lib.mkIf cfg.enable {
nixGL = {
inherit (inputs.nixgl) packages;
defaultWrapper = "nvidia";
};
};
}