Remove SnowLib

This commit is contained in:
jopejoe1 2023-05-16 14:55:15 +02:00
parent ff44c8a5e0
commit 7fa434b6f8
42 changed files with 363 additions and 1300 deletions

192
common.nix Normal file
View file

@ -0,0 +1,192 @@
{ home-manager, nixpkgs, nur, prismlauncher, config, ... }:
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.jopejoe1 = import ./home/jopejoe1.nix;
users.root = import ./home/root.nix;
};
nixpkgs = {
config.allowUnfree = true;
overlays = [ prismlauncher.overlay nur.overlay ];
};
services = {
xserver = {
enable = true;
libinput.enable = true;
displayManager.sddm = {
enable = true;
enableHidpi = true;
};
desktopManager.plasma5 = {
enable = true;
useQtScaling = true;
};
};
openssh = {
enable = true;
ports = [ 22 ];
openFirewall = true;
allowSFTP = true;
settings = {
X11forwarding = true;
PermitRootLogin = "no";
passwordAuthentication = true;
kbdInteractiveAuthentication = true;
};
};
};
programs.kdeconnect = {
enable = true;
package = pkgs.plasma5Packages.kdeconnect-kde;
};
xdg = {
sounds.enable = true;
mime.enable = true;
menus.enable = true;
icons.enable = true;
autostart.enable = true;
portal = {
enable = true;
extraPortals = with pkgs; [ xdg-desktop-portal ];
};
};
i18n = {
defaultLocale = "en_NZ.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "de_DE.UTF-8";
LC_IDENTIFICATION = "de_DE.UTF-8";
LC_MEASUREMENT = "de_DE.UTF-8";
LC_MONETARY = "de_DE.UTF-8";
LC_NAME = "de_DE.UTF-8";
LC_NUMERIC = "de_DE.UTF-8";
LC_PAPER = "de_DE.UTF-8";
LC_TELEPHONE = "de_DE.UTF-8";
LC_TIME = "de_DE.UTF-8";
LC_CTYPE = "de_DE.UTF-8";
LC_COLLATE = "de_DE.UTF-8";
LC_MESSAGES = "en_NZ.UTF-8";
};
};
hardware.steam-hardware.enable = true;
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
};
environment.variables = {
# Enable icons in tooling since we have nerdfonts.
LOG_ICONS = "true";
};
fonts.fontDir.enable = true;
nix = {
package = cfg.package;
settings = {
substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
"https://prismlauncher.cachix.org"
"https://nixos-search.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"prismlauncher.cachix.org-1:GhJfjdP1RFKtFSH3gXTIQCvZwsb2cioisOf91y/bK0w="
"nixos-search.cachix.org-1:1HV3YF8az4fywnH+pAd+CXFEdpTXtv9WpoivPi+H70o="
];
trusted-users = [ "root" ];
sandbox = true;
require-sigs = true;
max-jobs = "auto";
auto-optimise-store = true;
allowed-users = [ "*" ];
experimental-features = [ "nix-command" "flakes" ];
warn-dirty = false;
};
# flake-utils-plus
generateRegistryFromInputs = true;
generateNixPathFromInputs = true;
linkInputs = true;
};
security.rtkit.enable = true;
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
services.pipewire = {
enable = true;
alsa = {
enable = true;
support32Bit = true;
};
pulse.enable = true;
jack.enable = true;
wireplumber.enable = true;
};
hardware.pulseaudio.enable = mkForce false;
environment.systemPackages = with pkgs; [
sshfs
deploy-rs
nixfmt
nix-index
nix-prefetch-git
nixpkgs-review
nurl
nix-init
];
services.hardware.openrgb.enable = true;
services.printing = {
enable = true;
webInterface = true;
drivers = with pkgs; [ hplipWithPlugin ];
};
hardware = {
sane = {
enable = true;
extraBackends = with pkgs; [ sane-airscan hplipWithPlugin ];
};
};
services.avahi = {
enable = true;
nssmdns = true;
openFirewall = true;
};
users.users.jopejoe1 = {
isNormalUser = true;
description = "jopejoe1 🚫";
initialPassword = "password";
packages = with pkgs; [
git
kate
libsForQt5.ark
libreoffice-qt
texlive.combined.scheme-full
tela-icon-theme
];
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCUWMJyy2qq2aacVv/J5raugh7UKEmCs+JpagQh30mYqwLV9YQtOfZ+A3Q1qOOLPHTTciLydsfz8K2jBGXEv49uqz9P33aw63RzSaLdcnXhBJRmZvJ3AujLBKDIo24PLOVasogtu01eyQALTg4npX+qlti2UsxLY5O8E5paFJvJ+5rGE3/34c4xA9xthUm7G7SCSt4AhVXwPGB1tqz1KLqGdTJQhvy80laEDSV4tAYpiabmjhNFKGpf8T7afnw1MzKXz+ba6exBcGaJfy2Q24DLztZsW7fsTE1iCdkbcmos9/jUR6NooKFgDr0M4CL2TVZB5pECSiOev06GMnLt+vpxjFL29YeGMaVMmNCedkL1z1mftbXLEL7934kEK9FpEpSwzbRTJ7iPvfYZuTHiT6fi2Ep7n+zzRS+/ZgDUDLSqZYEBmE4dO4LgcqzOsJo5EgoyLGoqQ4OpvPRY12T3rCWUfEgOCXgToF0WlUyxCaPZCfvUjM4LXNlIy/dtivMxMs8= jopejoe1@yokai"
];
};
}

118
flake.nix
View file

