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
|
{config, ...}: let
|
||||||
inherit (config.marleyos.my) name;
|
inherit (config.marleycfg.my) name;
|
||||||
in {
|
in {
|
||||||
networking = {
|
networking = {
|
||||||
computerName = "mairley";
|
computerName = "mairley";
|
||||||
|
@ -7,9 +7,7 @@ in {
|
||||||
localHostName = "mairley";
|
localHostName = "mairley";
|
||||||
};
|
};
|
||||||
|
|
||||||
marleyos = {
|
marleycfg.profiles.desktop = true;
|
||||||
profiles.desktop = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
users = {
|
users = {
|
||||||
knownUsers = [name];
|
knownUsers = [name];
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
{config, ...}: let
|
{config, ...}: let
|
||||||
inherit (config.marleyos.my) name;
|
inherit (config.marleycfg.my) name;
|
||||||
in {
|
in {
|
||||||
imports = [./hardware-configuration.nix];
|
imports = [./hardware-configuration.nix];
|
||||||
|
|
||||||
networking.hostName = "marleycentre";
|
networking.hostName = "marleycentre";
|
||||||
|
|
||||||
marleyos = {
|
marleycfg.profiles.server = true;
|
||||||
profiles.server = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users = {
|
users.users = {
|
||||||
marley.openssh.authorizedKeys.keys = [
|
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 {
|
in {
|
||||||
imports = [./hardware-configuration.nix];
|
imports = [./hardware-configuration.nix];
|
||||||
|
|
||||||
networking.hostName = "marleynet";
|
networking.hostName = "marleynet";
|
||||||
|
|
||||||
|
marleycfg.profiles.server = true;
|
||||||
|
|
||||||
marleyos = {
|
marleyos = {
|
||||||
profiles.server = true;
|
services.ddclient = enabled;
|
||||||
# services.ddclient = enabled;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users = {
|
users.users = {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (marleylib.module) enabled;
|
inherit (marleylib.module) enabled;
|
||||||
inherit (config.marleyos.my) name;
|
inherit (config.marleycfg.my) name;
|
||||||
in {
|
in {
|
||||||
imports = [./hardware-configuration.nix ./mounts.nix ./autorandr.nix];
|
imports = [./hardware-configuration.nix ./mounts.nix ./autorandr.nix];
|
||||||
|
|
||||||
|
@ -13,16 +13,12 @@ in {
|
||||||
# For local dev.
|
# For local dev.
|
||||||
networking.firewall.allowedTCPPorts = [8080];
|
networking.firewall.allowedTCPPorts = [8080];
|
||||||
|
|
||||||
marleyos = {
|
marleycfg.profiles.desktop = true;
|
||||||
profiles = {
|
|
||||||
desktop = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
marleyos = {
|
||||||
hardware = {
|
hardware = {
|
||||||
nvidia = enabled;
|
nvidia = enabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
mounts.babeshare = enabled;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users."${name}" = {
|
home-manager.users."${name}" = {
|
||||||
|
|
13
layout.txt
13
layout.txt
|
@ -3,12 +3,13 @@ modules/${class}/default.nix # imported by easy-hosts.perClass.modules
|
||||||
imports = [
|
imports = [
|
||||||
../base # common across all systems
|
../base # common across all systems
|
||||||
|
|
||||||
./base # common across all ${class} systems
|
./base
|
||||||
|
./hardware
|
||||||
./shell # WM/DE
|
./shell # WM/DE
|
||||||
./programs
|
./programs
|
||||||
# default.nix - turns on/off depending on profile
|
./services
|
||||||
./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
|
./shell # WM/DE
|
||||||
./programs
|
./programs
|
||||||
# default.nix - turns on/off depending on profile
|
|
||||||
# ${program}.nix - OS check here if needed
|
# ${program}.nix - OS check here if needed
|
||||||
./services
|
./services
|
||||||
# default.nix - turns on/off depending on profile
|
|
||||||
# ${service}.nix - OS check here if needed
|
# ${service}.nix - OS check here if needed
|
||||||
|
|
||||||
|
./profiles.nix # enable/disable items
|
||||||
];
|
];
|
||||||
|
|
|
@ -6,11 +6,11 @@ let
|
||||||
email = "marley@punkfairie.net";
|
email = "marley@punkfairie.net";
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
marleyos.my = my;
|
marleycfg.my = my;
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
useGlobalPackages = true;
|
useGlobalPkgs = true;
|
||||||
backupFileExtension = "bak";
|
backupFileExtension = "bak";
|
||||||
|
|
||||||
users."${my.name}" = {
|
users."${my.name}" = {
|
||||||
|
|
|
@ -51,18 +51,18 @@
|
||||||
|
|
||||||
# Garbage collection.
|
# Garbage collection.
|
||||||
gc.automatic = true;
|
gc.automatic = true;
|
||||||
|
|
||||||
# More useful repl.
|
|
||||||
environment.systemPackages = let
|
|
||||||
nrepl =
|
|
||||||
pkgs.writeShellScriptBin "nrepl"
|
|
||||||
# sh
|
|
||||||
''
|
|
||||||
nix repl "${toString ./.}/repl.nix" "$@"
|
|
||||||
'';
|
|
||||||
in [
|
|
||||||
nrepl
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# More useful repl.
|
||||||
|
environment.systemPackages = let
|
||||||
|
nrepl =
|
||||||
|
pkgs.writeShellScriptBin "nrepl"
|
||||||
|
# sh
|
||||||
|
''
|
||||||
|
nix repl "${toString ./.}/repl.nix" "$@"
|
||||||
|
'';
|
||||||
|
in [
|
||||||
|
nrepl
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (config.marleyos.my) name;
|
inherit (config.marleycfg.my) name;
|
||||||
in {
|
in {
|
||||||
imports = [inputs.home-manager.darwinModules.home-manager];
|
imports = [inputs.home-manager.darwinModules.home-manager];
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./fish.nix
|
./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 = [
|
imports = [
|
||||||
../options
|
../options
|
||||||
./option-inheritance.nix
|
./option-inheritance.nix
|
||||||
|
./options
|
||||||
|
|
||||||
./home-manager.nix
|
./home-manager.nix
|
||||||
|
./profile.nix
|
||||||
|
|
||||||
|
./programs
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
{osConfig, ...}: let
|
{osConfig, ...}: let
|
||||||
cfg = osConfig.marleyos;
|
cfg = osConfig.marleycfg;
|
||||||
in {
|
in {
|
||||||
marleyos = {
|
marleycfg = {
|
||||||
profiles = {
|
profiles = {
|
||||||
inherit (cfg.profiles) desktop server;
|
inherit (cfg.profiles) desktop server;
|
||||||
};
|
};
|
||||||
|
|
||||||
my = {
|
my = {
|
||||||
inherit (cfg.my) name fullName username email;
|
inherit (cfg.my) name fullName username email git;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,14 +2,9 @@
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
system,
|
|
||||||
...
|
...
|
||||||
}: let
|
}: {
|
||||||
inherit (lib.snowfall.system) is-linux;
|
options.marleycfg.apps = {
|
||||||
|
|
||||||
cfg = config.marleyos.apps;
|
|
||||||
in {
|
|
||||||
options.marleyos.apps = {
|
|
||||||
pinentry = lib.mkOption {
|
pinentry = lib.mkOption {
|
||||||
type = lib.types.package;
|
type = lib.types.package;
|
||||||
default = pkgs.pinentry-gtk2;
|
default = pkgs.pinentry-gtk2;
|
||||||
|
@ -46,7 +41,7 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
default = default;
|
inherit default;
|
||||||
};
|
};
|
||||||
|
|
||||||
terminal = lib.mkOption {
|
terminal = lib.mkOption {
|
||||||
|
@ -77,15 +72,10 @@ in {
|
||||||
options = {
|
options = {
|
||||||
package = lib.mkOption {
|
package = lib.mkOption {
|
||||||
type = lib.types.package;
|
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.";
|
description = "The launcher to use.";
|
||||||
};
|
};
|
||||||
command = lib.mkOption {
|
command = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "--show drun";
|
|
||||||
description = ''
|
description = ''
|
||||||
The command appended after the launcher binary to run it.
|
The command appended after the launcher binary to run it.
|
||||||
'';
|
'';
|
||||||
|
@ -95,18 +85,19 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf (is-linux system) {
|
# config = lib.mkIf pkgs.stdenv.isLinux {
|
||||||
home.packages = [
|
# home.packages = [
|
||||||
cfg.pinentry
|
# cfg.pinentry
|
||||||
cfg.clipboard.package
|
# cfg.clipboard.package
|
||||||
];
|
# ];
|
||||||
|
#
|
||||||
programs.rbw = lib.mkDefault {
|
# # TODO: move these to respective modules
|
||||||
settings.pinentry = cfg.pinentry;
|
# programs.rbw = lib.mkDefault {
|
||||||
};
|
# settings.pinentry = cfg.pinentry;
|
||||||
|
# };
|
||||||
services.gpg-agent = lib.mkDefault {
|
#
|
||||||
pinentryPackage = 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 = {
|
boot = {
|
||||||
kernelPackages =
|
kernelPackages =
|
||||||
lib.mkIf (!config.marleyos.profiles.server)
|
lib.mkIf (!config.marleycfg.profiles.server)
|
||||||
pkgs.linuxPackages_xanmod;
|
pkgs.linuxPackages_xanmod;
|
||||||
|
|
||||||
loader = {
|
loader = {
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./boot.nix
|
./boot.nix
|
||||||
./drivers.nix
|
|
||||||
./fonts.nix
|
./fonts.nix
|
||||||
./home.nix
|
./home.nix
|
||||||
./i18n.nix
|
./i18n.nix
|
||||||
./mounts
|
|
||||||
./networking.nix
|
./networking.nix
|
||||||
./nix.nix
|
./nix.nix
|
||||||
./stylix.nix
|
./stylix.nix
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (config.marleyos.my) name;
|
inherit (config.marleycfg.my) name;
|
||||||
in {
|
in {
|
||||||
imports = [inputs.home-manager.nixosModules.home-manager];
|
imports = [inputs.home-manager.nixosModules.home-manager];
|
||||||
config = {
|
config = {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{config, ...}: {
|
{config, ...}: {
|
||||||
time.timeZone =
|
time.timeZone =
|
||||||
if config.marleyos.profiles.server
|
if config.marleycfg.profiles.server
|
||||||
then "UTC"
|
then "UTC"
|
||||||
else "America/Los_Angeles";
|
else "America/Los_Angeles";
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,6 @@
|
||||||
allowedTCPPorts = [80 443];
|
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";
|
desktopPass = "$y$j9T$ztWf9WeUCENC2T12qS4mi1$51ihV/5cQ8mdJJrNe7MMguk4hPB61S5xHawsfi.1hL3";
|
||||||
serverPass = "$y$j9T$8hA7OWZsdQMHqYIy8LkYQ1$hFeP2ak3QA4FtoIYIwqPg10//ZOSZrAw1PzJj0PuGSA";
|
serverPass = "$y$j9T$8hA7OWZsdQMHqYIy8LkYQ1$hFeP2ak3QA4FtoIYIwqPg10//ZOSZrAw1PzJj0PuGSA";
|
||||||
in {
|
in {
|
||||||
marleyos.my = {
|
marleycfg.my = {
|
||||||
inherit (my) name username fullName email;
|
inherit (my) name username fullName email;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ in {
|
||||||
++ (lib.optional config.networking.networkmanager.enable "networkmanager")
|
++ (lib.optional config.networking.networkmanager.enable "networkmanager")
|
||||||
++ (lib.optional config.virtualisation.docker.enable "docker");
|
++ (lib.optional config.virtualisation.docker.enable "docker");
|
||||||
hashedPassword =
|
hashedPassword =
|
||||||
if config.marleyos.profiles.server
|
if config.marleycfg.profiles.server
|
||||||
then serverPass
|
then serverPass
|
||||||
else desktopPass;
|
else desktopPass;
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,7 +6,11 @@
|
||||||
|
|
||||||
./base
|
./base
|
||||||
./hardware
|
./hardware
|
||||||
|
./shell
|
||||||
|
|
||||||
./programs
|
./programs
|
||||||
|
./services
|
||||||
|
|
||||||
|
./profiles.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
config = lib.mkIf (!config.marleyos.profiles.server) {
|
config = lib.mkIf (!config.marleycfg.profiles.server) {
|
||||||
security.rtkit.enable = true; # for pulseaudio
|
security.rtkit.enable = true; # for pulseaudio
|
||||||
|
|
||||||
hardware.pulseaudio.enable = false;
|
hardware.pulseaudio.enable = false;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./audio.nix
|
./audio.nix
|
||||||
|
./mounts
|
||||||
./nvidia.nix
|
./nvidia.nix
|
||||||
|
|
||||||
./misc.nix # try to use this as little as possible
|
./misc.nix # try to use this as little as possible
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
}: let
|
}: let
|
||||||
cfg = config.marleyos.mounts.babeshare;
|
cfg = config.marleyos.mounts.babeshare;
|
||||||
|
|
||||||
user = config.users.users."${config.marleyos.my.name}";
|
user = config.users.users."${config.marleycfg.my.name}";
|
||||||
uid =
|
uid =
|
||||||
if user.uid != null
|
if user.uid != null
|
||||||
then user.uid
|
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 = [
|
imports = [
|
||||||
./fish.nix
|
./fish.nix
|
||||||
|
./nh.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ in {
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
programs.nh = {
|
programs.nh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
clean = {
|
clean = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dates = "daily";
|
dates = "daily";
|
|
@ -8,7 +8,7 @@ in {
|
||||||
options.marleyos.services.ddclient.enable = lib.mkEnableOption "ddclient";
|
options.marleyos.services.ddclient.enable = lib.mkEnableOption "ddclient";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
age.secrets.ddclient.file = ../../../../secrets/ddclient.conf.age;
|
age.secrets.ddclient.file = ../../../secrets/ddclient.conf.age;
|
||||||
|
|
||||||
services.ddclient = {
|
services.ddclient = {
|
||||||
enable = true;
|
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 {
|
config = lib.mkIf cfg.enable {
|
||||||
age.secrets."mopidy-jellyfin.conf" = {
|
age.secrets."mopidy-jellyfin.conf" = {
|
||||||
file = ../../../../secrets/mopidy-jellyfin.conf.age;
|
file = ../../../secrets/mopidy-jellyfin.conf.age;
|
||||||
owner = "mopidy";
|
owner = "mopidy";
|
||||||
mode = "600";
|
mode = "600";
|
||||||
};
|
};
|
|
@ -10,6 +10,7 @@ in {
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
PermitRootLogin = "prohibit-password";
|
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,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.marleyos.programs.hyprlock;
|
cfg = config.marleyos.shell.hyprlock;
|
||||||
in {
|
in {
|
||||||
options.marleyos.programs.hyprlock.enable = lib.mkEnableOption "hyprlock";
|
options.marleyos.shell.hyprlock.enable = lib.mkEnableOption "hyprlock";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
programs.hyprlock = {
|
programs.hyprlock = {
|
|
@ -3,9 +3,9 @@
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.marleyos.services.ly;
|
cfg = config.marleyos.shell.ly;
|
||||||
in {
|
in {
|
||||||
options.marleyos.services.ly.enable = lib.mkEnableOption "ly";
|
options.marleyos.shell.ly.enable = lib.mkEnableOption "ly";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
services.displayManager.ly = {
|
services.displayManager.ly = {
|
|
@ -3,9 +3,9 @@
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.marleyos.wayland.niri;
|
cfg = config.marleyos.shell.niri;
|
||||||
in {
|
in {
|
||||||
options.marleyos.wayland.niri.enable = lib.mkEnableOption "niri";
|
options.marleyos.shell.niri.enable = lib.mkEnableOption "niri";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
programs.niri = {
|
programs.niri = {
|
|
@ -3,7 +3,7 @@
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
options.marleyos.my = rec {
|
options.marleycfg.my = rec {
|
||||||
name = lib.mkOption {
|
name = lib.mkOption {
|
||||||
type = with lib.types; str;
|
type = with lib.types; str;
|
||||||
default = "marley";
|
default = "marley";
|
||||||
|
@ -27,15 +27,27 @@
|
||||||
default = null;
|
default = null;
|
||||||
description = "Your email";
|
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
|
config = let
|
||||||
cfg = config.marleyos.my;
|
cfg = config.marleycfg.my;
|
||||||
in {
|
in {
|
||||||
assertions = [
|
assertions = [
|
||||||
{
|
{
|
||||||
assertion = cfg.name != null;
|
assertion = cfg.name != null;
|
||||||
message = "marleyos.my.name must be set.";
|
message = "marleycfg.my.name must be set.";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{lib, ...}: {
|
{lib, ...}: {
|
||||||
options.marleyos.profiles = {
|
options.marleycfg.profiles = {
|
||||||
desktop = lib.mkEnableOption "graphical desktop profile";
|
desktop = lib.mkEnableOption "graphical desktop profile";
|
||||||
server = lib.mkEnableOption "server 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