some fixes and refactoring

This commit is contained in:
Dmitriy Kholkin 2021-02-17 01:05:44 +03:00
parent 955c8cb081
commit f3bed52949
4 changed files with 20 additions and 106 deletions

View File

@ -95,6 +95,7 @@ with config.deviceSpecific;
# "text/csv" = spreadsheet; # "text/csv" = spreadsheet;
# "application/vnd.oasis.opendocument.spreadsheet" = spreadsheet; # "application/vnd.oasis.opendocument.spreadsheet" = spreadsheet;
"text/plain" = editor; "text/plain" = editor;
"inode/directory" = fm;
}; };
}; };
}; };

View File

@ -2,10 +2,10 @@
with config.deviceSpecific; { with config.deviceSpecific; {
programs.adb.enable = true; programs.adb.enable = true;
programs.java = { # programs.java = {
enable = true; # enable = true;
package = if (config.device == "AMD-Workstation") then pkgs.jdk13 else pkgs.jre; # package = if (config.device == "AMD-Workstation") then pkgs.jdk13 else pkgs.jre;
}; # };
# Install cdemu for some gaming purposes # Install cdemu for some gaming purposes
# programs.cdemu = { # programs.cdemu = {
@ -21,16 +21,19 @@ with config.deviceSpecific; {
curl curl
ddgr ddgr
exa exa
exfat-utils
fd fd
git-crypt git-crypt
glib.bin # gio
gptfdisk
lm_sensors lm_sensors
lnav lnav
neofetch neofetch
nix-prefetch-git nix-prefetch-git
nix-prefetch-github nix-prefetch-github
nomino nomino
# (p7zip.override { enableUnfree = true; })
p7zip p7zip
# (p7zip.override { enableUnfree = true; })
pciutils pciutils
pinfo pinfo
ripgrep ripgrep
@ -42,7 +45,6 @@ with config.deviceSpecific; {
xclip xclip
youtube-dl youtube-dl
zip zip
gptfdisk
# tui # tui
bpytop bpytop
@ -53,6 +55,7 @@ with config.deviceSpecific; {
spotify-tui spotify-tui
# gui # gui
# audacity # fixit
discord discord
feh feh
gnome3.simple-scan gnome3.simple-scan
@ -61,6 +64,7 @@ with config.deviceSpecific; {
pinta pinta
pulseeffects-legacy pulseeffects-legacy
qbittorrent qbittorrent
quodlibet
spotifywm spotifywm
system-config-printer system-config-printer
tdesktop tdesktop
@ -71,27 +75,29 @@ with config.deviceSpecific; {
xfce4-14.xfce4-taskmanager xfce4-14.xfce4-taskmanager
youtube-to-mpv youtube-to-mpv
zathura zathura
# audacity # fixit
# quodlibet # misc
spicetify-cli i3status-rust
papirus-icon-theme
] ++ lib.optionals (!isVM) [ ] ++ lib.optionals (!isVM) [
# rust-stable # rust-stable
libreoffice libreoffice
# Android dev
androidenv.androidPkgs_9_0.androidsdk
android-studio
# scrcpy
] ++ lib.optionals isGaming [ ] ++ lib.optionals isGaming [
# lutris # lutris
# protontricks # protontricks
# retroarch # retroarch
steam-run steam-run
(steam.override { withJava = true; }) (steam.override { withJava = true; })
multimc
] ++ lib.optionals isLaptop [ ] ++ lib.optionals isLaptop [
# acpi # acpi
# blueman # blueman
] ++ lib.optionals (config.device == "AMD-Workstation") [ ] ++ lib.optionals (config.device == "AMD-Workstation") [
# xonar-fp # xonar-fp
# Android dev
# androidenv.androidPkgs_9_0.androidsdk
# android-studio
# scrcpy
] ++ lib.optionals (enableVirtualisation) [ ] ++ lib.optionals (enableVirtualisation) [
virt-manager virt-manager
]; ];

View File

@ -59,82 +59,3 @@ with types; {
}; };
}; };
} }
# { pkgs, lib, config, ... }:
# with lib;
# with types; {
# options = {
# device = mkOption { type = strMatching "[A-z|0-9]*-(Laptop|Workstation|VM)"; };
# devices = mkOption { type = attrs; };
# deviceSpecific = mkOption { type = attrs; };
# };
# config = {
# deviceSpecific = let
# device = config.device;
# devInfo = config.devices.${config.device};
# in rec {
# isLaptop = (!isNull (builtins.match ".*Laptop" device));
# isVM = (!isNull (builtins.match ".*VM" device));
# isHost = (device == "AMD-Workstation");
# isShared = devInfo.isShared;
# isSSD = devInfo.drive.type == "ssd";
# smallScreen = (device == "Dell-Laptop");
# cpu = devInfo.cpu.vendor;
# gpu = devInfo.gpu;
# ram = devInfo.ram;
# enableVirtualisation = devInfo.enableVirtualisation;
# isGaming = devInfo.gaming;
# };
# devices = {
# AMD-Workstation = {
# cpu = {
# vendor = "amd";
# clock = 3700;
# threads = 12;
# };
# drive = {
# type = "ssd";
# size = 250;
# };
# gpu = "amd";
# ram = 16;
# isShared = false;
# enableVirtualisation = true;
# gaming = true;
# };
# Dell-Laptop = {
# cpu = {
# vendor = "intel";
# clock = 1600;
# threads = 8;
# };
# drive = {
# type = "ssd";
# size = 250;
# };
# gpu = "intel";
# ram = 16;
# isShared = false;
# enableVirtualisation = true;
# gaming = true;
# };
# NixOS-VM = {
# cpu = {
# vendor = "amd";
# clock = 3700;
# threads = 4;
# };
# drive = {
# type = "ssd";
# size = 20;
# };
# gpu = "virtualbox";
# ram = 4;
# isShared = false;
# enableVirtualisation = false;
# gaming = false;
# };
# };
# };
# }

View File

@ -1,6 +1,5 @@
{ pkgs, config, lib, inputs, ... }: { pkgs, config, lib, inputs, ... }:
let let
# mozilla_overlay = import inputs.nixpkgs-mozilla;
system = "x86_64-linux"; system = "x86_64-linux";
old = import inputs.nixpkgs-old ({ old = import inputs.nixpkgs-old ({
config = config.nixpkgs.config; config = config.nixpkgs.config;
@ -33,25 +32,12 @@ in
}); });
# material-icons = pkgs.callPackage ./packages/material-icons-inline.nix { }; # material-icons = pkgs.callPackage ./packages/material-icons-inline.nix { };
# rust-stable = pkgs.latest.rustChannels.stable.rust.override {
# extensions = [
# "rls-preview"
# "clippy-preview"
# "rustfmt-preview"
# ];
# };
# wpgtk = super.wpgtk.overrideAttrs (old: rec { # wpgtk = super.wpgtk.overrideAttrs (old: rec {
# propagatedBuildInputs = with pkgs; [ # propagatedBuildInputs = with pkgs; [
# python2 python27Packages.pygtk # python2 python27Packages.pygtk
# python3Packages.pygobject3 python3Packages.pillow python3Packages.pywal # python3Packages.pygobject3 python3Packages.pillow python3Packages.pywal
# ]; # ];
# }); # });
# spotifyd = super.spotifyd.override { withPulseAudio = true; };
# spotify-tui = naersk.buildPackage {
# name = "spotify-tui";
# src = pkgs.imports.spotify-tui;
# buildInputs = [ pkgs.pkgconf pkgs.openssl ];
# };
} }
) )
]; ];