@ -46,21 +46,6 @@
inputs.nixpkgs.follows = "nixpkgs";
};
snowfall-lib = {
url = github:snowfallorg/lib;
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-compat.follows = "flake-compat";
inputs.flake-utils-plus.follows = "flake-utils-plus";
};
snowfall-flake = {
url = github:snowfallorg/flake;
inputs.nixpkgs.follows = "nixpkgs";
inputs.unstable.follows = "nixpkgs";
inputs.flake-compat.follows = "flake-compat";
inputs.snowfall-lib.follows = "snowfall-lib";
};
peerix = {
url = github:cid-chan/peerix;
inputs.nixpkgs.follows = "nixpkgs";
@ -90,88 +75,43 @@
flake-utils.url = github:numtide/flake-utils;
nixlib.url = github:nix-community/nixpkgs.lib;
naersk = {
url = github:nix-community/naersk;
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils-plus = {
url = github:gytis-ivaskevicius/flake-utils-plus;
inputs.flake-utils.follows = "flake-utils";
};
comma = {
url = github:nix-community/comma;
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-compat.follows = "flake-compat";
inputs.utils.follows = "flake-utils";
inputs.naersk.follows = "naersk";
};
deploy-rs = {
url = github:serokell/deploy-rs;
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-compat.follows = "flake-compat";
inputs.utils.follows = "flake-utils";
};
libnbtplusplus = {
url = github:PrismLauncher/libnbtplusplus;
flake = false;
};
};
outputs = inputs:
let
lib = inputs.snowfall-lib.mkLib {
inherit inputs;
src = ./.;
};
in
lib.mkFlake {
package-namespace = "custom";
channels-config.allowUnfree = true;
overlays = with inputs; [
nur.overlay
snowfall-flake.overlay
];
systems.modules = with inputs; [
outputs = { self, nixpkgs, nixos-hardware, prismlauncher, home-manager, nur, ... }@attrs: {
nixosConfigurations.yokai = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
specialArgs = attrs;
modules = [
./systems/yokai.nix
./common.nix
nixos-hardware.nixosModules.pine64-pinebook-pro
home-manager.nixosModules.home-manager
nur.nixosModules.nur
peerix.nixosModules.peerix
agenix.nixosModules.default
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
};
system.stateVersion = "23.05";
nix.registry = {
flake-utils.flake = flake-utils;
home-manager.flake = home-manager;
nix-darwin.flake = nix-darwin;
nixos-hardware.flake = nixos-hardware;
nur.flake = nur;
nixpkgs.flake = nixpkgs;
};
nix.nixPath = [ "nixpkgs=/etc/channels/nixpkgs" "nixos-config=/etc/nixos/configuration.nix" "/nix/var/nix/profiles/per-user/root/channels" ];
environment.etc."channels/nixpkgs".source = inputs.nixpkgs.outPath;
}
];
systems.hosts.yokai.modules = with inputs; [
nixos-hardware.nixosModules.pine64-pinebook-pro
];
deploy = lib.mkDeploy { inherit (inputs) self; };
checks =
builtins.mapAttrs
(system: deploy-lib:
deploy-lib.deployChecks inputs.self.deploy)
inputs.deploy-rs.lib;
};
nixosConfigurations.oni = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = attrs;
modules = [
./systems/oni.nix
./common.nix
home-manager.nixosModules.home-manager
nur.nixosModules.nur
];
};
nixosConfigurations.kami = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = attrs;
modules = [
./systems/kami.nix
./common.nix
home-manager.nixosModules.home-manager
nur.nixosModules.nur
];
};
};
}

View file

@ -1,7 +1,5 @@
{ options, config, pkgs, lib, ... }:
{ options, config, pkgs, ... }:
with lib;
#with lib.internal;
let
cfg = config.custom.user.jopejoe1.home;
hcfg = config.home-manager.users.jopejoe1;

View file

@ -1,7 +1,5 @@
{ options, config, pkgs, lib, ... }:
{ options, config, pkgs, ... }:
with lib;
#with lib.internal;
let
cfg = config.custom.user.root.home;
hcfg = config.home-manager.users.root;

View file

@ -1,16 +0,0 @@
{ lib, ... }:
with lib; rec {
mkOpt = type: default: description:
mkOption { inherit type default description; };
mkOpt' = type: default: mkOpt type default null;
mkBoolOpt = mkOpt types.bool;
mkBoolOpt' = mkOpt' types.bool;
enabled = { enable = true; };
disabled = { enable = false; };
}

View file

@ -1,35 +0,0 @@
{ options, config, lib, pkgs, ... }:
with lib;
#with lib.internal;
let
cfg = config.custom.desktop.plasma;
in
{
options.custom.desktop.plasma = with types; {
enable = mkBoolOpt false "Whether or not to use KDE plasma as the desktop environment.";
};
config = mkIf cfg.enable {
services.xserver = {
enable = true;
libinput.enable = true;
displayManager.sddm = {
enable = true;
enableHidpi = true;
};
desktopManager.plasma5 = {
enable = true;
useQtScaling = true;
};
};
programs.kdeconnect = {
enable = true;
package = pkgs.plasma5Packages.kdeconnect-kde;
};
};
}

View file

@ -1,29 +0,0 @@
{ options, config, pkgs, lib, ... }:
with lib;
#with lib.internal;
let cfg = config.custom.hardware.audio;
in
{
options.custom.hardware.audio = with types; {
enable = mkBoolOpt false "Whether or not to enable audio support.";
};
config = mkIf cfg.enable {
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa = {
enable = true;
support32Bit = true;
};
pulse.enable = true;
jack.enable = true;
wireplumber.enable = true;
};
hardware.pulseaudio.enable = mkForce false;
};
}

View file

