ran linter

This commit is contained in:
Leyla Becker 2024-09-21 11:26:18 -05:00
parent 5da0753b7c
commit dcd5accea0
23 changed files with 372 additions and 309 deletions

View file

@ -1,11 +1,9 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
imports = [
../common
];
services = {
# Enable CUPS to print documents.
printing.enable = true;
@ -44,7 +42,6 @@
};
};
# Enable sound with pipewire.
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
imports = [
../../users
];

View file

@ -1,33 +1,55 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
imports = [
../common
];
users.groups.jellyfin_media = {
users = {
groups = {
jellyfin_media = {
members = ["jellyfin" "leyla" "ester" "eve"];
};
users.groups.jellyfin = {
jellyfin = {
members = ["jellyfin" "leyla"];
};
users.users.jellyfin = {
# forgejo = {
# members = ["forgejo" "leyla"];
# };
};
users = {
jellyfin = {
uid = 2000;
group = "jellyfin";
isSystemUser = true;
};
# forgejo = {
# uid = 2001;
# group = "forgejo";
# isSystemUser = true;
# };
};
};
systemd.tmpfiles.rules = [
"d /home/jellyfin 755 jellyfin jellyfin -"
"d /home/jellyfin/media 775 jellyfin jellyfin_media -"
"d /home/jellyfin/config 750 jellyfin jellyfin -"
"d /home/jellyfin/cache 755 jellyfin jellyfin_media -"
# "d /home/forgejo 750 forgejo forgejo -"
# "d /home/forgejo/data 750 forgejo forgejo -"
];
services = let
jellyfinDomain = "jellyfin.jan-leila.com";
headscaleDomain = "headscale.jan-leila.com";
# forgejoDomain = "forgejo.jan-leila.com";
in {
nfs.server = {
enable = true;
@ -59,6 +81,20 @@
openFirewall = false;
};
# TODO: figure out what needs to be here
# forgejo = {
# enable = true;
# database.type = "postgres";
# lfs.enable = true;
# settings = {
# server = {
# DOMAIN = forgejoDomain;
# HTTP_PORT = 8081;
# };
# service.DISABLE_REGISTRATION = true;
# };
# };
nginx = {
enable = false; # TODO: enable this when you want to test all the configs
virtualHosts = {
@ -66,20 +102,20 @@
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass =
"http://localhost:${toString config.services.headscale.port}";
proxyPass = "http://localhost:${toString config.services.headscale.port}";
proxyWebsockets = true;
};
};
${jellyfinDomain} = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass =
"http://localhost:8096";
proxyWebsockets = true;
};
locations."/".proxyPass = "http://localhost:8096";
};
# ${forgejoDomain} = {
# forceSSL = true;
# enableACME = true;
# locations."/".proxyPass = "http://localhost:${toString config.services.forgejo.settings.server.HTTP_PORT}";
# };
};
};
};

View file

