Compare commits
8 commits
a9f699c4e1
...
19de7d7076
Author | SHA1 | Date | |
---|---|---|---|
19de7d7076 | |||
c365d09f9f | |||
486c304fff | |||
ee90d3577f | |||
99623ce473 | |||
809e11313a | |||
87d7454dd1 | |||
ed196164d0 |
37 changed files with 266 additions and 203 deletions
|
@ -8,33 +8,23 @@
|
|||
config.easy-hosts = {
|
||||
shared.specialArgs.marleylib = import ../lib;
|
||||
|
||||
### Module Imports ###
|
||||
# TODO: Move module imports to custom module
|
||||
shared.modules = with inputs; [
|
||||
lix.nixosModules.default
|
||||
agenix.nixosModules.default
|
||||
|
||||
{
|
||||
home-manager.sharedModules = [
|
||||
nixcord.homeModules.nixcord
|
||||
];
|
||||
}
|
||||
];
|
||||
# shared.modules = with inputs; [
|
||||
# # TODO: Move module imports to custom module
|
||||
# {
|
||||
# home-manager.sharedModules = [
|
||||
# nixcord.homeModules.nixcord
|
||||
# ];
|
||||
# }
|
||||
# ];
|
||||
|
||||
perClass = class: {
|
||||
modules = ["${self}/modules/${class}/default.nix"];
|
||||
|
||||
# modules = with inputs;
|
||||
# (nixpkgs.lib.optionals (class == "nixos") [
|
||||
# home-manager.nixosModules.home-manager
|
||||
# agenix.nixosModules.default
|
||||
# stylix.nixosModules.stylix
|
||||
# niri-flake.nixosModules.niri
|
||||
# ])
|
||||
# ++ (nixpkgs.lib.optionals (class == "darwin") [
|
||||
# home-manager.darwinModules.home-manager
|
||||
# agenix.darwinModules.default
|
||||
# stylix.darwinModules.stylix
|
||||
# ]);
|
||||
};
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{config, ...}: {
|
||||
{config, ...}: let
|
||||
inherit (config.marleyos.my) name;
|
||||
in {
|
||||
networking = {
|
||||
computerName = "mairley";
|
||||
hostName = "mairley";
|
||||
|
@ -10,8 +12,8 @@
|
|||
};
|
||||
|
||||
users = {
|
||||
knownUsers = ["marley"];
|
||||
users."marley" = {
|
||||
knownUsers = [name];
|
||||
users."${name}" = {
|
||||
# This is required for some reason.
|
||||
uid = 501;
|
||||
|
||||
|
@ -19,5 +21,9 @@
|
|||
};
|
||||
};
|
||||
|
||||
home-manager.users."${name}" = {
|
||||
home.stateVersion = "24.05";
|
||||
};
|
||||
|
||||
system.stateVersion = 5;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
{config, ...}: let
|
||||
inherit (config.marleyos.my) name;
|
||||
in {
|
||||
imports = [./hardware-configuration.nix];
|
||||
|
||||
networking.hostName = "marleycentre";
|
||||
|
@ -25,5 +27,9 @@
|
|||
allowedUDPPorts = [6881];
|
||||
};
|
||||
|
||||
home-manager.users."${name}" = {
|
||||
home.stateVersion = "24.05";
|
||||
};
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
{config, ...}: let
|
||||
inherit (config.marleyos.my) name;
|
||||
in {
|
||||
imports = [./hardware-configuration.nix];
|
||||
|
||||
networking.hostName = "marleynet";
|
||||
|
@ -23,5 +25,9 @@
|
|||
|
||||
services.openssh.ports = [222];
|
||||
|
||||
home-manager.users."${name}" = {
|
||||
home.stateVersion = "24.05";
|
||||
};
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
{marleylib, ...}: let
|
||||
{
|
||||
marleylib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (marleylib.module) enabled;
|
||||
inherit (config.marleyos.my) name;
|
||||
in {
|
||||
imports = [./hardware-configuration.nix ./mounts.nix ./autorandr.nix];
|
||||
|
||||
|
@ -10,12 +15,19 @@ in {
|
|||
|
||||
marleyos = {
|
||||
profiles = {
|
||||
desktop = enabled;
|
||||
hardware.nvidia = enabled;
|
||||
desktop = true;
|
||||
};
|
||||
|
||||
hardware = {
|
||||
nvidia = enabled;
|
||||
};
|
||||
|
||||
mounts.babeshare = enabled;
|
||||
};
|
||||
|
||||
home-manager.users."${name}" = {
|
||||
home.stateVersion = "24.05";
|
||||
};
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
../options
|
||||
|
||||
./nix.nix
|
||||
./stylix
|
||||
|
||||
./programs
|
||||
|
||||
./home.nix
|
||||
];
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
inputs.lix.nixosModules.default # this is universal, despite the 'nixos'
|
||||
];
|
||||
|
||||
config = {
|
||||
nix = {
|
||||
package = pkgs.lix;
|
||||
|
||||
|
@ -59,4 +64,5 @@
|
|||
nrepl
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
5
modules/base/programs/default.nix
Normal file
5
modules/base/programs/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./fish.nix
|
||||
];
|
||||
}
|
|
@ -10,10 +10,7 @@ in {
|
|||
config = lib.mkIf cfg.enable {
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
|
||||
useBabelfish = true;
|
||||
};
|
||||
|
||||
environment.shells = [config.programs.fish.package];
|
||||
};
|
||||
}
|
21
modules/base/stylix/default.nix
Normal file
21
modules/base/stylix/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{pkgs, ...}: {
|
||||
stylix = {
|
||||
enable = true;
|
||||
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/rose-pine.yaml";
|
||||
override = {slug = "rose-pine";};
|
||||
|
||||
image = ./wallpaper.png;
|
||||
|
||||
fonts = {
|
||||
monospace = {
|
||||
package = pkgs.maple-mono-NF;
|
||||
name = "Maple Mono";
|
||||
};
|
||||
|
||||
sizes = {
|
||||
terminal = 11;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Before Width: | Height: | Size: 4.7 MiB After Width: | Height: | Size: 4.7 MiB |
|
@ -2,5 +2,6 @@
|
|||
imports = [
|
||||
./home.nix
|
||||
./nix.nix
|
||||
./stylix.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,7 +1,15 @@
|
|||
{config, ...}: let
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.marleyos.my) name;
|
||||
in {
|
||||
imports = [inputs.home-manager.darwinModules.home-manager];
|
||||
|
||||
config = {
|
||||
home-manager.users."${name}" = {
|
||||
home.homeDirectory = "/Users/${name}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
3
modules/darwin/base/stylix.nix
Normal file
3
modules/darwin/base/stylix.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{inputs, ...}: {
|
||||
imports = [inputs.stylix.darwinModules.stylix];
|
||||
}
|
|
@ -1,6 +1,10 @@
|
|||
{
|
||||
{inputs, ...}: {
|
||||
imports = [
|
||||
inputs.agenix.darwinModules.default
|
||||
|
||||
../base
|
||||
./base
|
||||
|
||||
./programs
|
||||
];
|
||||
}
|
||||
|
|
5
modules/darwin/programs/default.nix
Normal file
5
modules/darwin/programs/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./fish.nix
|
||||
];
|
||||
}
|
11
modules/darwin/programs/fish.nix
Normal file
11
modules/darwin/programs/fish.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.marleyos.programs.fish;
|
||||
in {
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.shells = [config.programs.fish.package];
|
||||
};
|
||||
}
|
|
@ -4,10 +4,6 @@ in {
|
|||
marleyos = {
|
||||
profiles = {
|
||||
inherit (cfg.profiles) desktop server;
|
||||
|
||||
hardware = {
|
||||
inherit (cfg.profiles.hardware) nvidia;
|
||||
};
|
||||
};
|
||||
|
||||
my = {
|
||||
|
|
|
@ -2,10 +2,13 @@
|
|||
imports = [
|
||||
./boot.nix
|
||||
./drivers.nix
|
||||
./fonts.nix
|
||||
./home.nix
|
||||
./i18n.nix
|
||||
./mounts
|
||||
./networking.nix
|
||||
./nix.nix
|
||||
./stylix.nix
|
||||
./users.nix
|
||||
];
|
||||
}
|
||||
|
|
10
modules/nixos/base/fonts.nix
Normal file
10
modules/nixos/base/fonts.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{pkgs, ...}: {
|
||||
fonts = {
|
||||
enableDefaultPackages = true;
|
||||
|
||||
packages = with pkgs; [
|
||||
corefonts
|
||||
noto-fonts
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,7 +1,14 @@
|
|||
{config, ...}: let
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.marleyos.my) name;
|
||||
in {
|
||||
imports = [inputs.home-manager.nixosModules.home-manager];
|
||||
config = {
|
||||
home-manager.users."${name}" = {
|
||||
home.homeDirectory = "/home/${name}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
7
modules/nixos/base/mounts/automounts.nix
Normal file
7
modules/nixos/base/mounts/automounts.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
boot.supportedFilesystems = {
|
||||
ntfs = true;
|
||||
};
|
||||
|
||||
services.udisks2.enable = true;
|
||||
}
|
6
modules/nixos/base/mounts/default.nix
Normal file
6
modules/nixos/base/mounts/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./automounts.nix
|
||||
./babeshare.nix
|
||||
];
|
||||
}
|
33
modules/nixos/base/stylix.nix
Normal file
33
modules/nixos/base/stylix.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [inputs.stylix.nixosModules.stylix];
|
||||
|
||||
config = {
|
||||
stylix = {
|
||||
enable = true;
|
||||
|
||||
fonts = {
|
||||
serif = {
|
||||
package = pkgs.eb-garamond;
|
||||
name = "EB Garamond";
|
||||
};
|
||||
sansSerif = {
|
||||
package = pkgs.dm-sans;
|
||||
name = "DeepMind Sans";
|
||||
};
|
||||
emoji = {
|
||||
package = pkgs.whatsapp-emoji-font;
|
||||
name = "Apple Color Emoji";
|
||||
};
|
||||
};
|
||||
|
||||
cursor = {
|
||||
package = pkgs.rose-pine-cursor;
|
||||
name = "BreezeX-RosePine-Linux";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,7 +1,12 @@
|
|||
{
|
||||
{inputs, ...}: {
|
||||
imports = [
|
||||
inputs.agenix.nixosModules.default
|
||||
|
||||
../base
|
||||
|
||||
./base
|
||||
./hardware
|
||||
|
||||
./programs
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf (!config.marleyos.profiles.server) {
|
||||
security.rtkit.enable = true; # Used for pulseaudio.
|
||||
security.rtkit.enable = true; # for pulseaudio
|
||||
|
||||
hardware.pulseaudio.enable = false;
|
||||
|
||||
|
@ -15,8 +15,6 @@
|
|||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
printing.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = [pkgs.pwvucontrol];
|
8
modules/nixos/hardware/default.nix
Normal file
8
modules/nixos/hardware/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
imports = [
|
||||
./audio.nix
|
||||
./nvidia.nix
|
||||
|
||||
./misc.nix # try to use this as little as possible
|
||||
];
|
||||
}
|
3
modules/nixos/hardware/misc.nix
Normal file
3
modules/nixos/hardware/misc.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
services.printing.enable = true;
|
||||
}
|
|
@ -3,9 +3,9 @@
|
|||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.marleyos.nvidia;
|
||||
cfg = config.marleyos.hardware.nvidia;
|
||||
in {
|
||||
options.marleyos.nvidia.enable = lib.mkEnableOption "nvidia";
|
||||
options.marleyos.hardware.nvidia.enable = lib.mkEnableOption "nvidia";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# NVIDIA drivers are unfree.
|
5
modules/nixos/programs/default.nix
Normal file
5
modules/nixos/programs/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./fish.nix
|
||||
];
|
||||
}
|
|
@ -5,14 +5,7 @@
|
|||
}: let
|
||||
cfg = config.marleyos.programs.fish;
|
||||
in {
|
||||
options.marleyos.programs.fish.enable = lib.mkEnableOption "fish";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
useBabelfish = true;
|
||||
};
|
||||
|
||||
users.defaultUserShell = config.programs.fish.package;
|
||||
};
|
||||
}
|
|
@ -2,9 +2,5 @@
|
|||
options.marleyos.profiles = {
|
||||
desktop = lib.mkEnableOption "graphical desktop profile";
|
||||
server = lib.mkEnableOption "server profile";
|
||||
|
||||
hardware = {
|
||||
nvidia = lib.mkEnableOption "Nvidia profile";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.marleyos.appearance.base;
|
||||
in {
|
||||
options.marleyos.appearance.base.enable = lib.mkEnableOption "base";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
fonts.packages = with pkgs; [
|
||||
maple-mono-NF
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,58 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.marleyos.appearance.base;
|
||||
in {
|
||||
options.marleyos.appearance.base.enable = lib.mkEnableOption "base";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
stylix = {
|
||||
enable = true;
|
||||
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/rose-pine.yaml";
|
||||
override = {slug = "rose-pine";};
|
||||
|
||||
image = ./wallpaper.png;
|
||||
|
||||
fonts = {
|
||||
serif = {
|
||||
package = pkgs.eb-garamond;
|
||||
name = "EB Garamond";
|
||||
};
|
||||
sansSerif = {
|
||||
package = pkgs.dm-sans;
|
||||
name = "DeepMind Sans";
|
||||
};
|
||||
monospace = {
|
||||
package = pkgs.maple-mono-NF;
|
||||
name = "Maple Mono";
|
||||
};
|
||||
emoji = {
|
||||
package = pkgs.whatsapp-emoji-font;
|
||||
name = "Apple Color Emoji";
|
||||
};
|
||||
|
||||
sizes = {
|
||||
terminal = 11;
|
||||
};
|
||||
};
|
||||
|
||||
cursor = {
|
||||
package = pkgs.rose-pine-cursor;
|
||||
name = "BreezeX-RosePine-Linux";
|
||||
};
|
||||
};
|
||||
|
||||
fonts = {
|
||||
enableDefaultPackages = true;
|
||||
|
||||
packages = with pkgs; [
|
||||
corefonts
|
||||
noto-fonts
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.marleyos.mounts.automounts;
|
||||
in {
|
||||
options.marleyos.mounts.automounts.enable = lib.mkEnableOption "automounts";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
boot.supportedFilesystems = {
|
||||
ntfs = true;
|
||||
};
|
||||
|
||||
services.udisks2.enable = true;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue