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