@ -30,8 +30,13 @@
};
};
outputs = { self, nixpkgs, disko, nixos-hardware, ... }@inputs:
let
outputs = {
self,
nixpkgs,
disko,
nixos-hardware,
...
} @ inputs: let
forEachSystem = nixpkgs.lib.genAttrs [
"aarch64-darwin"
"aarch64-linux"
@ -39,8 +44,7 @@
"x86_64-linux"
];
forEachPkgs = lambda: forEachSystem (system: lambda nixpkgs.legacyPackages.${system});
in
{
in {
packages = forEachPkgs (pkgs: import ./pkgs {inherit pkgs;});
nixosConfigurations = {

View file

@ -1,8 +1,11 @@
# server nas
{ config, pkgs, inputs, ... }:
{
imports =
[
config,
pkgs,
inputs,
...
}: {
imports = [
inputs.home-manager.nixosModules.default
inputs.sops-nix.nixosModules.sops

View file

@ -1,5 +1,4 @@
{ lib, ... }:
let
{lib, ...}: let
bootDisk = devicePath: {
type = "disk";
device = devicePath;
@ -86,7 +85,9 @@ in {
# should this only mirror for this inital config with 3 drives we will used raidz2 for future configs???
mode = "mirror";
members = [
"hd_13_tb_a" "hd_13_tb_b" "hd_13_tb_c"
"hd_13_tb_a"
"hd_13_tb_b"
"hd_13_tb_c"
];
}
];
@ -133,4 +134,3 @@ in {
};
};
}

View file

@ -1,9 +1,13 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
../hardware-common.nix

View file

@ -1,5 +1,4 @@
{ lib, ... }:
{
{lib, ...}: {
options = {
hardware = {
piperMouse = {

View file

@ -1,8 +1,11 @@
# leyla laptop
{ config, pkgs, inputs, ... }:
{
imports =
[
config,
pkgs,
inputs,
...
}: {
imports = [
inputs.home-manager.nixosModules.default
inputs.sops-nix.nixosModules.sops

View file

@ -1,9 +1,13 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
../hardware-common.nix
@ -25,39 +29,35 @@
};
fileSystems = {
"/" =
{ device = "/dev/disk/by-uuid/866d422b-f816-4ad9-9846-791839cb9337";
"/" = {
device = "/dev/disk/by-uuid/866d422b-f816-4ad9-9846-791839cb9337";
fsType = "ext4";
};
"/boot" =
{ device = "/dev/disk/by-uuid/E138-65B5";
"/boot" = {
device = "/dev/disk/by-uuid/E138-65B5";
fsType = "vfat";
};
"/mnt/leyla_home" =
{
"/mnt/leyla_home" = {
device = "defiant:/home/leyla";
fsType = "nfs";
options = ["x-systemd.automount" "user" "noatime" "nofail" "soft" "x-systemd.idle-timeout=600" "fsc"];
};
"/mnt/eve_home" =
{
"/mnt/eve_home" = {
device = "defiant:/home/eve";
fsType = "nfs";
options = ["x-systemd.automount" "user" "nofail" "soft" "x-systemd.idle-timeout=600" "fsc"];
};
"/mnt/ester_home" =
{
"/mnt/ester_home" = {
device = "defiant:/home/ester";
fsType = "nfs";
options = ["x-systemd.automount" "user" "nofail" "soft" "x-systemd.idle-timeout=600" "fsc"];
};
"/mnt/users_home" =
{
"/mnt/users_home" = {
device = "defiant:/home/users";
fsType = "nfs";
options = ["x-systemd.automount" "user" "nofail" "soft" "x-systemd.idle-timeout=600" "fsc"];
@ -87,8 +87,8 @@
services.cachefilesd.enable = true;
swapDevices =
[ { device = "/dev/disk/by-uuid/be98e952-a072-4c3a-8c12-69500b5a2fff"; }
swapDevices = [
{device = "/dev/disk/by-uuid/be98e952-a072-4c3a-8c12-69500b5a2fff";}
];
networking = {
@ -99,7 +99,6 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware = {
graphics.enable = true;
cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

View file

@ -1,8 +1,11 @@
# leyla laptop
{ config, pkgs, inputs, ... }:
{
imports =
[
config,
pkgs,
inputs,
...
}: {
imports = [
inputs.home-manager.nixosModules.default
inputs.sops-nix.nixosModules.sops

View file

@ -1,9 +1,13 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
../hardware-common.nix
@ -33,33 +37,30 @@
};
fileSystems = {
"/" =
{ device = "/dev/disk/by-uuid/8be49c65-2b57-48f1-b74d-244d26061adb";
"/" = {
device = "/dev/disk/by-uuid/8be49c65-2b57-48f1-b74d-244d26061adb";
fsType = "ext4";
};
"/boot" =
{ device = "/dev/disk/by-uuid/3006-3867";
"/boot" = {
device = "/dev/disk/by-uuid/3006-3867";
fsType = "vfat";
options = ["fmask=0022" "dmask=0022"];
};
"/mnt/leyla_home" =
{
"/mnt/leyla_home" = {
device = "server.arpa:/home/leyla";
fsType = "nfs";
options = ["x-systemd.automount" "user" "nofail" "soft" "x-systemd.idle-timeout=600" "fsc"];
};
"/mnt/share_home" =
{
"/mnt/share_home" = {
device = "server.arpa:/home/share";
fsType = "nfs";
options = ["x-systemd.automount" "user" "nofail" "soft" "x-systemd.idle-timeout=600" "fsc"];
};
"/mnt/docker_home" =
{
"/mnt/docker_home" = {
device = "server.arpa:/home/docker";
fsType = "nfs";
options = ["x-systemd.automount" "noauto" "x-systemd.idle-timeout=600"];
@ -122,4 +123,3 @@
cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
};
}

View file

@ -1,5 +1,4 @@
_:
{
_: {
# nixpkgs.overlays = [
# (self: super: {
# # idea is too out of date for android gradle things

View file

@ -1,5 +1,4 @@
_:
{
_: {
# nixpkgs.overlays = [
# (self: super: {
# # ui is broken on 1.84

View file

@ -1,4 +1,2 @@
_:
{
_: {
}

View file

@ -1,2 +1 @@
_:
{}
_: {}

View file

@ -1,5 +1,4 @@
{ inputs, ... }:
{
{inputs, ...}: {
imports = [./leyla ./ester ./eve];
users.mutableUsers = false;

View file

@ -1,8 +1,11 @@
{ lib, config, pkgs, ... }:
let
cfg = config.users.ester;
in
{
lib,
config,
pkgs,
...
}: let
cfg = config.users.ester;
in {
options.users.ester = {
isFullUser = lib.mkEnableOption "ester";
};
@ -25,7 +28,8 @@ in
}
(
if cfg.isFullUser then {
if cfg.isFullUser
then {
isNormalUser = true;
extraGroups = ["networkmanager" "users"];
@ -36,7 +40,8 @@ in
bitwarden
discord
];
} else {
}
else {
isSystemUser = true;
}
)

View file

@ -1,8 +1,11 @@
{ lib, config, pkgs, ... }:
let
cfg = config.users.eve;
in
{
lib,
config,
pkgs,
...
}: let
cfg = config.users.eve;
in {
options.users.eve = {
isFullUser = lib.mkEnableOption "eve";
};
@ -25,7 +28,8 @@ in
}
(
if cfg.isFullUser then {
if cfg.isFullUser
then {
isNormalUser = true;
extraGroups = ["networkmanager" "users"];
@ -38,7 +42,8 @@ in
makemkv
signal-desktop
];
} else {
}
else {
isSystemUser = true;
}
)

View file

@ -1,8 +1,11 @@
{ lib, config, pkgs, ... }:
let
cfg = config.users.leyla;
in
{
lib,
config,
pkgs,
...
}: let
cfg = config.users.leyla;
in {
imports = [
./packages.nix
];
@ -31,7 +34,8 @@ in
}
(
if (cfg.isFullUser || cfg.isThinUser) then {
if (cfg.isFullUser || cfg.isThinUser)
then {
isNormalUser = true;
extraGroups = lib.mkMerge [
["networkmanager" "wheel" "users"]
@ -48,7 +52,8 @@ in
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKBiZkg1c2aaNHiieBX4cEziqvJVj9pcDfzUrKU/mO0I leyla@twilight"
];
};
} else {
}
else {
isSystemUser = true;
}
)

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
# Home Manager needs a bit of information about you and the paths it should
# manage.
home = {

View file

@ -1,8 +1,12 @@
{ lib, config, pkgs, inputs, ... }:
let
cfg = config.users.leyla;
in
{
lib,
config,
pkgs,
inputs,
...
}: let
cfg = config.users.leyla;
in {
imports = [
../../overlays/intellij.nix
../../overlays/vscodium.nix
@ -74,7 +78,8 @@ in
# development tools
(vscode-with-extensions.override {
vscode = vscodium;
vscodeExtensions = with open-vsx; [
vscodeExtensions = with open-vsx;
[
# vs code feel extensions
ms-vscode.atom-keybindings
akamud.vscode-theme-onedark
@ -101,7 +106,8 @@ in
# misc extensions
bungcip.better-toml
] ++ (with vscode-marketplace; [
]
++ (with vscode-marketplace; [
# js extensions
karyfoundation.nearley
]);

View file

@ -1,5 +1,4 @@
_:
{
_: {
# mkUnless = condition: then: (mkIf (!condition) then);
# mkIfElse = condition: then: else: lib.mkMerge [
# (mkIf condition then)