Snowfall lib - more conversion
This commit is contained in:
parent
bca554318e
commit
df02d39ced
2
.gitattributes
vendored
2
.gitattributes
vendored
|
@ -1 +1 @@
|
||||||
modules/secrets/** filter=crypt diff=crypt merge=crypt
|
modules/nixos/secrets/** filter=crypt diff=crypt merge=crypt
|
||||||
|
|
|
@ -9,7 +9,7 @@ A full set of configuration files managed via NixOS. This project is an **unoffi
|
||||||
|
|
||||||
### Note on secrets management
|
### Note on secrets management
|
||||||
|
|
||||||
Secrets are managed using [git-crypt](https://github.com/AGWA/git-crypt). To unlock the repo, use `git-crypt unlock [path to key file]`. git-crypt will transparently encrypt/decrypt files stored in `modules/secrets` going forward, but you'll need this key file on all hosts that are using secrets.
|
Secrets are managed using [git-crypt](https://github.com/AGWA/git-crypt). To unlock the repo, use `git-crypt unlock [path to key file]`. git-crypt will transparently encrypt/decrypt files stored in `modules/nixos/secrets` going forward, but you'll need this key file on all hosts that are using secrets.
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> This is a poor man's secret management solution. If you use this, your secrets will be world-readable in the `/nix/store/`.
|
> This is a poor man's secret management solution. If you use this, your secrets will be world-readable in the `/nix/store/`.
|
||||||
|
|
66
flake.lock
66
flake.lock
|
@ -183,6 +183,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flatpak": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1732285094,
|
||||||
|
"narHash": "sha256-OD9tu/QN71OnEWtgvm9pXuQs+SGQtKnLHOGVRG5f9CU=",
|
||||||
|
"owner": "gmodena",
|
||||||
|
"repo": "nix-flatpak",
|
||||||
|
"rev": "d3a763532be5d223bb3474642f089667a8091cdf",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "gmodena",
|
||||||
|
"ref": "v0.5.0",
|
||||||
|
"repo": "nix-flatpak",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"gitignore": {
|
"gitignore": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -252,24 +268,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lix": {
|
"lix": {
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1729298361,
|
|
||||||
"narHash": "sha256-hiGtfzxFkDc9TSYsb96Whg0vnqBVV7CUxyscZNhed0U=",
|
|
||||||
"rev": "ad9d06f7838a25beec425ff406fe68721fef73be",
|
|
||||||
"type": "tarball",
|
|
||||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/ad9d06f7838a25beec425ff406fe68721fef73be.tar.gz?rev=ad9d06f7838a25beec425ff406fe68721fef73be"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"type": "tarball",
|
|
||||||
"url": "https://git.lix.systems/lix-project/lix/archive/2.91.1.tar.gz"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"lix-module": {
|
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_2",
|
"flake-utils": "flake-utils_2",
|
||||||
"flakey-profile": "flakey-profile",
|
"flakey-profile": "flakey-profile",
|
||||||
"lix": "lix",
|
"lix": "lix_2",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
|
@ -289,20 +291,18 @@
|
||||||
"url": "https://git.lix.systems/lix-project/nixos-module"
|
"url": "https://git.lix.systems/lix-project/nixos-module"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nix-flatpak": {
|
"lix_2": {
|
||||||
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732285094,
|
"lastModified": 1729298361,
|
||||||
"narHash": "sha256-OD9tu/QN71OnEWtgvm9pXuQs+SGQtKnLHOGVRG5f9CU=",
|
"narHash": "sha256-hiGtfzxFkDc9TSYsb96Whg0vnqBVV7CUxyscZNhed0U=",
|
||||||
"owner": "gmodena",
|
"rev": "ad9d06f7838a25beec425ff406fe68721fef73be",
|
||||||
"repo": "nix-flatpak",
|
"type": "tarball",
|
||||||
"rev": "d3a763532be5d223bb3474642f089667a8091cdf",
|
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/ad9d06f7838a25beec425ff406fe68721fef73be.tar.gz?rev=ad9d06f7838a25beec425ff406fe68721fef73be"
|
||||||
"type": "github"
|
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "gmodena",
|
"type": "tarball",
|
||||||
"ref": "v0.5.0",
|
"url": "https://git.lix.systems/lix-project/lix/archive/2.91.1.tar.gz"
|
||||||
"repo": "nix-flatpak",
|
|
||||||
"type": "github"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
|
@ -415,15 +415,15 @@
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"auto-cpufreq": "auto-cpufreq",
|
"auto-cpufreq": "auto-cpufreq",
|
||||||
|
"flatpak": "flatpak",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"lanzaboote": "lanzaboote",
|
"lanzaboote": "lanzaboote",
|
||||||
"lix-module": "lix-module",
|
"lix": "lix",
|
||||||
"nix-flatpak": "nix-flatpak",
|
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
"snowfall-lib": "snowfall-lib",
|
"snowfall-lib": "snowfall-lib",
|
||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt": "treefmt"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-overlay": {
|
"rust-overlay": {
|
||||||
|
@ -518,18 +518,18 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"treefmt-nix": {
|
"treefmt": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733222881,
|
"lastModified": 1733440889,
|
||||||
"narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=",
|
"narHash": "sha256-qKL3vjO+IXFQ0nTinFDqNq/sbbnnS5bMI1y0xX215fU=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"rev": "49717b5af6f80172275d47a418c9719a31a78b53",
|
"rev": "50862ba6a8a0255b87377b9d2d4565e96f29b410",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
35
flake.nix
35
flake.nix
|
@ -16,6 +16,9 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Flatpak support
|
||||||
|
flatpak.url = "github:gmodena/nix-flatpak/v0.5.0";
|
||||||
|
|
||||||
# Home-manager support
|
# Home-manager support
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-24.11";
|
url = "github:nix-community/home-manager/release-24.11";
|
||||||
|
@ -28,14 +31,11 @@
|
||||||
# Use Lix in place of Nix.
|
# Use Lix in place of Nix.
|
||||||
# If you'd rather use regular Nix, remove `lix-module.nixosModules.default` from the `modules` section below.
|
# If you'd rather use regular Nix, remove `lix-module.nixosModules.default` from the `modules` section below.
|
||||||
# To learn more about Lix, see https://lix.systems/
|
# To learn more about Lix, see https://lix.systems/
|
||||||
lix-module = {
|
lix = {
|
||||||
url = "git+https://git.lix.systems/lix-project/nixos-module?ref=release-2.91";
|
url = "git+https://git.lix.systems/lix-project/nixos-module?ref=release-2.91";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Flatpak support
|
|
||||||
nix-flatpak.url = "github:gmodena/nix-flatpak/v0.5.0";
|
|
||||||
|
|
||||||
# NixOS hardware quirks
|
# NixOS hardware quirks
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
treefmt-nix = {
|
treefmt = {
|
||||||
url = "github:numtide/treefmt-nix";
|
url = "github:numtide/treefmt-nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
@ -86,11 +86,10 @@
|
||||||
systems = {
|
systems = {
|
||||||
# Modules to import for all systems
|
# Modules to import for all systems
|
||||||
modules.nixos = with inputs; [
|
modules.nixos = with inputs; [
|
||||||
./modules/autoimport.nix
|
|
||||||
auto-cpufreq.nixosModules.default
|
auto-cpufreq.nixosModules.default
|
||||||
lix-module.nixosModules.default
|
lix.nixosModules.default
|
||||||
lanzaboote.nixosModules.lanzaboote
|
lanzaboote.nixosModules.lanzaboote
|
||||||
nix-flatpak.nixosModules.nix-flatpak
|
flatpak.nixosModules.nix-flatpak
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
_module.args = {
|
_module.args = {
|
||||||
|
@ -113,35 +112,41 @@
|
||||||
hosts = {
|
hosts = {
|
||||||
Dimaga.modules = with inputs; [
|
Dimaga.modules = with inputs; [
|
||||||
nixos-hardware.nixosModules.common-cpu-intel
|
nixos-hardware.nixosModules.common-cpu-intel
|
||||||
./hosts/Dimaga
|
|
||||||
];
|
];
|
||||||
|
|
||||||
Hevana.modules = with inputs; [
|
Hevana.modules = with inputs; [
|
||||||
nixos-hardware.nixosModules.common-cpu-amd-pstate
|
nixos-hardware.nixosModules.common-cpu-amd-pstate
|
||||||
nixos-hardware.nixosModules.common-gpu-amd
|
nixos-hardware.nixosModules.common-gpu-amd
|
||||||
./hosts/Hevana
|
|
||||||
];
|
];
|
||||||
|
|
||||||
Khanda.modules = with inputs; [
|
Khanda.modules = with inputs; [
|
||||||
nixos-hardware.nixosModules.microsoft-surface-pro-9
|
nixos-hardware.nixosModules.microsoft-surface-pro-9
|
||||||
./hosts/Khanda
|
|
||||||
];
|
];
|
||||||
|
|
||||||
Pihole.modules = with inputs; [
|
Pihole.modules = with inputs; [
|
||||||
nixos-hardware.nixosModules.raspberry-pi-4
|
nixos-hardware.nixosModules.raspberry-pi-4
|
||||||
./hosts/Pihole
|
|
||||||
];
|
];
|
||||||
|
|
||||||
Shura.modules = with inputs; [
|
Shura.modules = with inputs; [
|
||||||
nixos-hardware.nixosModules.lenovo-legion-16arha7
|
nixos-hardware.nixosModules.lenovo-legion-16arha7
|
||||||
./hosts/Shura
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Use treefmt to format project repo
|
# Use treefmt to format project repo
|
||||||
outputs-builder = channels: {
|
outputs-builder =
|
||||||
formatter = (inputs.treefmt-nix.lib.evalModule channels.nixpkgs ./treefmt.nix).config.build.wrapper;
|
channels:
|
||||||
|
let
|
||||||
|
treefmtEval = inputs.treefmt.lib.evalModule channels.nixpkgs ./treefmt.nix;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# For `nix fmt`
|
||||||
|
formatter = treefmtEval.config.build.wrapper;
|
||||||
|
|
||||||
|
# For `nix flake check`
|
||||||
|
checks = {
|
||||||
|
formatting = treefmtEval.config.build.check inputs.self;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
15
lib/default.nix
Normal file
15
lib/default.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
# Parses the domain from a URI
|
||||||
|
getDomainFromURI =
|
||||||
|
url:
|
||||||
|
let
|
||||||
|
parsedURL = (lib.strings.splitString "." url);
|
||||||
|
in
|
||||||
|
builtins.concatStringsSep "." [
|
||||||
|
(builtins.elemAt parsedURL 1)
|
||||||
|
(builtins.elemAt parsedURL 2)
|
||||||
|
];
|
||||||
|
}
|
|
@ -1,42 +0,0 @@
|
||||||
[General]
|
|
||||||
Name=Victrix Pro BFG
|
|
||||||
Appearance=0x03c4
|
|
||||||
AddressType=public
|
|
||||||
SupportedTechnologies=LE;
|
|
||||||
Trusted=true
|
|
||||||
Blocked=false
|
|
||||||
WakeAllowed=true
|
|
||||||
Services=00001800-0000-1000-8000-00805f9b34fb;00001801-0000-1000-8000-00805f9b34fb;0000180a-0000-1000-8000-00805f9b34fb;0000180f-0000-1000-8000-00805f9b34fb;00001812-0000-1000-8000-00805f9b34fb;00001813-0000-1000-8000-00805f9b34fb;f95a48e6-a721-11e9-a2a3-022ae2dbcce4;
|
|
||||||
|
|
||||||
[LongTermKey]
|
|
||||||
Key=F12268049C72EA0561E2E77DEA02AC12
|
|
||||||
Authenticated=0
|
|
||||||
EncSize=16
|
|
||||||
EDiv=29996
|
|
||||||
Rand=5139827239406697411
|
|
||||||
|
|
||||||
[PeripheralLongTermKey]
|
|
||||||
Key=CC60B7A9080383302B61EC2127E0D5CD
|
|
||||||
Authenticated=0
|
|
||||||
EncSize=16
|
|
||||||
EDiv=59630
|
|
||||||
Rand=6653202288716901387
|
|
||||||
|
|
||||||
[SlaveLongTermKey]
|
|
||||||
Key=CC60B7A9080383302B61EC2127E0D5CD
|
|
||||||
Authenticated=0
|
|
||||||
EncSize=16
|
|
||||||
EDiv=59630
|
|
||||||
Rand=6653202288716901387
|
|
||||||
|
|
||||||
[DeviceID]
|
|
||||||
Source=2
|
|
||||||
Vendor=3695
|
|
||||||
Product=587
|
|
||||||
Version=768
|
|
||||||
|
|
||||||
[ConnectionParameters]
|
|
||||||
MinInterval=6
|
|
||||||
MaxInterval=6
|
|
||||||
Latency=0
|
|
||||||
Timeout=300
|
|
|
@ -1,17 +0,0 @@
|
||||||
{ config, lib, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.aux.system.apps.dj;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
aux.system.apps.dj.enable = lib.mkEnableOption "Enables DJing tools (i.e. Mixxx)";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
aux.system.ui.flatpak = {
|
|
||||||
enable = true;
|
|
||||||
packages = [ "org.mixxx.Mixxx" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,31 +0,0 @@
|
||||||
# Auto-import modules in this folder, recursively.
|
|
||||||
# Sourced from https://github.com/evanjs/nixos_cfg/blob/4bb5b0b84a221b25cf50853c12b9f66f0cad3ea4/config/new-modules/default.nix
|
|
||||||
{ lib, ... }:
|
|
||||||
let
|
|
||||||
# Recursively constructs an attrset of a given folder, recursing on directories, value of attrs is the filetype
|
|
||||||
getDir =
|
|
||||||
dir:
|
|
||||||
lib.mapAttrs (file: type: if type == "directory" then getDir "${dir}/${file}" else type) (
|
|
||||||
builtins.readDir dir
|
|
||||||
);
|
|
||||||
|
|
||||||
# Collects all files of a directory as a list of strings of paths
|
|
||||||
files =
|
|
||||||
dir:
|
|
||||||
lib.collect lib.isString (
|
|
||||||
lib.mapAttrsRecursive (path: type: lib.concatStringsSep "/" path) (getDir dir)
|
|
||||||
);
|
|
||||||
|
|
||||||
# Search all files and folders within and below the current directory.
|
|
||||||
# Filters out directories that belong to home-manager, and don't end with .nix or are this file.
|
|
||||||
validFiles =
|
|
||||||
dir:
|
|
||||||
map (file: ./. + "/${file}") (
|
|
||||||
lib.filter (
|
|
||||||
file: !lib.hasInfix "home-manager" file && file != "autoimport.nix" && lib.hasSuffix ".nix" file
|
|
||||||
) (files dir)
|
|
||||||
);
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = validFiles ./.;
|
|
||||||
}
|
|
|
@ -5,7 +5,10 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
aux.system.apps.media.enable = lib.mkEnableOption "Enables media playback and editing apps";
|
aux.system.apps.media = {
|
||||||
|
enable = lib.mkEnableOption "Enables media playback and editing apps.";
|
||||||
|
mixxx.enable = lib.mkEnableOption "Installs the Mixxx DJing software.";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
@ -21,6 +24,7 @@ in
|
||||||
"org.kde.KStyle.Adwaita//6.6"
|
"org.kde.KStyle.Adwaita//6.6"
|
||||||
"org.kde.WaylandDecoration.QAdwaitaDecorations//5.15-23.08" # Replaced deprecated QGnomePlatform https://wiki.archlinux.org/title/Uniform_look_for_Qt_and_GTK_applications
|
"org.kde.WaylandDecoration.QAdwaitaDecorations//5.15-23.08" # Replaced deprecated QGnomePlatform https://wiki.archlinux.org/title/Uniform_look_for_Qt_and_GTK_applications
|
||||||
"org.kde.WaylandDecoration.QAdwaitaDecorations//6.6"
|
"org.kde.WaylandDecoration.QAdwaitaDecorations//6.6"
|
||||||
|
(lib.mkIf cfg.mixxx.enable "org.mixxx.Mixxx")
|
||||||
"org.videolan.VLC"
|
"org.videolan.VLC"
|
||||||
];
|
];
|
||||||
};
|
};
|
|
@ -15,7 +15,6 @@ in
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
aux.system = {
|
aux.system = {
|
||||||
allowUnfree = true;
|
|
||||||
packages = [ pkgs.beeper ];
|
packages = [ pkgs.beeper ];
|
||||||
ui.flatpak = {
|
ui.flatpak = {
|
||||||
enable = true;
|
enable = true;
|
|
@ -9,7 +9,7 @@ let
|
||||||
cfg = config.aux.system.apps.writing;
|
cfg = config.aux.system.apps.writing;
|
||||||
|
|
||||||
compile-manuscript = pkgs.writeShellScriptBin "compile-manuscript" (
|
compile-manuscript = pkgs.writeShellScriptBin "compile-manuscript" (
|
||||||
builtins.readFile ../../bin/compile-manuscript.sh
|
builtins.readFile ../../../../bin/compile-manuscript.sh
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
{
|
{
|
|
@ -1,6 +1,5 @@
|
||||||
# Modules common to all systems
|
# Modules common to all systems
|
||||||
{
|
{
|
||||||
inputs,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
@ -19,16 +18,6 @@
|
||||||
nixos-operations-script.enable = true;
|
nixos-operations-script.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Allow packages from the unstable repo by using 'pkgs.unstable'
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
(final: _prev: {
|
|
||||||
unstable = import inputs.nixpkgs-unstable {
|
|
||||||
system = final.system;
|
|
||||||
config.allowUnfree = true;
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
# Install ZSH for all users
|
# Install ZSH for all users
|
||||||
zsh.enable = true;
|
zsh.enable = true;
|
27189
modules/nixos/secrets/Freight-20240828T164047Z-001.zip
Normal file
27189
modules/nixos/secrets/Freight-20240828T164047Z-001.zip
Normal file
File diff suppressed because it is too large
Load diff
111
modules/nixos/secrets/default.nix
Normal file
111
modules/nixos/secrets/default.nix
Normal file
|
@ -0,0 +1,111 @@
|
||||||
|
U2FsdGVkX18XLcC6KPfRaGSo5Qz34PSSmgpl/qnz5d5TxlKG+pMhtUt0t/iGnyQV
|
||||||
|
guWUZIvUrnTfP0LSZym1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flXuuTiv/UTLD8B5Wv24t
|
||||||
|
aNeyBbDEbJaioOaQhDKuSdDrTHNtbuneW2+6bZGE+aRlAktzyIqUK3TncDFpvhIC
|
||||||
|
X4RaTGrqMmTupaSUCbTRlVYm8W5ZnmsgNdCp/b9ECQFNHMVAnX0Nfhnc1drkhwXX
|
||||||
|
ajaFbhyiX/rfGsWxD+Od4f+UbdSkTvwTcakzOQGEupJM0t0nk+h1Ug0wA5/bjEDN
|
||||||
|
17cHZIfdw5zp0Y6A8Cfh141zfECgcNp4Zzl+b6HLiNac2aY1dIOwlOJyK1CLeiSF
|
||||||
|
cuXRIG4ZhidP2hQ1ac9KDPlCewh2NP2bNXMaUD1BN0wqaGRfjz+cj272rkJqN3qo
|
||||||
|
Wg/ptizrlMmp7F3A3SrSBNIS+8wRcf7Ds30z8WwN3R5slV8s2X8ZCM9x1HlsIoU7
|
||||||
|
Ntk2JjG+hW64Yy9pCUR9c5bMHMXJMST1v535hS+WWv0=
|
|
@ -49,7 +49,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
nginx.virtualHosts."${cfg.url}" = {
|
nginx.virtualHosts."${cfg.url}" = {
|
||||||
useACMEHost = pkgs.util.getDomainFromURI cfg.url;
|
useACMEHost = lib.Sapana.getDomainFromURI cfg.url;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
basicAuth = {
|
basicAuth = {
|
||||||
"${cfg.auth.user}" = cfg.auth.password;
|
"${cfg.auth.user}" = cfg.auth.password;
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.aux.system.services.duplicacy-web;
|
cfg = config.aux.system.services.duplicacy-web;
|
||||||
duplicacy-web = pkgs.callPackage ../../packages/duplicacy-web.nix { inherit pkgs lib; };
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
|
@ -22,8 +21,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
nixpkgs.config.allowUnfree = true;
|
environment.systemPackages = [ pkgs.Sapana.duplicacy-web ];
|
||||||
environment.systemPackages = [ duplicacy-web ];
|
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 3875 ];
|
networking.firewall.allowedTCPPorts = [ 3875 ];
|
||||||
|
|
||||||
|
@ -38,7 +36,7 @@ in
|
||||||
description = "Start the Duplicacy backup service and web UI";
|
description = "Start the Duplicacy backup service and web UI";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
ExecStart = ''${duplicacy-web}/duplicacy-web'';
|
ExecStart = ''${pkgs.Sapana.duplicacy-web}/duplicacy-web'';
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = 10;
|
RestartSec = 10;
|
||||||
KillMode = "process";
|
KillMode = "process";
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
|
@ -32,7 +31,7 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
server = {
|
server = {
|
||||||
DOMAIN = pkgs.util.getDomainFromURI cfg.url;
|
DOMAIN = lib.Sapana.getDomainFromURI cfg.url;
|
||||||
ROOT_URL = cfg.url;
|
ROOT_URL = cfg.url;
|
||||||
HTTP_PORT = 3000;
|
HTTP_PORT = 3000;
|
||||||
};
|
};
|
||||||
|
@ -42,7 +41,7 @@ in
|
||||||
} // lib.optionalAttrs (cfg.home != null) { stateDir = cfg.home; };
|
} // lib.optionalAttrs (cfg.home != null) { stateDir = cfg.home; };
|
||||||
|
|
||||||
nginx.virtualHosts."${cfg.url}" = {
|
nginx.virtualHosts."${cfg.url}" = {
|
||||||
useACMEHost = pkgs.util.getDomainFromURI cfg.url;
|
useACMEHost = lib.Sapana.getDomainFromURI cfg.url;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://127.0.0.1:3000";
|
proxyPass = "http://127.0.0.1:3000";
|
|
@ -8,7 +8,7 @@ let
|
||||||
cfg = config.aux.system.services.jellyfin;
|
cfg = config.aux.system.services.jellyfin;
|
||||||
|
|
||||||
jellyfin-audio-save = pkgs.unstable.jellyfin.overrideAttrs (
|
jellyfin-audio-save = pkgs.unstable.jellyfin.overrideAttrs (
|
||||||
finalAttrs: prevAttrs: { patches = [ ./jellyfin/jellyfin-audio-save-position.patch ]; }
|
finalAttrs: prevAttrs: { patches = [ ./jellyfin-audio-save-position.patch ]; }
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -34,7 +34,7 @@ in
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
nginx.virtualHosts."${cfg.url}" = {
|
nginx.virtualHosts."${cfg.url}" = {
|
||||||
useACMEHost = pkgs.util.getDomainFromURI cfg.url;
|
useACMEHost = lib.Sapana.getDomainFromURI cfg.url;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://127.0.0.1:8096";
|
proxyPass = "http://127.0.0.1:8096";
|
|
@ -50,13 +50,11 @@ in
|
||||||
public = true;
|
public = true;
|
||||||
allowOrigin = "*";
|
allowOrigin = "*";
|
||||||
# Enable Ngrams
|
# Enable Ngrams
|
||||||
settings.languageModel = lib.mkIf cfg.ngrams.enable "${
|
settings.languageModel = lib.mkIf cfg.ngrams.enable "${pkgs.Sapana.languagetool-ngrams}/share/languagetool/ngrams";
|
||||||
(pkgs.callPackage ../../packages/languagetool-ngrams.nix { inherit pkgs lib; })
|
|
||||||
}/share/languagetool/ngrams";
|
|
||||||
};
|
};
|
||||||
# Create Nginx virtualhost
|
# Create Nginx virtualhost
|
||||||
nginx.virtualHosts."${cfg.url}" = {
|
nginx.virtualHosts."${cfg.url}" = {
|
||||||
useACMEHost = pkgs.util.getDomainFromURI cfg.url;
|
useACMEHost = lib.Sapana.getDomainFromURI cfg.url;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
basicAuth = {
|
basicAuth = {
|
||||||
"${cfg.auth.user}" = cfg.auth.password;
|
"${cfg.auth.user}" = cfg.auth.password;
|
|
@ -50,7 +50,7 @@ in
|
||||||
(lib.mkIf (cfg.enable && cfg.type == "parent") {
|
(lib.mkIf (cfg.enable && cfg.type == "parent") {
|
||||||
services = {
|
services = {
|
||||||
nginx.virtualHosts."${cfg.url}" = {
|
nginx.virtualHosts."${cfg.url}" = {
|
||||||
useACMEHost = pkgs.util.getDomainFromURI cfg.url;
|
useACMEHost = lib.Sapana.getDomainFromURI cfg.url;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
basicAuth = {
|
basicAuth = {
|
||||||
"${cfg.auth.user}" = cfg.auth.password;
|
"${cfg.auth.user}" = cfg.auth.password;
|
|
@ -58,7 +58,7 @@ in
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
services = {
|
services = {
|
||||||
nginx.virtualHosts."${cfg.url}" = {
|
nginx.virtualHosts."${cfg.url}" = {
|
||||||
useACMEHost = pkgs.util.getDomainFromURI cfg.url;
|
useACMEHost = lib.Sapana.getDomainFromURI cfg.url;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://127.0.0.1:${cfg.port}";
|
proxyPass = "http://127.0.0.1:${cfg.port}";
|
|
@ -56,7 +56,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
nginx.virtualHosts."${cfg.url}" = {
|
nginx.virtualHosts."${cfg.url}" = {
|
||||||
useACMEHost = pkgs.util.getDomainFromURI cfg.url;
|
useACMEHost = lib.Sapana.getDomainFromURI cfg.url;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
109
modules/nixos/system/gpu/default.nix
Normal file
109
modules/nixos/system/gpu/default.nix
Normal file
|
@ -0,0 +1,109 @@
|
||||||
|
# Enables AMD GPU support.
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.aux.system.gpu;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
aux.system.gpu = {
|
||||||
|
amd.enable = lib.mkEnableOption "Enables AMD GPU support.";
|
||||||
|
intel.enable = lib.mkEnableOption "Enables Intel GPU support.";
|
||||||
|
nvidia = {
|
||||||
|
enable = lib.mkEnableOption "Enables Nvidia GPU support.";
|
||||||
|
hybrid = {
|
||||||
|
enable = lib.mkEnableOption "Enables hybrid GPU support.";
|
||||||
|
sync = lib.mkEnableOption "Enables sync mode for faster performance at the cost of higher battery usage.";
|
||||||
|
busIDs = {
|
||||||
|
nvidia = lib.mkOption {
|
||||||
|
description = "The bus ID for your Nvidia GPU.";
|
||||||
|
type = lib.types.str;
|
||||||
|
example = "PCI:0:2:0";
|
||||||
|
default = "";
|
||||||
|
};
|
||||||
|
intel = lib.mkOption {
|
||||||
|
description = "The bus ID for your integrated Intel GPU. If you don't have an Intel GPU, you can leave this blank.";
|
||||||
|
type = lib.types.str;
|
||||||
|
example = "PCI:14:0:0";
|
||||||
|
default = "";
|
||||||
|
};
|
||||||
|
amd = lib.mkOption {
|
||||||
|
description = "The bus ID for your integrated AMD GPU. If you don't have an AMD GPU, you can leave this blank.";
|
||||||
|
type = lib.types.str;
|
||||||
|
example = "PCI:54:0:0";
|
||||||
|
default = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkMerge [
|
||||||
|
(lib.mkIf cfg.amd.enable {
|
||||||
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||||
|
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||||
|
|
||||||
|
hardware.graphics = {
|
||||||
|
enable = true;
|
||||||
|
# 32-bit application compatibility
|
||||||
|
enable32Bit = true;
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
||||||
|
(lib.mkIf cfg.intel.enable {
|
||||||
|
services.xserver.videoDrivers = [ "intel" ];
|
||||||
|
|
||||||
|
hardware.graphics = {
|
||||||
|
enable = true;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
intel-media-driver
|
||||||
|
vpl-gpu-rt
|
||||||
|
];
|
||||||
|
extraPackages32 = with pkgs.driversi686Linux; [
|
||||||
|
intel-media-driver
|
||||||
|
vpl-gpu-rt
|
||||||
|
];
|
||||||
|
};
|
||||||
|
})
|
||||||
|
(lib.mkIf cfg.nvidia.enable {
|
||||||
|
assertions = [
|
||||||
|
{
|
||||||
|
assertion = (cfg.nvidia.hybrid.busIDs.nvidia != "");
|
||||||
|
message = "You need to define a bus ID for your Nvidia GPU. To learn how to find the bus ID, see https://wiki.nixos.org/wiki/Nvidia#Configuring_Optimus_PRIME:_Bus_ID_Values_.28Mandatory.29.";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
assertion = (cfg.nvidia.hybrid.busIDs.intel != "" || cfg.nvidia.hybrid.busIDs.amd != "");
|
||||||
|
message = "You need to define a bus ID for your non-Nvidia GPU. To learn how to find your bus ID, see https://wiki.nixos.org/wiki/Nvidia#Configuring_Optimus_PRIME:_Bus_ID_Values_.28Mandatory.29.";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
services.xserver.videoDrivers = lib.mkDefault [ "nvidia" ];
|
||||||
|
hardware = {
|
||||||
|
opengl.extraPackages = with pkgs; [ vaapiVdpau ];
|
||||||
|
nvidia = {
|
||||||
|
modesetting.enable = true;
|
||||||
|
nvidiaSettings = config.aux.system.ui.desktops.enable;
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
|
prime = lib.mkIf cfg.nvidia.hybrid.enable {
|
||||||
|
|
||||||
|
offload = lib.mkIf (!cfg.nvidia.hybrid.sync) {
|
||||||
|
enable = true;
|
||||||
|
enableOffloadCmd = true; # Provides `nvidia-offload` command.
|
||||||
|
};
|
||||||
|
|
||||||
|
sync.enable = cfg.nvidia.hybrid.sync;
|
||||||
|
|
||||||
|
nvidiaBusId = cfg.nvidia.hybrid.busIDs.nvidia;
|
||||||
|
intelBusId = cfg.nvidia.hybrid.busIDs.intel;
|
||||||
|
amdgpuBusId = cfg.nvidia.hybrid.busIDs.amd;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
|
@ -11,13 +11,12 @@ let
|
||||||
cfg = config.aux.system;
|
cfg = config.aux.system;
|
||||||
|
|
||||||
nixos-operations-script = pkgs.writeShellScriptBin "nixos-operations-script" (
|
nixos-operations-script = pkgs.writeShellScriptBin "nixos-operations-script" (
|
||||||
builtins.readFile ../../bin/nixos-operations-script.sh
|
builtins.readFile ../../../../bin/nixos-operations-script.sh
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
aux.system = {
|
aux.system = {
|
||||||
allowUnfree = lib.mkEnableOption "Allow unfree packages to install.";
|
|
||||||
retentionPeriod = lib.mkOption {
|
retentionPeriod = lib.mkOption {
|
||||||
description = "How long to retain NixOS generations. Defaults to one month.";
|
description = "How long to retain NixOS generations. Defaults to one month.";
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
|
@ -28,7 +27,6 @@ in
|
||||||
};
|
};
|
||||||
config = lib.mkMerge [
|
config = lib.mkMerge [
|
||||||
{
|
{
|
||||||
nixpkgs.config.allowUnfree = cfg.allowUnfree;
|
|
||||||
nix = {
|
nix = {
|
||||||
extraOptions = ''
|
extraOptions = ''
|
||||||
# Ensure we can still build when secondary caches are unavailable
|
# Ensure we can still build when secondary caches are unavailable
|
Before Width: | Height: | Size: 853 KiB After Width: | Height: | Size: 853 KiB |
Before Width: | Height: | Size: 189 KiB After Width: | Height: | Size: 189 KiB |
File diff suppressed because it is too large
Load diff
|
@ -1,112 +0,0 @@
|
||||||
U2FsdGVkX19uO/YPjMlCHQXarQnzeZWOIhvuR/7/nwgPGZu7YTeyyEqzGS0hFNdF
|
|
||||||
jIo5a5umjTBPe0gUkAkTecwUFmbVCje2aQ0GmsBzEjsUXJTiM4kpElcWpRfBebtm
|
|
||||||
qfh2JTFTAOj2QUB2rYjK2JzwfZpGEWyoG5A3QRukzFnr7I7sUse9sVBQeKnI4put
|
|
||||||
/Kpe9tN+tDnf3byU83I7XxE9YECnlTTvF/A2CX4S7xf7Ig56DGH7rFAT3I4NIBkZ
|
|
||||||
FOTnIZcgQnBuB0HM/YdDeGsUIaxlDXcpFdj1YnVfrPDMuC245wO8n05YPNuiGEQZ
|
|
||||||
+2A0jDVeKWGasORdE19m4ciBRi4A3qgsMmArFvXtWJ+lHBL+510GrvNPlipbX7BM
|
|
||||||
c+TwrL6WgSwe0mtsB7e9MzDe6Fod3zQuLZIcD+9tqADP1V6REg8JjMH6fUj7atZ+
|
|
||||||
KlgejWbxliG0s1snuzZlVGSUS441ydkXb+takXLOtGBMRD5LDdSquEl9W/LAlAuo
|
|
||||||
bBWo+HiwIQjDadr/1zRGCcO1kYgtaFrSFJATTlU/cbfknPhLyTNFZ6ztTaYsHPRm
|
|
||||||
uV6TN9+kNHnnVokcp6K48kHmQrNn13r2cHoQCbtcANBXTakMMK2eU183fIA5Djkh
|
|
||||||
aXJM/9ygGdF5ItZkg/dd2CQYrTGlAfcYDQOJOD14fbT2SCP+3prrkJE/gRjTdCsF
|
|
||||||
YWV5ZGK3JYAdnLftt0IyNAvO+XbMQ0+tXOv4eiuOeDTtBPn6XMTTBqYxBlmydbaG
|
|
||||||
y59IoxNErOLoKfjjjbgbPiPpHHUANN05fa3f7j1De0SlhmmGRi0D5MW3hx20KmCa
|
|
||||||
lU03g0iSthqew5SVCBnTN16xd1GBTtqX9t9SZj0clEoI5ayfAHPntbjd3/58yJrT
|
|
||||||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2hi4n+89jL2Lvzq/U
|
|
||||||
2RIDxvejnApHTcpF9Aj1GISw9B57VAWXhMLE16FPYPF7NuhJz00eRWf0RRylmr1s
|
|
||||||
W0ArForEI+tvKQmkL+FLezTEzNBsXckxdDV7r2VvBJrhhIE92022VsCtYaufw68W
|
|
||||||
bDZHJ2ngdSfDvr4MLtFqZk77kRbVJMNbLrHal/l33hujdMWBCplE1eCWyIyfrVtU
|
|
||||||
qjMLxd2S8bRutPGyqjF6WKdsWVeAtIbbC6utdrJJidEnB2RXNYYYD2xQRfAPfKZN
|
|
||||||
n8o+5BVVniTugounVX7yCwT6bbGAigodtNDYjNw8TuWAPBRXWUXuqYd1fNvwSuu2
|
|
||||||
NVL4Kz0Y8TqIJlaSqERtvloEb3iaDu82zxDEKCKwzSXd3tzbkF9wM7wVAh1VfZJx
|
|
||||||
5ab+d1+nDjffafKt1c3+npusiAWfKyZiSogzutgRn6dI37QcYGE3NAs+H/IS7a0R
|
|
||||||
b7E1OKe1sYaR0h4tfHJ+SfOC1msK5itiMWqiUaHDuEBcmn1qGSwhPePJ4D5U1380
|
|
||||||
949SQ0Wo9LF2FC7n32+ntPXBTWbBNvAcz4qNMqxzojumPLCRtr5+GDnf34sEsBTS
|
|
||||||
jNVB5ZTZKUBcOrReUGC2X1bigbRE7corL19dkEaxzZI=
|
|
|
@ -1,26 +0,0 @@
|
||||||
# Enables AMD GPU support.
|
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
cfg = config.aux.system.gpu.amd;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
aux.system.gpu.amd.enable = lib.mkEnableOption "Enables AMD GPU support.";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
|
||||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
|
||||||
|
|
||||||
hardware.graphics = {
|
|
||||||
enable = true;
|
|
||||||
# 32-bit application compatibility
|
|
||||||
enable32Bit = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,33 +0,0 @@
|
||||||
# Enables Intel GPU support.
|
|
||||||
# https://wiki.nixos.org/wiki/Intel_Graphics
|
|
||||||
# https://nixos.org/manual/nixos/stable/#sec-x11--graphics-cards-intel
|
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
cfg = config.aux.system.gpu.intel;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
aux.system.gpu.intel.enable = lib.mkEnableOption "Enables Intel GPU support.";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
services.xserver.videoDrivers = [ "intel" ];
|
|
||||||
|
|
||||||
hardware.graphics = {
|
|
||||||
enable = true;
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
intel-media-driver
|
|
||||||
vpl-gpu-rt
|
|
||||||
];
|
|
||||||
extraPackages32 = with pkgs.driversi686Linux; [
|
|
||||||
intel-media-driver
|
|
||||||
vpl-gpu-rt
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,80 +0,0 @@
|
||||||
# Enables Nvidia GPU support.
|
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
cfg = config.aux.system.gpu.nvidia;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
aux.system.gpu.nvidia = {
|
|
||||||
enable = lib.mkEnableOption "Enables Nvidia GPU support.";
|
|
||||||
hybrid = {
|
|
||||||
enable = lib.mkEnableOption "Enables hybrid GPU support.";
|
|
||||||
sync = lib.mkEnableOption "Enables sync mode for faster performance at the cost of higher battery usage.";
|
|
||||||
busIDs = {
|
|
||||||
nvidia = lib.mkOption {
|
|
||||||
description = "The bus ID for your Nvidia GPU.";
|
|
||||||
type = lib.types.str;
|
|
||||||
example = "PCI:0:2:0";
|
|
||||||
default = "";
|
|
||||||
};
|
|
||||||
intel = lib.mkOption {
|
|
||||||
description = "The bus ID for your integrated Intel GPU. If you don't have an Intel GPU, you can leave this blank.";
|
|
||||||
type = lib.types.str;
|
|
||||||
example = "PCI:14:0:0";
|
|
||||||
default = "";
|
|
||||||
};
|
|
||||||
amd = lib.mkOption {
|
|
||||||
description = "The bus ID for your integrated AMD GPU. If you don't have an AMD GPU, you can leave this blank.";
|
|
||||||
type = lib.types.str;
|
|
||||||
example = "PCI:54:0:0";
|
|
||||||
default = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
assertions = [
|
|
||||||
{
|
|
||||||
assertion = (cfg.hybrid.busIDs.nvidia != "");
|
|
||||||
message = "You need to define a bus ID for your Nvidia GPU. To learn how to find the bus ID, see https://wiki.nixos.org/wiki/Nvidia#Configuring_Optimus_PRIME:_Bus_ID_Values_.28Mandatory.29.";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
assertion = (cfg.hybrid.busIDs.intel != "" || cfg.hybrid.busIDs.amd != "");
|
|
||||||
message = "You need to define a bus ID for your non-Nvidia GPU. To learn how to find your bus ID, see https://wiki.nixos.org/wiki/Nvidia#Configuring_Optimus_PRIME:_Bus_ID_Values_.28Mandatory.29.";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
aux.system.allowUnfree = true;
|
|
||||||
|
|
||||||
services.xserver.videoDrivers = lib.mkDefault [ "nvidia" ];
|
|
||||||
hardware = {
|
|
||||||
opengl.extraPackages = with pkgs; [ vaapiVdpau ];
|
|
||||||
nvidia = {
|
|
||||||
modesetting.enable = true;
|
|
||||||
nvidiaSettings = config.aux.system.ui.desktops.enable;
|
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
|
||||||
prime = lib.mkIf cfg.hybrid.enable {
|
|
||||||
|
|
||||||
offload = lib.mkIf (!cfg.hybrid.sync) {
|
|
||||||
enable = true;
|
|
||||||
enableOffloadCmd = true; # Provides `nvidia-offload` command.
|
|
||||||
};
|
|
||||||
|
|
||||||
sync.enable = cfg.hybrid.sync;
|
|
||||||
|
|
||||||
nvidiaBusId = cfg.hybrid.busIDs.nvidia;
|
|
||||||
intelBusId = cfg.hybrid.busIDs.intel;
|
|
||||||
amdgpuBusId = cfg.hybrid.busIDs.amd;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,25 +0,0 @@
|
||||||
# Utility and helper functions
|
|
||||||
{
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
(final: _prev: {
|
|
||||||
# Define custom functions using 'pkgs.util'
|
|
||||||
util = {
|
|
||||||
# Parses the domain from a URI
|
|
||||||
getDomainFromURI =
|
|
||||||
url:
|
|
||||||
let
|
|
||||||
parsedURL = (lib.strings.splitString "." url);
|
|
||||||
in
|
|
||||||
builtins.concatStringsSep "." [
|
|
||||||
(builtins.elemAt parsedURL 1)
|
|
||||||
(builtins.elemAt parsedURL 2)
|
|
||||||
];
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
|
||||||
}
|
|
10
overlays/pkgs/unstable/default.nix
Normal file
10
overlays/pkgs/unstable/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ channels, inputs, ... }:
|
||||||
|
|
||||||
|
final: prev:
|
||||||
|
|
||||||
|
{
|
||||||
|
unstable = import inputs.nixpkgs-unstable {
|
||||||
|
system = final.system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
}
|
|
@ -6,7 +6,7 @@ stdenv.mkDerivation rec {
|
||||||
nativeBuildInputs = [ pkgs.unzip ];
|
nativeBuildInputs = [ pkgs.unzip ];
|
||||||
buildInputs = [ pkgs.unzip ];
|
buildInputs = [ pkgs.unzip ];
|
||||||
|
|
||||||
src = ../modules/secrets/Freight-20240828T164047Z-001.zip;
|
src = ../../modules/nixos/secrets/Freight-20240828T164047Z-001.zip;
|
||||||
|
|
||||||
unpackPhase = ''
|
unpackPhase = ''
|
||||||
runHook preUnpack
|
runHook preUnpack
|
|
@ -93,11 +93,6 @@ in
|
||||||
|
|
||||||
# Configure the system.
|
# Configure the system.
|
||||||
aux.system = {
|
aux.system = {
|
||||||
# Enable to allow unfree (e.g. closed source) packages.
|
|
||||||
# Some settings may override this (e.g. enabling Nvidia GPU support).
|
|
||||||
# https://nixos.org/manual/nixpkgs/stable/#sec-allow-unfree
|
|
||||||
allowUnfree = true;
|
|
||||||
|
|
||||||
# Enable Secure Boot support.
|
# Enable Secure Boot support.
|
||||||
bootloader = {
|
bootloader = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -14,11 +14,6 @@ in
|
||||||
###*** Configure your system below this line. ***###
|
###*** Configure your system below this line. ***###
|
||||||
# Configure the system.
|
# Configure the system.
|
||||||
aux.system = {
|
aux.system = {
|
||||||
# Enable to allow unfree (e.g. closed source) packages.
|
|
||||||
# Some settings may override this (e.g. enabling Nvidia GPU support).
|
|
||||||
# https://nixos.org/manual/nixpkgs/stable/#sec-allow-unfree
|
|
||||||
allowUnfree = true;
|
|
||||||
|
|
||||||
apps = {
|
apps = {
|
||||||
development.enable = true;
|
development.enable = true;
|
||||||
media.enable = true;
|
media.enable = true;
|
||||||
|
|
|
@ -19,9 +19,11 @@ in
|
||||||
aux.system = {
|
aux.system = {
|
||||||
apps = {
|
apps = {
|
||||||
development.enable = true;
|
development.enable = true;
|
||||||
dj.enable = true;
|
|
||||||
gaming.enable = true;
|
gaming.enable = true;
|
||||||
media.enable = true;
|
media = {
|
||||||
|
enable = true;
|
||||||
|
mixxx.enable = true;
|
||||||
|
};
|
||||||
office.enable = true;
|
office.enable = true;
|
||||||
recording.enable = true;
|
recording.enable = true;
|
||||||
social.enable = true;
|
social.enable = true;
|
||||||
|
|
Loading…
Reference in a new issue