Compare commits
3 commits
9603b43f34
...
f2d0e9239f
Author | SHA1 | Date | |
---|---|---|---|
f2d0e9239f |
|||
e641dfa114 |
|||
f4464732e3 |
116 changed files with 1608 additions and 1087 deletions
12
default.nix
12
default.nix
|
@ -10,14 +10,14 @@ let
|
|||
inherit (lib.filesystem) listFilesRecursive;
|
||||
inherit (lib.strings) hasSuffix;
|
||||
|
||||
mkSystem = system: hostname:
|
||||
mkSystem =
|
||||
system: hostname:
|
||||
import (src.nixpkgs + "/nixos/lib/eval-config.nix") {
|
||||
specialArgs = {
|
||||
inherit sources;
|
||||
self = ./.;
|
||||
};
|
||||
modules =
|
||||
[
|
||||
modules = [
|
||||
# This is used to pre-emptively set the hostPlatform for nixpkgs.
|
||||
# Also, we set the system hostname here.
|
||||
{
|
||||
|
@ -27,10 +27,10 @@ let
|
|||
./hosts/common.nix
|
||||
./hosts/${hostname}
|
||||
]
|
||||
++ ((listFilesRecursive ./modules)
|
||||
|> filter (hasSuffix ".mod.nix"));
|
||||
++ ((listFilesRecursive ./modules) |> filter (hasSuffix ".mod.nix"));
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
temperance = mkSystem "x86_64-linux" "temperance";
|
||||
hermit = mkSystem "x86_64-linux" "hermit";
|
||||
tower = mkSystem "aarch64-linux" "tower";
|
||||
|
|
47
flake.nix
47
flake.nix
|
@ -3,64 +3,37 @@
|
|||
|
||||
# No inputs, take this flakers
|
||||
|
||||
outputs = _: let
|
||||
outputs =
|
||||
_:
|
||||
let
|
||||
sources = import ./npins;
|
||||
nixpkgs = (import sources.flake-compat { src = sources.nixpkgs; }).outputs;
|
||||
|
||||
inherit (nixpkgs) lib;
|
||||
eachSystem = lib.genAttrs (import sources.systems);
|
||||
pkgsFor = nixpkgs.legacyPackages;
|
||||
inputs = sources;
|
||||
in {
|
||||
in
|
||||
{
|
||||
nixosConfigurations = import ./default.nix;
|
||||
|
||||
formatter = eachSystem (system: pkgsFor.${system}.alejandra);
|
||||
|
||||
packages =
|
||||
lib.mapAttrs (
|
||||
_: pkgs: {
|
||||
packages = lib.mapAttrs (_: pkgs: {
|
||||
inherit
|
||||
(import ./packages {
|
||||
inherit inputs pkgs;
|
||||
inherit inputs pkgs sources;
|
||||
})
|
||||
fish
|
||||
helix
|
||||
kakoune
|
||||
nushell
|
||||
;
|
||||
}
|
||||
)
|
||||
pkgsFor;
|
||||
devShells =
|
||||
lib.mapAttrs (
|
||||
_: pkgs: {
|
||||
}) pkgsFor;
|
||||
devShells = lib.mapAttrs (_: pkgs: {
|
||||
default = pkgs.mkShellNoCC {
|
||||
packages = [
|
||||
(pkgs.callPackage (sources.npins + "/npins.nix") { })
|
||||
];
|
||||
env.NPINS_OVERRIDE_nichts = ".";
|
||||
};
|
||||
}
|
||||
)
|
||||
pkgsFor;
|
||||
|
||||
apps = eachSystem (system: let
|
||||
inherit (inputs.self.packages.${system}) fish helix nushell;
|
||||
in {
|
||||
default = inputs.self.apps.${system}.nushell;
|
||||
helix = {
|
||||
type = "app";
|
||||
program = "${helix}/bin/hx";
|
||||
};
|
||||
nushell = {
|
||||
type = "app";
|
||||
program = "${nushell}/bin/nu";
|
||||
};
|
||||
fish = {
|
||||
type = "app";
|
||||
program = "${fish}/bin/fish";
|
||||
};
|
||||
});
|
||||
}) pkgsFor;
|
||||
|
||||
templates = import ./templates;
|
||||
};
|
||||
|
|
|
@ -6,16 +6,19 @@
|
|||
lib,
|
||||
self,
|
||||
pkgs,
|
||||
sources,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.meta) hiPrioSet;
|
||||
helix = pkgs.callPackage (self + "/packages/helix") {};
|
||||
fish = pkgs.callPackage (self + "/packages/fish") {};
|
||||
in {
|
||||
helix = pkgs.callPackage (self + "/packages/helix") { inherit sources; };
|
||||
|
||||
fish = pkgs.callPackage (self + "/packages/fish") { inherit sources; };
|
||||
in
|
||||
{
|
||||
environment.systemPackages =
|
||||
builtins.attrValues {
|
||||
inherit
|
||||
(pkgs)
|
||||
inherit (pkgs)
|
||||
cachix
|
||||
calc
|
||||
delta
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
nixpkgs,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (builtins) filter map toString;
|
||||
inherit (nixpkgs) lib;
|
||||
inherit (lib.attrsets) recursiveUpdate;
|
||||
|
@ -14,20 +15,18 @@
|
|||
# NOTE: This was inspired by raf, and I find this
|
||||
# to be quite a sane way of managing all modules in my flake.
|
||||
|
||||
mkSystem = {
|
||||
mkSystem =
|
||||
{
|
||||
system,
|
||||
hostname,
|
||||
...
|
||||
}@args:
|
||||
nixosSystem {
|
||||
specialArgs =
|
||||
recursiveUpdate
|
||||
{
|
||||
specialArgs = recursiveUpdate {
|
||||
inherit lib;
|
||||
inputs = sources;
|
||||
inherit self;
|
||||
}
|
||||
args.specialArgs or {};
|
||||
} args.specialArgs or { };
|
||||
modules = concatLists [
|
||||
# This is used to pre-emptively set the hostPlatform for nixpkgs.
|
||||
# Also, we set the system hostname here.
|
||||
|
@ -42,20 +41,15 @@
|
|||
# common configuration, which all hosts share.
|
||||
(singleton ./common.nix)
|
||||
# Import all files called module.nix from my modules directory.
|
||||
(
|
||||
map toString (listFilesRecursive ../modules)
|
||||
|> filter (hasSuffix "module.nix")
|
||||
)
|
||||
(
|
||||
map toString (listFilesRecursive ../modules)
|
||||
|> filter (hasSuffix ".mod.nix")
|
||||
)
|
||||
(map toString (listFilesRecursive ../modules) |> filter (hasSuffix "module.nix"))
|
||||
(map toString (listFilesRecursive ../modules) |> filter (hasSuffix ".mod.nix"))
|
||||
]
|
||||
|> flatten
|
||||
)
|
||||
];
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
temperance = mkSystem {
|
||||
system = "x86_64-linux";
|
||||
hostname = "temperance";
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
# Time Zone
|
||||
time.timeZone = "Europe/Zurich";
|
||||
# Select internationalisation properties.
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
config = {
|
||||
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/10318654-ed20-43f6-885d-35366a427581";
|
||||
boot.initrd.luks.devices."cryptroot".device =
|
||||
"/dev/disk/by-uuid/10318654-ed20-43f6-885d-35366a427581";
|
||||
fileSystems = {
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/5D7D-FC52";
|
||||
|
@ -10,17 +11,28 @@
|
|||
"/" = {
|
||||
device = "/dev/disk/by-uuid/e353013b-8ac7-40ed-80f2-ddbea21b8d5e";
|
||||
fsType = "btrfs";
|
||||
options = ["compress=zstd" "noatime"];
|
||||
options = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"/nix" = {
|
||||
device = "/dev/disk/by-uuid/e353013b-8ac7-40ed-80f2-ddbea21b8d5e";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=nix" "compress=zstd" "noatime"];
|
||||
options = [
|
||||
"subvol=nix"
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"/home" = {
|
||||
device = "/dev/disk/by-uuid/e353013b-8ac7-40ed-80f2-ddbea21b8d5e";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=home" "compress=zstd" "noatime"];
|
||||
options = [
|
||||
"subvol=home"
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
};
|
||||
# swapDevices = [
|
||||
|
|
|
@ -6,18 +6,31 @@
|
|||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
|
||||
availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"nvme"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
"rtsx_pci_sdmmc"
|
||||
];
|
||||
kernelModules = [ ];
|
||||
};
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
blacklistedKernelModules = ["nouveau" "nvidia" "nvidia_drm" "nvidia_modeset"];
|
||||
blacklistedKernelModules = [
|
||||
"nouveau"
|
||||
"nvidia"
|
||||
"nvidia_drm"
|
||||
"nvidia_modeset"
|
||||
];
|
||||
|
||||
kernelParams = [ "mem_sleep_default=deep" ];
|
||||
extraModulePackages = [ ];
|
||||
|
|
|
@ -3,8 +3,10 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
xanmod_custom = callPackage ./xanmod.nix;
|
||||
in {
|
||||
in
|
||||
{
|
||||
boot.kernelPackages = xanmod_custom;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{pkgs, ...}: let
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
# a newer nil version, for pipes support.
|
||||
new-nil = pkgs.nil.overrideAttrs (_: {
|
||||
version = "unstable-18-07-2025";
|
||||
|
@ -17,13 +18,12 @@
|
|||
hash = "sha256-Sljr3ff8hl/qm/0wqc1GXsEr1wWn7NAXmdrd5wHzUX8=";
|
||||
};
|
||||
});
|
||||
in {
|
||||
in
|
||||
{
|
||||
environment.systemPackages = builtins.attrValues {
|
||||
inherit
|
||||
(pkgs)
|
||||
inherit (pkgs)
|
||||
abook
|
||||
aerc
|
||||
alejandra
|
||||
aichat
|
||||
alsa-utils
|
||||
anki
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
# Time Zone
|
||||
time.timeZone = "Europe/Zurich";
|
||||
# Select internationalisation properties.
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
config = {
|
||||
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/96e8f3d6-8d2d-4e2d-abd9-3eb7f48fed02";
|
||||
boot.initrd.luks.devices."cryptroot".device =
|
||||
"/dev/disk/by-uuid/96e8f3d6-8d2d-4e2d-abd9-3eb7f48fed02";
|
||||
fileSystems = {
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/B3AC-9050";
|
||||
|
@ -10,29 +11,49 @@
|
|||
"/" = {
|
||||
device = "none";
|
||||
fsType = "tmpfs";
|
||||
options = ["defaults" "size=40%" "mode=755"];
|
||||
options = [
|
||||
"defaults"
|
||||
"size=40%"
|
||||
"mode=755"
|
||||
];
|
||||
};
|
||||
"/nix" = {
|
||||
device = "/dev/disk/by-uuid/f0569993-722e-4721-b0d9-8ac537a7a548";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=nix" "compress=zstd" "noatime"];
|
||||
options = [
|
||||
"subvol=nix"
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"/persist" = {
|
||||
device = "/dev/disk/by-uuid/f0569993-722e-4721-b0d9-8ac537a7a548";
|
||||
neededForBoot = true;
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=persist" "compress=zstd" "noatime"];
|
||||
options = [
|
||||
"subvol=persist"
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"/home" = {
|
||||
device = "/dev/disk/by-uuid/f0569993-722e-4721-b0d9-8ac537a7a548";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=home" "compress=zstd" "noatime"];
|
||||
options = [
|
||||
"subvol=home"
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"/swap" = {
|
||||
device = "/dev/disk/by-uuid/f0569993-722e-4721-b0d9-8ac537a7a548";
|
||||
fsType = "btrfs";
|
||||
|
||||
options = ["subvol=swap" "compress=lzo" "noatime"];
|
||||
options = [
|
||||
"subvol=swap"
|
||||
"compress=lzo"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
};
|
||||
swapDevices = [
|
||||
|
|
|
@ -3,11 +3,18 @@
|
|||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot = {
|
||||
initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "sd_mod"];
|
||||
initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"nvme"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
];
|
||||
initrd.kernelModules = [ ];
|
||||
kernelModules = [ ];
|
||||
extraModulePackages = [ ];
|
||||
|
@ -21,6 +28,5 @@
|
|||
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
|
|
@ -3,8 +3,10 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
xanmod_custom = callPackage ./xanmod.nix;
|
||||
in {
|
||||
in
|
||||
{
|
||||
boot.kernelPackages = xanmod_custom;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
{lib, ...}: let
|
||||
{ lib, ... }:
|
||||
let
|
||||
inherit (lib.kernel) no unset;
|
||||
inherit (lib.attrsets) mapAttrs;
|
||||
inherit (lib.modules) mkForce;
|
||||
in {
|
||||
in
|
||||
{
|
||||
boot.kernelPatches = [
|
||||
{
|
||||
name = "disable-unused-features";
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
buildLinux,
|
||||
kernelPatches,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
pname = "linux-xanmod";
|
||||
version = "6.11.5";
|
||||
vendorSuffix = "xanmod1";
|
||||
|
@ -58,17 +59,17 @@
|
|||
};
|
||||
})
|
||||
# 1:1 taken from raf's custom kernel, check out his config for this.
|
||||
.overrideAttrs (oa: {
|
||||
prePatch =
|
||||
oa.prePatch or ""
|
||||
+ ''
|
||||
.overrideAttrs
|
||||
(oa: {
|
||||
prePatch = oa.prePatch or "" + ''
|
||||
# bragging rights
|
||||
echo "Replacing localversion with custom suffix"
|
||||
substituteInPlace localversion \
|
||||
--replace-fail "xanmod1" "blox"
|
||||
'';
|
||||
});
|
||||
in {
|
||||
in
|
||||
{
|
||||
inherit
|
||||
xanmod_blox
|
||||
;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = builtins.attrValues {
|
||||
inherit
|
||||
(pkgs)
|
||||
inherit (pkgs)
|
||||
alsa-utils
|
||||
anki
|
||||
asciinema
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
# Time Zone
|
||||
time.timeZone = "Europe/Vienna";
|
||||
# Select internationalisation properties.
|
||||
|
|
|
@ -2,13 +2,18 @@
|
|||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot = {
|
||||
initrd.availableKernelModules = ["xhci_pci" "virtio_scsi" "sr_mod"];
|
||||
initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"virtio_scsi"
|
||||
"sr_mod"
|
||||
];
|
||||
initrd.kernelModules = [ ];
|
||||
kernelModules = [ ];
|
||||
extraModulePackages = [ ];
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = builtins.attrValues {
|
||||
inherit
|
||||
(pkgs)
|
||||
inherit (pkgs)
|
||||
;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
# Time Zone
|
||||
time.timeZone = "Europe/Zurich";
|
||||
# Select internationalisation properties.
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
config = {
|
||||
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/10318654-ed20-43f6-885d-35366a427581";
|
||||
boot.initrd.luks.devices."cryptroot".device =
|
||||
"/dev/disk/by-uuid/10318654-ed20-43f6-885d-35366a427581";
|
||||
fileSystems = {
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/5D7D-FC52";
|
||||
|
@ -10,17 +11,28 @@
|
|||
"/" = {
|
||||
device = "/dev/disk/by-uuid/e353013b-8ac7-40ed-80f2-ddbea21b8d5e";
|
||||
fsType = "btrfs";
|
||||
options = ["compress=zstd" "noatime"];
|
||||
options = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"/nix" = {
|
||||
device = "/dev/disk/by-uuid/e353013b-8ac7-40ed-80f2-ddbea21b8d5e";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=nix" "compress=zstd" "noatime"];
|
||||
options = [
|
||||
"subvol=nix"
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"/home" = {
|
||||
device = "/dev/disk/by-uuid/e353013b-8ac7-40ed-80f2-ddbea21b8d5e";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=home" "compress=zstd" "noatime"];
|
||||
options = [
|
||||
"subvol=home"
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
};
|
||||
# swapDevices = [
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
# (modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix")
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
|
@ -11,11 +12,23 @@
|
|||
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
|
||||
availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"nvme"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
"rtsx_pci_sdmmc"
|
||||
];
|
||||
kernelModules = [ ];
|
||||
};
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
blacklistedKernelModules = ["nouveau" "nvidia" "nvidia_drm" "nvidia_modeset"];
|
||||
blacklistedKernelModules = [
|
||||
"nouveau"
|
||||
"nvidia"
|
||||
"nvidia_drm"
|
||||
"nvidia_modeset"
|
||||
];
|
||||
|
||||
kernelParams = [ "mem_sleep_default=deep" ];
|
||||
extraModulePackages = [ ];
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
self,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
environment.systemPackages = builtins.attrValues {
|
||||
inherit
|
||||
(pkgs)
|
||||
inherit (pkgs)
|
||||
calc
|
||||
comma
|
||||
difftastic
|
||||
|
|
|
@ -1,7 +1,15 @@
|
|||
{lib, ...}: let
|
||||
{ lib, ... }:
|
||||
let
|
||||
inherit (lib.options) mkOption;
|
||||
inherit (lib.types) submodule int ints number attrsOf;
|
||||
in {
|
||||
inherit (lib.types)
|
||||
submodule
|
||||
int
|
||||
ints
|
||||
number
|
||||
attrsOf
|
||||
;
|
||||
in
|
||||
{
|
||||
options.modules.system.hardware.monitors = mkOption {
|
||||
description = "\n List of monitors to use\n ";
|
||||
default = { };
|
||||
|
|
|
@ -2,14 +2,22 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (builtins) elemAt;
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.types) enum listOf str nullOr bool;
|
||||
inherit (lib.types)
|
||||
enum
|
||||
listOf
|
||||
str
|
||||
nullOr
|
||||
bool
|
||||
;
|
||||
inherit (lib.lists) elem;
|
||||
|
||||
inherit (config.modules.system) systemType;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.system = {
|
||||
users = mkOption {
|
||||
type = listOf str;
|
||||
|
@ -27,7 +35,11 @@ in {
|
|||
};
|
||||
|
||||
systemType = mkOption {
|
||||
type = nullOr (enum ["desktop" "laptop" "server"]);
|
||||
type = nullOr (enum [
|
||||
"desktop"
|
||||
"laptop"
|
||||
"server"
|
||||
]);
|
||||
default = null;
|
||||
description = ''
|
||||
The type of the current system. This is used to determine whether things like graphical
|
||||
|
@ -37,7 +49,10 @@ in {
|
|||
|
||||
isGraphical = mkOption {
|
||||
type = bool;
|
||||
default = elem systemType ["desktop" "laptop"];
|
||||
default = elem systemType [
|
||||
"desktop"
|
||||
"laptop"
|
||||
];
|
||||
description = ''
|
||||
Whether the current system is a graphical system.
|
||||
'';
|
||||
|
@ -46,7 +61,10 @@ in {
|
|||
yubikeySupport = {
|
||||
enable = mkEnableOption "yubikey support";
|
||||
deviceType = mkOption {
|
||||
type = nullOr (enum ["NFC5" "nano"]);
|
||||
type = nullOr (enum [
|
||||
"NFC5"
|
||||
"nano"
|
||||
]);
|
||||
default = null;
|
||||
description = "A list of device models to enable Yubikey support for";
|
||||
};
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
{lib, ...}: let
|
||||
{ lib, ... }:
|
||||
let
|
||||
inherit (lib.types) str enum;
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.system.programs = {
|
||||
editors = {
|
||||
helix.enable = mkEnableOption "Helix text editor";
|
||||
|
@ -27,23 +29,42 @@ in {
|
|||
};
|
||||
default = {
|
||||
terminal = mkOption {
|
||||
type = enum ["foot" "kitty"];
|
||||
type = enum [
|
||||
"foot"
|
||||
"kitty"
|
||||
];
|
||||
default = "foot";
|
||||
};
|
||||
fileManager = mkOption {
|
||||
type = enum ["thunar" "dolphin" "nemo"];
|
||||
type = enum [
|
||||
"thunar"
|
||||
"dolphin"
|
||||
"nemo"
|
||||
];
|
||||
default = "thunar";
|
||||
};
|
||||
browser = mkOption {
|
||||
type = enum ["firefox" "librewolf" "chromium"];
|
||||
type = enum [
|
||||
"firefox"
|
||||
"librewolf"
|
||||
"chromium"
|
||||
];
|
||||
default = "firefox";
|
||||
};
|
||||
editor = mkOption {
|
||||
type = enum ["neovim" "helix" "emacs"];
|
||||
type = enum [
|
||||
"neovim"
|
||||
"helix"
|
||||
"emacs"
|
||||
];
|
||||
default = "emacs";
|
||||
};
|
||||
launcher = mkOption {
|
||||
type = enum ["anyrun" "rofi" "wofi"];
|
||||
type = enum [
|
||||
"anyrun"
|
||||
"rofi"
|
||||
"wofi"
|
||||
];
|
||||
default = "anyrun";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{pkgs, ...}: let
|
||||
key =
|
||||
pkgs.writeText "signingkey" "ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAAWEDj/Yib6Mqs016jx7rtecWpytwfVl28eoHtPYCM9TVLq81VIHJSN37lbkc/JjiXCdIJy2Ta3A3CVV5k3Z37NbgAu23oKA2OcHQNaRTLtqWlcBf9fk9suOkP1A3NzAqzivFpBnZm3ytaXwU8LBJqxOtNqZcFVruO6fZxJtg2uE34mAw==";
|
||||
in {
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
key = pkgs.writeText "signingkey" "ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAAWEDj/Yib6Mqs016jx7rtecWpytwfVl28eoHtPYCM9TVLq81VIHJSN37lbkc/JjiXCdIJy2Ta3A3CVV5k3Z37NbgAu23oKA2OcHQNaRTLtqWlcBf9fk9suOkP1A3NzAqzivFpBnZm3ytaXwU8LBJqxOtNqZcFVruO6fZxJtg2uE34mAw==";
|
||||
in
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
lfs.enable = true;
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
{lib, ...}: let
|
||||
{ lib, ... }:
|
||||
let
|
||||
inherit (lib.options) mkOption;
|
||||
inherit (lib.types) str;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.other.system = {
|
||||
username = mkOption {
|
||||
description = "username for this system";
|
||||
|
|
|
@ -4,14 +4,16 @@
|
|||
pkgs,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (builtins) elemAt;
|
||||
inherit (lib.options) mkOption;
|
||||
inherit (lib.types) listOf str package;
|
||||
inherit (config.meta.mainUser) username;
|
||||
|
||||
nushell = pkgs.callPackage (self + "/packages/nushell") { };
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.meta = {
|
||||
users = mkOption {
|
||||
type = listOf str;
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (config.meta.mainUser) username;
|
||||
|
||||
primary_browser = "Librewolf.desktop";
|
||||
|
@ -13,7 +14,8 @@
|
|||
text_editor = "helix.desktop";
|
||||
terminal = "foot.desktop";
|
||||
pdf_viewer = "zathura.desktop";
|
||||
in {
|
||||
in
|
||||
{
|
||||
environment = {
|
||||
systemPackages = [ pkgs.xdg-utils ];
|
||||
variables = {
|
||||
|
|
13
modules/packages/packages.mod.nix
Normal file
13
modules/packages/packages.mod.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
pkgs,
|
||||
sources,
|
||||
...
|
||||
}:
|
||||
let
|
||||
nixfmt = pkgs.callPackage "${sources.nixfmt}/default.nix" { };
|
||||
in
|
||||
{
|
||||
environment.systemPackages = [
|
||||
nixfmt
|
||||
];
|
||||
}
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.meta) getExe;
|
||||
|
||||
toml = pkgs.formats.toml { };
|
||||
|
@ -14,11 +15,20 @@
|
|||
};
|
||||
|
||||
ui = {
|
||||
pager = ["${getExe pkgs.bat}" "--plain"];
|
||||
pager = [
|
||||
"${getExe pkgs.bat}"
|
||||
"--plain"
|
||||
];
|
||||
default-command = "log";
|
||||
movement.edit = true;
|
||||
|
||||
diff.tool = ["${getExe pkgs.difftastic}" "--color" "always" "$left" "$right"];
|
||||
diff.tool = [
|
||||
"${getExe pkgs.difftastic}"
|
||||
"--color"
|
||||
"always"
|
||||
"$left"
|
||||
"$right"
|
||||
];
|
||||
};
|
||||
# FIXME: do this with agenix
|
||||
# "--scope" = [
|
||||
|
@ -44,26 +54,52 @@
|
|||
signing = {
|
||||
behaviour = "own";
|
||||
backend = "ssh";
|
||||
key = ["ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAAWEDj/Yib6Mqs016jx7rtecWpytwfVl28eoHtPYCM9TVLq81VIHJSN37lbkc/JjiXCdIJy2Ta3A3CVV5k3Z37NbgAu23oKA2OcHQNaRTLtqWlcBf9fk9suOkP1A3NzAqzivFpBnZm3ytaXwU8LBJqxOtNqZcFVruO6fZxJtg2uE34mAw=="];
|
||||
key = [
|
||||
"ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAAWEDj/Yib6Mqs016jx7rtecWpytwfVl28eoHtPYCM9TVLq81VIHJSN37lbkc/JjiXCdIJy2Ta3A3CVV5k3Z37NbgAu23oKA2OcHQNaRTLtqWlcBf9fk9suOkP1A3NzAqzivFpBnZm3ytaXwU8LBJqxOtNqZcFVruO6fZxJtg2uE34mAw=="
|
||||
];
|
||||
};
|
||||
|
||||
aliases = {
|
||||
c = [ "commit" ];
|
||||
ci = ["commit" "--interactive"];
|
||||
ci = [
|
||||
"commit"
|
||||
"--interactive"
|
||||
];
|
||||
|
||||
e = [ "edit" ];
|
||||
|
||||
# "new bookmark"
|
||||
nb = ["bookmark" "create" "-r @-"];
|
||||
nb = [
|
||||
"bookmark"
|
||||
"create"
|
||||
"-r @-"
|
||||
];
|
||||
|
||||
pull = ["git" "fetch"];
|
||||
push = ["git" "push" "--allow-new"];
|
||||
pull = [
|
||||
"git"
|
||||
"fetch"
|
||||
];
|
||||
push = [
|
||||
"git"
|
||||
"push"
|
||||
"--allow-new"
|
||||
];
|
||||
|
||||
r = [ "rebase" ];
|
||||
s = [ "squash" ];
|
||||
si = ["squash" "--interactive"];
|
||||
si = [
|
||||
"squash"
|
||||
"--interactive"
|
||||
];
|
||||
|
||||
tug = ["bookmark" "move" "--from" "closest_bookmark(@-)" "--to" "@-"];
|
||||
tug = [
|
||||
"bookmark"
|
||||
"move"
|
||||
"--from"
|
||||
"closest_bookmark(@-)"
|
||||
"--to"
|
||||
"@-"
|
||||
];
|
||||
};
|
||||
revset-aliases = {
|
||||
"closest_bookmark(to)" = "heads(::to & bookmarks())";
|
||||
|
@ -97,6 +133,7 @@
|
|||
|
||||
'';
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
# environment.systemPackages = [jj-wrapped];
|
||||
}
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
pkgs,
|
||||
sources,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.modules.programs.nh;
|
||||
inherit (config.modules.other.system) username;
|
||||
inherit (lib.modules) mkIf;
|
||||
|
@ -12,7 +13,8 @@
|
|||
nh = (pkgs.callPackage "${sources.nh}/package.nix" { }).overrideAttrs (_: {
|
||||
doInstallCheck = false;
|
||||
});
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.programs.nh.enable = mkEnableOption "nh";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (config.modules.system) isGraphical;
|
||||
inherit (lib.modules) mkIf;
|
||||
|
||||
|
@ -16,12 +17,12 @@
|
|||
BITWARDEN_SSH_AUTH_SOCK /run/user/1000/ssh-agent.sock
|
||||
'';
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
config = mkIf isGraphical {
|
||||
environment = {
|
||||
systemPackages = lib.attrValues {
|
||||
inherit
|
||||
(pkgs)
|
||||
inherit (pkgs)
|
||||
bitwarden-cli
|
||||
;
|
||||
inherit bitwarden-desktop-wrapped;
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.lists) map;
|
||||
inherit (lib.strings) concatStringsSep;
|
||||
|
||||
|
@ -20,16 +21,15 @@
|
|||
brave-wrapped = pkgs.symlinkJoin {
|
||||
name = "brave";
|
||||
paths = [
|
||||
(
|
||||
pkgs.brave.override {vulkanSupport = true;}
|
||||
)
|
||||
(pkgs.brave.override { vulkanSupport = true; })
|
||||
];
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/brave --append-flags "${flags}"
|
||||
'';
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
environment.systemPackages = [
|
||||
brave-wrapped
|
||||
];
|
||||
|
|
|
@ -3,10 +3,12 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (config.modules.system) isGraphical;
|
||||
in {
|
||||
in
|
||||
{
|
||||
config = mkIf isGraphical {
|
||||
environment.systemPackages = with pkgs; [
|
||||
kdePackages.dolphin
|
||||
|
|
|
@ -3,14 +3,16 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
|
||||
inherit (config.meta.mainUser) username;
|
||||
cfg = config.modules.system.programs.terminals.foot;
|
||||
theme-colors = config.modules.style.colorScheme.colors;
|
||||
|
||||
foot-config = pkgs.writeText "foot.ini" (lib.generators.toINI {} {
|
||||
foot-config = pkgs.writeText "foot.ini" (
|
||||
lib.generators.toINI { } {
|
||||
main = {
|
||||
term = "xterm-256color";
|
||||
app-id = "foot";
|
||||
|
@ -123,7 +125,8 @@
|
|||
|
||||
alpha = 0.9;
|
||||
};
|
||||
});
|
||||
}
|
||||
);
|
||||
foot-wrapped = pkgs.symlinkJoin {
|
||||
name = "foot-wrapped";
|
||||
paths = [ pkgs.foot ];
|
||||
|
@ -132,7 +135,8 @@
|
|||
wrapProgram $out/bin/foot --add-flags "--config=${foot-config} --working-directory=/home/${username}"
|
||||
'';
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ foot-wrapped ];
|
||||
};
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.lists) elem;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.attrsets) mapAttrsToList;
|
||||
|
@ -15,9 +16,16 @@
|
|||
# Shell integration for ghostty only supports
|
||||
# bash, fish and zsh for now.
|
||||
shell-integration =
|
||||
if elem name ["bash" "fish" "zsh"]
|
||||
then name
|
||||
else "none";
|
||||
if
|
||||
elem name [
|
||||
"bash"
|
||||
"fish"
|
||||
"zsh"
|
||||
]
|
||||
then
|
||||
name
|
||||
else
|
||||
"none";
|
||||
|
||||
ghostty-settings = {
|
||||
font-size = 14;
|
||||
|
@ -53,7 +61,10 @@
|
|||
command = getExe package;
|
||||
};
|
||||
|
||||
settingsFile = pkgs.writeText "config" <| concatStringsSep "\n" <| mapAttrsToList (name: value: "${name} = ${toString value}") ghostty-settings;
|
||||
settingsFile =
|
||||
pkgs.writeText "config"
|
||||
<| concatStringsSep "\n"
|
||||
<| mapAttrsToList (name: value: "${name} = ${toString value}") ghostty-settings;
|
||||
|
||||
ghostty-wrapped = pkgs.symlinkJoin {
|
||||
name = "ghostty-wrapped";
|
||||
|
@ -63,7 +74,8 @@
|
|||
wrapProgram $out/bin/ghostty --add-flags "--config-file=${settingsFile}"
|
||||
'';
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
environment.systemPackages = builtins.attrValues {
|
||||
inherit ghostty-wrapped;
|
||||
};
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.modules) mkIf;
|
||||
|
||||
cfg = config.modules.programs.minecraft;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.programs.minecraft = {
|
||||
enable = mkEnableOption "minecraft";
|
||||
wayland = mkEnableOption "wayland";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
environment.systemPackages =
|
||||
[
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = [
|
||||
pkgs.spotify
|
||||
]
|
||||
++ (with pkgs; [
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
|
||||
cfg = config.modules.system.programs.steam;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.system.programs.steam.enable = mkEnableOption "Steam games platform";
|
||||
config = mkIf cfg.enable {
|
||||
programs.steam = {
|
||||
|
@ -19,7 +21,8 @@ in {
|
|||
SDL_VIDEODRIVER = "x11";
|
||||
};
|
||||
|
||||
extraLibraries = p:
|
||||
extraLibraries =
|
||||
p:
|
||||
builtins.attrValues {
|
||||
inherit (p) atk;
|
||||
};
|
||||
|
|
|
@ -3,18 +3,19 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
cfg = config.modules.programs.thunar;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.programs.thunar.enable = mkEnableOption "Thunar file manager";
|
||||
config = mkIf cfg.enable {
|
||||
programs.thunar = {
|
||||
enable = true;
|
||||
plugins = builtins.attrValues {
|
||||
inherit
|
||||
(pkgs.xfce)
|
||||
inherit (pkgs.xfce)
|
||||
thunar-volman
|
||||
thunar-vcs-plugin
|
||||
thunar-archive-plugin
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
config = {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs = {
|
||||
# We have to disable this and use nix-index instead. (Rust >>> Pearl)
|
||||
command-not-found = {
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.modules) mkIf;
|
||||
|
||||
|
@ -39,7 +40,8 @@
|
|||
wrapProgram $out/bin/btop --set XDG_CONFIG_HOME "${btop-settings}"
|
||||
'';
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.programs.btop.enable = mkEnableOption "btop";
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ btop-wrapped ];
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{pkgs, ...}: let
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
zellij-wrapped = pkgs.symlinkJoin {
|
||||
name = "zellij-wrapped";
|
||||
paths = [ pkgs.zellij ];
|
||||
|
@ -8,7 +9,8 @@
|
|||
--config ${./config.kdl}"
|
||||
'';
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
environment.systemPackages = builtins.attrValues {
|
||||
inherit zellij-wrapped;
|
||||
};
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
mkAcmeCert = domain: {
|
||||
# An acme system user is created. This user belongs to the acme group
|
||||
# and the home directory is /var/lib/acme. This user will try to make the directory
|
||||
|
@ -15,7 +16,8 @@
|
|||
email = "charlie@charlieroot.dev";
|
||||
group = "nginx";
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults = {
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (pkgs) fetchurl;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
|
@ -16,7 +17,8 @@
|
|||
img = ./img;
|
||||
dataDir = "/srv/data/forgejo";
|
||||
dumpDir = "/srv/data/forgejo-dump";
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.system.services.forgejo.enable = mkEnableOption "forgejo";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -113,7 +115,8 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = let
|
||||
systemd.tmpfiles.rules =
|
||||
let
|
||||
# no crawlers, thank you.
|
||||
robots = pkgs.writeText "robots-txt" ''
|
||||
User-agent: *
|
||||
|
@ -131,7 +134,8 @@ in {
|
|||
url = "https://codeberg.org/Codeberg-Infrastructure/forgejo/raw/branch/codeberg-10/web_src/css/themes/theme-codeberg-dark.css";
|
||||
hash = "sha256-KyXznH49koRGlzIDDqagN4PvFGD/zCX//wrctmtfgBs=";
|
||||
};
|
||||
in [
|
||||
in
|
||||
[
|
||||
"d '${customDir}/public' 0750 ${user} ${group} - -"
|
||||
"d '${customDir}/public/assets' 0750 ${user} ${group} - -"
|
||||
"d '${customDir}/public/assets/img' 0750 ${user} ${group} - -"
|
||||
|
|
|
@ -7,49 +7,10 @@
|
|||
<h1 class="ui icon header title">
|
||||
{{AppDisplayName}}
|
||||
</h1>
|
||||
<h2>A very painful Git service</h2>
|
||||
<h2>{{ctx.Locale.Tr "startpage.app_desc"}}</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui stackable middle very relaxed page grid">
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header stackable">
|
||||
<img class="logo" width="100" height="100" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}">
|
||||
<p>Made with copious amounts of caffeeine</p>
|
||||
</h1>
|
||||
<p class="large">
|
||||
<b>TODO</b>: Write some funny text here
|
||||
</p>
|
||||
</div>
|
||||
<div class="eight wide center column stackable">
|
||||
<h1 class="hero ui icon header">
|
||||
<img class="logo" width="100" height="100" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}">
|
||||
<p><it>I hate it here</it></p>
|
||||
</h1>
|
||||
<p class="large">
|
||||
Bottom text
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui stackable middle very relaxed page grid">
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header stackable">
|
||||
<img class="logo" width="100" height="100" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}">
|
||||
<p>Is this the real life?</p>
|
||||
</h1>
|
||||
<p class="large">
|
||||
Something something fuck poettering
|
||||
</p>
|
||||
</div>
|
||||
<div class="eight wide center column stackable">
|
||||
<h1 class="hero ui icon header">
|
||||
<img class="logo" width="100" height="100" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}">
|
||||
<p>Open source or something</p>
|
||||
</h1>
|
||||
<p class="large">
|
||||
I forgor
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{{template "home_forgejo" .}}
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
|
|
36
modules/services/forgejo/templates/home_forgejo.tmpl
Normal file
36
modules/services/forgejo/templates/home_forgejo.tmpl
Normal file
|
@ -0,0 +1,36 @@
|
|||
<div class="ui stackable middle very relaxed page grid">
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
{{svg "octicon-flame"}} {{ctx.Locale.Tr "startpage.install"}}
|
||||
</h1>
|
||||
<p class="large">
|
||||
{{ctx.Locale.Tr "startpage.install_desc" "https://forgejo.org/download/#installation-from-binary" "https://forgejo.org/download/#container-image" "https://forgejo.org/download"}}
|
||||
</p>
|
||||
</div>
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
{{svg "octicon-device-desktop"}} {{ctx.Locale.Tr "startpage.platform"}}
|
||||
</h1>
|
||||
<p class="large">
|
||||
{{ctx.Locale.Tr "startpage.platform_desc"}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui stackable middle very relaxed page grid">
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
{{svg "octicon-rocket"}} {{ctx.Locale.Tr "startpage.lightweight"}}
|
||||
</h1>
|
||||
<p class="large">
|
||||
{{ctx.Locale.Tr "startpage.lightweight_desc"}}
|
||||
</p>
|
||||
</div>
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
{{svg "octicon-code"}} {{ctx.Locale.Tr "startpage.license"}}
|
||||
</h1>
|
||||
<p class="large">
|
||||
{{ctx.Locale.Tr "startpage.license_desc" "https://forgejo.org/download" "https://codeberg.org/forgejo/forgejo"}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (builtins) fetchurl;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
|
@ -11,7 +12,8 @@
|
|||
cfg = config.modules.system.services.grafana;
|
||||
domain = "info.copeberg.org";
|
||||
port = 4021;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.system.services.grafana.enable = mkEnableOption "Grafana, a graphing service";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.meta) getExe getExe';
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
|
@ -12,7 +13,8 @@
|
|||
inherit (config.meta.mainUser) username;
|
||||
cfg = config.modules.services.greetd;
|
||||
uwsmEnabled = config.modules.services.uwsm.enable;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.services.greetd = {
|
||||
enable = mkEnableOption "greetd";
|
||||
greeter = mkOption {
|
||||
|
@ -27,14 +29,13 @@ in {
|
|||
description = "Which login session to start";
|
||||
type = str;
|
||||
default =
|
||||
if uwsmEnabled
|
||||
then "${getExe config.programs.uwsm.package} start Hyprland"
|
||||
else "Hyprland";
|
||||
if uwsmEnabled then "${getExe config.programs.uwsm.package} start Hyprland" else "Hyprland";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.greetd = let
|
||||
services.greetd =
|
||||
let
|
||||
session = {
|
||||
# command = ''
|
||||
# ${pkgs.greetd.tuigreet}/bin/tuigreet \
|
||||
|
@ -46,7 +47,8 @@ in {
|
|||
command = "${getExe config.programs.uwsm.package} start hyprland-uwsm.desktop";
|
||||
user = username;
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
package = pkgs.greetd;
|
||||
vt = 7;
|
||||
|
|
|
@ -2,12 +2,14 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
|
||||
cfg = config.modules.services.kanata;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.services.kanata.enable = mkEnableOption "kanata";
|
||||
config = mkIf cfg.enable {
|
||||
services.kanata = {
|
||||
|
|
|
@ -3,11 +3,13 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.modules.services.locate;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.services.locate.enable = mkEnableOption "Locate service";
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ pkgs.plocate ];
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{pkgs, ...}: let
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
mako-wrapped = pkgs.symlinkJoin {
|
||||
name = "mako-wrapped";
|
||||
paths = [ pkgs.mako ];
|
||||
|
@ -12,6 +13,7 @@
|
|||
--default-timeout 4000"
|
||||
'';
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
environment.systemPackages = [ mako-wrapped ];
|
||||
}
|
||||
|
|
|
@ -3,14 +3,16 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
|
||||
cfg = config.modules.system.services.loki;
|
||||
port = 4026;
|
||||
dataDir = "/srv/data/loki";
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.system.services.loki.enable = mkEnableOption "Grafana, a graphing service";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
|
|
@ -3,13 +3,15 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.modules.services.media.mpd;
|
||||
inherit (config.meta.mainUser) username;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.types) str;
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.services = {
|
||||
media = {
|
||||
mpd = {
|
||||
|
|
|
@ -3,11 +3,13 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.modules) mkIf mkDefault;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
cfg = config.modules.system.services.nginx;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.system.services.nginx.enable = mkEnableOption "nginx";
|
||||
config = mkIf cfg.enable {
|
||||
security = {
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.meta) getExe';
|
||||
inherit (lib.modules) mkIf;
|
||||
|
||||
cfg = config.modules.system.services.owncloud;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.system.services.owncloud.enable = lib.mkEnableOption "owncloud";
|
||||
|
||||
config = {
|
||||
|
|
|
@ -2,10 +2,12 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.modules.system.sound;
|
||||
inherit (lib.modules) mkIf;
|
||||
in {
|
||||
in
|
||||
{
|
||||
config = mkIf cfg.enable {
|
||||
services.pulseaudio.enable = false;
|
||||
services.pipewire = {
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
|
||||
cfg = config.modules.system.services.database.postgresql;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.system.services.database.postgresql.enable = mkEnableOption "postgresql";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
|
|
@ -2,9 +2,11 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.services.cups.enable = mkEnableOption "CUPS, the Common UNIX printing system";
|
||||
|
||||
config = {
|
||||
|
|
|
@ -3,13 +3,15 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
|
||||
cfg = config.modules.system.services.prometheus;
|
||||
port = 4022;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.system.services.prometheus.enable = mkEnableOption "Grafana, a graphing service";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -22,7 +24,10 @@ in {
|
|||
node = {
|
||||
enable = true;
|
||||
port = 4023;
|
||||
enabledCollectors = ["systemd" "processes"];
|
||||
enabledCollectors = [
|
||||
"systemd"
|
||||
"processes"
|
||||
];
|
||||
};
|
||||
|
||||
postgres = {
|
||||
|
@ -44,17 +49,23 @@ in {
|
|||
{
|
||||
job_name = "node";
|
||||
scrape_interval = "30s";
|
||||
static_configs = [{targets = ["localhost:${toString config.services.prometheus.exporters.node.port}"];}];
|
||||
static_configs = [
|
||||
{ targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; }
|
||||
];
|
||||
}
|
||||
{
|
||||
job_name = "postgres";
|
||||
scrape_interval = "30s";
|
||||
static_configs = [{targets = ["localhost:${toString config.services.prometheus.exporters.postgres.port}"];}];
|
||||
static_configs = [
|
||||
{ targets = [ "localhost:${toString config.services.prometheus.exporters.postgres.port}" ]; }
|
||||
];
|
||||
}
|
||||
{
|
||||
job_name = "nginx";
|
||||
scrape_interval = "30s";
|
||||
static_configs = [{targets = ["localhost:${toString config.services.prometheus.exporters.nginx.port}"];}];
|
||||
static_configs = [
|
||||
{ targets = [ "localhost:${toString config.services.prometheus.exporters.nginx.port}" ]; }
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
|
|
@ -2,15 +2,17 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (config.modules.system) isGraphical;
|
||||
in {
|
||||
in
|
||||
{
|
||||
# TODO: setup
|
||||
services.spotifyd = mkIf isGraphical {
|
||||
enable = true;
|
||||
settings = {
|
||||
backend = "pipe";
|
||||
# backend = "pipe";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{lib, ...}: let
|
||||
{ lib, ... }:
|
||||
let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.programs.ssh.enable = mkEnableOption "ssh";
|
||||
config = {
|
||||
services.openssh = {
|
||||
|
|
|
@ -3,14 +3,16 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
|
||||
domain = "charlieroot.dev";
|
||||
|
||||
cfg = config.modules.system.services.stalwart;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.system.services.stalwart.enable = mkEnableOption "stalwart";
|
||||
config = mkIf cfg.enable {
|
||||
# create the stallwart user
|
||||
|
|
|
@ -3,18 +3,23 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (config.meta.mainUser) username;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
cfg = config.modules.services.usbguard;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.services.usbguard.enable = mkEnableOption "usbguard";
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ pkgs.usbguard ];
|
||||
services.usbguard = {
|
||||
enable = true;
|
||||
IPCAllowedUsers = ["root" "${username}"];
|
||||
IPCAllowedUsers = [
|
||||
"root"
|
||||
"${username}"
|
||||
];
|
||||
presentDevicePolicy = "allow";
|
||||
rules = ''
|
||||
allow with-interface equals { 08:*:* }
|
||||
|
|
|
@ -3,11 +3,13 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.modules.services.uwsm;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.services.uwsm.enable = mkEnableOption "uwsm";
|
||||
config = mkIf cfg.enable {
|
||||
programs.uwsm = {
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.meta) getExe;
|
||||
|
||||
custom-wayneko = pkgs.wayneko.overrideAttrs {
|
||||
|
@ -16,7 +17,8 @@
|
|||
|
||||
hash = "";
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
systemd.user.services.wayneko = {
|
||||
description = "Wayneko, as a systemd service";
|
||||
|
||||
|
|
|
@ -9,10 +9,24 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.options) mkOption literalExpression;
|
||||
inherit (lib.strings) toLower replaceStrings removePrefix hasPrefix isString;
|
||||
inherit (lib.types) str nullOr enum mkOptionType attrsOf coercedTo;
|
||||
inherit (lib.strings)
|
||||
toLower
|
||||
replaceStrings
|
||||
removePrefix
|
||||
hasPrefix
|
||||
isString
|
||||
;
|
||||
inherit (lib.types)
|
||||
str
|
||||
nullOr
|
||||
enum
|
||||
mkOptionType
|
||||
attrsOf
|
||||
coercedTo
|
||||
;
|
||||
|
||||
cfg = config.modules.style;
|
||||
|
||||
|
@ -25,15 +39,23 @@
|
|||
colorType = attrsOf (coercedTo str (removePrefix "#") hexColorType);
|
||||
|
||||
nameToSlug = name: toLower (replaceStrings [ " " ] [ "-" ] name);
|
||||
getPaletteFromScheme = slug:
|
||||
if builtins.pathExists ./palettes/${slug}.nix
|
||||
then (import ./palettes/${slug}.nix).colorscheme.palette
|
||||
else throw "The following colorscheme was imported but not found: ${slug}";
|
||||
in {
|
||||
getPaletteFromScheme =
|
||||
slug:
|
||||
if builtins.pathExists ./palettes/${slug}.nix then
|
||||
(import ./palettes/${slug}.nix).colorscheme.palette
|
||||
else
|
||||
throw "The following colorscheme was imported but not found: ${slug}";
|
||||
in
|
||||
{
|
||||
options.modules.style = {
|
||||
colorScheme = {
|
||||
name = mkOption {
|
||||
type = nullOr (enum ["Catppuccin Mocha" "Zenburn" "Black Metal Venom" "Gruvbox"]);
|
||||
type = nullOr (enum [
|
||||
"Catppuccin Mocha"
|
||||
"Zenburn"
|
||||
"Black Metal Venom"
|
||||
"Gruvbox"
|
||||
]);
|
||||
description = "The colorscheme that should be used globally to theme your system.";
|
||||
default = "Catppuccin Mocha";
|
||||
};
|
||||
|
@ -83,11 +105,11 @@ in {
|
|||
};
|
||||
|
||||
variant = mkOption {
|
||||
type = enum ["dark" "light"];
|
||||
default =
|
||||
if builtins.substring 0 1 cfg.colorScheme.colors.base00 < "5"
|
||||
then "dark"
|
||||
else "light";
|
||||
type = enum [
|
||||
"dark"
|
||||
"light"
|
||||
];
|
||||
default = if builtins.substring 0 1 cfg.colorScheme.colors.base00 < "5" then "dark" else "light";
|
||||
description = ''
|
||||
Whether the scheme is dark or light
|
||||
'';
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{pkgs, ...}: let
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
inherit (builtins) mapAttrs;
|
||||
|
||||
fancy-iosevka = pkgs.iosevka.override {
|
||||
|
@ -40,7 +41,8 @@
|
|||
};
|
||||
set = "Fancy";
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
# A (somewhat) sane list of fonts to be installed.
|
||||
fonts = {
|
||||
fontconfig = {
|
||||
|
@ -58,7 +60,8 @@ in {
|
|||
|
||||
# Set the defalt fonts. This was taken from raf,
|
||||
# many thanks.
|
||||
defaultFonts = let
|
||||
defaultFonts =
|
||||
let
|
||||
common = [
|
||||
"Iosevka Nerd Font"
|
||||
"Roboto Mono Nerd Font"
|
||||
|
@ -76,8 +79,7 @@ in {
|
|||
};
|
||||
};
|
||||
packages = builtins.attrValues {
|
||||
inherit
|
||||
(pkgs)
|
||||
inherit (pkgs)
|
||||
material-icons
|
||||
material-design-icons
|
||||
lexend
|
||||
|
@ -88,8 +90,7 @@ in {
|
|||
corefonts
|
||||
font-awesome
|
||||
;
|
||||
inherit
|
||||
(pkgs.nerd-fonts)
|
||||
inherit (pkgs.nerd-fonts)
|
||||
iosevka
|
||||
jetbrains-mono
|
||||
comic-shanns-mono
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# blatantly stolen from sioodmy, thanks :3
|
||||
{ colors }:
|
||||
with colors; ''
|
||||
with colors;
|
||||
''
|
||||
@define-color accent_color #${base0D};
|
||||
@define-color accent_bg_color #${base0D};
|
||||
@define-color accent_fg_color #${base00};
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (builtins) toString isBool;
|
||||
inherit (lib.generators) toINI;
|
||||
inherit (lib.modules) mkIf;
|
||||
|
@ -15,12 +16,12 @@
|
|||
cfg = config.modules.theming.gtk;
|
||||
|
||||
toGtk3Ini = toINI {
|
||||
mkKeyValue = key: value: let
|
||||
value' =
|
||||
if isBool value
|
||||
then boolToString value
|
||||
else toString value;
|
||||
in "${escape ["="] key}=${value'}";
|
||||
mkKeyValue =
|
||||
key: value:
|
||||
let
|
||||
value' = if isBool value then boolToString value else toString value;
|
||||
in
|
||||
"${escape [ "=" ] key}=${value'}";
|
||||
};
|
||||
|
||||
gtkIni = {
|
||||
|
@ -34,7 +35,8 @@
|
|||
gtk-cursor-theme-name = "BreezeX-RosePine-Linux";
|
||||
gtk-theme-name = "Gruvbox-Dark";
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.theming.gtk = {
|
||||
enable = mkEnableOption "Wether to enable GTK theming";
|
||||
theme = {
|
||||
|
@ -63,15 +65,15 @@ in {
|
|||
};
|
||||
};
|
||||
};
|
||||
config = let
|
||||
config =
|
||||
let
|
||||
cursorSize = 32;
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
programs.dconf.enable = true;
|
||||
environment = {
|
||||
systemPackages = builtins.attrValues {
|
||||
inherit
|
||||
(pkgs)
|
||||
inherit (pkgs)
|
||||
rose-pine-cursor
|
||||
gruvbox-gtk-theme
|
||||
papirus-icon-theme
|
||||
|
@ -83,9 +85,11 @@ in {
|
|||
XCURSOR_THEME = "BreezeX-RosePine-Linux";
|
||||
XCURSOR_SIZE = cursorSize;
|
||||
};
|
||||
etc = let
|
||||
etc =
|
||||
let
|
||||
css = import ./gtk-colors.nix { inherit (config.modules.style.colorScheme) colors; };
|
||||
in {
|
||||
in
|
||||
{
|
||||
"xdg/gtk-4.0/settings.ini".text = toGtk3Ini {
|
||||
Settings = gtkIni;
|
||||
};
|
||||
|
|
|
@ -3,13 +3,15 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.types) str package;
|
||||
|
||||
cfg = config.modules.theming.qt;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.theming.qt = {
|
||||
enable = mkEnableOption "qt theming";
|
||||
name = mkOption {
|
||||
|
|
|
@ -4,12 +4,14 @@
|
|||
pkgs,
|
||||
sources,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
|
||||
cfg = config.modules.theming.quickshell;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.theming.quickshell.enable = mkEnableOption "quickshell";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
|
|
@ -1 +1 @@
|
|||
/run/user/1000/quickshell/vfs/97b86fe3cbb42714790f5e96b44b706b/.qmlls.ini
|
||||
/run/user/1000/quickshell/vfs/4f7a8066a49ba487f5b2754750896151/.qmlls.ini
|
|
@ -3,13 +3,15 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.modules) mkForce mkDefault;
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.types) int;
|
||||
|
||||
cfg = config.modules.system.boot;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.system.boot = {
|
||||
grub.enable = mkEnableOption "Grub, a bloated boot loader";
|
||||
systemd-boot.enable = mkEnableOption "Poetteringboot";
|
||||
|
@ -29,7 +31,8 @@ in {
|
|||
message = "No bootloader is enabled.";
|
||||
}
|
||||
{
|
||||
assertion = cfg.systemd-boot.enable -> !cfg.grub.enable && cfg.grub.enable -> !cfg.systemd-boot.enable;
|
||||
assertion =
|
||||
cfg.systemd-boot.enable -> !cfg.grub.enable && cfg.grub.enable -> !cfg.systemd-boot.enable;
|
||||
message = "Please enable only ONE of systemd-boot or grub.";
|
||||
}
|
||||
];
|
||||
|
@ -73,8 +76,7 @@ in {
|
|||
plymouth = {
|
||||
enable = true;
|
||||
themePackages = [
|
||||
(pkgs.adi1090x-plymouth-themes.override
|
||||
{
|
||||
(pkgs.adi1090x-plymouth-themes.override {
|
||||
selected_themes = [
|
||||
"hud_3"
|
||||
];
|
||||
|
|
|
@ -4,12 +4,14 @@
|
|||
pkgs,
|
||||
sources,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
|
||||
cfg = config.modules.system.boot.lanzaboote;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.system.boot.lanzaboote.enable = mkEnableOption "Lanzaboote";
|
||||
imports = [
|
||||
(sources.lanzaboote + "/nix/modules/lanzaboote.nix")
|
||||
|
|
|
@ -3,19 +3,20 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
|
||||
cfg = config.modules.system.hardware.bluetooth;
|
||||
in {
|
||||
in
|
||||
{
|
||||
config = mkIf cfg.enable {
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
inherit (cfg) powerOnBoot;
|
||||
};
|
||||
environment.systemPackages = builtins.attrValues {
|
||||
inherit
|
||||
(pkgs)
|
||||
inherit (pkgs)
|
||||
bluetuith
|
||||
bluez
|
||||
blueman
|
||||
|
|
|
@ -2,12 +2,14 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
|
||||
cfg = config.modules.system.hardware;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.system.hardware = {
|
||||
nvidia = {
|
||||
enable = mkEnableOption "Nvidia graphics drivers";
|
||||
|
|
|
@ -3,19 +3,20 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.modules) mkDefault mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
|
||||
cfg = config.modules.system.hardware.intel;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.system.hardware.intel.enable = mkEnableOption "Intel Hardware";
|
||||
config = mkIf cfg.enable {
|
||||
hardware = {
|
||||
cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
|
||||
graphics.extraPackages = builtins.attrValues {
|
||||
inherit
|
||||
(pkgs)
|
||||
inherit (pkgs)
|
||||
intel-vaapi-driver
|
||||
intel-media-driver
|
||||
;
|
||||
|
|
|
@ -2,11 +2,13 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
|
||||
cfg = config.modules.system.sound;
|
||||
in {
|
||||
in
|
||||
{
|
||||
config = mkIf cfg.enable {
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
|
|
|
@ -4,16 +4,17 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.modules) mkDefault;
|
||||
in {
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
# (sources.watt + "/nix/module.nix")
|
||||
];
|
||||
config = {
|
||||
environment.systemPackages = builtins.attrValues {
|
||||
inherit
|
||||
(pkgs)
|
||||
inherit (pkgs)
|
||||
acpi
|
||||
powertop
|
||||
;
|
||||
|
|
|
@ -4,9 +4,12 @@
|
|||
pkgs,
|
||||
sources,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
determinate = (import sources.flake-compat { src = sources.determinate; }).outputs;
|
||||
dix = (import sources.flake-compat {src = determinate.inputs.nix;}).outputs.packages.${pkgs.stdenv.system}.nix;
|
||||
dix =
|
||||
(import sources.flake-compat { src = determinate.inputs.nix; })
|
||||
.outputs.packages.${pkgs.stdenv.system}.nix;
|
||||
|
||||
# Stronger than mkDefault (1000), weaker than mkForce (50) and the "default override priority"
|
||||
# (100).
|
||||
|
@ -14,7 +17,8 @@
|
|||
|
||||
# Stronger than the "default override priority", as the upstream module uses that, and weaker than mkForce (50).
|
||||
mkMorePreferable = lib.mkOverride 75;
|
||||
in {
|
||||
in
|
||||
{
|
||||
config = {
|
||||
nix = {
|
||||
package = dix;
|
||||
|
@ -30,7 +34,9 @@ in {
|
|||
services.nix-daemon.serviceConfig = {
|
||||
ExecStart = [
|
||||
""
|
||||
"@${determinate.packages.${pkgs.stdenv.system}.default}/bin/determinate-nixd determinate-nixd --nix-bin ${config.nix.package}/bin daemon"
|
||||
"@${
|
||||
determinate.packages.${pkgs.stdenv.system}.default
|
||||
}/bin/determinate-nixd determinate-nixd --nix-bin ${config.nix.package}/bin daemon"
|
||||
];
|
||||
KillMode = mkPreferable "process";
|
||||
LimitNOFILE = mkMorePreferable 1048576;
|
||||
|
@ -45,7 +51,10 @@ in {
|
|||
before = [ "multi-user.target" ];
|
||||
|
||||
unitConfig = {
|
||||
RequiresMountsFor = ["/nix/store" "/nix/var/determinate"];
|
||||
RequiresMountsFor = [
|
||||
"/nix/store"
|
||||
"/nix/var/determinate"
|
||||
];
|
||||
};
|
||||
|
||||
socketConfig = {
|
||||
|
|
|
@ -5,10 +5,12 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.attrsets) mapAttrsToList;
|
||||
inherit (lib.modules) mkForce;
|
||||
in {
|
||||
in
|
||||
{
|
||||
nix = {
|
||||
# Check that Nix can parse the generated nix.conf.
|
||||
checkConfig = true;
|
||||
|
@ -62,10 +64,18 @@ in {
|
|||
auto-optimise-store = true;
|
||||
|
||||
# Users that are allowed to connect to the Nix daemon.
|
||||
allowed-users = ["root" "@wheel" "nix-builder"];
|
||||
allowed-users = [
|
||||
"root"
|
||||
"@wheel"
|
||||
"nix-builder"
|
||||
];
|
||||
|
||||
# Users that are allowed to connect to the Nix daemon.
|
||||
trusted-users = ["root" "@wheel" "nix-builder"];
|
||||
trusted-users = [
|
||||
"root"
|
||||
"@wheel"
|
||||
"nix-builder"
|
||||
];
|
||||
|
||||
# Let the system decide the number of max jobs
|
||||
# based on available system specs. Usually this is
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# taken from raf
|
||||
{sources, ...}: {
|
||||
{ sources, ... }:
|
||||
{
|
||||
# Global nixpkgs configuration.
|
||||
# This is ignored if nixpkgs.pkgs is set, which should be avoided.
|
||||
nixpkgs = {
|
||||
|
|
|
@ -4,12 +4,14 @@
|
|||
lib,
|
||||
sources,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.modules) mkIf mkForce;
|
||||
inherit (builtins) map;
|
||||
|
||||
cfg = config.modules.system.impermanence;
|
||||
in {
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
(sources.impermanence + "/nixos.nix")
|
||||
];
|
||||
|
@ -41,20 +43,36 @@ in {
|
|||
];
|
||||
|
||||
users.cr = {
|
||||
directories =
|
||||
[
|
||||
directories = [
|
||||
"cloud"
|
||||
"repos"
|
||||
]
|
||||
++ map (
|
||||
dir: ".config/${dir}"
|
||||
) ["nicotine" "Signal" "Nextcloud" "emacs" "doom"]
|
||||
++ map (
|
||||
dir: ".cache/${dir}"
|
||||
) ["tealdeer" "keepassxc" "nix" "starship" "nix-index" "mozilla" "zsh" "nvim"]
|
||||
++ map (
|
||||
dir: ".local/share/${dir}"
|
||||
) ["direnv" "Steam" "TelegramDesktop" "PrismLauncher" "nicotine" "zoxide" ".keepass"];
|
||||
++ map (dir: ".config/${dir}") [
|
||||
"nicotine"
|
||||
"Signal"
|
||||
"Nextcloud"
|
||||
"emacs"
|
||||
"doom"
|
||||
]
|
||||
++ map (dir: ".cache/${dir}") [
|
||||
"tealdeer"
|
||||
"keepassxc"
|
||||
"nix"
|
||||
"starship"
|
||||
"nix-index"
|
||||
"mozilla"
|
||||
"zsh"
|
||||
"nvim"
|
||||
]
|
||||
++ map (dir: ".local/share/${dir}") [
|
||||
"direnv"
|
||||
"Steam"
|
||||
"TelegramDesktop"
|
||||
"PrismLauncher"
|
||||
"nicotine"
|
||||
"zoxide"
|
||||
".keepass"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -3,10 +3,12 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
StateDirectory = "dnscrypt-proxy";
|
||||
inherit (lib.modules) mkForce;
|
||||
in {
|
||||
in
|
||||
{
|
||||
networking = {
|
||||
networkmanager.dns = mkForce "none";
|
||||
nameservers = [
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
networking = {
|
||||
# use nftables over iptables
|
||||
nftables.enable = true;
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{config, ...}: let
|
||||
{ config, ... }:
|
||||
let
|
||||
inherit (config.modules.other.system) username;
|
||||
in {
|
||||
in
|
||||
{
|
||||
networking = {
|
||||
enableIPv6 = true;
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
security = {
|
||||
# Enable Soteria, a GTK-based Polkit authentication agent.
|
||||
soteria.enable = true;
|
||||
|
|
|
@ -2,9 +2,11 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.modules) mkForce mkDefault;
|
||||
in {
|
||||
in
|
||||
{
|
||||
security = {
|
||||
sudo-rs.enable = mkForce false;
|
||||
sudo = {
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{lib, ...}: let
|
||||
{ lib, ... }:
|
||||
let
|
||||
inherit (lib.modules) mkForce;
|
||||
in {
|
||||
in
|
||||
{
|
||||
config.systemd = {
|
||||
# faster startup
|
||||
targets.network-online.wantedBy = mkForce [ ]; # Normally ["multi-user.target"]
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{config, ...}: let
|
||||
{ config, ... }:
|
||||
let
|
||||
machine-id = builtins.substring 0 32 (builtins.hashString "sha256" config.networking.hostName);
|
||||
in {
|
||||
in
|
||||
{
|
||||
system = {
|
||||
# My state version.
|
||||
stateVersion = "23.11";
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.modules) mkForce mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (config.modules.system) isGraphical;
|
||||
|
@ -27,13 +28,11 @@
|
|||
})
|
||||
];
|
||||
});
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.desktops.niri.enable = mkEnableOption "Niri, a scolling tiling wayland compositor";
|
||||
|
||||
config =
|
||||
mkIf (cfg.enable
|
||||
|| isGraphical)
|
||||
{
|
||||
config = mkIf (cfg.enable || isGraphical) {
|
||||
programs.niri = {
|
||||
enable = true;
|
||||
package = patched-niri;
|
||||
|
@ -45,8 +44,7 @@ in {
|
|||
environment.etc."niri/config.kdl".source = ./config.kdl;
|
||||
|
||||
environment.systemPackages = builtins.attrValues {
|
||||
inherit
|
||||
(pkgs)
|
||||
inherit (pkgs)
|
||||
xwayland-satellite
|
||||
avizo
|
||||
playerctl
|
||||
|
|
|
@ -3,10 +3,12 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.lists) optional;
|
||||
in {
|
||||
in
|
||||
{
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
# Sets environment variable NIXOS_XDG_OPEN_USE_PORTAL to 1.
|
||||
|
|
|
@ -2,12 +2,14 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
|
||||
cfg = config.modules.wms.wayland;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.wms.wayland.enable = mkEnableOption "wayland";
|
||||
config = mkIf true {
|
||||
environment.variables = {
|
||||
|
|
|
@ -84,6 +84,22 @@
|
|||
"url": "https://github.com/nix-community/nh/archive/a90e3124111d9c3eb64e97a5334db09a8e2a4bae.tar.gz",
|
||||
"hash": "sha256-KKaUEg1/ntHVsG61CkKFr2mfdsoK9Nj5FM/W1PBhe5o="
|
||||
},
|
||||
"nixfmt": {
|
||||
"type": "GitRelease",
|
||||
"repository": {
|
||||
"type": "GitHub",
|
||||
"owner": "nixos",
|
||||
"repo": "nixfmt"
|
||||
},
|
||||
"pre_releases": false,
|
||||
"version_upper_bound": null,
|
||||
"release_prefix": null,
|
||||
"submodules": false,
|
||||
"version": "v1.0.0",
|
||||
"revision": "1f2589cb7198529c6c1eec9699eccd4d507d3600",
|
||||
"url": "https://api.github.com/repos/nixos/nixfmt/tarball/refs/tags/v1.0.0",
|
||||
"hash": "sha256-d8SYpFoCpi1GrqlKwxxq9qhyjDANeLgr8WWJNRK6wkc="
|
||||
},
|
||||
"nixpkgs": {
|
||||
"type": "Channel",
|
||||
"name": "nixpkgs-unstable",
|
||||
|
|
|
@ -1,12 +1,20 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
}: let
|
||||
sources,
|
||||
}:
|
||||
let
|
||||
inherit (pkgs) lib;
|
||||
helix = pkgs.callPackage ./helix { };
|
||||
kakoune = pkgs.callPackage ./kakoune.nix { };
|
||||
fish = pkgs.callPackage ./fish { inherit lib; };
|
||||
nushell = pkgs.callPackage ./nushell { };
|
||||
in {
|
||||
inherit kakoune fish helix nushell;
|
||||
in
|
||||
{
|
||||
inherit
|
||||
kakoune
|
||||
fish
|
||||
helix
|
||||
nushell
|
||||
;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{pkgs, ...}: let
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
inherit (pkgs.lib) getExe;
|
||||
in {
|
||||
in
|
||||
{
|
||||
ls = "${getExe pkgs.eza} --icons=never";
|
||||
la = "${getExe pkgs.eza} --icons=never -lha --git";
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue