mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2026-10-06 21:51:50 +00:00
feat: stuff
This commit is contained in:
@@ -196,6 +196,12 @@
|
|||||||
ausweisapp
|
ausweisapp
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/*services.nfsclient = {
|
||||||
|
enable = true;
|
||||||
|
ip = "192.168.0.51";
|
||||||
|
exportedDirs = [ "shared" ];
|
||||||
|
};*/
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
firewall = {
|
firewall = {
|
||||||
allowedTCPPorts = [
|
allowedTCPPorts = [
|
||||||
|
|||||||
@@ -157,6 +157,15 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
services.nfshare = {
|
||||||
|
enable = true;
|
||||||
|
allowedIps = [ "192.168.0.84" ];
|
||||||
|
baseDir = "/export";
|
||||||
|
exportedDirs = [ "shared" ];
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
# List packages installed in system profile. To search, run:
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# Essential utils
|
# Essential utils
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
osConfig,
|
osConfig,
|
||||||
|
username,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
@@ -57,7 +58,7 @@ in
|
|||||||
decoration.border_part_of_window = false;
|
decoration.border_part_of_window = false;
|
||||||
};
|
};
|
||||||
bind = [
|
bind = [
|
||||||
(bind "SUPER + C" "hl.dsp.window.close()")
|
(bind (if username == "luci" then "SUPER + Q" else "SUPER + C") "hl.dsp.window.close()")
|
||||||
(bind "SUPER + P" ''
|
(bind "SUPER + P" ''
|
||||||
function()
|
function()
|
||||||
hl.dsp.window.float()
|
hl.dsp.window.float()
|
||||||
|
|||||||
@@ -36,6 +36,8 @@
|
|||||||
./usecases/windows-vm.nix
|
./usecases/windows-vm.nix
|
||||||
|
|
||||||
./services/airprint.nix
|
./services/airprint.nix
|
||||||
|
./services/nfs.nix
|
||||||
|
./services/nfsclient.nix
|
||||||
|
|
||||||
./shell/dunst.nix
|
./shell/dunst.nix
|
||||||
./shell/firefox-pip.nix
|
./shell/firefox-pip.nix
|
||||||
|
|||||||
@@ -0,0 +1,67 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.services.nfshare;
|
||||||
|
lockdPort = 4001;
|
||||||
|
mountdPort = 4002;
|
||||||
|
statdPort = 4000;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.services.nfshare = {
|
||||||
|
enable = mkEnableOption "Enable shared directory";
|
||||||
|
allowedIps = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
};
|
||||||
|
baseDir = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "/export";
|
||||||
|
};
|
||||||
|
exportedDirs = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services.nfs.server = {
|
||||||
|
inherit lockdPort mountdPort statdPort;
|
||||||
|
enable = true;
|
||||||
|
exports = (
|
||||||
|
lib.concatStringsSep "\n" (
|
||||||
|
lib.concatMap (
|
||||||
|
ip:
|
||||||
|
[ "${cfg.baseDir} ${ip}(rw,fsid=0,no_subtree_check)" ]
|
||||||
|
++ (lib.map (
|
||||||
|
dir: "${cfg.baseDir}/${dir} ${ip}(rw,nohide,insecure,no_subtree_check)"
|
||||||
|
) cfg.exportedDirs)
|
||||||
|
) cfg.allowedIps
|
||||||
|
)
|
||||||
|
);
|
||||||
|
extraNfsdConfig = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall = {
|
||||||
|
enable = true;
|
||||||
|
allowedTCPPorts = [
|
||||||
|
111
|
||||||
|
2049
|
||||||
|
lockdPort
|
||||||
|
mountdPort
|
||||||
|
statdPort
|
||||||
|
20048
|
||||||
|
];
|
||||||
|
allowedUDPPorts = [
|
||||||
|
111
|
||||||
|
2049
|
||||||
|
lockdPort
|
||||||
|
mountdPort
|
||||||
|
statdPort
|
||||||
|
20048
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.services.nfsclient;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.services.nfsclient = {
|
||||||
|
enable = mkEnableOption "Enable shared directory";
|
||||||
|
ip = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
};
|
||||||
|
exportedDirs = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
boot.supportedFilesystems = [ "nfs" ];
|
||||||
|
fileSystems = builtins.listToAttrs (
|
||||||
|
lib.map (dir: {
|
||||||
|
name = "/mnt/${dir}";
|
||||||
|
value = {
|
||||||
|
device = "${cfg.ip}:/shared";
|
||||||
|
fsType = "nfs4";
|
||||||
|
options = [
|
||||||
|
"x-systemd.idle-timeout=600"
|
||||||
|
"x-systemd.automount"
|
||||||
|
"noauto"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}) cfg.exportedDirs
|
||||||
|
);
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -34,6 +34,7 @@ in
|
|||||||
home-manager.users.${username} = {
|
home-manager.users.${username} = {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
freecad
|
freecad
|
||||||
|
plasticity
|
||||||
orca-slicer
|
orca-slicer
|
||||||
];
|
];
|
||||||
programs = {
|
programs = {
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ in
|
|||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
oversteer
|
oversteer
|
||||||
obs-studio
|
obs-studio
|
||||||
/*
|
|
||||||
(lutris.override {
|
(lutris.override {
|
||||||
extraLibraries =
|
extraLibraries =
|
||||||
pkgs: with pkgs; [
|
pkgs: with pkgs; [
|
||||||
@@ -37,7 +36,6 @@ in
|
|||||||
libvdpau
|
libvdpau
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
*/
|
|
||||||
# rpcs3
|
# rpcs3
|
||||||
# bottles
|
# bottles
|
||||||
wineWow64Packages.stagingFull
|
wineWow64Packages.stagingFull
|
||||||
|
|||||||
Reference in New Issue
Block a user