Merge
This commit is contained in:
commit
7c8a7bab46
@ -42,6 +42,9 @@ with import ../support.nix { inherit lib config; }; {
|
|||||||
cmd = "${pkgs.xarchiver}/bin/xarchiver";
|
cmd = "${pkgs.xarchiver}/bin/xarchiver";
|
||||||
desktop = "xarchiver";
|
desktop = "xarchiver";
|
||||||
};
|
};
|
||||||
|
viewtube = {
|
||||||
|
desktop = "viewtube";
|
||||||
|
};
|
||||||
# archive = {
|
# archive = {
|
||||||
# cmd = "${pkgs.ark}/bin/ark";
|
# cmd = "${pkgs.ark}/bin/ark";
|
||||||
# desktop = "org.kde.ark";
|
# desktop = "org.kde.ark";
|
||||||
@ -59,37 +62,38 @@ with import ../support.nix { inherit lib config; }; {
|
|||||||
# desktop = "gnumeric";
|
# desktop = "gnumeric";
|
||||||
# };
|
# };
|
||||||
};
|
};
|
||||||
# home-manager.users.alukard.xdg.configFile."mimeapps.list.home".text =
|
home-manager.users.alukard.xdg.configFile."mimeapps.list".text =
|
||||||
# with config.defaultApplications;
|
with config.defaultApplications;
|
||||||
# let
|
let
|
||||||
# apps = builtins.mapAttrs (name: value: "${value.desktop}.desktop;") {
|
apps = builtins.mapAttrs (name: value: "${value.desktop}.desktop;") {
|
||||||
# "text/html" = browser;
|
"text/html" = browser;
|
||||||
# # "image/*" = { desktop = "org.kde.gwenview"; };
|
# "image/*" = { desktop = "org.kde.gwenview"; };
|
||||||
# "application/x-bittorrent" = torrent;
|
"application/x-bittorrent" = torrent;
|
||||||
# "application/zip" = archive;
|
"application/zip" = archive;
|
||||||
# "application/rar" = archive;
|
"application/rar" = archive;
|
||||||
# "application/7z" = archive;
|
"application/7z" = archive;
|
||||||
# "application/*tar" = archive;
|
"application/*tar" = archive;
|
||||||
# "application/x-kdenlive" = archive;
|
"application/x-kdenlive" = archive;
|
||||||
# "x-scheme-handler/http" = browser;
|
"x-scheme-handler/http" = browser;
|
||||||
# "x-scheme-handler/https" = browser;
|
"x-scheme-handler/https" = browser;
|
||||||
# "x-scheme-handler/about" = browser;
|
"x-scheme-handler/about" = browser;
|
||||||
# "x-scheme-handler/unknown" = browser;
|
"x-scheme-handler/unknown" = browser;
|
||||||
# # "x-scheme-handler/mailto" = mail;
|
"x-scheme-handler/viewtube" = viewtube;
|
||||||
# # "application/pdf" = { desktop = "org.kde.okular"; };
|
# "x-scheme-handler/mailto" = mail;
|
||||||
# # "application/vnd.openxmlformats-officedocument.wordprocessingml.document" =
|
# "application/pdf" = { desktop = "org.kde.okular"; };
|
||||||
# # text_processor;
|
# "application/vnd.openxmlformats-officedocument.wordprocessingml.document" =
|
||||||
# # "application/msword" = text_processor;
|
# text_processor;
|
||||||
# # "application/vnd.oasis.opendocument.text" = text_processor;
|
# "application/msword" = text_processor;
|
||||||
# # "text/csv" = spreadsheet;
|
# "application/vnd.oasis.opendocument.text" = text_processor;
|
||||||
# # "application/vnd.oasis.opendocument.spreadsheet" = spreadsheet;
|
# "text/csv" = spreadsheet;
|
||||||
# # This actually makes Emacs an editor for everything... XDG is wierd
|
# "application/vnd.oasis.opendocument.spreadsheet" = spreadsheet;
|
||||||
# "text/plain" = editor;
|
# This actually makes Emacs an editor for everything... XDG is wierd
|
||||||
# };
|
"text/plain" = editor;
|
||||||
# in genIni {
|
};
|
||||||
# "Default Applications" = apps;
|
in genIni {
|
||||||
# "Added Associations" = apps;
|
"Default Applications" = apps;
|
||||||
# };
|
"Added Associations" = apps;
|
||||||
|
};
|
||||||
home-manager.users.alukard.xdg.configFile."filetypesrc".text = genIni {
|
home-manager.users.alukard.xdg.configFile."filetypesrc".text = genIni {
|
||||||
EmbedSettings = {
|
EmbedSettings = {
|
||||||
"embed-application/*" = false;
|
"embed-application/*" = false;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ ... }: {
|
{ config, lib, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./applications/packages.nix
|
./applications/packages.nix
|
||||||
./applications/rofi.nix
|
./applications/rofi.nix
|
||||||
@ -17,6 +17,8 @@
|
|||||||
./workspace/compton.nix
|
./workspace/compton.nix
|
||||||
./workspace/misc.nix
|
./workspace/misc.nix
|
||||||
./workspace/dunst.nix
|
./workspace/dunst.nix
|
||||||
|
./workspace/cursor.nix
|
||||||
|
./workspace/mpv.nix
|
||||||
./workspace/kde
|
./workspace/kde
|
||||||
# ./workspace/synergy.nix
|
# ./workspace/synergy.nix
|
||||||
# ./workspace/ssh.nix
|
# ./workspace/ssh.nix
|
||||||
@ -41,5 +43,6 @@
|
|||||||
./network.nix
|
./network.nix
|
||||||
./wireguard.nix
|
./wireguard.nix
|
||||||
./filesystems.nix
|
./filesystems.nix
|
||||||
|
./samba.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -6,10 +6,20 @@
|
|||||||
else
|
else
|
||||||
[ "noatime" "compress=zstd" ];
|
[ "noatime" "compress=zstd" ];
|
||||||
};
|
};
|
||||||
"/shared" = lib.mkIf config.deviceSpecific.isVM {
|
"/shared/nixos" = lib.mkIf config.deviceSpecific.isVM {
|
||||||
fsType = "vboxsf";
|
fsType = "vboxsf";
|
||||||
device = "shared";
|
device = "shared";
|
||||||
options = [ "rw" "nodev" "relatime" "iocharset=utf8" "uid=1000" "gid=100" "dmode=0770" "fmode=0770" "nofail" ];
|
options = [
|
||||||
|
"rw"
|
||||||
|
"nodev"
|
||||||
|
"relatime"
|
||||||
|
"nofail"
|
||||||
|
"dmode=0755"
|
||||||
|
"fmode=0644"
|
||||||
|
"uid=${toString config.users.users.alukard.uid}"
|
||||||
|
# "gid=${toString config.users.groups.users.gid}"
|
||||||
|
"gid=${toString config.users.groups.smbgrp.gid}"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ with deviceSpecific; {
|
|||||||
GST_VAAPI_ALL_DRIVERS = "1";
|
GST_VAAPI_ALL_DRIVERS = "1";
|
||||||
LIBVA_DRIVER_NAME = "iHD";
|
LIBVA_DRIVER_NAME = "iHD";
|
||||||
};
|
};
|
||||||
|
# --- END ---
|
||||||
|
|
||||||
hardware.bluetooth.enable = isLaptop;
|
hardware.bluetooth.enable = isLaptop;
|
||||||
|
|
||||||
@ -41,6 +42,9 @@ with deviceSpecific; {
|
|||||||
pkgs.linuxPackages_latest;
|
pkgs.linuxPackages_latest;
|
||||||
supportedFilesystems = [ "ntfs" ];
|
supportedFilesystems = [ "ntfs" ];
|
||||||
# extraModulePackages = [ config.boot.kernelPackages.exfat-nofuse ];
|
# extraModulePackages = [ config.boot.kernelPackages.exfat-nofuse ];
|
||||||
|
blacklistedKernelModules = lib.mkIf (device == "Dell-Laptop") [
|
||||||
|
"psmouse"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
|
54
modules/samba.nix
Normal file
54
modules/samba.nix
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
users.groups.smbgrp.gid = 2001;
|
||||||
|
# TODO: add nologin shell to this user
|
||||||
|
users.users.smbuser =
|
||||||
|
lib.mkIf (config.device == "AMD-Workstation" || config.device == "NixOS-VM") {
|
||||||
|
isNormalUser = false;
|
||||||
|
extraGroups = [
|
||||||
|
"smbgrp"
|
||||||
|
];
|
||||||
|
description = "User for samba sharing";
|
||||||
|
};
|
||||||
|
services.samba =
|
||||||
|
lib.mkIf (config.device == "AMD-Workstation" || config.device == "NixOS-VM") {
|
||||||
|
enable = true;
|
||||||
|
enableNmbd = false;
|
||||||
|
enableWinbindd = false;
|
||||||
|
invalidUsers = [ "root" ];
|
||||||
|
nsswins = false;
|
||||||
|
securityType = "user";
|
||||||
|
syncPasswordsByPam = false;
|
||||||
|
# shares = {
|
||||||
|
# };
|
||||||
|
# extraConfig = ''
|
||||||
|
configText = ''
|
||||||
|
[global]
|
||||||
|
server string = samba home server
|
||||||
|
server role = standalone server
|
||||||
|
disable netbios = yes
|
||||||
|
smb ports = 445
|
||||||
|
|
||||||
|
[private]
|
||||||
|
path = /shared/samba
|
||||||
|
browsable = yes
|
||||||
|
read only = no
|
||||||
|
force create mode = 0660
|
||||||
|
force directory mode = 2770
|
||||||
|
valid users = @smbgrp
|
||||||
|
|
||||||
|
[files]
|
||||||
|
path = /shared/files
|
||||||
|
browsable = yes
|
||||||
|
read only = no
|
||||||
|
guest only = yes
|
||||||
|
force create mode = 0660
|
||||||
|
force directory mode = 2770
|
||||||
|
force user = smbuser
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
environment.systemPackages =
|
||||||
|
if (config.device == "AMD-Workstation" || config.device == "NixOS-VM") then
|
||||||
|
[ config.services.samba.package ]
|
||||||
|
else
|
||||||
|
[ ];
|
||||||
|
}
|
@ -18,6 +18,7 @@
|
|||||||
# "adbusers"
|
# "adbusers"
|
||||||
"input"
|
"input"
|
||||||
"vboxusers"
|
"vboxusers"
|
||||||
|
"smbgrp"
|
||||||
];
|
];
|
||||||
description = "Дмитрий Холкин";
|
description = "Дмитрий Холкин";
|
||||||
uid = 1000;
|
uid = 1000;
|
||||||
|
10
modules/workspace/cursor.nix
Normal file
10
modules/workspace/cursor.nix
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
bibata-cursors
|
||||||
|
];
|
||||||
|
# Bibata_Amber, Bibata_Ice, Bibata_Oil
|
||||||
|
home-manager.users.alukard.home.file.".icons/default" = {
|
||||||
|
source = "${pkgs.bibata-cursors}/share/icons/Bibata_Oil";
|
||||||
|
};
|
||||||
|
}
|
32
modules/workspace/mpv.nix
Normal file
32
modules/workspace/mpv.nix
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
home-manager.users.alukard.programs.mpv = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users.alukard.home.file.".local/share/applications/viewtube.desktop" = {
|
||||||
|
text = ''
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=ViewTube Protocol
|
||||||
|
Exec=/home/alukard/.scripts/viewtube.sh %u
|
||||||
|
Type=Application
|
||||||
|
Terminal=false
|
||||||
|
MimeType=x-scheme-handler/viewtube
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
home-manager.users.alukard.home.file.".scripts/viewtube.sh" = {
|
||||||
|
executable = true;
|
||||||
|
text = ''
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
s="$(echo "$1" | sed -e "s/viewtube://")"
|
||||||
|
v="$(echo "$s" | awk -F 'SEPARATOR' '{print $1}')"
|
||||||
|
a="$(echo "$s" | awk -F 'SEPARATOR' '{print $2}')"
|
||||||
|
if [ "$a" = "" ]; then
|
||||||
|
mpv --hwdec=vaapi --osc --fs --ytdl=yes "$v"
|
||||||
|
#cvlc -f "$v"
|
||||||
|
else
|
||||||
|
mpv --hwdec=vaapi --osc --fs --ytdl=yes --audio-file "$a" "$v"
|
||||||
|
#cvlc -f --input-slave "$a" "$v"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
@ -41,5 +41,8 @@
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
shellAliases = {
|
||||||
|
"mpv" = "mpv --hwdec=vaapi";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user