Compare commits
29 commits
19de7d7076
...
a27b3ffdd5
Author | SHA1 | Date | |
---|---|---|---|
a27b3ffdd5 | |||
546f73b42b | |||
ba90c05b2d | |||
8c014a0a97 | |||
783502952c | |||
555471d5f3 | |||
8f12b248d5 | |||
24ffd6d7ce | |||
8f64cd0822 | |||
f9d633f4c2 | |||
8f10d3a6cf | |||
979929ea32 | |||
4b27f1db40 | |||
1df6787b36 | |||
29f77cd309 | |||
e0087d7668 | |||
b73a7a33b1 | |||
72c9eec2d8 | |||
c0c67efdd8 | |||
39f89b8965 | |||
53340764e3 | |||
839728539b | |||
37912e91eb | |||
41154db1b5 | |||
b7537fafda | |||
3f26e32ebe | |||
1c99ea2b99 | |||
1eba02f65f | |||
449d972d14 |
62 changed files with 222 additions and 381 deletions
|
@ -1,5 +1,5 @@
|
|||
{config, ...}: let
|
||||
inherit (config.marleyos.my) name;
|
||||
inherit (config.marleycfg.my) name;
|
||||
in {
|
||||
networking = {
|
||||
computerName = "mairley";
|
||||
|
@ -7,9 +7,7 @@ in {
|
|||
localHostName = "mairley";
|
||||
};
|
||||
|
||||
marleyos = {
|
||||
profiles.desktop = true;
|
||||
};
|
||||
marleycfg.profiles.desktop = true;
|
||||
|
||||
users = {
|
||||
knownUsers = [name];
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
{config, ...}: let
|
||||
inherit (config.marleyos.my) name;
|
||||
inherit (config.marleycfg.my) name;
|
||||
in {
|
||||
imports = [./hardware-configuration.nix];
|
||||
|
||||
networking.hostName = "marleycentre";
|
||||
|
||||
marleyos = {
|
||||
profiles.server = true;
|
||||
};
|
||||
marleycfg.profiles.server = true;
|
||||
|
||||
users.users = {
|
||||
marley.openssh.authorizedKeys.keys = [
|
||||
|
|
|
@ -1,13 +1,19 @@
|
|||
{config, ...}: let
|
||||
inherit (config.marleyos.my) name;
|
||||
{
|
||||
config,
|
||||
marleylib,
|
||||
...
|
||||
}: let
|
||||
inherit (config.marleycfg.my) name;
|
||||
inherit (marleylib.module) enabled;
|
||||
in {
|
||||
imports = [./hardware-configuration.nix];
|
||||
|
||||
networking.hostName = "marleynet";
|
||||
|
||||
marleycfg.profiles.server = true;
|
||||
|
||||
marleyos = {
|
||||
profiles.server = true;
|
||||
# services.ddclient = enabled;
|
||||
services.ddclient = enabled;
|
||||
};
|
||||
|
||||
users.users = {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
...
|
||||
}: let
|
||||
inherit (marleylib.module) enabled;
|
||||
inherit (config.marleyos.my) name;
|
||||
inherit (config.marleycfg.my) name;
|
||||
in {
|
||||
imports = [./hardware-configuration.nix ./mounts.nix ./autorandr.nix];
|
||||
|
||||
|
@ -13,16 +13,12 @@ in {
|
|||
# For local dev.
|
||||
networking.firewall.allowedTCPPorts = [8080];
|
||||
|
||||
marleyos = {
|
||||
profiles = {
|
||||
desktop = true;
|
||||
};
|
||||
marleycfg.profiles.desktop = true;
|
||||
|
||||
marleyos = {
|
||||
hardware = {
|
||||
nvidia = enabled;
|
||||
};
|
||||
|
||||
mounts.babeshare = enabled;
|
||||
};
|
||||
|
||||
home-manager.users."${name}" = {
|
||||
|
|
11
layout.txt
11
layout.txt
|
@ -3,12 +3,13 @@ modules/${class}/default.nix # imported by easy-hosts.perClass.modules
|
|||
imports = [
|
||||
../base # common across all systems
|
||||
|
||||
./base # common across all ${class} systems
|
||||
./base
|
||||
./hardware
|
||||
./shell # WM/DE
|
||||
./programs
|
||||
# default.nix - turns on/off depending on profile
|
||||
./services
|
||||
# default.nix - turns on/off depending on profile
|
||||
|
||||
./profiles.nix # enable/disable items
|
||||
];
|
||||
|
||||
|
||||
|
@ -34,9 +35,9 @@ modules/home/default.nix # HOME MANAGER OPTIONS ONLY
|
|||
|
||||
./shell # WM/DE
|
||||
./programs
|
||||
# default.nix - turns on/off depending on profile
|
||||
# ${program}.nix - OS check here if needed
|
||||
./services
|
||||
# default.nix - turns on/off depending on profile
|
||||
# ${service}.nix - OS check here if needed
|
||||
|
||||
./profiles.nix # enable/disable items
|
||||
];
|
||||
|
|
|
@ -6,11 +6,11 @@ let
|
|||
email = "marley@punkfairie.net";
|
||||
};
|
||||
in {
|
||||
marleyos.my = my;
|
||||
marleycfg.my = my;
|
||||
|
||||
home-manager = {
|
||||
useUserPackages = true;
|
||||
useGlobalPackages = true;
|
||||
useGlobalPkgs = true;
|
||||
backupFileExtension = "bak";
|
||||
|
||||
users."${my.name}" = {
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
|
||||
# Garbage collection.
|
||||
gc.automatic = true;
|
||||
};
|
||||
|
||||
# More useful repl.
|
||||
environment.systemPackages = let
|
||||
|
@ -64,5 +65,4 @@
|
|||
nrepl
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
inputs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.marleyos.my) name;
|
||||
inherit (config.marleycfg.my) name;
|
||||
in {
|
||||
imports = [inputs.home-manager.darwinModules.home-manager];
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
{
|
||||
imports = [
|
||||
./fish.nix
|
||||
./wezterm.nix
|
||||
./wireguard.nix
|
||||
];
|
||||
}
|
||||
|
|
15
modules/darwin/programs/wireguard.nix
Normal file
15
modules/darwin/programs/wireguard.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.marleyos.programs.wireguard;
|
||||
in {
|
||||
options.marleyos.programs.wireguard.enable = lib.mkEnableOption "wireguard";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
homebrew.masApps = {
|
||||
"WireGuard" = 1451685025;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -2,7 +2,11 @@
|
|||
imports = [
|
||||
../options
|
||||
./option-inheritance.nix
|
||||
./options
|
||||
|
||||
./home-manager.nix
|
||||
./profile.nix
|
||||
|
||||
./programs
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{osConfig, ...}: let
|
||||
cfg = osConfig.marleyos;
|
||||
cfg = osConfig.marleycfg;
|
||||
in {
|
||||
marleyos = {
|
||||
marleycfg = {
|
||||
profiles = {
|
||||
inherit (cfg.profiles) desktop server;
|
||||
};
|
||||
|
||||
my = {
|
||||
inherit (cfg.my) name fullName username email;
|
||||
inherit (cfg.my) name fullName username email git;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,14 +2,9 @@
|
|||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
system,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.snowfall.system) is-linux;
|
||||
|
||||
cfg = config.marleyos.apps;
|
||||
in {
|
||||
options.marleyos.apps = {
|
||||
}: {
|
||||
options.marleycfg.apps = {
|
||||
pinentry = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = pkgs.pinentry-gtk2;
|
||||
|
@ -46,7 +41,7 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
default = default;
|
||||
inherit default;
|
||||
};
|
||||
|
||||
terminal = lib.mkOption {
|
||||
|
@ -77,15 +72,10 @@ in {
|
|||
options = {
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default =
|
||||
if config.marleyos.wayland.hyprland.enable
|
||||
then config.programs.wofi.package
|
||||
else config.programs.rofi.package;
|
||||
description = "The launcher to use.";
|
||||
};
|
||||
command = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "--show drun";
|
||||
description = ''
|
||||
The command appended after the launcher binary to run it.
|
||||
'';
|
||||
|
@ -95,18 +85,19 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf (is-linux system) {
|
||||
home.packages = [
|
||||
cfg.pinentry
|
||||
cfg.clipboard.package
|
||||
];
|
||||
|
||||
programs.rbw = lib.mkDefault {
|
||||
settings.pinentry = cfg.pinentry;
|
||||
};
|
||||
|
||||
services.gpg-agent = lib.mkDefault {
|
||||
pinentryPackage = cfg.pinentry;
|
||||
};
|
||||
};
|
||||
# config = lib.mkIf pkgs.stdenv.isLinux {
|
||||
# home.packages = [
|
||||
# cfg.pinentry
|
||||
# cfg.clipboard.package
|
||||
# ];
|
||||
#
|
||||
# # TODO: move these to respective modules
|
||||
# programs.rbw = lib.mkDefault {
|
||||
# settings.pinentry = cfg.pinentry;
|
||||
# };
|
||||
#
|
||||
# services.gpg-agent = lib.mkDefault {
|
||||
# pinentryPackage = cfg.pinentry;
|
||||
# };
|
||||
# };
|
||||
}
|
6
modules/home/options/default.nix
Normal file
6
modules/home/options/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./apps.nix
|
||||
./shellAbbrs.nix
|
||||
];
|
||||
}
|
5
modules/home/programs/default.nix
Normal file
5
modules/home/programs/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./nh.nix
|
||||
];
|
||||
}
|
23
modules/home/programs/nh.nix
Normal file
23
modules/home/programs/nh.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
cfg = config.marleyos.programs.nh;
|
||||
in {
|
||||
options.marleyos.programs.nh.enable = lib.mkEnableOption "nh";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
clean =
|
||||
osConfig.programs.nh.clean
|
||||
or {
|
||||
enable = true;
|
||||
dates = "daily";
|
||||
extraArgs = "--keep-since 7d --keep 3";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -6,7 +6,7 @@
|
|||
}: {
|
||||
boot = {
|
||||
kernelPackages =
|
||||
lib.mkIf (!config.marleyos.profiles.server)
|
||||
lib.mkIf (!config.marleycfg.profiles.server)
|
||||
pkgs.linuxPackages_xanmod;
|
||||
|
||||
loader = {
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
{
|
||||
imports = [
|
||||
./boot.nix
|
||||
./drivers.nix
|
||||
./fonts.nix
|
||||
./home.nix
|
||||
./i18n.nix
|
||||
./mounts
|
||||
./networking.nix
|
||||
./nix.nix
|
||||
./stylix.nix
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
inputs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.marleyos.my) name;
|
||||
inherit (config.marleycfg.my) name;
|
||||
in {
|
||||
imports = [inputs.home-manager.nixosModules.home-manager];
|
||||
config = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{config, ...}: {
|
||||
time.timeZone =
|
||||
if config.marleyos.profiles.server
|
||||
if config.marleycfg.profiles.server
|
||||
then "UTC"
|
||||
else "America/Los_Angeles";
|
||||
|
||||
|
|
|
@ -11,6 +11,6 @@
|
|||
allowedTCPPorts = [80 443];
|
||||
};
|
||||
|
||||
wireless.enable = lib.mkIf config.marleyos.profiles.server false;
|
||||
wireless.enable = lib.mkIf config.marleycfg.profiles.server false;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
desktopPass = "$y$j9T$ztWf9WeUCENC2T12qS4mi1$51ihV/5cQ8mdJJrNe7MMguk4hPB61S5xHawsfi.1hL3";
|
||||
serverPass = "$y$j9T$8hA7OWZsdQMHqYIy8LkYQ1$hFeP2ak3QA4FtoIYIwqPg10//ZOSZrAw1PzJj0PuGSA";
|
||||
in {
|
||||
marleyos.my = {
|
||||
marleycfg.my = {
|
||||
inherit (my) name username fullName email;
|
||||
};
|
||||
|
||||
|
@ -34,7 +34,7 @@ in {
|
|||
++ (lib.optional config.networking.networkmanager.enable "networkmanager")
|
||||
++ (lib.optional config.virtualisation.docker.enable "docker");
|
||||
hashedPassword =
|
||||
if config.marleyos.profiles.server
|
||||
if config.marleycfg.profiles.server
|
||||
then serverPass
|
||||
else desktopPass;
|
||||
};
|
||||
|
|
|
@ -6,7 +6,11 @@
|
|||
|
||||
./base
|
||||
./hardware
|
||||
./shell
|
||||
|
||||
./programs
|
||||
./services
|
||||
|
||||
./profiles.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
pkgs,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf (!config.marleyos.profiles.server) {
|
||||
config = lib.mkIf (!config.marleycfg.profiles.server) {
|
||||
security.rtkit.enable = true; # for pulseaudio
|
||||
|
||||
hardware.pulseaudio.enable = false;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
imports = [
|
||||
./audio.nix
|
||||
./mounts
|
||||
./nvidia.nix
|
||||
|
||||
./misc.nix # try to use this as little as possible
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
}: let
|
||||
cfg = config.marleyos.mounts.babeshare;
|
||||
|
||||
user = config.users.users."${config.marleyos.my.name}";
|
||||
user = config.users.users."${config.marleycfg.my.name}";
|
||||
uid =
|
||||
if user.uid != null
|
||||
then user.uid
|
49
modules/nixos/profiles.nix
Normal file
49
modules/nixos/profiles.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
config,
|
||||
marleylib,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.marleycfg.profiles;
|
||||
|
||||
inherit (marleylib.module) enabled;
|
||||
in {
|
||||
#
|
||||
### Universal ###
|
||||
marleyos =
|
||||
{
|
||||
programs = {
|
||||
fish = enabled;
|
||||
nh = enabled;
|
||||
};
|
||||
|
||||
services = {
|
||||
docker = enabled;
|
||||
openssh = enabled; # needed for agenix
|
||||
};
|
||||
}
|
||||
#
|
||||
#
|
||||
### Graphical Desktop Profile ###
|
||||
// (lib.optionalAttrs cfg.desktop {
|
||||
mounts.babeshare = enabled;
|
||||
|
||||
shell = {
|
||||
ly = enabled;
|
||||
niri = enabled;
|
||||
};
|
||||
|
||||
services = {
|
||||
mopidy = enabled;
|
||||
protonmail-bridge = enabled;
|
||||
};
|
||||
})
|
||||
#
|
||||
#
|
||||
### Server Profile ###
|
||||
// (lib.optionalAttrs cfg.server {
|
||||
services = {
|
||||
prometheus = enabled;
|
||||
};
|
||||
});
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./fish.nix
|
||||
./nh.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ in {
|
|||
config = lib.mkIf cfg.enable {
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
|
||||
clean = {
|
||||
enable = true;
|
||||
dates = "daily";
|
|
@ -8,7 +8,7 @@ in {
|
|||
options.marleyos.services.ddclient.enable = lib.mkEnableOption "ddclient";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
age.secrets.ddclient.file = ../../../../secrets/ddclient.conf.age;
|
||||
age.secrets.ddclient.file = ../../../secrets/ddclient.conf.age;
|
||||
|
||||
services.ddclient = {
|
||||
enable = true;
|
11
modules/nixos/services/default.nix
Normal file
11
modules/nixos/services/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
imports = [
|
||||
./ddclient.nix
|
||||
./docker.nix
|
||||
./gnome-keyring.nix
|
||||
./mopidy.nix
|
||||
./openssh.nix
|
||||
./prometheus.nix
|
||||
./protonmail-bridge.nix
|
||||
];
|
||||
}
|
|
@ -10,7 +10,7 @@ in {
|
|||
|
||||
config = lib.mkIf cfg.enable {
|
||||
age.secrets."mopidy-jellyfin.conf" = {
|
||||
file = ../../../../secrets/mopidy-jellyfin.conf.age;
|
||||
file = ../../../secrets/mopidy-jellyfin.conf.age;
|
||||
owner = "mopidy";
|
||||
mode = "600";
|
||||
};
|
|
@ -10,6 +10,7 @@ in {
|
|||
config = lib.mkIf cfg.enable {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
PermitRootLogin = "prohibit-password";
|
||||
};
|
7
modules/nixos/shell/default.nix
Normal file
7
modules/nixos/shell/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
imports = [
|
||||
./hyprlock.nix
|
||||
./ly.nix
|
||||
./niri.nix
|
||||
];
|
||||
}
|
|
@ -3,9 +3,9 @@
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.marleyos.programs.hyprlock;
|
||||
cfg = config.marleyos.shell.hyprlock;
|
||||
in {
|
||||
options.marleyos.programs.hyprlock.enable = lib.mkEnableOption "hyprlock";
|
||||
options.marleyos.shell.hyprlock.enable = lib.mkEnableOption "hyprlock";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.hyprlock = {
|
|
@ -3,9 +3,9 @@
|
|||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.marleyos.services.ly;
|
||||
cfg = config.marleyos.shell.ly;
|
||||
in {
|
||||
options.marleyos.services.ly.enable = lib.mkEnableOption "ly";
|
||||
options.marleyos.shell.ly.enable = lib.mkEnableOption "ly";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.displayManager.ly = {
|
|
@ -3,9 +3,9 @@
|
|||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.marleyos.wayland.niri;
|
||||
cfg = config.marleyos.shell.niri;
|
||||
in {
|
||||
options.marleyos.wayland.niri.enable = lib.mkEnableOption "niri";
|
||||
options.marleyos.shell.niri.enable = lib.mkEnableOption "niri";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.niri = {
|
|
@ -3,7 +3,7 @@
|
|||
config,
|
||||
...
|
||||
}: {
|
||||
options.marleyos.my = rec {
|
||||
options.marleycfg.my = rec {
|
||||
name = lib.mkOption {
|
||||
type = with lib.types; str;
|
||||
default = "marley";
|
||||
|
@ -27,15 +27,27 @@
|
|||
default = null;
|
||||
description = "Your email";
|
||||
};
|
||||
|
||||
git.name = lib.mkOption {
|
||||
type = with lib.types; str;
|
||||
default = username;
|
||||
description = "Your git committer name.";
|
||||
};
|
||||
|
||||
git.email = lib.mkOption {
|
||||
type = with lib.types; nullOr str;
|
||||
default = email;
|
||||
description = "Your git committer email.";
|
||||
};
|
||||
};
|
||||
|
||||
config = let
|
||||
cfg = config.marleyos.my;
|
||||
cfg = config.marleycfg.my;
|
||||
in {
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.name != null;
|
||||
message = "marleyos.my.name must be set.";
|
||||
message = "marleycfg.my.name must be set.";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{lib, ...}: {
|
||||
options.marleyos.profiles = {
|
||||
options.marleycfg.profiles = {
|
||||
desktop = lib.mkEnableOption "graphical desktop profile";
|
||||
server = lib.mkEnableOption "server profile";
|
||||
};
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.marleyos) enabled;
|
||||
in {
|
||||
marleyos = {
|
||||
bundles.mac = enabled;
|
||||
};
|
||||
|
||||
home.stateVersion = "24.05";
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.marleyos) enabled;
|
||||
in {
|
||||
marleyos = {
|
||||
bundles.server = enabled;
|
||||
};
|
||||
|
||||
home.stateVersion = "24.05";
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.marleyos) enabled;
|
||||
in {
|
||||
marleyos = {
|
||||
bundles.server = enabled;
|
||||
};
|
||||
|
||||
home.stateVersion = "24.05";
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
|
||||
cfg = config.marleyos.programs.wireguard;
|
||||
in
|
||||
{
|
||||
options.marleyos.programs.wireguard.enable = mkEnableOption "wireguard";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
homebrew.masApps = {
|
||||
"WireGuard" = 1451685025;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{lib, ...}: {
|
||||
options.marleyos.isDesktop = lib.mkOption {
|
||||
type = with lib.types; bool;
|
||||
default = false;
|
||||
description = "Whether this machine is used as a graphical desktop.";
|
||||
};
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{lib, ...}: {
|
||||
options.marleyos.isServer = lib.mkOption {
|
||||
type = with lib.types; bool;
|
||||
default = false;
|
||||
description = "Whether this machine is a server.";
|
||||
};
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
options.marleyos.my = rec {
|
||||
name = lib.mkOption {
|
||||
type = with lib.types; str;
|
||||
default = config.snowfallorg.user.name or "marley";
|
||||
description = "Your username, for use as your login name.";
|
||||
};
|
||||
|
||||
username = lib.mkOption {
|
||||
type = with lib.types; str;
|
||||
default = name;
|
||||
description = "Your username, for external profiles.";
|
||||
};
|
||||
|
||||
fullName = lib.mkOption {
|
||||
type = with lib.types; str;
|
||||
default = name;
|
||||
description = "Your full name, for display purposes.";
|
||||
};
|
||||
|
||||
email = lib.mkOption {
|
||||
type = with lib.types; nullOr str;
|
||||
default = null;
|
||||
description = "Your email";
|
||||
};
|
||||
|
||||
git.name = lib.mkOption {
|
||||
type = with lib.types; str;
|
||||
default = username;
|
||||
description = "Your git committer name.";
|
||||
};
|
||||
|
||||
git.email = lib.mkOption {
|
||||
type = with lib.types; nullOr str;
|
||||
default = email;
|
||||
description = "Your git committer email.";
|
||||
};
|
||||
};
|
||||
|
||||
config = let
|
||||
cfg = config.marleyos.my;
|
||||
in {
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.name != null;
|
||||
message = "marleyos.my.name must be set.";
|
||||
}
|
||||
];
|
||||
|
||||
home.username = lib.mkDefault cfg.name;
|
||||
|
||||
programs.git = {
|
||||
userName = lib.mkDefault cfg.git.name;
|
||||
userEmail = lib.mkDefault cfg.git.email;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.marleyos.bundles.desktop;
|
||||
|
||||
inherit (lib.marleyos) enabled disabled;
|
||||
in {
|
||||
options.marleyos.bundles.desktop.enable = lib.mkEnableOption "desktop";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
marleyos = {
|
||||
isDesktop = lib.mkDefault true;
|
||||
|
||||
mounts = {
|
||||
automounts = enabled;
|
||||
babeshare = enabled;
|
||||
};
|
||||
|
||||
appearance = {
|
||||
base = enabled;
|
||||
};
|
||||
|
||||
programs = {
|
||||
cli = enabled;
|
||||
tui = enabled;
|
||||
gui = enabled;
|
||||
|
||||
lutris = lib.mkForce disabled;
|
||||
steam = lib.mkForce disabled;
|
||||
};
|
||||
|
||||
services = {
|
||||
docker = enabled;
|
||||
mopidy = enabled;
|
||||
openssh = enabled; # Needed for agenix.
|
||||
protonmail-bridge = enabled;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.marleyos.bundles.server;
|
||||
|
||||
inherit (lib.marleyos) enabled;
|
||||
in {
|
||||
options.marleyos.bundles.server.enable = lib.mkEnableOption "server";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
marleyos = {
|
||||
isServer = lib.mkDefault true;
|
||||
|
||||
appearance = {
|
||||
base = enabled;
|
||||
};
|
||||
|
||||
programs = {
|
||||
cli = enabled;
|
||||
tui = enabled;
|
||||
};
|
||||
|
||||
services = {
|
||||
docker = enabled;
|
||||
openssh = enabled;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.marleyos.programs.cli;
|
||||
|
||||
inherit (lib.marleyos) enabled;
|
||||
in {
|
||||
options.marleyos.programs.cli.enable = lib.mkEnableOption "cli";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
marleyos.programs = {
|
||||
fish = enabled;
|
||||
nh = enabled;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.marleyos.programs.gui;
|
||||
|
||||
inherit (lib.marleyos) enabled;
|
||||
in {
|
||||
options.marleyos.programs.gui.enable = lib.mkEnableOption "gui";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
marleyos.programs = {
|
||||
lutris = enabled;
|
||||
steam = enabled;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.marleyos.programs.lutris;
|
||||
in {
|
||||
options.marleyos.programs.lutris.enable = lib.mkEnableOption "lutris";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
lutris
|
||||
];
|
||||
|
||||
programs.gamemode.enable = true;
|
||||
};
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.marleyos.programs.steam;
|
||||
in {
|
||||
options.marleyos.programs.steam.enable = lib.mkEnableOption "steam";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
|
||||
extraCompatPackages = with pkgs; [
|
||||
proton-ge-bin
|
||||
];
|
||||
|
||||
protontricks.enable = true;
|
||||
};
|
||||
|
||||
programs.gamemode.enable = true;
|
||||
};
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.marleyos.programs.tui;
|
||||
|
||||
inherit (lib.marleyos) enabled;
|
||||
in {
|
||||
options.marleyos.programs.tui.enable = lib.mkEnableOption "tui";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
marleyos.programs = {
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue