treewide: format files

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2025-06-29 19:49:39 +05:30
parent 404f35c0b9
commit a9d4f6de5a
62 changed files with 953 additions and 511 deletions

View File

@@ -1,6 +1,6 @@
#Catpuccin Mocha #Catpuccin Mocha
let let
colors = rec{ colors = rec {
rosewater = "#F5E0DC"; rosewater = "#F5E0DC";
flamingo = "#F2CDCD"; flamingo = "#F2CDCD";
pink = "#F5C2E7"; pink = "#F5C2E7";
@@ -37,5 +37,9 @@ in
rec { rec {
default = with builtins; mapAttrs (_: color: substring 1 6 color) colors; # hex without hash default = with builtins; mapAttrs (_: color: substring 1 6 color) colors; # hex without hash
hex = colors; # hex with hash hex = colors; # hex with hash
argb = { a ? "ff" }: builtins.mapAttrs (_:color: a + color) default; # ARGB argb =
{
a ? "ff",
}:
builtins.mapAttrs (_: color: a + color) default; # ARGB
} }

View File

@@ -2,36 +2,36 @@
description = "dotfiles"; description = "dotfiles";
inputs = { inputs = {
nixpkgs.url = github:nixos/nixpkgs/nixpkgs-unstable; nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
stable.url = github:nixos/nixpkgs/release-24.05; stable.url = "github:nixos/nixpkgs/release-24.05";
flake-parts.url = github:hercules-ci/flake-parts; flake-parts.url = "github:hercules-ci/flake-parts";
home-manager = { home-manager = {
url = github:nix-community/home-manager; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
mailserver = { mailserver = {
url = gitlab:simple-nixos-mailserver/nixos-mailserver; url = "gitlab:simple-nixos-mailserver/nixos-mailserver";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
filehost = { filehost = {
url = github:natto1784/simpler-filehost; url = "github:natto1784/simpler-filehost";
}; };
nix-gaming.url = github:fufexan/nix-gaming; nix-gaming.url = "github:fufexan/nix-gaming";
nbfc = { nbfc = {
url = github:nbfc-linux/nbfc-linux; url = "github:nbfc-linux/nbfc-linux";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
emacs-overlay.url = github:nix-community/emacs-overlay; emacs-overlay.url = "github:nix-community/emacs-overlay";
nvim-overlay.url = github:nix-community/neovim-nightly-overlay; nvim-overlay.url = "github:nix-community/neovim-nightly-overlay";
hyprland = { hyprland = {
type = "git"; type = "git";
@@ -40,17 +40,21 @@
}; };
hyprland-contrib = { hyprland-contrib = {
url = github:hyprwm/contrib; url = "github:hyprwm/contrib";
}; };
agenix.url = github:ryantm/agenix; agenix.url = "github:ryantm/agenix";
ags.url = github:Aylur/ags/v1; ags.url = "github:Aylur/ags/v1";
}; };
outputs = inputs@{ self, ... }: outputs =
inputs@{ self, ... }:
inputs.flake-parts.lib.mkFlake { inherit inputs; } { inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" "aarch64-linux" ]; systems = [
"x86_64-linux"
"aarch64-linux"
];
imports = [ imports = [
./hosts ./hosts
@@ -59,10 +63,13 @@
./conf ./conf
]; ];
perSystem = { system, pkgs, ... }: perSystem =
{ system, pkgs, ... }:
rec { rec {
formatter = pkgs.nixfmt-rfc-style; formatter = pkgs.nixfmt-rfc-style;
devShells.default = with pkgs; mkShell { devShells.default =
with pkgs;
mkShell {
packages = [ packages = [
nixd nixd
formatter formatter

View File

@@ -1,4 +1,9 @@
{ config, pkgs, inputs, ... }: {
config,
pkgs,
inputs,
...
}:
{ {
home = { home = {
homeDirectory = "/home/amneesh"; homeDirectory = "/home/amneesh";

View File

@@ -24,7 +24,8 @@ in
alwaysEnsure = true; alwaysEnsure = true;
alwaysTangle = true; alwaysTangle = true;
defaultInitFile = true; defaultInitFile = true;
extraEmacsPackages = epkgs: with epkgs; [ extraEmacsPackages =
epkgs: with epkgs; [
use-package use-package
(tree-sitter-langs.withPlugins (_: tree-sitter-langs.plugins)) (tree-sitter-langs.withPlugins (_: tree-sitter-langs.plugins))
]; ];

View File

@@ -1,4 +1,9 @@
{ self, inputs, globalArgs, ... }: {
self,
inputs,
globalArgs,
...
}:
let let
common = [ common = [
{ programs.home-manager.enable = true; } { programs.home-manager.enable = true; }
@@ -6,7 +11,9 @@ let
./common/direnv ./common/direnv
]; ];
mkPkgs = system: import inputs.nixpkgs { mkPkgs =
system:
import inputs.nixpkgs {
inherit system; inherit system;
config = { config = {
allowUnfree = true; allowUnfree = true;
@@ -50,49 +57,57 @@ in
// { // {
spark = inputs.home-manager.lib.homeManagerConfiguration { spark = inputs.home-manager.lib.homeManagerConfiguration {
inherit extraSpecialArgs; inherit extraSpecialArgs;
modules = [{ modules = [
{
home = { home = {
homeDirectory = "/home/spark"; homeDirectory = "/home/spark";
username = "spark"; username = "spark";
stateVersion = "23.05"; stateVersion = "23.05";
}; };
}] ++ common; }
] ++ common;
pkgs = mkPkgs "aarch64-linux"; pkgs = mkPkgs "aarch64-linux";
}; };
bat = inputs.home-manager.lib.homeManagerConfiguration { bat = inputs.home-manager.lib.homeManagerConfiguration {
inherit extraSpecialArgs; inherit extraSpecialArgs;
modules = [{ modules = [
{
home = { home = {
homeDirectory = "/home/bat"; homeDirectory = "/home/bat";
username = "bat"; username = "bat";
stateVersion = "23.05"; stateVersion = "23.05";
}; };
}] ++ common; }
] ++ common;
pkgs = mkPkgs "x86_64-linux"; pkgs = mkPkgs "x86_64-linux";
}; };
spin = inputs.home-manager.lib.homeManagerConfiguration { spin = inputs.home-manager.lib.homeManagerConfiguration {
inherit extraSpecialArgs; inherit extraSpecialArgs;
modules = [{ modules = [
{
home = { home = {
homeDirectory = "/home/spin"; homeDirectory = "/home/spin";
username = "spin"; username = "spin";
stateVersion = "23.05"; stateVersion = "23.05";
}; };
}] ++ common; }
] ++ common;
pkgs = mkPkgs "x86_64-linux"; pkgs = mkPkgs "x86_64-linux";
}; };
kero = inputs.home-manager.lib.homeManagerConfiguration { kero = inputs.home-manager.lib.homeManagerConfiguration {
inherit extraSpecialArgs; inherit extraSpecialArgs;
modules = [{ modules = [
{
home = { home = {
homeDirectory = "/home/kero"; homeDirectory = "/home/kero";
username = "kero"; username = "kero";
stateVersion = "24.05"; stateVersion = "24.05";
}; };
}] ++ common; }
] ++ common;
pkgs = mkPkgs "aarch64-linux"; pkgs = mkPkgs "aarch64-linux";
}; };

View File

@@ -1,8 +1,16 @@
{ pkgs, lib, config, inputs, ... }: {
pkgs,
lib,
config,
inputs,
...
}:
let let
cfg = config.programs.ags; cfg = config.programs.ags;
deps = with pkgs; [ deps =
with pkgs;
[
sass sass
gawk gawk
bash bash
@@ -11,12 +19,13 @@ let
imagemagick imagemagick
systemd systemd
config.wayland.windowManager.hyprland.package config.wayland.windowManager.hyprland.package
] ++ lib.optional config.isLaptop brightnessctl; ]
++ lib.optional config.isLaptop brightnessctl;
configDir = lib.cleanSourceWith { configDir = lib.cleanSourceWith {
src = ./.; src = ./.;
filter = name: _: filter =
name: _:
let let
baseName = baseNameOf (toString name); baseName = baseNameOf (toString name);
in in
@@ -28,7 +37,10 @@ in
inputs.ags.homeManagerModules.default inputs.ags.homeManagerModules.default
]; ];
programs.ags.enable = true; programs.ags = {
enable = true;
# package = pkgs.ags_1;
};
xdg.configFile."ags" = { xdg.configFile."ags" = {
source = configDir; source = configDir;

View File

@@ -21,10 +21,10 @@
./zsh.nix ./zsh.nix
./games.nix ./games.nix
/* when xserver */ # when xserver
# ./xsession.nix # ./xsession.nix
/* when wayland */ # when wayland
./wayland.nix ./wayland.nix
./hyprland.nix ./hyprland.nix
./foot.nix ./foot.nix

View File

@@ -3,7 +3,9 @@
services = { services = {
dunst = { dunst = {
enable = true; enable = true;
iconTheme = with config.gtk.iconTheme; { inherit name package; }; iconTheme = with config.gtk.iconTheme; {
inherit name package;
};
settings = with conf.colors.hex; { settings = with conf.colors.hex; {
global = { global = {
mouse_left_click = "close_current"; mouse_left_click = "close_current";

View File

@@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
key = "53EC089EF230E47A83BA8F8195949BD4B853F559"; key = "53EC089EF230E47A83BA8F8195949BD4B853F559";
host = "mail.weirdnatto.in"; host = "mail.weirdnatto.in";
@@ -51,18 +56,17 @@ in
enable = true; enable = true;
package = pkgs.neomutt; package = pkgs.neomutt;
sort = "reverse-date"; sort = "reverse-date";
extraConfig = extraConfig = lib.concatMapStringsSep "\n" builtins.readFile [
lib.concatMapStringsSep
"\n"
builtins.readFile
[
./config/neomutt/neomuttrc ./config/neomutt/neomuttrc
./config/neomutt/theme ./config/neomutt/theme
]; ];
}; };
}; };
home = { home = {
packages = with pkgs; [ mailcap w3m ]; packages = with pkgs; [
mailcap
w3m
];
file = { file = {
mailcap = { mailcap = {
source = ./config/mailcap; source = ./config/mailcap;

View File

@@ -1,11 +1,17 @@
{ config, pkgs, lib, ... }: {
config,
pkgs,
lib,
...
}:
{ {
programs.eww = { programs.eww = {
enable = true; enable = true;
package = pkgs.eww; package = pkgs.eww;
configDir = lib.cleanSourceWith { configDir = lib.cleanSourceWith {
src = ./.; src = ./.;
filter = name: _: filter =
name: _:
let let
baseName = baseNameOf (toString name); baseName = baseNameOf (toString name);
in in
@@ -20,11 +26,11 @@
}; };
Service = Service =
let let
deps = [ deps =
[
config.programs.eww.package config.programs.eww.package
] ++ lib.optional ]
config.wayland.windowManager.hyprland.enable ++ lib.optional config.wayland.windowManager.hyprland.enable config.wayland.windowManager.hyprland.package
config.wayland.windowManager.hyprland.package
++ (with pkgs; [ ++ (with pkgs; [
coreutils coreutils
bash bash
@@ -48,4 +54,3 @@
Install.WantedBy = [ "graphical-session.target" ]; Install.WantedBy = [ "graphical-session.target" ];
}; };
} }

View File

@@ -11,4 +11,3 @@
programs.mangohud.enable = true; programs.mangohud.enable = true;
} }

View File

@@ -1,4 +1,11 @@
{ pkgs, inputs, config, conf, ... }: { {
pkgs,
inputs,
config,
conf,
...
}:
{
wayland = { wayland = {
windowManager = { windowManager = {
hyprland = { hyprland = {
@@ -8,11 +15,12 @@
xwayland = { xwayland = {
enable = true; enable = true;
}; };
extraConfig = (builtins.readFile ./config/hypr/hyprland.conf) extraConfig =
(builtins.readFile ./config/hypr/hyprland.conf)
+ (with config.home.pointerCursor; '' + (with config.home.pointerCursor; ''
exec-once=hyprctl setcursor ${name} ${toString size} exec-once=hyprctl setcursor ${name} ${toString size}
'') '')
+ (with conf.colors.argb { a = "ee"; };'' + (with conf.colors.argb { a = "ee"; }; ''
general { general {
col.active_border = 0x${mauve} 0x${flamingo} 135deg col.active_border = 0x${mauve} 0x${flamingo} 135deg
col.inactive_border = 0x${surface0} col.inactive_border = 0x${surface0}

View File

@@ -84,7 +84,6 @@ in
}; };
}; };
age.secrets.mpdasrc = { age.secrets.mpdasrc = {
file = ./secrets/mpdasrc.age; file = ./secrets/mpdasrc.age;
path = "${home}/.config/mpdasrc"; path = "${home}/.config/mpdasrc";

View File

@@ -16,4 +16,3 @@
}; };
}; };
} }

View File

@@ -1,6 +1,13 @@
{ flake, pkgs, config, ... }:
{ {
home.packages = with pkgs; [ flake,
pkgs,
config,
...
}:
{
home.packages =
with pkgs;
[
# A/V, codec and media stuff # A/V, codec and media stuff
ffmpeg-full ffmpeg-full
wireplumber wireplumber
@@ -39,7 +46,8 @@
# Misc # Misc
mailcap mailcap
libsForQt5.qtstyleplugins libsForQt5.qtstyleplugins
] ++ lib.optionals config.isLaptop [ ]
++ lib.optionals config.isLaptop [
powertop powertop
undervolt undervolt
]; ];

View File

@@ -1,4 +1,10 @@
{ config, lib, pkgs, ... }: { {
config,
lib,
pkgs,
...
}:
{
xdg = { xdg = {
enable = true; enable = true;
userDirs.enable = true; userDirs.enable = true;
@@ -29,7 +35,10 @@
inputMethod = { inputMethod = {
enable = true; enable = true;
type = "fcitx5"; type = "fcitx5";
fcitx5.addons = with pkgs; [ fcitx5-m17n fcitx5-mozc ]; fcitx5.addons = with pkgs; [
fcitx5-m17n
fcitx5-mozc
];
}; };
}; };
} }

View File

@@ -1,4 +1,9 @@
{ pkgs, config, flake, ... }: {
pkgs,
config,
flake,
...
}:
{ {
xsession = { xsession = {
enable = true; enable = true;

View File

@@ -26,7 +26,8 @@ in
# Desktop # Desktop
okina = nixpkgs.lib.nixosSystem { okina = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules =
[
./okina ./okina
] ]
++ desktopModules ++ desktopModules
@@ -36,7 +37,8 @@ in
#Home laptop #Home laptop
satori = nixpkgs.lib.nixosSystem { satori = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules =
[
./satori ./satori
] ]
++ desktopModules ++ desktopModules
@@ -48,8 +50,7 @@ in
system = "aarch64-linux"; system = "aarch64-linux";
modules = [ modules = [
./marisa ./marisa
] ] ++ commonModules;
++ commonModules;
}; };
#Oracle Cloud VM #Oracle Cloud VM
@@ -59,8 +60,7 @@ in
./remilia ./remilia
./x86builder.nix ./x86builder.nix
inputs.mailserver.nixosModules.mailserver inputs.mailserver.nixosModules.mailserver
] ] ++ commonModules;
++ commonModules;
}; };
#Oracle Cloud VM #Oracle Cloud VM
@@ -69,8 +69,7 @@ in
modules = [ modules = [
./hina ./hina
./x86builder.nix ./x86builder.nix
] ] ++ commonModules;
++ commonModules;
}; };
#Oracle Cloud VM #Oracle Cloud VM
@@ -78,8 +77,7 @@ in
system = "aarch64-linux"; system = "aarch64-linux";
modules = [ modules = [
./suwako ./suwako
] ] ++ commonModules;
++ commonModules;
}; };
}; };
} }

View File

@@ -3,9 +3,19 @@
boot = { boot = {
kernel.sysctl."net.ipv4.ip_forward" = 1; kernel.sysctl."net.ipv4.ip_forward" = 1;
initrd.kernelModules = [ "bochs" ]; initrd.kernelModules = [ "bochs" ];
initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" ]; initrd.availableKernelModules = [
"ata_piix"
"uhci_hcd"
"virtio_pci"
"virtio_scsi"
];
kernelModules = [ "kvm-amd" ]; kernelModules = [ "kvm-amd" ];
kernelParams = [ "console=ttyS0" "console=tty1" "nvme.shutdown_timeout=10" "libiscsi.debug_libiscsi_eh=1" ]; kernelParams = [
"console=ttyS0"
"console=tty1"
"nvme.shutdown_timeout=10"
"libiscsi.debug_libiscsi_eh=1"
];
loader = { loader = {
systemd-boot.enable = true; systemd-boot.enable = true;
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;

View File

@@ -1,4 +1,9 @@
{ config, pkgs, conf, ... }: {
config,
pkgs,
conf,
...
}:
{ {
imports = [ imports = [
./networking.nix ./networking.nix

View File

@@ -1,13 +1,17 @@
{ config, lib, pkgs, modulesPath, ... }: {
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = imports = [
[
(modulesPath + "/profiles/qemu-guest.nix") (modulesPath + "/profiles/qemu-guest.nix")
]; ];
fileSystems."/" = fileSystems."/" = {
{
device = "/dev/disk/by-uuid/d91adce2-9059-4a8a-86e7-dee6ecc85b2b"; device = "/dev/disk/by-uuid/d91adce2-9059-4a8a-86e7-dee6ecc85b2b";
fsType = "ext4"; fsType = "ext4";
}; };

View File

@@ -1,13 +1,22 @@
{ lib, config, conf, pkgs, ... }: {
lib,
config,
conf,
pkgs,
...
}:
{ {
networking = { networking = {
useDHCP = false; useDHCP = false;
hostName = "hina"; hostName = "hina";
firewall = firewall = {
{
interfaces = { interfaces = {
ens3 = { ens3 = {
allowedTCPPorts = [ 9898 80 443 ]; allowedTCPPorts = [
9898
80
443
];
}; };
}; };
}; };

View File

@@ -1,4 +1,10 @@
{ config, pkgs, lib, conf, ... }: {
config,
pkgs,
lib,
conf,
...
}:
let let
domain = conf.network.addresses.domain.natto; domain = conf.network.addresses.domain.natto;
in in
@@ -32,4 +38,3 @@ in
}; };
}; };
} }

View File

@@ -2,19 +2,33 @@
{ {
boot = { boot = {
consoleLogLevel = 7; consoleLogLevel = 7;
kernelParams = [ "console=ttyS0,115200n8" "console=ttyAMA0,115200n8" "console=tty0" ]; kernelParams = [
"console=ttyS0,115200n8"
"console=ttyAMA0,115200n8"
"console=tty0"
];
kernelPackages = pkgs.linuxPackages_5_10; kernelPackages = pkgs.linuxPackages_5_10;
initrd.availableKernelModules = [ "xhci_pci" "usb_storage" "usbhid" "uas" "pcie-brcmstb" "vc4" ]; initrd.availableKernelModules = [
"xhci_pci"
"usb_storage"
"usbhid"
"uas"
"pcie-brcmstb"
"vc4"
];
loader = { loader = {
grub.enable = false; grub.enable = false;
generic-extlinux-compatible.enable = true; generic-extlinux-compatible.enable = true;
/* raspberryPi= { /*
raspberryPi= {
version = 4; version = 4;
firmwareConfig = "dtparam=sd_poll_once=on"; firmwareConfig = "dtparam=sd_poll_once=on";
enable = true; enable = true;
}; */
}; };
/* kernelPatches = [ */
};
/*
kernelPatches = [
{ {
name = "change-pgtable"; name = "change-pgtable";
patch = null; patch = null;
@@ -22,6 +36,7 @@
CONFIG_PGTABLE_LEVELS 4 CONFIG_PGTABLE_LEVELS 4
''; '';
} }
];*/ ];
*/
}; };
} }

View File

@@ -1,4 +1,9 @@
{ config, pkgs, conf, ... }: {
config,
pkgs,
conf,
...
}:
{ {
imports = [ imports = [
./networking.nix ./networking.nix

View File

@@ -1,17 +1,20 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
{ {
fileSystems."/" = fileSystems."/" = {
{
device = "/dev/disk/by-label/NIXOS_SD"; device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/nix/store" = fileSystems."/nix/store" = {
{
device = "/nix/store"; device = "/nix/store";
fsType = "none"; fsType = "none";
options = [ "bind" ]; options = [ "bind" ];

View File

@@ -1,4 +1,9 @@
{ config, pkgs, conf, ... }: {
config,
pkgs,
conf,
...
}:
{ {
networking = { networking = {
hostName = "marisa"; hostName = "marisa";
@@ -7,10 +12,10 @@
22 # ssh 22 # ssh
80 # http 80 # http
# 5454 # 5454
5001 #gitea 5001 # gitea
4646 #nomad 4646 # nomad
# 8500 #vault nomad consul # 8500 #vault nomad consul
8000 #simpler-filehost 8000 # simpler-filehost
# 6666 #concourse # 6666 #concourse
# 202 #gitea-ssh # 202 #gitea-ssh
]; ];
@@ -25,16 +30,20 @@
interfaces = { interfaces = {
eth0 = { eth0 = {
ipv4.addresses = [{ ipv4.addresses = [
{
prefixLength = 24; prefixLength = 24;
address = "192.168.1.159"; address = "192.168.1.159";
}]; }
];
}; };
wlan0 = { wlan0 = {
ipv4.addresses = [{ ipv4.addresses = [
{
prefixLength = 24; prefixLength = 24;
address = "192.168.1.159"; address = "192.168.1.159";
}]; }
];
}; };
}; };
wireguard.interfaces.wg0 = with conf.network.addresses.wireguard.ips; { wireguard.interfaces.wg0 = with conf.network.addresses.wireguard.ips; {
@@ -52,6 +61,9 @@
]; ];
}; };
defaultGateway = "192.168.1.1"; defaultGateway = "192.168.1.1";
nameservers = [ "1.1.1.1" "8.8.8.8" ]; nameservers = [
"1.1.1.1"
"8.8.8.8"
];
}; };
} }

View File

@@ -17,19 +17,20 @@
services = { services = {
openssh = { openssh = {
enable = true; enable = true;
ports = [ 22 22001 ]; ports = [
22
22001
];
}; };
postgresql = { postgresql = {
enable = true; enable = true;
authentication = '' authentication = ''
local gitea all ident map=gitea-map local gitea all ident map=gitea-map
''; '';
identMap = identMap = ''
''
gitea-map gitea gitea gitea-map gitea gitea
''; '';
}; };
}; };
} }

View File

@@ -1,4 +1,10 @@
{ config, pkgs, inputs, conf, ... }: {
config,
pkgs,
inputs,
conf,
...
}:
{ {
systemd.services.filehost = { systemd.services.filehost = {
enable = true; enable = true;

View File

@@ -1,4 +1,9 @@
{ config, pkgs, conf, ... }: {
config,
pkgs,
conf,
...
}:
{ {
services = { services = {
gitea = rec { gitea = rec {
@@ -38,4 +43,3 @@
}; };
}; };
} }

View File

@@ -6,7 +6,10 @@
enable = true; enable = true;
enableDocker = true; enableDocker = true;
dropPrivileges = false; dropPrivileges = false;
extraPackages = with pkgs; [ consul cni-plugins ]; extraPackages = with pkgs; [
consul
cni-plugins
];
extraSettingsPaths = [ "/run/nomad/nomad.json" ]; extraSettingsPaths = [ "/run/nomad/nomad.json" ];
}; };
vault = { vault = {
@@ -27,4 +30,3 @@
}; };
}; };
} }

View File

@@ -1,20 +1,38 @@
{ lib, config, pkgs, ... }: {
lib,
config,
pkgs,
...
}:
{ {
boot = { boot = {
kernelPackages = pkgs.linuxPackages; kernelPackages = pkgs.linuxPackages;
initrd = { initrd = {
availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
];
kernelModules = [ ]; kernelModules = [ ];
}; };
kernelParams = [ "i915.force_probe=56a1" ]; kernelParams = [ "i915.force_probe=56a1" ];
# kernelModules = [ "kvm-intel" "i2c-dev" "ddcci_backlight" ]; # kernelModules = [ "kvm-intel" "i2c-dev" "ddcci_backlight" ];
kernelModules = [ "kvm-intel" "i2c-dev" ]; kernelModules = [
"kvm-intel"
"i2c-dev"
];
# extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback r8125 ddcci-driver ]; # extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback r8125 ddcci-driver ];
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback r8125 ]; extraModulePackages = with config.boot.kernelPackages; [
v4l2loopback
r8125
];
blacklistedKernelModules = [ "r8169" ]; blacklistedKernelModules = [ "r8169" ];
extraModprobeConfig = '' options snd-intel-dspcfg dsp_driver=1 ''; extraModprobeConfig = ''options snd-intel-dspcfg dsp_driver=1 '';
resumeDevice = "/dev/disk/by-uuid/3770e3bd-a200-4e36-b3a5-4963d13865f9"; resumeDevice = "/dev/disk/by-uuid/3770e3bd-a200-4e36-b3a5-4963d13865f9";

View File

@@ -1,7 +1,6 @@
{ lib, config, ... }: { lib, config, ... }:
{ {
imports = imports = [
[
./hardware.nix ./hardware.nix
./stuff.nix ./stuff.nix
./networking.nix ./networking.nix

View File

@@ -1,42 +1,45 @@
{ config, lib, modulesPath, pkgs, ... }: {
config,
lib,
modulesPath,
pkgs,
...
}:
{ {
imports = imports = [
[
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
fileSystems."/" = fileSystems."/" = {
{
device = "/dev/disk/by-uuid/5679b901-3a70-4422-81f5-af91f287500b"; device = "/dev/disk/by-uuid/5679b901-3a70-4422-81f5-af91f287500b";
fsType = "btrfs"; fsType = "btrfs";
options = [ "compress-force=zstd:3" ]; options = [ "compress-force=zstd:3" ];
}; };
fileSystems."/boot/efi" = fileSystems."/boot/efi" = {
{
device = "/dev/disk/by-uuid/A2E5-006F"; device = "/dev/disk/by-uuid/A2E5-006F";
fsType = "vfat"; fsType = "vfat";
}; };
fileSystems."/media/omghi" = fileSystems."/media/omghi" = {
{
device = "/dev/disk/by-uuid/0e862bdb-168a-42cc-8a28-0ae9e9a0753c"; device = "/dev/disk/by-uuid/0e862bdb-168a-42cc-8a28-0ae9e9a0753c";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/media/real" = fileSystems."/media/real" = {
{
device = "/dev/disk/by-uuid/8086be20-c770-46be-bd8f-5bd2d7735c7d"; device = "/dev/disk/by-uuid/8086be20-c770-46be-bd8f-5bd2d7735c7d";
fsType = "btrfs"; fsType = "btrfs";
options = [ "compress-force=zstd:3" ]; options = [ "compress-force=zstd:3" ];
}; };
/* fileSystems."/media/ntfs" = /*
fileSystems."/media/ntfs" =
{ {
device = "/dev/disk/by-uuid/54034ca6-d3cd-11ee-9e0c-f020ff87c985"; device = "/dev/disk/by-uuid/54034ca6-d3cd-11ee-9e0c-f020ff87c985";
fsType = "ntfs"; fsType = "ntfs";
};*/ };
*/
zramSwap = { zramSwap = {
enable = true; enable = true;

View File

@@ -1,4 +1,10 @@
{ config, pkgs, conf, lib, ... }: {
config,
pkgs,
conf,
lib,
...
}:
{ {
networking = { networking = {
@@ -10,35 +16,54 @@
}; };
firewall = { firewall = {
allowedTCPPorts = [ 22 18172 6600 8001 7590 25565 9092 8096 ]; allowedTCPPorts = [
allowedUDPPorts = [ 22 17840 18172 ]; 22
18172
6600
8001
7590
25565
9092
8096
];
allowedUDPPorts = [
22
17840
18172
];
trustedInterfaces = [ "docker0" ]; trustedInterfaces = [ "docker0" ];
}; };
interfaces = { interfaces = {
/*
enp7s0 = { enp7s0 = {
ipv4.addresses = [{ ipv4.addresses = [{
prefixLength = 24; prefixLength = 24;
address = "192.168.1.106"; address = "192.168.1.106";
}]; }];
}; };
*/
}; };
wireguard.interfaces.wg0 = with conf.network.addresses.wireguard.ips; { wireguard.interfaces.wg0 = with conf.network.addresses.wireguard.ips; {
ips = [ okina ]; ips = [ okina ];
listenPort = 17840; listenPort = 17840;
privateKeyFile = "/var/secrets/wg.key"; privateKeyFile = "/var/secrets/wg.key";
peers = [{ peers = [
{
#Oracle VM1 #Oracle VM1
publicKey = "z0Y2VNEWcyVQVSqRHiwmiJ5/0MgSPM+HZfEcwIccSxM="; publicKey = "z0Y2VNEWcyVQVSqRHiwmiJ5/0MgSPM+HZfEcwIccSxM=";
allowedIPs = [ remilia ]; allowedIPs = [ remilia ];
endpoint = "${conf.network.addresses.domain.natto}:17840"; endpoint = "${conf.network.addresses.domain.natto}:17840";
persistentKeepalive = 25; persistentKeepalive = 25;
}]; }
];
}; };
defaultGateway = "192.168.1.1"; defaultGateway = "192.168.1.1";
nameservers = [ "1.1.1.1" "8.8.8.8" ]; nameservers = [
"1.1.1.1"
"8.8.8.8"
];
}; };
} }

View File

@@ -1,4 +1,9 @@
{ lib, config, pkgs, ... }: {
lib,
config,
pkgs,
...
}:
{ {
services = { services = {
openssh = { openssh = {

View File

@@ -1,4 +1,9 @@
{ lib, config, pkgs, ... }: {
lib,
config,
pkgs,
...
}:
{ {
time.timeZone = "Asia/Kolkata"; time.timeZone = "Asia/Kolkata";
@@ -9,13 +14,23 @@
polkit.enable = true; polkit.enable = true;
sudo.enable = true; sudo.enable = true;
}; };
console.useXkbConfig = true; console.useXkbConfig = true;
users.users.natto = { users.users.natto = {
isNormalUser = true; isNormalUser = true;
shell = pkgs.zsh; shell = pkgs.zsh;
home = "/home/natto"; home = "/home/natto";
extraGroups = [ "wheel" "adbusers" "video" "libvirtd" "docker" "networkmanager" "dialout" "pipewire" ]; extraGroups = [
"wheel"
"adbusers"
"video"
"libvirtd"
"docker"
"networkmanager"
"dialout"
"pipewire"
];
}; };
virtualisation = { virtualisation = {

View File

@@ -16,7 +16,10 @@
''; '';
settings = { settings = {
auto-optimise-store = true; auto-optimise-store = true;
trusted-users = [ "root" "@wheel" ]; trusted-users = [
"root"
"@wheel"
];
substituters = [ substituters = [
"https://nix-community.cachix.org" "https://nix-community.cachix.org"
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store" "https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store"

View File

@@ -3,9 +3,19 @@
boot = { boot = {
kernel.sysctl."net.ipv4.ip_forward" = 1; kernel.sysctl."net.ipv4.ip_forward" = 1;
initrd.kernelModules = [ "bochs" ]; initrd.kernelModules = [ "bochs" ];
initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" ]; initrd.availableKernelModules = [
"ata_piix"
"uhci_hcd"
"virtio_pci"
"virtio_scsi"
];
kernelModules = [ "kvm-amd" ]; kernelModules = [ "kvm-amd" ];
kernelParams = [ "console=ttyS0" "console=tty1" "nvme.shutdown_timeout=10" "libiscsi.debug_libiscsi_eh=1" ]; kernelParams = [
"console=ttyS0"
"console=tty1"
"nvme.shutdown_timeout=10"
"libiscsi.debug_libiscsi_eh=1"
];
loader = { loader = {
systemd-boot.enable = true; systemd-boot.enable = true;
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;

View File

@@ -1,4 +1,9 @@
{ config, pkgs, conf, ... }: {
config,
pkgs,
conf,
...
}:
{ {
imports = [ imports = [
./networking.nix ./networking.nix

View File

@@ -1,13 +1,17 @@
{ config, lib, pkgs, modulesPath, ... }: {
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = imports = [
[
(modulesPath + "/profiles/qemu-guest.nix") (modulesPath + "/profiles/qemu-guest.nix")
]; ];
fileSystems."/" = fileSystems."/" = {
{
device = "/dev/disk/by-uuid/d91adce2-9059-4a8a-86e7-dee6ecc85b2b"; device = "/dev/disk/by-uuid/d91adce2-9059-4a8a-86e7-dee6ecc85b2b";
fsType = "ext4"; fsType = "ext4";
}; };

View File

@@ -1,7 +1,15 @@
{ config, pkgs, conf, network, ... }: {
config,
pkgs,
conf,
network,
...
}:
{ {
mailserver = mailserver =
let domain = conf.network.addresses.domain.natto; in let
domain = conf.network.addresses.domain.natto;
in
rec { rec {
enable = true; enable = true;
fqdn = "mail.${domain}"; fqdn = "mail.${domain}";

View File

@@ -1,26 +1,42 @@
{ lib, config, conf, pkgs, ... }: {
lib,
config,
conf,
pkgs,
...
}:
{ {
networking = { networking = {
useDHCP = false; useDHCP = false;
hostName = "remilia"; hostName = "remilia";
firewall = firewall = {
{
interfaces = { interfaces = {
ens3 = { ens3 = {
allowedTCPPorts = [ 80 81 443 444 993 465 143 25 22 22001 22002 4444 ] allowedTCPPorts = [
++ (map (x: x.sourcePort) config.networking.nat.forwardPorts); 80
81
443
444
993
465
143
25
22
22001
22002
4444
] ++ (map (x: x.sourcePort) config.networking.nat.forwardPorts);
allowedUDPPorts = [ 17840 ]; allowedUDPPorts = [ 17840 ];
}; };
}; };
extraCommands = lib.concatMapStringsSep "\n" extraCommands = lib.concatMapStringsSep "\n" (
(x: x:
let let
t = lib.splitString ":" x.destination; t = lib.splitString ":" x.destination;
in in
with lib; with lib;
"iptables -t nat -A POSTROUTING -d ${head t} -p tcp -m tcp --dport ${last t} -j MASQUERADE" "iptables -t nat -A POSTROUTING -d ${head t} -p tcp -m tcp --dport ${last t} -j MASQUERADE"
) ) config.networking.nat.forwardPorts;
config.networking.nat.forwardPorts;
}; };
interfaces = { interfaces = {
ens3 = { ens3 = {

View File

@@ -1,4 +1,10 @@
{ config, pkgs, lib, conf, ... }: {
config,
pkgs,
lib,
conf,
...
}:
let let
domain = conf.network.addresses.domain.natto; domain = conf.network.addresses.domain.natto;
in in
@@ -8,7 +14,10 @@ in
openssh = { openssh = {
enable = true; enable = true;
settings.PermitRootLogin = "yes"; settings.PermitRootLogin = "yes";
ports = [ 22 22002 ]; ports = [
22
22002
];
}; };
nginx = { nginx = {
enable = true; enable = true;
@@ -24,20 +33,29 @@ in
''; '';
virtualHosts = virtualHosts =
let let
genericHttpRProxy = { addr, ssl ? true, conf ? "" }: { genericHttpRProxy =
{
addr,
ssl ? true,
conf ? "",
}:
{
enableACME = ssl; enableACME = ssl;
# addSSL = ssl; # addSSL = ssl;
forceSSL = ssl; forceSSL = ssl;
locations."/" = { locations."/" = {
proxyPass = toString addr; proxyPass = toString addr;
extraConfig = '' extraConfig =
''
expires $expires; expires $expires;
proxy_set_header Host $host; proxy_set_header Host $host;
'' + conf; ''
+ conf;
}; };
}; };
in in
with conf.network.addresses.wireguard.ips; { with conf.network.addresses.wireguard.ips;
{
"${domain}" = { "${domain}" = {
addSSL = true; addSSL = true;
enableACME = true; enableACME = true;
@@ -51,7 +69,8 @@ in
# "consul.${domain}" = genericHttpRProxy { addr = "http://${marisa}:8500"; }; # "consul.${domain}" = genericHttpRProxy { addr = "http://${marisa}:8500"; };
"f.${domain}" = genericHttpRProxy { addr = "http://${marisa}:8000"; }; "f.${domain}" = genericHttpRProxy { addr = "http://${marisa}:8000"; };
"radio.${domain}" = genericHttpRProxy { addr = "http://${satori}:8001"; }; "radio.${domain}" = genericHttpRProxy { addr = "http://${satori}:8001"; };
/* "radio.${domain}" = { /*
"radio.${domain}" = {
addSSL = true; addSSL = true;
enableACME = true; enableACME = true;
locations."/" = { locations."/" = {
@@ -62,13 +81,15 @@ in
''; '';
}; };
locations."= /".return = "301 /radio"; locations."= /".return = "301 /radio";
};*/ };
*/
"git.${domain}" = genericHttpRProxy { "git.${domain}" = genericHttpRProxy {
addr = "http://${marisa}:5001"; addr = "http://${marisa}:5001";
conf = "client_max_body_size 64M;"; conf = "client_max_body_size 64M;";
}; };
/*"nomad.${domain}" = genericHttpRProxy { /*
"nomad.${domain}" = genericHttpRProxy {
addr = "http://${marisa}:4646"; addr = "http://${marisa}:4646";
conf = '' conf = ''
proxy_buffering off; proxy_buffering off;
@@ -80,4 +101,3 @@ in
}; };
}; };
} }

View File

@@ -1,22 +1,49 @@
{ lib, config, pkgs, ... }: {
lib,
config,
pkgs,
...
}:
{ {
boot = { boot = {
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;
initrd = { initrd = {
availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "vfio-pci" ]; availableKernelModules = [
/* preDeviceCommands = '' "xhci_pci"
"ahci"
"nvme"
"usb_storage"
"sd_mod"
"vfio-pci"
];
/*
preDeviceCommands = ''
DEVS="0000:01:00.0 0000:01:00.1 0000:01:00.2 0000:01:00.3" DEVS="0000:01:00.0 0000:01:00.1 0000:01:00.2 0000:01:00.3"
for DEV in $DEVS; do for DEV in $DEVS; do
echo "vfio-pci" > /sys/bus/pci/devices/$DEV/driver_override echo "vfio-pci" > /sys/bus/pci/devices/$DEV/driver_override
done done
modprobe -i vfio-pci modprobe -i vfio-pci
'';*/ '';
*/
kernelModules = [ ]; kernelModules = [ ];
}; };
kernelParams = [ "intel_pstate=active" "intel_iommu=on" "nvidia_drm.modeset=1" "clearcpuid=512" ]; kernelParams = [
kernelModules = [ "kvm-intel" "snd-seq" "snd-rawmidi" "joydev" ]; "intel_pstate=active"
extraModulePackages = with config.boot.kernelPackages; [ nvidia_x11 v4l2loopback ]; "intel_iommu=on"
"nvidia_drm.modeset=1"
"clearcpuid=512"
];
kernelModules = [
"kvm-intel"
"snd-seq"
"snd-rawmidi"
"joydev"
];
extraModulePackages = with config.boot.kernelPackages; [
nvidia_x11
v4l2loopback
];
loader = { loader = {
efi = { efi = {
canTouchEfiVariables = true; canTouchEfiVariables = true;

View File

@@ -1,7 +1,6 @@
{ lib, config, ... }: { lib, config, ... }:
{ {
imports = imports = [
[
./hardware.nix ./hardware.nix
./stuff.nix ./stuff.nix
./networking.nix ./networking.nix

View File

@@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }: {
config,
pkgs,
lib,
...
}:
let let
nvidia-offload = pkgs.writeShellScriptBin "nvi" '' nvidia-offload = pkgs.writeShellScriptBin "nvi" ''
export __NV_PRIME_RENDER_OFFLOAD=1 export __NV_PRIME_RENDER_OFFLOAD=1
@@ -23,11 +28,15 @@ in
package = config.boot.kernelPackages.nvidia_x11; package = config.boot.kernelPackages.nvidia_x11;
prime = { prime = {
# sync.enable = true; # sync.enable = true;
offload = { enable = true; }; offload = {
enable = true;
};
intelBusId = "PCI:0:2:0"; intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0"; nvidiaBusId = "PCI:1:0:0";
}; };
modesetting = { enable = true; }; modesetting = {
enable = true;
};
powerManagement = { powerManagement = {
enable = true; enable = true;
finegrained = true; finegrained = true;

View File

@@ -1,26 +1,27 @@
{ config, lib, modulesPath, ... }: {
config,
lib,
modulesPath,
...
}:
{ {
imports = imports = [
[
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
fileSystems."/" = fileSystems."/" = {
{
device = "/dev/disk/by-uuid/59af143c-1a87-4654-9b31-7594ac8ba530"; device = "/dev/disk/by-uuid/59af143c-1a87-4654-9b31-7594ac8ba530";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/media/real" = fileSystems."/media/real" = {
{
device = "/dev/disk/by-uuid/8086be20-c770-46be-bd8f-5bd2d7735c7d"; device = "/dev/disk/by-uuid/8086be20-c770-46be-bd8f-5bd2d7735c7d";
fsType = "btrfs"; fsType = "btrfs";
options = [ "compress-force=zstd:3" ]; options = [ "compress-force=zstd:3" ];
}; };
fileSystems."/boot/efi" = fileSystems."/boot/efi" = {
{
device = "/dev/disk/by-uuid/2424-5639"; device = "/dev/disk/by-uuid/2424-5639";
fsType = "vfat"; fsType = "vfat";
}; };
@@ -33,7 +34,10 @@
}; };
swapDevices = [ swapDevices = [
{ device = "/var/swap"; size = 4096; } {
device = "/var/swap";
size = 4096;
}
]; ];
powerManagement = { powerManagement = {

View File

@@ -1,4 +1,9 @@
{ config, pkgs, conf, ... }: {
config,
pkgs,
conf,
...
}:
{ {
networking = { networking = {
@@ -10,8 +15,20 @@
}; };
firewall = { firewall = {
allowedTCPPorts = [ 22 18172 6600 8001 7590 25565 9092 ]; allowedTCPPorts = [
allowedUDPPorts = [ 22 17840 18172 ]; 22
18172
6600
8001
7590
25565
9092
];
allowedUDPPorts = [
22
17840
18172
];
trustedInterfaces = [ "docker0" ]; trustedInterfaces = [ "docker0" ];
}; };
@@ -19,16 +36,21 @@
ips = [ satori ]; ips = [ satori ];
listenPort = 17840; listenPort = 17840;
privateKeyFile = "/var/secrets/wg.key"; privateKeyFile = "/var/secrets/wg.key";
peers = [{ peers = [
{
#Oracle VM1 #Oracle VM1
publicKey = "z0Y2VNEWcyVQVSqRHiwmiJ5/0MgSPM+HZfEcwIccSxM="; publicKey = "z0Y2VNEWcyVQVSqRHiwmiJ5/0MgSPM+HZfEcwIccSxM=";
allowedIPs = [ remilia ]; allowedIPs = [ remilia ];
endpoint = "${conf.network.addresses.domain.natto}:17840"; endpoint = "${conf.network.addresses.domain.natto}:17840";
persistentKeepalive = 25; persistentKeepalive = 25;
}]; }
];
}; };
defaultGateway = "192.168.1.1"; defaultGateway = "192.168.1.1";
nameservers = [ "1.1.1.1" "8.8.8.8" ]; nameservers = [
"1.1.1.1"
"8.8.8.8"
];
}; };
} }

View File

@@ -1,4 +1,9 @@
{ lib, config, pkgs, ... }: {
lib,
config,
pkgs,
...
}:
{ {
services = { services = {
openssh = { openssh = {

View File

@@ -1,4 +1,9 @@
{ lib, config, pkgs, ... }: {
lib,
config,
pkgs,
...
}:
{ {
time.timeZone = "Asia/Kolkata"; time.timeZone = "Asia/Kolkata";
@@ -11,12 +16,19 @@
}; };
console.useXkbConfig = true; console.useXkbConfig = true;
users.users.natto = { users.users.natto = {
isNormalUser = true; isNormalUser = true;
shell = pkgs.zsh; shell = pkgs.zsh;
home = "/home/natto"; home = "/home/natto";
extraGroups = [ "wheel" "adbusers" "video" "libvirtd" "docker" "networkmanager" "dialout" ]; extraGroups = [
"wheel"
"adbusers"
"video"
"libvirtd"
"docker"
"networkmanager"
"dialout"
];
}; };
virtualisation = { virtualisation = {

View File

@@ -3,9 +3,19 @@
boot = { boot = {
kernel.sysctl."net.ipv4.ip_forward" = 1; kernel.sysctl."net.ipv4.ip_forward" = 1;
initrd.kernelModules = [ "bochs" ]; initrd.kernelModules = [ "bochs" ];
initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" ]; initrd.availableKernelModules = [
"ata_piix"
"uhci_hcd"
"virtio_pci"
"virtio_scsi"
];
kernelModules = [ "kvm-amd" ]; kernelModules = [ "kvm-amd" ];
kernelParams = [ "console=ttyS0" "console=tty1" "nvme.shutdown_timeout=10" "libiscsi.debug_libiscsi_eh=1" ]; kernelParams = [
"console=ttyS0"
"console=tty1"
"nvme.shutdown_timeout=10"
"libiscsi.debug_libiscsi_eh=1"
];
loader = { loader = {
systemd-boot.enable = true; systemd-boot.enable = true;
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;

View File

@@ -1,4 +1,9 @@
{ config, pkgs, conf, ... }: {
config,
pkgs,
conf,
...
}:
{ {
imports = [ imports = [
./networking.nix ./networking.nix

View File

@@ -1,13 +1,17 @@
{ config, lib, pkgs, modulesPath, ... }: {
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = imports = [
[
(modulesPath + "/profiles/qemu-guest.nix") (modulesPath + "/profiles/qemu-guest.nix")
]; ];
fileSystems."/" = fileSystems."/" = {
{
device = "/dev/disk/by-uuid/e87c20b9-f451-45bf-b863-385ac9c290cf "; device = "/dev/disk/by-uuid/e87c20b9-f451-45bf-b863-385ac9c290cf ";
fsType = "ext4"; fsType = "ext4";
}; };

View File

@@ -1,13 +1,22 @@
{ lib, config, conf, pkgs, ... }: {
lib,
config,
conf,
pkgs,
...
}:
{ {
networking = { networking = {
useDHCP = false; useDHCP = false;
hostName = "suwako"; hostName = "suwako";
firewall = firewall = {
{
interfaces = { interfaces = {
enp0s6 = { enp0s6 = {
allowedTCPPorts = [ 22 443 80 ]; allowedTCPPorts = [
22
443
80
];
}; };
}; };
}; };

View File

@@ -1,4 +1,10 @@
{ config, pkgs, lib, conf, ... }: {
config,
pkgs,
lib,
conf,
...
}:
let let
domain = conf.network.addresses.domain.natto; domain = conf.network.addresses.domain.natto;
in in
@@ -13,4 +19,3 @@ in
}; };
}; };
} }

View File

@@ -1,5 +1,10 @@
#Taken from https://github.com/MagicRB/dotfiles/blob/master/nix/nixos-modules/vault-agent.nix #Taken from https://github.com/MagicRB/dotfiles/blob/master/nix/nixos-modules/vault-agent.nix
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
with lib; with lib;
let let
cfg = config.services.vault-agent; cfg = config.services.vault-agent;
@@ -59,8 +64,7 @@ in
}; };
}; };
config = mkIf cfg.enable config = mkIf cfg.enable ({
({
users = { users = {
users = { users = {
"${cfg.userName}" = { "${cfg.userName}" = {
@@ -84,9 +88,12 @@ in
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
wants = [ "network-online.target" ]; wants = [ "network-online.target" ];
after = [ "network-online.target" ]; after = [ "network-online.target" ];
path = (with pkgs; [ path = (
with pkgs;
[
glibc glibc
]); ]
);
serviceConfig = { serviceConfig = {
User = cfg.userName; User = cfg.userName;
Group = cfg.groupName; Group = cfg.groupName;
@@ -103,4 +110,3 @@ in
}; };
}); });
} }

View File

@@ -4,13 +4,23 @@
extraOptions = '' extraOptions = ''
builders-use-substitutes = true builders-use-substitutes = true
''; '';
buildMachines = [{ buildMachines = [
{
hostName = "okina"; hostName = "okina";
systems = [ "x86_64-linux" "aarch64-linux" ]; systems = [
"x86_64-linux"
"aarch64-linux"
];
maxJobs = 4; maxJobs = 4;
speedFactor = 2; speedFactor = 2;
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; supportedFeatures = [
}]; "nixos-test"
"benchmark"
"big-parallel"
"kvm"
];
}
];
distributedBuilds = true; distributedBuilds = true;
}; };
} }

View File

@@ -1,4 +1,8 @@
{ lib, stdenvNoCC, fetchFromGitHub }: {
lib,
stdenvNoCC,
fetchFromGitHub,
}:
stdenvNoCC.mkDerivation { stdenvNoCC.mkDerivation {
name = "customscripts"; name = "customscripts";

View File

@@ -1,4 +1,5 @@
{ self, ... }: { { self, ... }:
{
flake = { flake = {
overlays = rec { overlays = rec {
packages = import ./packages.nix; packages = import ./packages.nix;
@@ -6,7 +7,9 @@
}; };
}; };
perSystem = { pkgs, ... }: { perSystem =
{ pkgs, ... }:
{
packages = self.overlays.default null pkgs; packages = self.overlays.default null pkgs;
}; };
} }

View File

@@ -1,4 +1,11 @@
{ wrapNeovimUnstable, neovimUtils, neovim-unwrapped, nvimPackage ? neovim-unwrapped, vimPlugins, ... }: {
wrapNeovimUnstable,
neovimUtils,
neovim-unwrapped,
nvimPackage ? neovim-unwrapped,
vimPlugins,
...
}:
let let
nvimConfig = neovimUtils.makeNeovimConfig { nvimConfig = neovimUtils.makeNeovimConfig {
plugins = with vimPlugins; [ plugins = with vimPlugins; [
@@ -24,8 +31,11 @@ let
]; ];
}; };
in in
wrapNeovimUnstable nvimPackage (nvimConfig // { wrapNeovimUnstable nvimPackage (
nvimConfig
// {
luaRcContent = '' luaRcContent = ''
${builtins.readFile ./init.lua} ${builtins.readFile ./init.lua}
''; '';
}) }
)

View File

@@ -1,4 +1,11 @@
{ lib, stdenvNoCC, fetchFromGitLab, python3, librsvg, xcursorgen }: {
lib,
stdenvNoCC,
fetchFromGitLab,
python3,
librsvg,
xcursorgen,
}:
stdenvNoCC.mkDerivation rec { stdenvNoCC.mkDerivation rec {
pname = "simp1e-cursors"; pname = "simp1e-cursors";
@@ -36,4 +43,3 @@ stdenvNoCC.mkDerivation rec {
maintainers = with maintainers; [ natto1784 ]; maintainers = with maintainers; [ natto1784 ];
}; };
} }