@ -1,19 +0,0 @@
{ options, config, pkgs, lib, ... }:
with lib;
#with lib.internal;
let cfg = config.custom.hardware.bluetooth;
in
{
options.custom.hardware.bluetooth = with types; {
enable = mkBoolOpt false "Whether or not to enable bluetooth";
};
config = mkIf cfg.enable {
hardware.bluetooth.enable = true;
hardware.bluetooth.hsphfpd.enable = !config.services.pipewire.wireplumber.enable;
hardware.bluetooth.powerOnBoot = true;
};
}

View file

@ -1,39 +0,0 @@
{ options, config, pkgs, lib, ... }:
with lib;
#with lib.internal;
let cfg = config.custom.hardware.printing;
in
{
options.custom.hardware.printing = with types; {
enable = mkBoolOpt false "Whether or not to enable printing and scaning";
printers = mkOpt (listOf package) [ ] "Custom printing backend packages to install.";
};
config = mkIf cfg.enable {
services.printing = {
enable = true;
webInterface = true;
drivers = with pkgs; [
hplipWithPlugin
] ++ cfg.printers;
};
hardware = {
sane = {
enable = true;
extraBackends = with pkgs; [
sane-airscan
hplipWithPlugin
] ++ cfg.printers;
};
};
services.avahi = {
enable = true;
nssmdns = true;
openFirewall = true;
};
};
}

View file

@ -1,19 +0,0 @@
{ options, config, pkgs, lib, ... }:
with lib;
#with lib.internal;
let cfg = config.custom.hardware.rgb;
in
{
options.custom.hardware.rgb = with types; {
enable = mkBoolOpt false "Whether or not to enable openrgb";
motherboard = mkOpt str "intel" "Which motherboard to use"; # Move to common CPU module at some point
};
config = mkIf cfg.enable {
services.hardware.openrgb.enable = true;
services.hardware.openrgb.motherboard = cfg.motherboard;
};
}

View file

@ -1,55 +0,0 @@
{ options, config, pkgs, lib, ... }:
with lib;
#with lib.internal;
let cfg = config.custom.nix;
in
{
options.custom.nix = with types; {
enable = mkBoolOpt true "Whether or not to manage nix configuration.";
package = mkOpt package pkgs.nix "Which nix package to use.";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
deploy-rs
nixfmt
nix-index
nix-prefetch-git
nixpkgs-review
nurl
nix-init
];
nix = {
package = cfg.package;
settings = {
substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
"https://prismlauncher.cachix.org"
"https://nixos-search.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"prismlauncher.cachix.org-1:GhJfjdP1RFKtFSH3gXTIQCvZwsb2cioisOf91y/bK0w="
"nixos-search.cachix.org-1:1HV3YF8az4fywnH+pAd+CXFEdpTXtv9WpoivPi+H70o="
];
trusted-users = [ "root" ];
sandbox = true;
require-sigs = true;
max-jobs = "auto";
auto-optimise-store = true;
allowed-users = [ "*" ];
experimental-features = [ "nix-command" "flakes" ];
warn-dirty = false;
};
# flake-utils-plus
generateRegistryFromInputs = true;
generateNixPathFromInputs = true;
linkInputs = true;
};
};
}

View file

@ -1,21 +0,0 @@
{ options, config, pkgs, lib, ... }:
with lib;
#with lib.internal;
let cfg = config.custom.programs.steam;
in
{
options.custom.programs.steam = with types; {
enable = mkBoolOpt false "Whether or not to enable Steam.";
};
config = mkIf cfg.enable {
hardware.steam-hardware.enable = true;
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
};
};
}

View file

@ -1,24 +0,0 @@
{ options, config, pkgs, lib, ... }:
with lib;
#with lib.internal;
let cfg = config.custom.system.boot.uboot;
in
{
options.custom.system.boot.uboot = with types; {
enable = mkBoolOpt false "Whether or not to enable booting on uboot system.";
};
config = mkIf cfg.enable {
boot = {
# Boot loader configutation
loader = {
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
grub.enable = false;
# Enables the generation of /boot/extlinux/extlinux.conf
generic-extlinux-compatible.enable = true;
systemd-boot.configurationLimit = 10;
};
};
};
}

View file

@ -1,22 +0,0 @@
{ options, config, pkgs, lib, ... }:
with lib;
#with lib.internal;
let cfg = config.custom.system.boot.uefi;
in
{
options.custom.system.boot.uefi = with types; {
enable = mkBoolOpt false "Whether or not to enable booting on a uefi system.";
};
config = mkIf cfg.enable {
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi";
boot.loader.systemd-boot.configurationLimit = 10;
# https://github.com/NixOS/nixpkgs/blob/c32c39d6f3b1fe6514598fa40ad2cf9ce22c3fb7/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix#L66
boot.loader.systemd-boot.editor = false;
};
}

View file

@ -1,36 +0,0 @@
{ options, config, pkgs, lib, ... }:
with lib;
#with lib.internal;
let
cfg = config.custom.system.dns;
zones = {
"geek" = import ./geek.nix pkgs;
"glue" = import ./glue.nix pkgs;
};
in
{
options.custom.system.dns = with types; {
enable = mkBoolOpt false "Whether or not to enable creation of dns server.";
};
config = mkIf cfg.enable {
services.bind = {
enable = true;
forwarders = [];
zones = {
"geek" = {
master = false;
masters = [ "202.83.95.229" ];
file = "${pkgs.opennic-dns-root-data}/geek.zone";
};
"glue" = {
master = false;
masters = [ "195.201.99.61" "168.119.153.26" ];
file = "${pkgs.opennic-dns-root-data}/glue.zone";
};
};
};
};
}

View file

@ -1 +0,0 @@

View file

