mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 04:19:22 +08:00
Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| df93212d11 | |||
| 96d507a5ee | |||
| 21ec879c84 | |||
| 4c7c357aca | |||
| ce6b60b150 | |||
| 30c283523a | |||
| 66a7da7c0c | |||
| d0836dd35e | |||
| 4516dd39b3 | |||
| 97f36d2e92 | |||
| 2ded7a75f0 | |||
| 8379b95651 | |||
| 26d8e48e61 | |||
| 125bab0ea8 | |||
| 1f108a4ffc | |||
| 1259ace667 | |||
| ef71e54d26 | |||
| b1b76c2984 | |||
| e110601a80 | |||
| cef3a1eb63 | |||
| bb8442a458 |
@@ -20,6 +20,7 @@ inputs:
|
||||
rollingRootfs = {};
|
||||
};
|
||||
nixpkgs.march = "tigerlake";
|
||||
kernel.variant = "cachyos-lts";
|
||||
};
|
||||
hardware = { cpus = [ "intel" ]; gpu.type = "intel"; };
|
||||
services =
|
||||
@@ -36,7 +37,6 @@ inputs:
|
||||
};
|
||||
beesd."/".hashTableSizeMB = 64;
|
||||
sshd = {};
|
||||
kvm = {};
|
||||
};
|
||||
bugs = [ "xmunet" ];
|
||||
};
|
||||
|
||||
@@ -52,7 +52,6 @@ inputs:
|
||||
"alderlake"
|
||||
];
|
||||
nixpkgs = { march = "znver4"; cuda.capabilities = [ "8.9" ]; };
|
||||
kernel.variant = "cachyos-lts";
|
||||
sysctl.laptop-mode = 5;
|
||||
};
|
||||
hardware =
|
||||
|
||||
@@ -18,7 +18,6 @@ inputs:
|
||||
{
|
||||
xray.client = { enable = true; dnsmasq.extraInterfaces = [ "eno146" ]; };
|
||||
beesd."/" = { hashTableSizeMB = 128; threads = 4; };
|
||||
xrdp = { enable = true; hostname = [ "srv1.chn.moe" ]; };
|
||||
samba = { hostsAllowed = ""; shares = { home.path = "/home"; root.path = "/"; }; };
|
||||
};
|
||||
packages.packages._prebuildPackages =
|
||||
|
||||
@@ -23,7 +23,6 @@ inputs:
|
||||
dnsmasq = { extraInterfaces = [ "eno2" ]; hosts."hpc.xmu.edu.cn" = "121.192.191.11"; };
|
||||
};
|
||||
beesd."/" = { hashTableSizeMB = 16 * 128; loadAverage = 8; };
|
||||
xrdp = { enable = true; hostname = [ "srv2.chn.moe" ]; };
|
||||
samba = { hostsAllowed = ""; shares = { home.path = "/home"; root.path = "/"; }; };
|
||||
groupshare = {};
|
||||
hpcstat = {};
|
||||
|
||||
13
doc/todo.md
13
doc/todo.md
@@ -1,6 +1,7 @@
|
||||
* 使用 wrap 好的 intel 编译器。
|
||||
* 在挂载根目录前(创建 rootfs 时),按用户复制需要的文件
|
||||
* 挑选一个好看的主题
|
||||
* 尝试一些别的计算软件
|
||||
* 解决 vscode 中的英语语法检查插件,尝试 valentjn.vscode-ltex
|
||||
* 调整 xmupc1 xmupc2 启动分区
|
||||
* 完善 slurm 文档,调整 slurm 设置:内存,nice
|
||||
* 调整 sbatch-tui 选项
|
||||
* 打包 cachyos
|
||||
* 打包 intel 编译器
|
||||
* 切换到 niri,清理 plasma
|
||||
* 调整其它用户的 zsh 配置
|
||||
* 调整 motd
|
||||
|
||||
69
flake.lock
generated
69
flake.lock
generated
@@ -3,12 +3,12 @@
|
||||
"blog": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1742891194,
|
||||
"lastModified": 1748496213,
|
||||
"lfs": true,
|
||||
"narHash": "sha256-MTP/2zAh8VUft3mlgLOWYRuYslDKDu+YRM6BM8r9L9w=",
|
||||
"narHash": "sha256-yoJ8G3ZmYu/qdDBckj/qz5ErOtpBlqHBqxMaL3ZTKuI=",
|
||||
"ref": "refs/heads/public",
|
||||
"rev": "99ec653eac9f8452500ee3a2d553728dd60a1a11",
|
||||
"revCount": 27,
|
||||
"rev": "005a0715053936815c5e4be26236915d915d81c2",
|
||||
"revCount": 29,
|
||||
"type": "git",
|
||||
"url": "https://git.chn.moe/chn/blog-public.git"
|
||||
},
|
||||
@@ -18,22 +18,6 @@
|
||||
"url": "https://git.chn.moe/chn/blog-public.git"
|
||||
}
|
||||
},
|
||||
"blurred-wallpaper": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1746480265,
|
||||
"narHash": "sha256-A1xKQy6ufGrW4yVGkYb8zBqRuQFFxtowCbao2GOP150=",
|
||||
"owner": "bouteillerAlan",
|
||||
"repo": "blurredwallpaper",
|
||||
"rev": "6fa32cc6062c4852b9abb83f590314a2cab9b5ad",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "bouteillerAlan",
|
||||
"repo": "blurredwallpaper",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"bscpkgs": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -531,11 +515,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1748221239,
|
||||
"narHash": "sha256-zUlZp/ebt+EVBp1sA2ChVGz9MSdZpz/rIesOFSq23bo=",
|
||||
"lastModified": 1748494270,
|
||||
"narHash": "sha256-SRyjwD3RfMXpY0/69WErFQ/P8UG1aD5qQQNvEd/NGLs=",
|
||||
"owner": "CHN-beta",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "3da8a40d3722ba5bc42e5076c774ac24daf3cc0d",
|
||||
"rev": "3eb4afeaf2384476d35dbb5dc51675c5ec1d2b62",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -839,7 +823,6 @@
|
||||
"root": {
|
||||
"inputs": {
|
||||
"blog": "blog",
|
||||
"blurred-wallpaper": "blurred-wallpaper",
|
||||
"bscpkgs": "bscpkgs",
|
||||
"cachyos-lts": "cachyos-lts",
|
||||
"catppuccin": "catppuccin",
|
||||
@@ -875,8 +858,6 @@
|
||||
"py4vasp": "py4vasp",
|
||||
"rsshub": "rsshub",
|
||||
"rycee": "rycee",
|
||||
"shadowrz": "shadowrz",
|
||||
"slate": "slate",
|
||||
"sops-nix": "sops-nix",
|
||||
"sqlite-orm": "sqlite-orm",
|
||||
"stickerpicker": "stickerpicker",
|
||||
@@ -919,42 +900,6 @@
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"shadowrz": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1748056260,
|
||||
"narHash": "sha256-bcUxYhdC/wCw20DeU3tHgdc80JLOAIsKUULH37fdU/M=",
|
||||
"owner": "ShadowRZ",
|
||||
"repo": "nur-packages",
|
||||
"rev": "0c35cdecdf6ecec27c69810ca9f0346fca7c2ee8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ShadowRZ",
|
||||
"repo": "nur-packages",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"slate": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1626631298,
|
||||
"narHash": "sha256-3tbB16sWVUqiHAfeFc0FnFb0Cf6ZFxYWsYAyexeZVxk=",
|
||||
"owner": "TheBigWazz",
|
||||
"repo": "Slate",
|
||||
"rev": "ff21b49c6e49b5a9f89497e4fea49a5a0c39bd6b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "TheBigWazz",
|
||||
"repo": "Slate",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"sops-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
bscpkgs = { url = "github:CHN-beta/bscpkgs"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||
cachyos-lts.url = "github:drakon64/nixos-cachyos-kernel";
|
||||
nixvirt = { url = "github:CHN-beta/NixVirt"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||
shadowrz = { url = "github:ShadowRZ/nur-packages"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||
|
||||
misskey = { url = "git+https://github.com/CHN-beta/misskey?submodules=1"; flake = false; };
|
||||
rsshub = { url = "github:DIYgod/RSSHub"; flake = false; };
|
||||
@@ -41,8 +40,6 @@
|
||||
tgbot-cpp = { url = "github:reo7sp/tgbot-cpp"; flake = false; };
|
||||
v-sim = { url = "gitlab:l_sim/v_sim/master"; flake = false; };
|
||||
rycee = { url = "gitlab:rycee/nur-expressions"; flake = false; };
|
||||
blurred-wallpaper = { url = "github:bouteillerAlan/blurredwallpaper"; flake = false; };
|
||||
slate = { url = "github:TheBigWazz/Slate"; flake = false; };
|
||||
lepton = { url = "github:black7375/Firefox-UI-Fix"; flake = false; };
|
||||
mumax = { url = "github:CHN-beta/mumax"; flake = false; };
|
||||
openxlsx = { url = "github:troldal/OpenXLSX"; flake = false; };
|
||||
|
||||
@@ -15,8 +15,7 @@ inputs:
|
||||
[
|
||||
# system management
|
||||
# TODO: module should add yubikey-touch-detector into path
|
||||
gparted yubikey-touch-detector btrfs-assistant
|
||||
kdePackages.qtstyleplugin-kvantum cpu-x wl-mirror xpra
|
||||
gparted yubikey-touch-detector btrfs-assistant kdePackages.qtstyleplugin-kvantum cpu-x wl-mirror xpra
|
||||
(
|
||||
writeShellScriptBin "xclip"
|
||||
''
|
||||
@@ -25,16 +24,16 @@ inputs:
|
||||
''
|
||||
)
|
||||
# networking
|
||||
remmina putty
|
||||
remmina putty kdePackages.krdc
|
||||
# media
|
||||
mpv nomacs simplescreenrecorder imagemagick gimp-with-plugins qcm waifu2x-converter-cpp blender paraview vlc
|
||||
obs-studio (inkscape-with-extensions.override { inkscapeExtensions = null; })
|
||||
# themes
|
||||
klassy-qt6 localPackages.slate localPackages.blurred-wallpaper
|
||||
obs-studio (inkscape-with-extensions.override { inkscapeExtensions = null; }) kdePackages.kcolorchooser
|
||||
kdePackages.kdenlive
|
||||
# development
|
||||
adb-sync scrcpy dbeaver-bin aircrack-ng fprettify
|
||||
# password and key management
|
||||
yubikey-manager yubikey-manager-qt yubikey-personalization yubikey-personalization-gui bitwarden hashcat
|
||||
kdePackages.kleopatra
|
||||
# download
|
||||
qbittorrent wgetpaste rclone
|
||||
# editor
|
||||
@@ -65,9 +64,7 @@ inputs:
|
||||
nur-xddxdd.svp
|
||||
# for kdenlive auto subtitle
|
||||
openai-whisper
|
||||
]
|
||||
++ (builtins.filter (p: !((p.meta.broken or false) || (builtins.elem p.pname or null [ "falkon" "kalzium" ])))
|
||||
(builtins.filter inputs.lib.isDerivation (builtins.attrValues kdePackages.kdeGear)));
|
||||
];
|
||||
_pythonPackages = [(pythonPackages: with pythonPackages;
|
||||
[
|
||||
phonopy scipy scikit-learn jupyterlab autograd inputs.pkgs.localPackages.phono3py numpy
|
||||
@@ -118,6 +115,7 @@ inputs:
|
||||
wireshark = { enable = true; package = inputs.pkgs.wireshark; };
|
||||
yubikey-touch-detector.enable = true;
|
||||
kdeconnect.enable = true;
|
||||
kde-pim = { enable = true; kmail = true; };
|
||||
};
|
||||
services.pcscd.enable = true;
|
||||
};
|
||||
|
||||
@@ -12,11 +12,10 @@ inputs:
|
||||
{
|
||||
enable = true;
|
||||
languagePacks = [ "zh-CN" "en-US" ];
|
||||
nativeMessagingHosts.packages = with inputs.pkgs; [ uget-integrator firefoxpwa ];
|
||||
nativeMessagingHosts.packages = with inputs.pkgs; [ uget-integrator ];
|
||||
};
|
||||
nixos =
|
||||
{
|
||||
packages.packages._packages = [ inputs.pkgs.firefoxpwa ];
|
||||
user.sharedModules =
|
||||
[{
|
||||
config =
|
||||
@@ -25,7 +24,7 @@ inputs:
|
||||
{
|
||||
enable = true;
|
||||
nativeMessagingHosts = with inputs.pkgs;
|
||||
[ kdePackages.plasma-browser-integration uget-integrator firefoxpwa ];
|
||||
[ kdePackages.plasma-browser-integration uget-integrator ];
|
||||
# TODO: use fixed-version of plugins
|
||||
policies.DefaultDownloadDirectory = "\${home}/Downloads";
|
||||
profiles.default =
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
inputs:
|
||||
{
|
||||
options.nixos.services.xrdp = let inherit (inputs.lib) mkOption types; in
|
||||
{
|
||||
enable = mkOption { type = types.bool; default = false; };
|
||||
port = mkOption { type = types.ints.unsigned; default = 3389; };
|
||||
hostname = mkOption { type = types.nullOr (types.nonEmptyListOf types.nonEmptyStr); default = null; };
|
||||
};
|
||||
config = let inherit (inputs.config.nixos.services) xrdp;
|
||||
in inputs.lib.mkIf xrdp.enable (inputs.lib.mkMerge
|
||||
[
|
||||
{
|
||||
services.xrdp =
|
||||
{
|
||||
enable = true;
|
||||
port = xrdp.port;
|
||||
openFirewall = true;
|
||||
defaultWindowManager = "${inputs.pkgs.plasma-workspace}/bin/startplasma-x11";
|
||||
};
|
||||
}
|
||||
(
|
||||
inputs.lib.mkIf (xrdp.hostname != null)
|
||||
(
|
||||
let mainDomain = builtins.elemAt xrdp.hostname 0;
|
||||
in
|
||||
{
|
||||
services.xrdp =
|
||||
let keydir = inputs.config.security.acme.certs.${mainDomain}.directory;
|
||||
in { sslCert = "${keydir}/full.pem"; sslKey = "${keydir}/key.pem"; };
|
||||
nixos.services.acme.cert.${mainDomain} =
|
||||
{ domains = xrdp.hostname; group = inputs.config.systemd.services.xrdp.serviceConfig.Group; };
|
||||
}
|
||||
)
|
||||
)
|
||||
]);
|
||||
}
|
||||
@@ -5,6 +5,7 @@ inputs:
|
||||
{
|
||||
services =
|
||||
{
|
||||
dbus.implementation = "broker";
|
||||
fstrim.enable = true;
|
||||
acpid.enable = true;
|
||||
# TODO: set ipfs as separate service
|
||||
@@ -15,9 +16,6 @@ inputs:
|
||||
{
|
||||
supportedFilesystems = [ "ntfs" "nfs" "nfsv4" ];
|
||||
# consoleLogLevel = 7;
|
||||
kernelParams = inputs.lib.mkIf
|
||||
(builtins.elem inputs.config.nixos.system.grub.installDevice [ "efi" "efiRemovable" ])
|
||||
[ "plymouth.use-simpledrm" ];
|
||||
};
|
||||
hardware = { enableAllFirmware = true; bluetooth.enable = true; sensor.iio.enable = true; };
|
||||
environment =
|
||||
|
||||
@@ -37,6 +37,8 @@ inputs:
|
||||
"r8712u"
|
||||
# network for srv3
|
||||
"igb"
|
||||
# touchscreen for one
|
||||
"pinctrl-tigerlake"
|
||||
]
|
||||
++ (inputs.lib.optionals (kernel.variant != "nixos") [ "crypto_simd" ]);
|
||||
extraModulePackages = with inputs.config.boot.kernelPackages; [ v4l2loopback zenpower ];
|
||||
|
||||
@@ -24,7 +24,7 @@ let
|
||||
# TODO: test znver3 do use AVX
|
||||
oneapiArch = let match = {}; in match.${nixpkgs.march} or nixpkgs.march;
|
||||
nvhpcArch = nixpkgs.march;
|
||||
contentAddressedByDefault = true;
|
||||
# contentAddressedByDefault = true;
|
||||
})
|
||||
// (inputs.lib.optionalAttrs (nixpkgs.nixRoot != null)
|
||||
{ nix = { storeDir = "${nixpkgs.nixRoot}/store"; stateDir = "${nixpkgs.nixRoot}/var"; }; });
|
||||
@@ -34,7 +34,6 @@ in platformConfig //
|
||||
overlays =
|
||||
[
|
||||
inputs.topInputs.nur-xddxdd.overlays.inSubTree
|
||||
inputs.topInputs.shadowrz.overlays.default
|
||||
inputs.topInputs.nix-vscode-extensions.overlays.default
|
||||
(final: prev:
|
||||
{
|
||||
@@ -64,6 +63,7 @@ in platformConfig //
|
||||
patches = prev.patches or [] ++ [ ./root.patch ];
|
||||
cmakeFlags = prev.cmakeFlags ++ [ "-DCMAKE_CXX_STANDARD=23" ];
|
||||
});
|
||||
inherit (final.pkgs-2411) iio-sensor-proxy;
|
||||
}
|
||||
// (
|
||||
let
|
||||
@@ -121,7 +121,6 @@ in platformConfig //
|
||||
in builtins.listToAttrs (builtins.map
|
||||
(name: { inherit name; value = packages name; }) (builtins.attrNames source))
|
||||
)
|
||||
# TODO: bring patch to upstream
|
||||
// (inputs.lib.optionalAttrs (prev.stdenv.hostPlatform.avx512Support)
|
||||
{ gsl = prev.gsl.overrideAttrs { doCheck = false; }; })
|
||||
// (inputs.lib.optionalAttrs (nixpkgs.march != null)
|
||||
|
||||
@@ -57,7 +57,6 @@ inputs:
|
||||
)
|
||||
];
|
||||
};
|
||||
gtk.iconTheme.name = "klassy";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -11,16 +11,6 @@ inputs:
|
||||
fileName = "nheko.desktop";
|
||||
path = "${inputs.pkgs.nheko}/share/applications/${fileName}";
|
||||
};
|
||||
kclockd = rec
|
||||
{
|
||||
fileName = "org.kde.kclockd-autostart.desktop";
|
||||
path = "${inputs.pkgs.kdePackages.kdeGear.kclock}/etc/xdg/autostart/${fileName}";
|
||||
};
|
||||
yakuake = rec
|
||||
{
|
||||
fileName = "org.kde.yakuake.desktop";
|
||||
path = "${inputs.pkgs.kdePackages.yakuake}/share/applications/${fileName}";
|
||||
};
|
||||
telegram = rec
|
||||
{
|
||||
fileName = "org.telegram.desktop.desktop";
|
||||
@@ -55,8 +45,8 @@ inputs:
|
||||
};
|
||||
devices =
|
||||
{
|
||||
pc = [ "nheko" "kclockd" "yakuake" "telegram" "element" "kmail" "discord" "crow-translate" ];
|
||||
one = [ "kclockd" "yakuake" "telegram" "element" "kmail" "crow-translate" ];
|
||||
pc = [ "nheko" "telegram" "element" "kmail" "discord" "crow-translate" ];
|
||||
one = [ "telegram" "element" "kmail" "crow-translate" ];
|
||||
};
|
||||
in builtins.listToAttrs (builtins.map
|
||||
(file:
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
inputs:
|
||||
{
|
||||
config = inputs.lib.mkIf (inputs.config.nixos.packages.desktop != null)
|
||||
{
|
||||
home-manager.users.chn.config =
|
||||
{
|
||||
programs.plasma =
|
||||
{
|
||||
overrideConfig = true;
|
||||
resetFiles = [ "konsolerc" "yakuakerc" ];
|
||||
configFile =
|
||||
{
|
||||
yakuakerc =
|
||||
{
|
||||
Appearance =
|
||||
{
|
||||
HideSkinBorders.value = true;
|
||||
Skin.value = "Slate";
|
||||
Translucency.value = true;
|
||||
};
|
||||
"Desktop Entry".DefaultProfile.value = "plasma-manager.profile";
|
||||
Dialogs.FirstRun.value = false;
|
||||
Window =
|
||||
{
|
||||
KeepOpen.value = false;
|
||||
KeepOpenAfterLastSessionCloses.value = true;
|
||||
ShowSystrayIcon.value = false;
|
||||
};
|
||||
};
|
||||
konsolerc =
|
||||
{
|
||||
"Desktop Entry".DefaultProfile.value = "plasma-manager.profile";
|
||||
"MainWindow.Toolbar sessionToolbar".ToolButtonStyle.value = "IconOnly";
|
||||
};
|
||||
};
|
||||
dataFile."konsole/plasma-manager.profile" =
|
||||
{
|
||||
Appearance =
|
||||
{
|
||||
AntiAliasFonts.value = true;
|
||||
BoldIntense.value = true;
|
||||
ColorScheme.value = "Breeze";
|
||||
Font.value = "FiraCode Nerd Font Mono,10,-1,5,50,0,0,0,0,0";
|
||||
UseFontLineChararacters.value = true;
|
||||
WordModeAttr.value = false;
|
||||
};
|
||||
"Cursor Options".CursorShape.value = 1;
|
||||
General =
|
||||
{
|
||||
Name.value = "plasma-manager";
|
||||
Parent.value = "FALLBACK/";
|
||||
TerminalCenter.value = true;
|
||||
TerminalMargin.value = 1;
|
||||
};
|
||||
"Interaction Options" =
|
||||
{
|
||||
AutoCopySelectedText.value = true;
|
||||
TrimLeadingSpacesInSelectedText.value = true;
|
||||
TrimTrailingSpacesInSelectedText.value = true;
|
||||
UnderlineFilesEnabled.value = true;
|
||||
};
|
||||
Scrolling = { HistoryMode.value = 2; ReflowLines.value = false; };
|
||||
"Terminal Features".BlinkingCursorEnabled.value = true;
|
||||
};
|
||||
};
|
||||
home.file.".local/share/konsole/Breeze.colorscheme".text = builtins.replaceStrings
|
||||
[ "Opacity=1" ] [ "Opacity=0.8\nBlur=true" ]
|
||||
(builtins.readFile "${inputs.pkgs.libsForQt5.konsole}/share/konsole/Breeze.colorscheme");
|
||||
};
|
||||
environment.persistence."/nix/rootfs/current".users.chn.directories =
|
||||
[ ".local/share/konsole" ".local/share/yakuake" ];
|
||||
};
|
||||
}
|
||||
@@ -88,8 +88,6 @@ inputs:
|
||||
{ "org.kde.krunner.desktop"._launch = "Alt+Space"; }
|
||||
# settings
|
||||
{ "systemsettings.desktop"._launch = "Meta+I"; }
|
||||
# yakuake
|
||||
{ yakuake.toggle-window-state = "Meta+Space"; }
|
||||
# virt-manager
|
||||
{ "virt-manager.desktop"._launch = "Meta+V"; }
|
||||
# system monitor
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
inputs:
|
||||
{
|
||||
config = inputs.lib.mkIf (builtins.elem inputs.config.nixos.model.type [ "desktop" "server" ])
|
||||
{
|
||||
home-manager.users.chn.config =
|
||||
{
|
||||
programs.plasma =
|
||||
{
|
||||
workspace =
|
||||
{
|
||||
theme = "breeze-light";
|
||||
colorScheme = "BreezeLight";
|
||||
cursor.theme = "breeze_cursors";
|
||||
lookAndFeel = "org.kde.klassylighttraditional.desktop";
|
||||
# ~/.config/kdeglobals [Icons]
|
||||
iconTheme = "klassy";
|
||||
};
|
||||
configFile =
|
||||
{
|
||||
kwinrc =
|
||||
{
|
||||
Effect-blur.BlurStrength.value = 10;
|
||||
Effect-kwin4_effect_translucency.MoveResize.value = 75;
|
||||
Effect-wobblywindows =
|
||||
{
|
||||
AdvancedMode.value = true;
|
||||
Drag.value = 85;
|
||||
Stiffness.value = 10;
|
||||
WobblynessLevel.value = 1;
|
||||
ResizeWobble.value = false;
|
||||
};
|
||||
Plugins =
|
||||
{
|
||||
blurEnabled.value = true;
|
||||
kwin4_effect_dimscreenEnabled.value = true;
|
||||
kwin4_effect_translucencyEnabled.value = true;
|
||||
padding.value = 4;
|
||||
wobblywindowsEnabled.value = true;
|
||||
};
|
||||
"org.kde.kdecoration2".theme.value = "Klassy";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,21 +1,5 @@
|
||||
inputs:
|
||||
{
|
||||
config.home-manager.users.chn.config.programs.plasma.configFile =
|
||||
let
|
||||
inherit (inputs.topInputs) nixos-wallpaper;
|
||||
wallpaper =
|
||||
{
|
||||
pc = "${nixos-wallpaper}/pixiv-117612023.png";
|
||||
}.${inputs.config.nixos.model.hostname} or "${nixos-wallpaper}/pixiv-96734339-x2.png";
|
||||
in
|
||||
{
|
||||
# "plasma-org.kde.plasma.desktop-appletsrc" =
|
||||
# {
|
||||
# "Containments/1".wallpaperplugin.value = "a2n.blur";
|
||||
# "Containments/1/Wallpaper/a2n.blur/General".Image.value = wallpaper;
|
||||
# };
|
||||
kscreenlockerrc."Greeter/Wallpaper/org.kde.image/General" =
|
||||
{ Image.value = wallpaper; PreviewImage.value = wallpaper; };
|
||||
kdeglobals.General.accentColorFromWallpaper.value = true;
|
||||
};
|
||||
config.home-manager.users.chn.config.programs.plasma.configFile.kdeglobals.General.accentColorFromWallpaper.value
|
||||
= true;
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
{ stdenv, src }: stdenv.mkDerivation
|
||||
{
|
||||
name = "blurred-wallpaper";
|
||||
inherit src;
|
||||
phases = [ "installPhase" ];
|
||||
installPhase =
|
||||
''
|
||||
mkdir -p $out/share/plasma/wallpapers
|
||||
cp -r $src/a2n.blur $out/share/plasma/wallpapers
|
||||
'';
|
||||
}
|
||||
@@ -34,8 +34,6 @@ inputs: rec
|
||||
};
|
||||
cppcoro = inputs.pkgs.callPackage ./cppcoro { src = inputs.topInputs.cppcoro; };
|
||||
date = inputs.pkgs.callPackage ./date.nix { src = inputs.topInputs.date; };
|
||||
blurred-wallpaper = inputs.pkgs.callPackage ./blurred-wallpaper.nix { src = inputs.topInputs.blurred-wallpaper; };
|
||||
slate = inputs.pkgs.callPackage ./slate.nix { src = inputs.topInputs.slate; };
|
||||
vasp =
|
||||
{
|
||||
gnu = inputs.pkgs.callPackage ./vasp/gnu
|
||||
|
||||
@@ -17,6 +17,9 @@ int main()
|
||||
std::string UserCommand;
|
||||
std::string SubmitCommand;
|
||||
std::string CurrentInterface = "Program";
|
||||
std::string JobName = std::filesystem::current_path().filename().string();
|
||||
std::string OutputFile = "output.txt";
|
||||
bool LowPriority = false;
|
||||
} State;
|
||||
std::vector<std::unique_ptr<Program>> Programs;
|
||||
auto ConfigFile = YAML::LoadFile(SBATCH_CONFIG);
|
||||
@@ -64,6 +67,9 @@ int main()
|
||||
return ftxui::Container::Vertical
|
||||
({
|
||||
Programs[State.ProgramSelected]->get_interface() | with_bottom_heavy,
|
||||
input(&State.JobName, "Job name: "),
|
||||
input(&State.OutputFile, "Output file: "),
|
||||
checkbox("Low priority", &State.LowPriority),
|
||||
// 操作按钮
|
||||
ftxui::Container::Horizontal
|
||||
({
|
||||
@@ -111,7 +117,9 @@ int main()
|
||||
else if (State.UserCommand == "Continue")
|
||||
{
|
||||
State.CurrentInterface = "Confirm";
|
||||
State.SubmitCommand = Programs[State.ProgramSelected]->get_submit_command();
|
||||
State.SubmitCommand = Programs[State.ProgramSelected]->get_submit_command()
|
||||
+ "\n--job-name='{}' --output='{}'{}"_f
|
||||
(State.JobName, State.OutputFile, State.LowPriority ? " --nice=10000" : "");
|
||||
}
|
||||
else std::unreachable();
|
||||
}
|
||||
|
||||
@@ -16,8 +16,6 @@ namespace sbatch
|
||||
int MemorySchemeSelected = 0;
|
||||
std::vector<std::string> MemorySchemeEntries = { "Default", "All", "Custom" };
|
||||
std::string Memory = "1";
|
||||
std::string JobName = std::filesystem::current_path().filename().string();
|
||||
std::string OutputFile = "output.txt";
|
||||
std::string InputFile = "input.txt";
|
||||
};
|
||||
protected: StateType State_;
|
||||
@@ -47,7 +45,6 @@ namespace sbatch
|
||||
if (saved_state.MemorySchemeSelected < State_.MemorySchemeEntries.size())
|
||||
State_.MemorySchemeSelected = saved_state.MemorySchemeSelected;
|
||||
State_.Memory = saved_state.Memory;
|
||||
State_.OutputFile = saved_state.OutputFile;
|
||||
State_.InputFile = saved_state.InputFile;
|
||||
}
|
||||
catch (...) {}
|
||||
@@ -90,12 +87,8 @@ namespace sbatch
|
||||
}) | with_title("Memory:", ftxui::Color::GrayDark) | with_separator
|
||||
}) | with_title("Resource allocation:") | with_bottom,
|
||||
// 第三行:任务名和输入输出文件
|
||||
ftxui::Container::Vertical
|
||||
({
|
||||
input(&State_.JobName, "Job name: "),
|
||||
input(&State_.InputFile, "Input file: "),
|
||||
input(&State_.OutputFile, "Output file: "),
|
||||
}) | with_title("Misc:")
|
||||
ftxui::Container::Vertical({input(&State_.InputFile, "Input file: ")})
|
||||
| with_title("Misc:")
|
||||
});
|
||||
}
|
||||
public: virtual std::string get_submit_command() const override
|
||||
@@ -116,11 +109,8 @@ namespace sbatch
|
||||
else if (State_.MemorySchemeSelected == 2) return "--mem={}G"_f(State_.Memory);
|
||||
else std::unreachable();
|
||||
}();
|
||||
return "sbatch --partition={}\n{}{} {}\n--job-name='{}' --output='{}'\n--wrap=\"mumax3 {}\""_f
|
||||
(
|
||||
State_.QueueEntries[State_.QueueSelected], gpu_string, cpu_string, mem_string,
|
||||
State_.JobName, State_.OutputFile, State_.InputFile
|
||||
);
|
||||
return "sbatch --partition={}\n{}{} {}\n--wrap=\"mumax3 {}\""_f
|
||||
(State_.QueueEntries[State_.QueueSelected], gpu_string, cpu_string, mem_string, State_.InputFile);
|
||||
}
|
||||
};
|
||||
template void Program::register_child_<Mumax3>();
|
||||
|
||||
@@ -18,8 +18,6 @@ namespace sbatch
|
||||
int MemorySchemeSelected = 0;
|
||||
std::vector<std::string> MemorySchemeEntries = { "Default", "All", "Custom" };
|
||||
std::string Memory = "1";
|
||||
std::string JobName = std::filesystem::current_path().filename().string();
|
||||
std::string OutputFile = "output.txt";
|
||||
bool OptcellEnable = false;
|
||||
int OptcellSelected = 0;
|
||||
std::vector<std::string> OptcellEntries = { "fix ab", "fix c" };
|
||||
@@ -96,8 +94,7 @@ namespace sbatch
|
||||
// 第三行:任务名和输出文件
|
||||
ftxui::Container::Vertical
|
||||
({
|
||||
input(&State_.JobName, "Job name: "),
|
||||
input(&State_.OutputFile, "Output file: "),
|
||||
|
||||
ftxui::Container::Horizontal
|
||||
({
|
||||
checkbox("Generate OPTCELL", &State_.OptcellEnable),
|
||||
@@ -141,11 +138,11 @@ namespace sbatch
|
||||
else return ""s;
|
||||
}();
|
||||
return
|
||||
"{}sbatch --partition={} --nodes=1-1\n{}{}\n--job-name='{}' --output='{}'\n"
|
||||
"{}sbatch --partition={} --nodes=1-1\n{}{}\n"
|
||||
"--wrap=\"srun{} vasp-intel vasp-{}\""_f
|
||||
(
|
||||
optcell_string, State_.QueueEntries[State_.QueueSelected], cpu_string, mem_string,
|
||||
State_.JobName, State_.OutputFile, srun_string, State_.VaspEntries[State_.VaspSelected]
|
||||
srun_string, State_.VaspEntries[State_.VaspSelected]
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -21,8 +21,6 @@ namespace sbatch
|
||||
int MemorySchemeSelected = 0;
|
||||
std::vector<std::string> MemorySchemeEntries = { "Default", "All", "Custom" };
|
||||
std::string Memory = "1";
|
||||
std::string JobName = std::filesystem::current_path().filename().string();
|
||||
std::string OutputFile = "output.txt";
|
||||
bool OptcellEnable = false;
|
||||
int OptcellSelected = 0;
|
||||
std::vector<std::string> OptcellEntries = { "fix ab", "fix c" };
|
||||
@@ -116,8 +114,6 @@ namespace sbatch
|
||||
// 第三行:任务名和输出文件
|
||||
ftxui::Container::Vertical
|
||||
({
|
||||
input(&State_.JobName, "Job name: "),
|
||||
input(&State_.OutputFile, "Output file: "),
|
||||
ftxui::Container::Horizontal
|
||||
({
|
||||
checkbox("Generate OPTCELL", &State_.OptcellEnable),
|
||||
@@ -158,10 +154,10 @@ namespace sbatch
|
||||
else if (State_.MemorySchemeSelected == 2) return " --mem={}G"_f(State_.Memory);
|
||||
else std::unreachable();
|
||||
}();
|
||||
return "{}sbatch --partition={}\n{} {}{}\n--job-name='{}' --output='{}'\n--wrap=\"srun vasp-nvidia vasp-{}\""_f
|
||||
return "{}sbatch --partition={}\n{} {}{}\n--wrap=\"srun vasp-nvidia vasp-{}\""_f
|
||||
(
|
||||
optcell_string, State_.QueueEntries[State_.QueueSelected], gpu_string, cpu_string, mem_string,
|
||||
State_.JobName, State_.OutputFile, State_.VaspEntries[State_.VaspSelected]
|
||||
State_.VaspEntries[State_.VaspSelected]
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
{ stdenv, src }: stdenv.mkDerivation
|
||||
{
|
||||
name = "slate";
|
||||
src = "${src}/Slate.tar.gz";
|
||||
installPhase =
|
||||
''
|
||||
mkdir -p $out/share/yakuake/skins/Slate
|
||||
cp -r * $out/share/yakuake/skins/Slate
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user