Compare commits
16 Commits
6651d3e417
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 32dba1cfaa | |||
| 27da4a1f07 | |||
| bc575ee116 | |||
|
|
787e1020c0
|
||
| 91756e662e | |||
| 392392f937 | |||
| d425db9f19 | |||
| 075557a871 | |||
| 242ee062de | |||
| 7d0974ea92 | |||
| 0e8a37c000 | |||
| 0240531a02 | |||
| 7fbc6f180e | |||
| c23e6d9621 | |||
|
a13add9b81
|
|||
| 0b0dd1a1ba |
60
flake.lock
generated
60
flake.lock
generated
@@ -7,11 +7,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773889306,
|
"lastModified": 1776613567,
|
||||||
"narHash": "sha256-PAqwnsBSI9SVC2QugvQ3xeYCB0otOwCacB1ueQj2tgw=",
|
"narHash": "sha256-gC9Cp5ibBmGD5awCA9z7xy6MW6iJufhazTYJOiGlCUI=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "5ad85c82cc52264f4beddc934ba57f3789f28347",
|
"rev": "32f4236bfc141ae930b5ba2fb604f561fed5219d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -48,11 +48,11 @@
|
|||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "pkgs/firefox-addons",
|
"dir": "pkgs/firefox-addons",
|
||||||
"lastModified": 1773892995,
|
"lastModified": 1777176175,
|
||||||
"narHash": "sha256-kRGAztxZcaErtp4FoXnKgOX0OebUdkAIoSXRU1fybKA=",
|
"narHash": "sha256-l/0TJCLEarrsyHIKNhAjI4+7lkyGsFqojyx1X1h64Ks=",
|
||||||
"owner": "rycee",
|
"owner": "rycee",
|
||||||
"repo": "nur-expressions",
|
"repo": "nur-expressions",
|
||||||
"rev": "394a8d49da42d2a63e8845c7262c636051f0f823",
|
"rev": "515c8c1296021efe49ba1b1318ff27a43e93442b",
|
||||||
"type": "gitlab"
|
"type": "gitlab"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -83,11 +83,11 @@
|
|||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772408722,
|
"lastModified": 1775087534,
|
||||||
"narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=",
|
"narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3",
|
"rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -103,11 +103,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773681845,
|
"lastModified": 1775425411,
|
||||||
"narHash": "sha256-o8hrZrigP0JYcwnglCp8Zi8jQafWsxbDtRRPzuVwFxY=",
|
"narHash": "sha256-KY6HsebJHEe5nHOWP7ur09mb0drGxYSzE3rQxy62rJo=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "0759e0e137305bc9d0c52c204c6d8dffe6f601a6",
|
"rev": "0d02ec1d0a05f88ef9e74b516842900c41f0f2fe",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -141,11 +141,11 @@
|
|||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1774407052,
|
"lastModified": 1777001712,
|
||||||
"narHash": "sha256-rUkn7Bo3PAlpcZl8+0FDsTwFyDwvS4xwMT9+RJ+XJoE=",
|
"narHash": "sha256-9JX9msZU1NvHzjKM24PRorP76Ge8GBy6LAkJKA21mlY=",
|
||||||
"owner": "Infinidoge",
|
"owner": "Infinidoge",
|
||||||
"repo": "nix-minecraft",
|
"repo": "nix-minecraft",
|
||||||
"rev": "70daf1f48885f0b4a70797076cd2ff5d9139b46e",
|
"rev": "394d3bfd943458baf29e4798bc9b256d824a3bb9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -156,11 +156,11 @@
|
|||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773533765,
|
"lastModified": 1776983936,
|
||||||
"narHash": "sha256-qonGfS2lzCgCl59Zl63jF6dIRRpvW3AJooBGMaXjHiY=",
|
"narHash": "sha256-ZOQyNqSvJ8UdrrqU1p7vaFcdL53idK+LOM8oRWEWh6o=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "f8e82243fd601afb9f59ad230958bd073795cbfe",
|
"rev": "2096f3f411ce46e88a79ae4eafcfc9df8ed41c61",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -172,11 +172,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773814637,
|
"lastModified": 1776734388,
|
||||||
"narHash": "sha256-GNU+ooRmrHLfjlMsKdn0prEKVa0faVanm0jrgu1J/gY=",
|
"narHash": "sha256-vl3dkhlE5gzsItuHoEMVe+DlonsK+0836LIRDnm6MXQ=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "fea3b367d61c1a6592bc47c72f40a9f3e6a53e96",
|
"rev": "10e7ad5bbcb421fe07e3a4ad53a634b0cd57ffac",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -188,11 +188,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-lib": {
|
"nixpkgs-lib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772328832,
|
"lastModified": 1774748309,
|
||||||
"narHash": "sha256-e+/T/pmEkLP6BHhYjx6GmwP5ivonQQn0bJdH9YrRB+Q=",
|
"narHash": "sha256-+U7gF3qxzwD5TZuANzZPeJTZRHS29OFQgkQ2kiTJBIQ=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs.lib",
|
"repo": "nixpkgs.lib",
|
||||||
"rev": "c185c7a5e5dd8f9add5b2f8ebeff00888b070742",
|
"rev": "333c4e0545a6da976206c74db8773a1645b5870a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -203,11 +203,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773821835,
|
"lastModified": 1776877367,
|
||||||
"narHash": "sha256-TJ3lSQtW0E2JrznGVm8hOQGVpXjJyXY2guAxku2O9A4=",
|
"narHash": "sha256-EHq1/OX139R1RvBzOJ0aMRT3xnWyqtHBRUBuO1gFzjI=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "b40629efe5d6ec48dd1efba650c797ddbd39ace0",
|
"rev": "0726a0ecb6d4e08f6adced58726b95db924cef57",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -239,11 +239,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773889674,
|
"lastModified": 1776771786,
|
||||||
"narHash": "sha256-+ycaiVAk3MEshJTg35cBTUa0MizGiS+bgpYw/f8ohkg=",
|
"narHash": "sha256-DRFGPfFV6hbrfO9a1PH1FkCi7qR5FgjSqsQGGvk1rdI=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "29b6519f3e0780452bca0ac0be4584f04ac16cc5",
|
"rev": "bef289e2248991f7afeb95965c82fbcd8ff72598",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
flake.homeConfigurations."jonas@comfy-station" = inputs.home-manager.lib.homeManagerConfiguration {
|
flake.homeConfigurations."jonas@comfy-station" = inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
pkgs = import inputs.nixpkgs {system = "x86_64-linux";};
|
pkgs = import inputs.nixpkgs {system = "x86_64-linux";};
|
||||||
modules = [
|
modules = [
|
||||||
({...}: {nixpkgs.overlays = [self.overlays.unstable inputs.audio.overlays.default];})
|
({...}: {nixpkgs.overlays = [self.overlays.unstable];})
|
||||||
({...}: {nixpkgs.config.allowUnfree = true;})
|
({...}: {nixpkgs.config.allowUnfree = true;})
|
||||||
|
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
|
|||||||
@@ -28,6 +28,9 @@
|
|||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
# hive modules
|
# hive modules
|
||||||
|
hive.hyprland.enable = true;
|
||||||
|
hive.hyprland.autologin = "jonas";
|
||||||
|
hive.kwallet.enable = true;
|
||||||
hive.kwallet.forUsers = ["jonas"];
|
hive.kwallet.forUsers = ["jonas"];
|
||||||
hive.virt-manager.enable = true;
|
hive.virt-manager.enable = true;
|
||||||
hive.virt-manager.forUsers = ["jonas"];
|
hive.virt-manager.forUsers = ["jonas"];
|
||||||
@@ -108,8 +111,6 @@
|
|||||||
trusted-users = [
|
trusted-users = [
|
||||||
"@wheel"
|
"@wheel"
|
||||||
];
|
];
|
||||||
max-jobs = 2;
|
|
||||||
cores = 8;
|
|
||||||
};
|
};
|
||||||
gc = {
|
gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
self.nixosModules.openhantek
|
self.nixosModules.openhantek
|
||||||
self.nixosModules.firefox
|
self.nixosModules.firefox
|
||||||
self.nixosModules.kdeconnect
|
self.nixosModules.kdeconnect
|
||||||
|
self.nixosModules.ntsync
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,6 +49,9 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
# hive modules
|
# hive modules
|
||||||
|
hive.plasma.enable = true;
|
||||||
|
hive.plasma.autologin = "jonas";
|
||||||
|
hive.kwallet.enable = true;
|
||||||
hive.kwallet.forUsers = ["jonas"];
|
hive.kwallet.forUsers = ["jonas"];
|
||||||
hive.virt-manager.enable = true;
|
hive.virt-manager.enable = true;
|
||||||
hive.virt-manager.forUsers = ["jonas"];
|
hive.virt-manager.forUsers = ["jonas"];
|
||||||
@@ -71,6 +74,9 @@
|
|||||||
clientIdSopsKey = config.sops.secrets.spotifyShortcutsClientId.name;
|
clientIdSopsKey = config.sops.secrets.spotifyShortcutsClientId.name;
|
||||||
clientSecretSopsKey = config.sops.secrets.spotifyShortcutsClientSecret.name;
|
clientSecretSopsKey = config.sops.secrets.spotifyShortcutsClientSecret.name;
|
||||||
};
|
};
|
||||||
|
hive.ntsync.enable = true;
|
||||||
|
|
||||||
|
services.flatpak.enable = true;
|
||||||
|
|
||||||
# system packages
|
# system packages
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
@@ -168,6 +174,7 @@
|
|||||||
boot.plymouth.enable = true;
|
boot.plymouth.enable = true;
|
||||||
boot.initrd.systemd.enable = true;
|
boot.initrd.systemd.enable = true;
|
||||||
boot.supportedFilesystems = ["ntfs"];
|
boot.supportedFilesystems = ["ntfs"];
|
||||||
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
# Configure console keymap
|
# Configure console keymap
|
||||||
console.keyMap = "de";
|
console.keyMap = "de";
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
self.nixosModules.firefox
|
self.nixosModules.firefox
|
||||||
self.nixosModules.kdeconnect
|
self.nixosModules.kdeconnect
|
||||||
self.nixosModules.spotify-shortcuts
|
self.nixosModules.spotify-shortcuts
|
||||||
|
self.nixosModules.ntsync
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,31 +5,34 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.hive.displayManager;
|
cfg = config.hive.hyprland;
|
||||||
in {
|
in {
|
||||||
options.hive.displayManager = with lib; {
|
options.hive.hyprland = with lib; {
|
||||||
|
enable = mkEnableOption "Enable Hyprland Wayland compositor";
|
||||||
autologin = mkOption {
|
autologin = mkOption {
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
default = null;
|
default = null;
|
||||||
description = "The autologin username or null for no autologin.";
|
description = "The autologin username or null for no autologin.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = {
|
config = lib.mkIf cfg.enable {
|
||||||
services.xserver.enable = true;
|
services.displayManager = {
|
||||||
services.xserver = {
|
autoLogin.enable = cfg.autologin != null;
|
||||||
xkb.layout = "de";
|
autoLogin.user = cfg.autologin;
|
||||||
xkb.variant = "";
|
sddm = {
|
||||||
xkb.options = "caps:ctrl_modifier";
|
|
||||||
};
|
|
||||||
services.displayManager.autoLogin.enable = cfg.autologin != null;
|
|
||||||
services.displayManager.autoLogin.user = cfg.autologin;
|
|
||||||
|
|
||||||
services.libinput.enable = true;
|
|
||||||
services.dbus.enable = true;
|
|
||||||
services.displayManager.sddm = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
wayland.enable = true;
|
wayland.enable = true;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
withUWSM = true;
|
||||||
|
xwayland.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.libinput.enable = true;
|
||||||
|
services.dbus.enable = true;
|
||||||
|
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -41,14 +44,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [spaceFM];
|
environment.systemPackages = with pkgs; [spaceFM];
|
||||||
|
|
||||||
services.udisks2.enable = true;
|
services.udisks2.enable = true;
|
||||||
|
|
||||||
programs.hyprland = {
|
|
||||||
enable = true;
|
|
||||||
withUWSM = true;
|
|
||||||
xwayland.enable = true;
|
|
||||||
};
|
|
||||||
programs.hyprlock.enable = true;
|
programs.hyprlock.enable = true;
|
||||||
security.pam.services.hyprlock = {};
|
security.pam.services.hyprlock = {};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
cfg = config.hive.kwallet;
|
cfg = config.hive.kwallet;
|
||||||
in {
|
in {
|
||||||
options.hive.kwallet = {
|
options.hive.kwallet = {
|
||||||
|
enable = lib.mkEnableOption "Enable kwallet integration with pam.";
|
||||||
forUsers = lib.mkOption {
|
forUsers = lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.str;
|
type = lib.types.listOf lib.types.str;
|
||||||
default = [];
|
default = [];
|
||||||
@@ -17,7 +18,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = lib.mkIf cfg.enable {
|
||||||
environment.systemPackages = with pkgs.kdePackages; [
|
environment.systemPackages = with pkgs.kdePackages; [
|
||||||
kwallet
|
kwallet
|
||||||
kwalletmanager
|
kwalletmanager
|
||||||
|
|||||||
@@ -1,15 +1,30 @@
|
|||||||
{
|
{
|
||||||
flake.nixosModules.plasma = {pkgs, ...}: {
|
flake.nixosModules.plasma = {
|
||||||
services.xserver.enable = true;
|
config,
|
||||||
services.xserver = {
|
pkgs,
|
||||||
xkb.layout = "de";
|
lib,
|
||||||
xkb.variant = "";
|
...
|
||||||
xkb.options = "caps:ctrl_modifier";
|
}: let
|
||||||
|
cfg = config.hive.plasma;
|
||||||
|
in {
|
||||||
|
options.hive.plasma = {
|
||||||
|
enable = lib.mkEnableOption "Enable Plasma 6 desktop environment";
|
||||||
|
autologin = lib.mkOption {
|
||||||
|
type = lib.types.nullOr lib.types.str;
|
||||||
|
default = null;
|
||||||
|
description = "The autologin username or null for no autologin.";
|
||||||
};
|
};
|
||||||
services.displayManager.sddm = {
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.displayManager = {
|
||||||
|
autoLogin.enable = cfg.autologin != null;
|
||||||
|
autoLogin.user = cfg.autologin;
|
||||||
|
sddm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
wayland.enable = true;
|
wayland.enable = true;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
services.desktopManager.plasma6.enable = true;
|
services.desktopManager.plasma6.enable = true;
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -19,4 +34,5 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
32
modules/docs.nix
Normal file
32
modules/docs.nix
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
perSystem = {
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
system,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
packages.docs = let
|
||||||
|
nixos = inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules =
|
||||||
|
[
|
||||||
|
inputs.sops-nix.nixosModules.sops
|
||||||
|
]
|
||||||
|
++ lib.attrValues self.nixosModules;
|
||||||
|
};
|
||||||
|
doc = pkgs.nixosOptionsDoc {options.hive = nixos.options.hive;};
|
||||||
|
in
|
||||||
|
pkgs.stdenvNoCC.mkDerivation {
|
||||||
|
name = ".hive-docs";
|
||||||
|
buildCommand = ''
|
||||||
|
mkdir -p $out
|
||||||
|
cp ${doc.optionsCommonMark} $out/docs.md
|
||||||
|
${pkgs.pandoc}/bin/pandoc -o $out/docs.html $out/docs.md
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
;;collab ; buffers with friends
|
;;collab ; buffers with friends
|
||||||
(debugger +realgud +lsp) ; FIXME stepping through code, to help you add bugs
|
(debugger +realgud +lsp) ; FIXME stepping through code, to help you add bugs
|
||||||
;;direnv
|
;;direnv
|
||||||
;;docker
|
docker
|
||||||
;;editorconfig ; let someone else argue about tabs vs spaces
|
;;editorconfig ; let someone else argue about tabs vs spaces
|
||||||
ein ; tame Jupyter notebooks with emacs
|
ein ; tame Jupyter notebooks with emacs
|
||||||
(eval +overlay) ; run code, run (also, repls)
|
(eval +overlay) ; run code, run (also, repls)
|
||||||
|
|||||||
@@ -56,6 +56,7 @@
|
|||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
self.nixosModules.bulk-transcode-overlay
|
self.nixosModules.bulk-transcode-overlay
|
||||||
|
self.nixosModules.unstable-overlay
|
||||||
];
|
];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
description = "The user for the borg repository home.";
|
description = "The user for the borg repository home.";
|
||||||
};
|
};
|
||||||
repositories = lib.mkOption {
|
repositories = lib.mkOption {
|
||||||
|
description = "The borg repositories to serve";
|
||||||
type = lib.types.attrsOf (lib.types.submodule {
|
type = lib.types.attrsOf (lib.types.submodule {
|
||||||
options = {
|
options = {
|
||||||
name = lib.mkOption {
|
name = lib.mkOption {
|
||||||
|
|||||||
31
modules/system/ntsync.nix
Normal file
31
modules/system/ntsync.nix
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
flake.nixosModules.ntsync = {
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.hive.ntsync;
|
||||||
|
in {
|
||||||
|
options.hive.ntsync.enable = lib.mkEnableOption "Enable the nt-sync kernel driver.";
|
||||||
|
options.hive.ntsync.proton = lib.mkOption {
|
||||||
|
description = "Make proton use ntsync";
|
||||||
|
default = true;
|
||||||
|
type = lib.types.bool;
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
assertions = [
|
||||||
|
{
|
||||||
|
assertion = lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.14";
|
||||||
|
message = "ntsync requires at least linux 6.14";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.kernelModules = ["ntsync"];
|
||||||
|
|
||||||
|
environment.variables = lib.optionalAttrs cfg.proton {
|
||||||
|
PROTON_USE_NTSYNC = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user