@ -1,30 +0,0 @@
{ options, config, pkgs, lib, ... }:
with lib;
#with lib.internal;
let cfg = config.custom.system.fonts;
in
{
options.custom.system.fonts = with types; {
enable = mkBoolOpt false "Whether or not to manage fonts.";
fonts = mkOpt (listOf package) [ ] "Custom font packages to install.";
};
config = mkIf cfg.enable {
environment.variables = {
# Enable icons in tooling since we have nerdfonts.
LOG_ICONS = "true";
};
fonts.fontDir.enable = true;
fonts.fonts = with pkgs;
[
noto-fonts
noto-fonts-cjk-sans
noto-fonts-cjk-serif
noto-fonts-emoji
(nerdfonts.override { fonts = [ "Hack" ]; })
] ++ cfg.fonts;
};
}

View file

@ -1,40 +0,0 @@
{ options, config, pkgs, lib, ... }:
with lib;
#with lib.internal;
let cfg = config.custom.system.locale;
in
{
options.custom.system.locale = with types; {
enable = mkBoolOpt false "Whether or not to manage locale settings.";
layout = mkOpt str "de" "The Keyboard layout to use.";
};
config = mkIf cfg.enable {
i18n = {
defaultLocale = "en_NZ.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "de_DE.UTF-8";
LC_IDENTIFICATION = "de_DE.UTF-8";
LC_MEASUREMENT = "de_DE.UTF-8";
LC_MONETARY = "de_DE.UTF-8";
LC_NAME = "de_DE.UTF-8";
LC_NUMERIC = "de_DE.UTF-8";
LC_PAPER = "de_DE.UTF-8";
LC_TELEPHONE = "de_DE.UTF-8";
LC_TIME = "de_DE.UTF-8";
LC_CTYPE = "de_DE.UTF-8";
LC_COLLATE = "de_DE.UTF-8";
LC_MESSAGES = "en_NZ.UTF-8";
};
};
console = {
enable = true;
keyMap = mkForce cfg.layout;
};
services.xserver = {
layout = cfg.layout;
};
};
}

View file

@ -1,28 +0,0 @@
{ options, config, pkgs, lib, ... }:
with lib;
#with lib.internal;
let cfg = config.custom.system.ssh;
in
{
options.custom.system.ssh = with types; {
enable = mkBoolOpt false "Whether or not to enable ssh.";
};
config = mkIf cfg.enable {
services.openssh = {
enable = true;
ports = [ 22 ];
openFirewall = true;
allowSFTP = true;
settings = {
X11forwarding = true;
PermitRootLogin = "no";
passwordAuthentication = true;
kbdInteractiveAuthentication = true;
};
};
environment.systemPackages = with pkgs; [ sshfs ];
};
}

View file

@ -1,25 +0,0 @@
{ options, config, pkgs, lib, ... }:
with lib;
#with lib.internal;
let cfg = config.custom.system.xdg;
in
{
options.custom.system.xdg = with types; {
enable = mkBoolOpt false "Whether or not to enable xdg.";
};
config = mkIf cfg.enable {
xdg = {
sounds.enable = true;
mime.enable = true;
menus.enable = true;
icons.enable = true;
autostart.enable = true;
portal = {
enable = true;
extraPortals = with pkgs; [ xdg-desktop-portal ];
};
};
};
}

View file

@ -1,27 +0,0 @@
{ options, config, pkgs, lib, ... }:
with lib;
#with lib.internal;
let cfg = config.custom.user.jopejoe1;
in
{
options.custom.user.jopejoe1 = with types; {
enable = mkBoolOpt false "Enable the user jopejoe1";
};
config = mkIf cfg.enable {
custom.user.jopejoe1.home.enable = true;
users.users.jopejoe1 = {
isNormalUser = true;
description = "jopejoe1 🚫";
initialPassword = "password";
extraGroups = [ "wheel"]
++ lib.optionals config.custom.hardware.printing.enable [ "scanner" "lp"]
++ lib.optional config.networking.networkmanager.enable "networkmanger";
packages = with pkgs; [ git kate libsForQt5.ark libreoffice-qt texlive.combined.scheme-full tela-icon-theme ];
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCUWMJyy2qq2aacVv/J5raugh7UKEmCs+JpagQh30mYqwLV9YQtOfZ+A3Q1qOOLPHTTciLydsfz8K2jBGXEv49uqz9P33aw63RzSaLdcnXhBJRmZvJ3AujLBKDIo24PLOVasogtu01eyQALTg4npX+qlti2UsxLY5O8E5paFJvJ+5rGE3/34c4xA9xthUm7G7SCSt4AhVXwPGB1tqz1KLqGdTJQhvy80laEDSV4tAYpiabmjhNFKGpf8T7afnw1MzKXz+ba6exBcGaJfy2Q24DLztZsW7fsTE1iCdkbcmos9/jUR6NooKFgDr0M4CL2TVZB5pECSiOev06GMnLt+vpxjFL29YeGMaVMmNCedkL1z1mftbXLEL7934kEK9FpEpSwzbRTJ7iPvfYZuTHiT6fi2Ep7n+zzRS+/ZgDUDLSqZYEBmE4dO4LgcqzOsJo5EgoyLGoqQ4OpvPRY12T3rCWUfEgOCXgToF0WlUyxCaPZCfvUjM4LXNlIy/dtivMxMs8= jopejoe1@yokai"
];
};
};
}

View file

@ -1,261 +0,0 @@
{ options, config, pkgs, lib, ... }:
with lib;
#with lib.internal;
let
cfg = config.custom.user.jopejoe1.home;
hcfg = config.home-manager.users.jopejoe1;
in
{
options.custom.user.jopejoe1.home = with types; {
enable = mkBoolOpt false "Enable the home-manger for jopejoe1";
};
config = mkIf cfg.enable {
home-manager.users.jopejoe1 = {
home = {
# Basic information for home-manager
username = "jopejoe1";
homeDirectory = "/home/${hcfg.home.username}";
# Enviroment variables
sessionVariables = {
XCOMPOSECACHE = "${hcfg.xdg.cacheHome}/X11/xcompos";
XAUTHORITY = "$XDG_RUNTIME_DIR/Xauthority";
};
stateVersion = config.system.stateVersion;
};
accounts.email.accounts = {
main = {
address = "johannes@joens.email";
flavor = "gmail.com";
primary = true;
realName = "Johannes Joens";
thunderbird.enable = true;
};
};
# XDG base dirs
xdg = {
enable = true;
mime.enable = true;
cacheHome = "${hcfg.home.homeDirectory}/.cache";
configHome = "${hcfg.home.homeDirectory}/.config";
dataHome = "${hcfg.home.homeDirectory}/.local/share";
stateHome = "${hcfg.home.homeDirectory}/.local/state";
userDirs = {
enable = true;
createDirectories = false;
desktop = "${hcfg.home.homeDirectory}/Desktop";
documents = "${hcfg.home.homeDirectory}/Documents";
download = "${hcfg.home.homeDirectory}/Downloads";
music = "${hcfg.home.homeDirectory}/Music";
pictures = "${hcfg.home.homeDirectory}/Pictures";
publicShare = "${hcfg.home.homeDirectory}/Public";
templates = "${hcfg.home.homeDirectory}/Templates";
videos = "${hcfg.home.homeDirectory}/Videos";
};
};
gtk = {
enable = true;
gtk2 = {
configLocation = "${hcfg.xdg.configHome}/gtk-2.0/gtkrc";
};
gtk3 = {
extraConfig = {
gtk-application-prefer-dark-theme = true;
gtk-button-images = true;
gtk-decoration-layout = "icon:minimize,maximize,close";
gtk-enable-animations = true;
gtk-menu-images = true;
gtk-modules = "colorreload-gtk-module";
gtk-primary-button-warps-slider = false;
gtk-toolbar-style = 3;
};
};
gtk4 = {
extraConfig = {
gtk-application-prefer-dark-theme = true;
gtk-decoration-layout = "icon:minimize,maximize,close";
gtk-enable-animations = true;
gtk-primary-button-warps-slider = false;
};
};
cursorTheme = {
package = pkgs.libsForQt5.breeze-icons;
name = "breeze_cursors";
size = 24;
};
font = {
package = pkgs.noto-fonts;
name = "Noto Sans";
size = 10;
};
theme = {
package = pkgs.libsForQt5.breeze-gtk;
name = "breeze-dark";
};
iconTheme = {
package = pkgs.tela-icon-theme;
name = "Tela-purple";
};
};
# Let Home Manager install and manage itself.
programs = {
home-manager.enable = true;
git = {
enable = true;
package = pkgs.gitAndTools.gitFull;
userEmail = "johannes@joens.email";
userName = "jopejoe1";
};
bash = {
enable = true;
historyFile = "${hcfg.xdg.stateHome}/bash/history";
shellAliases = {
gc = "nix store gc";
rb = "git -C /etc/nixos pull && nix flake update /etc/nixos/ && nixos-rebuild switch && git -C /etc/nixos add . && git -C /etc/nixos commit -m 'Updated flake.lock' && git -C /etc/nixos push";
};
};
zsh = {
enable = true;
shellAliases = hcfg.programs.bash.shellAliases;
enableAutosuggestions = true;
enableCompletion = true;
enableSyntaxHighlighting = true;
enableVteIntegration = true;
dotDir = ".config/zsh";
};
fish.shellAbbrs = hcfg.programs.bash.shellAliases;
thunderbird = {
enable = false;
profiles = {
default = {
isDefault = true;
};
};
};
firefox = {
enable = true;
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
extraPolicies = {
AppAutoUpdate = false;
BackgroundAppUpdate = false;
DisableAppUpdate = true;
CaptivePortal = false;
DisableFirefoxStudies = true;
DisablePocket = true;
DisableTelemetry = true;
DisableFirefoxAccounts = true;
DisableFormHistory = true;
DefaultDownloadDirectory = "${hcfg.xdg.userDirs.download}";
DontCheckDefaultBrowser = true;
ExtensionUpdate = false;
NoDefaultBookmarks = true;
PasswordManagerEnabled = false;
OfferToSaveLogins = false;
OfferToSaveLoginsDefault = false;
EnableTrackingProtection = {
Value = true;
Cryptomining = true;
Fingerprinting = true;
};
FirefoxHome = {
Search = true;
Pocket = false;
SponsoredPocket = false;
Snippets = false;
TopSites = true;
SponsoredTopSites = false;
Highlights = false;
};
UserMessaging = {
ExtensionRecommendations = false;
SkipOnboarding = true;
};
};
};
profiles = {
default = {
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
privacy-badger
bitwarden
clearurls
decentraleyes
duckduckgo-privacy-essentials
ghostery
libredirect
privacy-badger
languagetool
fastforward
return-youtube-dislikes
sponsorblock
augmented-steam
steam-database
refined-github
plasma-integration
#bypass-paywalls-clean
lovely-forks
search-by-image
skip-redirect
terms-of-service-didnt-read
unpaywall
wappalyzer
wayback-machine
modrinthify
];
id = 0;
isDefault = true;
name = "default";
search = {
default = "DuckDuckGo";
force = true;
engines = {
"Nix Packages" = {
urls = [{
template = "https://search.nixos.org/packages";
params = [
{ name = "type"; value = "packages"; }
{ name = "query"; value = "{searchTerms}"; }
];
}];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
};
"NixOS Wiki" = {
urls = [{ template = "https://nixos.wiki/index.php?search={searchTerms}"; }];
icon = "${hcfg.programs.firefox.profiles.default.search.engines."Nix Packages".icon}";
definedAliases = [ "@nw" ];
};
"Bing".metaData.hidden = true;
"Google".metaData.hidden = true;
"eBay".metaData.hidden = true;
"Amazon.de".metaData.hidden = true;
"Wikipedia (en)".metaData.alias = "@wiki";
};
};
settings = {
"privacy.resistFingerprinting" = true;
"privacy.trackingprotection.fingerprinting.enabled" = true;
"privacy.trackingprotection.cryptomining.enabled" = true;
"dom.event.clipboardevents.enabled" = false;
"dom.battery.enabled" = false;
"browser.safebrowsing.phishing.enabled" = false;
"browser.safebrowsing.malware.enabled" = false;
"browser.zoom.siteSpecific" = true;
"config.trim_on_minimize" = true;
"pdfjs.annotationEditorMode" = 0;
"pdfjs.annotationmode" = 2;
};
};
};
};
};
};
};
}

View file

@ -1,15 +0,0 @@
{ options, config, pkgs, lib, ... }:
with lib;
#with lib.internal;
let cfg = config.custom.user.root;
in
{
options.custom.user.root = with types; {
enable = mkBoolOpt false "Enable the user root";
};
config = mkIf cfg.enable {
custom.user.root.home.enable = true;
};
}

View file

@ -1,15 +0,0 @@
{ lib, fetchFromGitHub, buildNpmPackage, ... }:
buildNpmPackage {
name = "knossos";
verison = "2.2";
src = fetchFromGitHub {
owner = "modrinth";
repo = "knossos";
rev = "v2.2";
hash = "sha256-p6rHMio9oOmT2qyPq+TPzd7id+X1fck9Wa3vLHWp0Kg=";
};
npmDepsHash = "sha256-4ha6qgehExf/OoUGu622vpBTN80/83r3IWbPbBOSCMQ=";
}

View file

@ -1,15 +0,0 @@
{ stdenv, lib }:
stdenv.mkDerivation {
pname = "opennic-dns-root-data";
buildCommand = ''
mkdir $out
echo "${lib.toString "example.com" (import ./geek.nix { inherit dns; })}" > $out/geek.zone
echo "${lib.toString "example.com" (import ./geek.nix { inherit dns; })}" > $out/glue.zone
'';
meta = with lib; {
description = "DNS root data including root zone for openic";
};
}

View file

@ -1,15 +0,0 @@
{ lib }:
with lib.combinators;
{
SOA = {
nameServer = "ns2";
adminEmail = "shdwdrgn@sourpuss.net";
serial = 2019030800;
};
NS = [
"ns2.opennic.glue."
];
}

View file

@ -1,20 +0,0 @@
{ lib }:
with lib.combinators;
{
SOA = {
nameServer = "ns0";
adminEmail = "shdwdrgn@sourpuss.net";
serial = 2019030800;
};
NS = [
"ns0.opennic.glue."
];
subdomains = {
"ns0.opennic".A = [ "195.201.99.61" "168.119.153.26" ];
};
}

View file

@ -1,35 +0,0 @@
{ pkgs, config, lib, channel, ... }:
with lib;
#with lib.internal;
{
networking.networkmanager.enable = true;
networking.wireless.enable = mkForce false;
hardware.opengl.enable = true;
environment.systemPackages = with pkgs; [
gparted
parted
gnufdisk
partition-manager
];
hardware.enableRedistributableFirmware = true;
programs = {
dconf.enable = true;
xwayland.enable = true;
};
# System
custom.system.boot.uboot.enable = true;
custom.system.ssh.enable = true;
custom.nix.enable = true;
custom.hardware.audio.enable = true;
custom.desktop.plasma.enable = true;
# User
custom.user.jopejoe1.enable = true;
custom.user.root.enable = true;
}

View file

@ -1,36 +0,0 @@
{ pkgs, config, lib, channel, ... }:
with lib;
#with lib.internal;
{
imports = [ ./hardware.nix ];
networking.networkmanager.enable = true;
networking.hostName = "yokai";
time.timeZone = "Europe/Berlin";
hardware.opengl.enable = true;
programs = {
dconf.enable = true;
droidcam.enable = true;
xwayland.enable = true;
};
# System
custom.system.boot.uboot.enable = true;
custom.system.xdg.enable = true;
custom.system.fonts.enable = true;
custom.system.locale.enable = true;
custom.system.locale.layout = "us";
custom.system.ssh.enable = true;
custom.nix.enable = true;
custom.hardware.audio.enable = true;
custom.hardware.printing.enable = true;
custom.desktop.plasma.enable = true;
custom.hardware.bluetooth.enable = true;
# User
custom.user.jopejoe1.enable = true;
custom.user.root.enable = true;
}

View file

@ -1,35 +0,0 @@
{ pkgs, config, lib, channel, ... }:
with lib;
#with lib.internal;
{
networking.networkmanager.enable = true;
networking.wireless.enable = mkForce false;
hardware.opengl.enable = true;
environment.systemPackages = with pkgs; [
gparted
parted
gnufdisk
partition-manager
];
hardware.enableRedistributableFirmware = true;
programs = {
dconf.enable = true;
xwayland.enable = true;
};
# System
custom.system.boot.uefi.enable = true;
custom.system.ssh.enable = true;
custom.nix.enable = true;
custom.hardware.audio.enable = true;
custom.desktop.plasma.enable = true;
# User
custom.user.jopejoe1.enable = true;
custom.user.root.enable = true;
}

82
systems/kami/default.nix Normal file
View file

@ -0,0 +1,82 @@
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware.nix
];
services.ivpn.enable = true;
networking.hostName = "kami";
networking.hostId = "16c22faf";
boot.supportedFilesystems = [ "ntfs" "btrfs" "zfs" ];
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
networking.networkmanager.enable = true;
time.timeZone = "Europe/Berlin";
services.xserver.videoDrivers = [ "nvidia" ];
hardware.opengl.enable = true;
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
#boot.kernelParams = [ "module_blacklist=i915" ];
#services.boinc.enable = true;
environment.systemPackages = with pkgs; [
prismlauncher
libsForQt5.discover
skypeforlinux
discord
jetbrains.pycharm-professional
carla
tela-icon-theme
#devolo-dlan-cockpit
# Fonts
google-fonts
noto-fonts
noto-fonts-emoji
noto-fonts-cjk-sans
noto-fonts-cjk-serif
noto-fonts-emoji-blob-bin
nerdfonts
league-of-moveable-type
twitter-color-emoji
];
hardware.nvidia.modesetting.enable = true;
services.flatpak.enable = true;
programs = {
dconf.enable = true;
droidcam.enable = true;
sysdig.enable = true;
xwayland.enable = true;
kdeconnect.enable = true;
};
console = {
enable = true;
keyMap = "de";
};
services.xserver = {
layout = "de";
};
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi";
boot.loader.systemd-boot.configurationLimit = 10;
# https://github.com/NixOS/nixpkgs/blob/c32c39d6f3b1fe6514598fa40ad2cf9ce22c3fb7/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix#L66
boot.loader.systemd-boot.editor = false;
}

28
systems/oni/default.nix Normal file
View file

@ -0,0 +1,28 @@
{ pkgs, config, lib, channel, ... }:
with lib;
#with lib.internal;
{
imports = [ ./hardware.nix ];
networking.networkmanager.enable = true;
networking.hostName = "oni";
time.timeZone = "Europe/Berlin";
hardware.opengl.enable = true;
programs = {
dconf.enable = true;
droidcam.enable = true;
sysdig.enable = true;
xwayland.enable = true;
};
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi";
boot.loader.systemd-boot.configurationLimit = 10;
# https://github.com/NixOS/nixpkgs/blob/c32c39d6f3b1fe6514598fa40ad2cf9ce22c3fb7/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix#L66
boot.loader.systemd-boot.editor = false;
}

View file

@ -9,14 +9,14 @@ in
common-cpu-amd
common-gpu-amd
common-pc
#common-pc-ssd
common-pc-ssd
];
boot = {
kernelPackages = pkgs.linuxPackages_zen;
initrd = {
# kernelModules = [ "amdgpu" ];
kernelModules = [ "amdgpu" ];
availableKernelModules = [ "xhci_pci" "ahci" "ehci_pci" "usb_storage" "sd_mod" "sr_mod" ];
};
@ -46,7 +46,4 @@ in
hardware.enableRedistributableFirmware = true;
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
# high-resolution display
hardware.video.hidpi.enable = lib.mkDefault true;
}

View file

@ -1,35 +0,0 @@
{ pkgs, config, lib, channel, ... }:
with lib;
#with lib.internal;
{
networking.networkmanager.enable = true;
networking.wireless.enable = mkForce false;
hardware.opengl.enable = true;
environment.systemPackages = with pkgs; [
gparted
parted
gnufdisk
partition-manager
];
hardware.enableRedistributableFirmware = true;
programs = {
dconf.enable = true;
xwayland.enable = true;
};
# System
custom.system.boot.uefi.enable = true;
custom.system.ssh.enable = true;
custom.nix.enable = true;
custom.hardware.audio.enable = true;
custom.desktop.plasma.enable = true;
# User
custom.user.jopejoe1.enable = true;
custom.user.root.enable = true;
}

View file

@ -1,101 +0,0 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware.nix
];
services.ivpn.enable = true;
networking.hostName = "kami";
networking.hostId = "16c22faf";
boot.supportedFilesystems = [ "ntfs" "btrfs" "zfs" ];
boot.binfmt.emulatedSystems = [ "aarch64-linux" "i686-linux" "armv6l-linux" "armv7l-linux" "aarch64_be-linux" "i386-linux" "i486-linux" "i586-linux" "alpha-linux" "sparc64-linux" "sparc-linux" "powerpc-linux" "powerpc64-linux" "powerpc64le-linux" "mips-linux" "mipsel-linux" "mips64-linux" "mips64el-linux" "riscv32-linux" "riscv64-linux" "wasm32-wasi" "wasm64-wasi" "x86_64-windows" "i686-windows" ];
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
networking.networkmanager.enable = true;
time.timeZone = "Europe/Berlin";
services.xserver.videoDrivers = [ "nvidia" ];
hardware.opengl.enable = true;
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
#boot.kernelParams = [ "module_blacklist=i915" ];
services.boinc.enable = true;
environment.systemPackages = with pkgs; [
prismlauncher
libsForQt5.discover
skypeforlinux
discord
jetbrains.pycharm-professional
python3
python3Packages.numpy
python3Packages.pandas
python3Packages.requests
python3Packages.json5
python3Packages.pyperclip
python3Packages.plotly
carla
tela-icon-theme
#devolo-dlan-cockpit
# Fonts
google-fonts
noto-fonts
noto-fonts-emoji
noto-fonts-cjk-sans
noto-fonts-cjk-serif
noto-fonts-emoji-blob-bin
nerdfonts
league-of-moveable-type
twitter-color-emoji
];
hardware.nvidia.modesetting.enable = true;
services.flatpak.enable = true;
programs = {
dconf.enable = true;
droidcam.enable = true;
sysdig.enable = true;
xwayland.enable = true;
kdeconnect.enable = true;
};
# Migrated Stuff
custom.user.jopejoe1.enable = true;
custom.user.root.enable = true;
custom.system.locale.enable = true;
custom.system.locale.layout = "de";
custom.nix.enable = true;
custom.desktop.plasma.enable = true;
custom.system.boot.uefi.enable = true;
custom.system.xdg.enable = true;
custom.system.fonts.enable = true;
custom.hardware.audio.enable = true;
custom.hardware.printing.enable = true;
custom.system.ssh.enable = true;
custom.hardware.rgb.enable = true;
custom.hardware.rgb.motherboard = "intel";
custom.hardware.bluetooth.enable = true;
custom.programs.steam.enable = true;
# Currently broken
#custom.system.dns.enable = true;
}

View file

@ -1,39 +0,0 @@
{ pkgs, config, lib, channel, ... }:
with lib;
#with lib.internal;
{
imports = [ ./hardware.nix ];
networking.networkmanager.enable = true;
custom.system.boot.uefi.enable = true;
#custom.system.xdg.enable = true;
#custom.system.fonts.enable = true;
custom.system.locale.enable = true;
custom.system.locale.layout = "de";
#custom.system.ssh.enable = true;
custom.nix.enable = true;
#custom.hardware.audio.enable = true;
#custom.hardware.printing.enable = true;
custom.desktop.plasma.enable = true;
custom.user.jopejoe1.enable =true;
custom.user.root.enable =true;
networking.hostName = "kami";
time.timeZone = "Europe/Berlin";
hardware.opengl.enable = true;
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
boot.kernelParams = [ "module_blacklist=i915" ];
programs = {
dconf.enable = true;
#droidcam.enable = true;
#sysdig.enable = true;
#xwayland.enable = true;
};
}

View file

@ -1,70 +0,0 @@
{ config, lib, pkgs, modulesPath, inputs, ... }:
let
inherit (inputs) nixos-hardware;
in
{
imports = with nixos-hardware.nixosModules; [
(modulesPath + "/installer/scan/not-detected.nix")
#common-cpu-intel
#common-gpu-nvidia
#common-pc
#common-pc-ssd
];
#hardware.nvidia.prime = {
# offload.enable = false;
#sync.enable = false;
# Bus ID of the Intel GPU. You can find it using lspci, either under 3D or VGA
#intelBusId = "PCI:0:2:0";
# Bus ID of the NVIDIA GPU. You can find it using lspci, either under 3D or VGA
#nvidiaBusId = "PCI:1:0:0";
# };
boot = {
#kernelPackages = pkgs.linuxPackages_5_10;
initrd = {
# kernelModules = [ "amdgpu" ];
availableKernelModules =
[ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" "sr_mod" ];
};
extraModulePackages = [ ];
};
fileSystems."/" =
{ device = "/dev/disk/by-uuid/99a47ace-7e69-4520-b914-d4fe5b31dc79";
fsType = "btrfs";
options = [ "subvol=@" ];
};
fileSystems."/boot/efi" =
{ device = "/dev/disk/by-uuid/1F26-8168";
fsType = "vfat";
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/78d6db21-b823-4ca4-b495-7782d3e56ddc";
fsType = "ext4";
};
swapDevices = [ ];
# @NOTE(jakehamilton): NetworkManager will handle DHCP.
networking.interfaces.enp6s0.useDHCP = true;
networking.interfaces.wlo1.useDHCP = true;
hardware.enableRedistributableFirmware = true;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
# high-resolution display
hardware.video.hidpi.enable = lib.mkDefault true;
services.xserver.videoDrivers = [ "nvidia" ];
#hardware.bluetooth.enable = false;
}

View file

@ -1,40 +0,0 @@
{ pkgs, config, lib, channel, ... }:
with lib;
#with lib.internal;
{
imports = [ ./hardware.nix ];
networking.networkmanager.enable = true;
networking.hostName = "oni";
time.timeZone = "Europe/Berlin";
hardware.opengl.enable = true;
programs = {
dconf.enable = true;
droidcam.enable = true;
sysdig.enable = true;
xwayland.enable = true;
};
# System
custom.system.boot.uefi.enable = true;
custom.system.xdg.enable = true;
custom.system.fonts.enable = true;
custom.system.locale.enable = true;
custom.system.locale.layout = "de";
custom.system.ssh.enable = true;
custom.nix.enable = true;
custom.hardware.audio.enable = true;
custom.hardware.printing.enable = true;
custom.desktop.plasma.enable = true;
custom.system.ssh.enable = true;
custom.hardware.bluetooth.enable = true;
custom.programs.steam.enable = true;
# Users
custom.user.jopejoe1.enable =true;
custom.user.root.enable =true;
}

27
systems/yokai/default.nix Normal file
View file

@ -0,0 +1,27 @@
{ pkgs, config, ... }:
{
imports = [ ./hardware.nix ];
networking.networkmanager.enable = true;
networking.hostName = "yokai";
time.timeZone = "Europe/Berlin";
hardware.opengl.enable = true;
programs = {
dconf.enable = true;
droidcam.enable = true;
xwayland.enable = true;
};
boot = {
# Boot loader configutation
loader = {
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
grub.enable = false;
# Enables the generation of /boot/extlinux/extlinux.conf
generic-extlinux-compatible.enable = true;
systemd-boot.configurationLimit = 10;
};
}

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, modulesPath, inputs, ... }:
{ config, pkgs, modulesPath, ... }:
{
imports = [
@ -9,7 +9,6 @@
kernelPackages = pkgs.linuxPackages_zen;
initrd = {
# kernelModules = [ "amdgpu" ];
availableKernelModules = [ "usbhid" ];
};