mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 13:39:23 +08:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 18f1b374d4 |
@@ -45,13 +45,12 @@ inputs:
|
||||
nix.substituters = [ "https://cache.nixos.org/" "https://nix-store.chn.moe" ];
|
||||
kernel.patches = [ "cjktty" ];
|
||||
networking.hostname = "nas";
|
||||
gui.preferred = false;
|
||||
};
|
||||
hardware = { cpus = [ "intel" ]; gpus = [ "intel" ]; };
|
||||
packages.packageSet = "desktop-fat";
|
||||
packages.packageSet = "server";
|
||||
services =
|
||||
{
|
||||
snapper.enable = false;
|
||||
snapper.enable = true;
|
||||
fontconfig.enable = true;
|
||||
samba =
|
||||
{
|
||||
@@ -67,7 +66,6 @@ inputs:
|
||||
serverName = "vps6.xserver.chn.moe";
|
||||
dns.extraInterfaces = [ "docker0" ];
|
||||
};
|
||||
xrdp = { enable = true; hostname = [ "nas.chn.moe" "office.chn.moe" ]; };
|
||||
groupshare.enable = true;
|
||||
smartd.enable = true;
|
||||
beesd =
|
||||
|
||||
@@ -10,16 +10,16 @@ inputs:
|
||||
{
|
||||
mount =
|
||||
{
|
||||
vfat."/dev/disk/by-uuid/3F57-0EBE" = "/boot/efi";
|
||||
vfat."/dev/disk/by-uuid/E58F-416A" = "/boot/efi";
|
||||
btrfs =
|
||||
{
|
||||
"/dev/disk/by-uuid/02e426ec-cfa2-4a18-b3a5-57ef04d66614"."/" = "/boot";
|
||||
"/dev/disk/by-uuid/066be4fd-8617-4fe1-9654-c133c2996d33"."/" = "/boot";
|
||||
"/dev/mapper/root" = { "/nix" = "/nix"; "/nix/rootfs/current" = "/"; };
|
||||
};
|
||||
};
|
||||
decrypt.auto =
|
||||
{
|
||||
"/dev/disk/by-uuid/55fdd19f-0f1d-4c37-bd4e-6df44fc31f26" = { mapper = "root"; ssd = true; };
|
||||
"/dev/disk/by-uuid/4c73288c-bcd8-4a7e-b683-693f9eed2d81" = { mapper = "root"; ssd = true; };
|
||||
"/dev/disk/by-uuid/4be45329-a054-4c20-8965-8c5b7ee6b35d" =
|
||||
{ mapper = "swap"; ssd = true; before = [ "root" ]; };
|
||||
};
|
||||
@@ -77,7 +77,7 @@ inputs:
|
||||
};
|
||||
services =
|
||||
{
|
||||
snapper.enable = true;
|
||||
# snapper.enable = true;
|
||||
fontconfig.enable = true;
|
||||
samba =
|
||||
{
|
||||
@@ -137,10 +137,12 @@ inputs:
|
||||
bugs = [ "xmunet" "backlight" "amdpstate" ];
|
||||
};
|
||||
# use plasma-x11 as default, instead of plasma-wayland
|
||||
services.xserver.displayManager.defaultSession = inputs.lib.mkForce "plasma";
|
||||
services.xserver.displayManager =
|
||||
{
|
||||
defaultSession = inputs.lib.mkForce "plasma";
|
||||
setupCommands = "${inputs.pkgs.xcalib}/bin/xcalib -d :0 ${./color/TPLCD_161B_Default.icm}";
|
||||
};
|
||||
virtualisation.virtualbox.host = { enable = true; enableExtensionPack = true; };
|
||||
hardware.nvidia.forceFullCompositionPipeline = true;
|
||||
home-manager.users.chn.config.programs.plasma.startup.autoStartScript.xcalib.text =
|
||||
"${inputs.pkgs.xcalib}/bin/xcalib -d :0 ${./color/TPLCD_161B_Default.icm}";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ inputs:
|
||||
nixpkgs.march = "skylake";
|
||||
grub.installDevice = "efi";
|
||||
nix.substituters = [ "https://cache.nixos.org/" "https://nix-store.chn.moe" ];
|
||||
kernel.patches = [ "cjktty" "lantian" "surface" ];
|
||||
kernel.patches = [ "cjktty" "lantian" ];
|
||||
networking.hostname = "surface";
|
||||
};
|
||||
hardware =
|
||||
@@ -61,6 +61,21 @@ inputs:
|
||||
};
|
||||
bugs = [ "xmunet" ];
|
||||
};
|
||||
boot.kernelPackages =
|
||||
let
|
||||
originalKernel = inputs.pkgs.linuxPackages_xanmod_latest.kernel;
|
||||
version = originalKernel.version;
|
||||
majorVersion =
|
||||
let versionArray = builtins.splitVersion version;
|
||||
in "${builtins.elemAt versionArray 0}.${builtins.elemAt versionArray 1}";
|
||||
repoFile = "${inputs.topInputs.nixos-hardware}/microsoft/surface/common/kernel/linux-package.nix";
|
||||
inherit (inputs.pkgs.callPackage repoFile {}) repos;
|
||||
patchDir = repos.linux-surface + "/patches/${majorVersion}";
|
||||
patchFile = "${inputs.topInputs.nixos-hardware}/microsoft/surface/common/kernel/linux-6.6.x/patches.nix";
|
||||
kernelPatches = inputs.pkgs.callPackage patchFile { inherit (inputs.lib) kernel; inherit version patchDir; };
|
||||
in
|
||||
inputs.lib.mkForce (inputs.pkgs.linuxPackagesFor (originalKernel.override
|
||||
(prev: { kernelPatches = prev.kernelPatches ++ kernelPatches; })));
|
||||
environment.systemPackages = with inputs.pkgs; [ maliit-keyboard maliit-framework ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -30,9 +30,8 @@ inputs:
|
||||
nix.substituters = [ "https://cache.nixos.org/" "https://nix-store.chn.moe" ];
|
||||
initrd.sshd.enable = true;
|
||||
networking.hostname = "vps7";
|
||||
gui.preferred = false;
|
||||
};
|
||||
packages.packageSet = "desktop";
|
||||
packages.packageSet = "server";
|
||||
services =
|
||||
{
|
||||
snapper.enable = true;
|
||||
@@ -50,7 +49,6 @@ inputs:
|
||||
synapse.matrixHostname = "synapse.chn.moe";
|
||||
matrix = { port = 8009; redisPort = 6380; slidingSyncPort = 9001; };
|
||||
};
|
||||
xrdp = { enable = true; hostname = [ "vps7.chn.moe" ]; };
|
||||
vaultwarden.enable = true;
|
||||
beesd = { enable = true; instances.root = { device = "/"; hashTableSizeMB = 1024; }; };
|
||||
photoprism.enable = true;
|
||||
|
||||
141
flake.lock
generated
141
flake.lock
generated
@@ -21,38 +21,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"blurred-wallpaper": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1700747921,
|
||||
"narHash": "sha256-mCqf03cXlTl4vuJIzVEiYhHQsAPG3i6yHQ3Xdt06HfA=",
|
||||
"owner": "bouteillerAlan",
|
||||
"repo": "blurredwallpaper",
|
||||
"rev": "aecc88d43e458a0962a0091dcdb7baac34e263be",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "bouteillerAlan",
|
||||
"repo": "blurredwallpaper",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"cascade": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1707981987,
|
||||
"narHash": "sha256-6p4t7maih5I5BqkawqArnYSN+35iUPxlsHebk6SRf7A=",
|
||||
"owner": "CHN-beta",
|
||||
"repo": "cascade",
|
||||
"rev": "7c5645ed390c8b829e241f3ed5495a9d5a473375",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "CHN-beta",
|
||||
"repo": "cascade",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"citation-style-language": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
@@ -876,22 +844,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"fluent-kde": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1685119052,
|
||||
"narHash": "sha256-jm8ztgoWV8sewCYbFxReiVPjuHY97NslKM1AIoooSiY=",
|
||||
"owner": "vinceliuice",
|
||||
"repo": "Fluent-kde",
|
||||
"rev": "83d5cc2013751aa9eeb944dafa3a3460652690ce",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "vinceliuice",
|
||||
"repo": "Fluent-kde",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"format-all": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
@@ -970,22 +922,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"linux-surface": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1707902187,
|
||||
"narHash": "sha256-mGxhAvpBJ3wSgecz9mwghTjRUjwcsjE0cqdcUODLS+0=",
|
||||
"owner": "linux-surface",
|
||||
"repo": "linux-surface",
|
||||
"rev": "fcc945709d89716a0012d3d42d0e9af0f7cd60ee",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "linux-surface",
|
||||
"repo": "linux-surface",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"lmix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -1324,15 +1260,15 @@
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1707989601,
|
||||
"narHash": "sha256-Zq81JV6NnWI4dDOYVB7VeP3BEv/HswEvIvIwrcUZoaA=",
|
||||
"owner": "CHN-beta",
|
||||
"lastModified": 1705312285,
|
||||
"narHash": "sha256-rd+dY+v61Y8w3u9bukO/hB55Xl4wXv4/yC8rCGVnK5U=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "b3e300fcdab6c004e25de94d5e23ae78a267ec4b",
|
||||
"rev": "bee2202bec57e521e3bd8acd526884b9767d7fa0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "CHN-beta",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -1493,11 +1429,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1707987774,
|
||||
"narHash": "sha256-32JbH7Gmmjxt9xeUdIPpdL5QcSay+7Ojq5FU+lJORdI=",
|
||||
"lastModified": 1706959166,
|
||||
"narHash": "sha256-vEbBSmakksQN+Ho7FHDWeoTpfOZRthhOWOysYD9nf5g=",
|
||||
"owner": "CHN-beta",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "718d0f4a06cb8c6880d37fbfbd10c384e4d3be2a",
|
||||
"rev": "910dd75760e1fea2a6e78d567adc7f1a7c309038",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1767,11 +1703,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1707045317,
|
||||
"narHash": "sha256-o2NZJcNu2/M3qycZ2Z9sgIESQEBFmihbbA7//sp7yVA=",
|
||||
"lastModified": 1705946102,
|
||||
"narHash": "sha256-0hy28d7qC7Hv6/KV7xefa03b2xFJIGHPYAPcsVwzTeM=",
|
||||
"owner": "pjones",
|
||||
"repo": "plasma-manager",
|
||||
"rev": "290cd65b65e2da11ca9fda69781ea9beb8a6f6ac",
|
||||
"rev": "4d209a083aeefa7d4f8060de14896399bbc8f30b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1841,8 +1777,6 @@
|
||||
"root": {
|
||||
"inputs": {
|
||||
"aagl": "aagl",
|
||||
"blurred-wallpaper": "blurred-wallpaper",
|
||||
"cascade": "cascade",
|
||||
"citation-style-language": "citation-style-language",
|
||||
"concurrencpp": "concurrencpp",
|
||||
"cppcoro": "cppcoro",
|
||||
@@ -1851,10 +1785,8 @@
|
||||
"dguibert-nur-packages": "dguibert-nur-packages",
|
||||
"eigen": "eigen",
|
||||
"envfs": "envfs",
|
||||
"fluent-kde": "fluent-kde",
|
||||
"home-manager": "home-manager",
|
||||
"impermanence": "impermanence",
|
||||
"linux-surface": "linux-surface",
|
||||
"lmix": "lmix",
|
||||
"matplotplusplus": "matplotplusplus",
|
||||
"misskey": "misskey",
|
||||
@@ -1879,12 +1811,9 @@
|
||||
"pnpm2nix-nzbr": "pnpm2nix-nzbr",
|
||||
"qchem": "qchem",
|
||||
"rsshub": "rsshub",
|
||||
"rycee": "rycee",
|
||||
"slate": "slate",
|
||||
"sops-nix": "sops-nix",
|
||||
"tgbot-cpp": "tgbot-cpp",
|
||||
"v-sim": "v-sim",
|
||||
"win11os-kde": "win11os-kde",
|
||||
"zpp-bits": "zpp-bits"
|
||||
}
|
||||
},
|
||||
@@ -1920,38 +1849,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"rycee": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1707673696,
|
||||
"narHash": "sha256-3+IgVATpdUFJ33QLIuK8mIzg5rSWA/wX0IoBMfPKzWo=",
|
||||
"owner": "rycee",
|
||||
"repo": "nur-expressions",
|
||||
"rev": "22f2d8e0cbb3a8490a104ca5cb7bbc8ba10d262c",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"owner": "rycee",
|
||||
"repo": "nur-expressions",
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"slate": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1626631298,
|
||||
"narHash": "sha256-3tbB16sWVUqiHAfeFc0FnFb0Cf6ZFxYWsYAyexeZVxk=",
|
||||
"owner": "TheBigWazz",
|
||||
"repo": "Slate",
|
||||
"rev": "ff21b49c6e49b5a9f89497e4fea49a5a0c39bd6b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "TheBigWazz",
|
||||
"repo": "Slate",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"sln-mode": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
@@ -2299,22 +2196,6 @@
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"win11os-kde": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1684014177,
|
||||
"narHash": "sha256-uumpEiPkrTf98oqYe+rR3zmb7H8esy1vXLuv1WiOV7M=",
|
||||
"owner": "yeyushengfan258",
|
||||
"repo": "Win11OS-kde",
|
||||
"rev": "b5daaa322c312e016ff1508850287c32a8123693",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "yeyushengfan258",
|
||||
"repo": "Win11OS-kde",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"ws-butler": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
||||
11
flake.nix
11
flake.nix
@@ -41,7 +41,7 @@
|
||||
};
|
||||
nix-doom-emacs = { url = "github:nix-community/nix-doom-emacs"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||
nur-linyinfeng = { url = "github:linyinfeng/nur-packages"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||
nixos-hardware.url = "github:CHN-beta/nixos-hardware";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
envfs = { url = "github:Mic92/envfs"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||
|
||||
misskey = { url = "git+https://github.com/CHN-beta/misskey?submodules=1"; flake = false; };
|
||||
@@ -57,13 +57,6 @@
|
||||
nodesoup = { url = "github:olvb/nodesoup"; flake = false; };
|
||||
tgbot-cpp = { url = "github:reo7sp/tgbot-cpp"; flake = false; };
|
||||
v-sim = { url = "gitlab:l_sim/v_sim"; flake = false; };
|
||||
win11os-kde = { url = "github:yeyushengfan258/Win11OS-kde"; flake = false; };
|
||||
fluent-kde = { url = "github:vinceliuice/Fluent-kde"; flake = false; };
|
||||
rycee = { url = "gitlab:rycee/nur-expressions"; flake = false; };
|
||||
cascade = { url = "github:CHN-beta/cascade"; flake = false; };
|
||||
blurred-wallpaper = { url = "github:bouteillerAlan/blurredwallpaper"; flake = false; };
|
||||
slate = { url = "github:TheBigWazz/Slate"; flake = false; };
|
||||
linux-surface = { url = "github:linux-surface/linux-surface"; flake = false; };
|
||||
};
|
||||
|
||||
outputs = inputs:
|
||||
@@ -151,6 +144,6 @@
|
||||
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks inputs.self.deploy) inputs.deploy-rs.lib;
|
||||
overlays.default = final: prev:
|
||||
{ localPackages = (import ./local/pkgs { inherit (inputs) lib; pkgs = final; }); };
|
||||
config.archive = false;
|
||||
config.production = false;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
lib:
|
||||
{
|
||||
attrsToList = attrs: builtins.map (name: { inherit name; value = attrs.${name}; }) (builtins.attrNames attrs);
|
||||
attrsToList = Attrs: builtins.map ( name: { inherit name; value = Attrs.${name}; } ) ( builtins.attrNames Attrs );
|
||||
mkConditional = condition: trueResult: falseResult: let inherit (lib) mkMerge mkIf; in
|
||||
mkMerge [ ( mkIf condition trueResult ) ( mkIf (!condition) falseResult ) ];
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
{ stdenv, src }: stdenv.mkDerivation
|
||||
{
|
||||
name = "blurred-wallpaper";
|
||||
inherit src;
|
||||
phases = [ "installPhase" ];
|
||||
installPhase =
|
||||
''
|
||||
mkdir -p $out/share/plasma/wallpapers/a2n.blur
|
||||
cp -r $src/* $out/share/plasma/wallpapers/a2n.blur
|
||||
'';
|
||||
}
|
||||
@@ -45,8 +45,4 @@
|
||||
pyreadline3 = python3Packages.callPackage ./pyreadline3 {};
|
||||
torchdata = python3Packages.callPackage ./torchdata {};
|
||||
torchtext = python3Packages.callPackage ./torchtext { inherit torchdata; };
|
||||
win11os-kde = callPackage ./win11os-kde { src = topInputs.win11os-kde; };
|
||||
fluent-kde = callPackage ./fluent-kde { src = topInputs.fluent-kde; };
|
||||
blurred-wallpaper = callPackage ./blurred-wallpaper { src = topInputs.blurred-wallpaper; };
|
||||
slate = callPackage ./slate { src = topInputs.slate; };
|
||||
}
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
{ lib, stdenv, src }: stdenv.mkDerivation
|
||||
{
|
||||
name = "fluent-kde";
|
||||
inherit src;
|
||||
installPhase =
|
||||
''
|
||||
mkdir -p $out/share/aurorae/themes
|
||||
cp -r $src/aurorae/* $out/share/aurorae/themes
|
||||
mkdir -p $out/share/color-schemes
|
||||
cp -r $src/color-schemes/*.colors $out/share/color-schemes
|
||||
mkdir -p $out/share/Kvantum
|
||||
cp -r $src/Kvantum/Fluent* $out/share/Kvantum
|
||||
mkdir -p $out/share/plasma/desktoptheme
|
||||
cp -r $src/plasma/desktoptheme/* $out/share/plasma/desktoptheme
|
||||
mkdir -p $out/share/plasma/layout-templates
|
||||
cp -r $src/plasma/layout-templates/* $out/share/plasma/layout-templates
|
||||
mkdir -p $out/share/plasma/look-and-feel
|
||||
cp -r $src/plasma/look-and-feel/com.github.vinceliuice.Fluent* $out/share/plasma/look-and-feel
|
||||
mkdir -p $out/share/wallpapers
|
||||
cp -r $src/wallpaper/* $out/share/wallpapers
|
||||
'';
|
||||
}
|
||||
@@ -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
|
||||
'';
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{ lib, stdenv, src }: stdenv.mkDerivation
|
||||
{
|
||||
name = "win11os-kde";
|
||||
inherit src;
|
||||
installPhase =
|
||||
''
|
||||
mkdir -p $out/share/aurorae/themes
|
||||
cp -r $src/aurorae/* $out/share/aurorae/themes
|
||||
mkdir -p $out/share/color-schemes
|
||||
cp -r $src/color-schemes/*.colors $out/share/color-schemes
|
||||
mkdir -p $out/share/Kvantum
|
||||
cp -r $src/Kvantum/* $out/share/Kvantum
|
||||
mkdir -p $out/share/plasma/desktoptheme
|
||||
cp -r $src/plasma/desktoptheme/* $out/share/plasma/desktoptheme
|
||||
mkdir -p $out/share/plasma/look-and-feel
|
||||
cp -r $src/plasma/look-and-feel/* $out/share/plasma/look-and-feel
|
||||
mkdir -p $out/share/wallpapers
|
||||
cp -r $src/wallpaper/* $out/share/wallpapers
|
||||
'';
|
||||
}
|
||||
@@ -37,7 +37,6 @@ inputs:
|
||||
# needed by mirism
|
||||
nghttp2-2305 =
|
||||
inputs.pkgs.callPackage "${inputs.topInputs.nixpkgs-2305}/pkgs/development/libraries/nghttp2" {};
|
||||
firefox-addons = (import "${topInputs.rycee}" { inherit (prev) pkgs; }).firefox-addons;
|
||||
})
|
||||
];
|
||||
home-manager.sharedModules =
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
inputs:
|
||||
{
|
||||
imports = inputs.localLib.mkModules [ ./vscode.nix ./firefox.nix ];
|
||||
imports = inputs.localLib.mkModules [ ./vscode.nix ];
|
||||
config =
|
||||
let
|
||||
inherit (inputs.lib) mkIf;
|
||||
@@ -30,27 +30,23 @@ inputs:
|
||||
# media
|
||||
mpv nomacs
|
||||
# themes
|
||||
tela-circle-icon-theme localPackages.win11os-kde localPackages.fluent-kde localPackages.blurred-wallpaper
|
||||
localPackages.slate utterly-nord-plasma
|
||||
tela-circle-icon-theme
|
||||
];
|
||||
users.sharedModules =
|
||||
[(homeInputs: {
|
||||
config.home.file = mkIf (!homeInputs.config.programs.plasma.enable)
|
||||
{
|
||||
".config/baloofilerc".text =
|
||||
''
|
||||
[Basic Settings]
|
||||
Indexing-Enabled=false
|
||||
'';
|
||||
};
|
||||
})];
|
||||
[{
|
||||
config.home.file.".config/baloofilerc".text =
|
||||
''
|
||||
[Basic Settings]
|
||||
Indexing-Enabled=false
|
||||
'';
|
||||
}];
|
||||
};
|
||||
programs =
|
||||
{
|
||||
adb.enable = true;
|
||||
wireshark = { enable = true; package = inputs.pkgs.wireshark; };
|
||||
firefox = { enable = true; languagePacks = [ "zh-CN" "en-US" ]; };
|
||||
vim.package = inputs.pkgs.vim-full;
|
||||
yubikey-touch-detector.enable = true;
|
||||
};
|
||||
nixpkgs.config.packageOverrides = pkgs:
|
||||
{
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
inputs:
|
||||
{
|
||||
config = inputs.lib.mkIf (builtins.elem "desktop" inputs.config.nixos.packages._packageSets)
|
||||
{
|
||||
nixos.users.sharedModules = [{ config =
|
||||
{
|
||||
programs.firefox =
|
||||
{
|
||||
enable = true;
|
||||
# TODO: switch to 24.05
|
||||
# nativeMessagingHosts = [ inputs.pkgs.plasma-browser-integration ];
|
||||
package = inputs.pkgs.firefox.override { nativeMessagingHosts = [ inputs.pkgs.plasma-browser-integration ]; };
|
||||
policies.DefaultDownloadDirectory = "\${home}/Downloads";
|
||||
profiles.default =
|
||||
{
|
||||
extensions = with inputs.pkgs.firefox-addons;
|
||||
[
|
||||
immersive-translate tampermonkey bitwarden cookies-txt dualsub firefox-color i-dont-care-about-cookies
|
||||
metamask pakkujs switchyomega rsshub-radar rsspreview tabliss tree-style-tab ublock-origin wallabagger
|
||||
wappalyzer grammarly
|
||||
(
|
||||
buildFirefoxXpiAddon
|
||||
{
|
||||
pname = "zotero-connector";
|
||||
version = "5.0.114";
|
||||
addonId = "zotero@chnm.gmu.edu";
|
||||
url = "https://download.zotero.org/connector/firefox/release/Zotero_Connector-5.0.114.xpi";
|
||||
sha256 = "1g9d991m4vfj5x6r86sw754bx7r4qi8g5ddlqp7rcw6wrgydhrhw";
|
||||
meta = {};
|
||||
}
|
||||
)
|
||||
];
|
||||
search = { default = "Google"; force = true; };
|
||||
userChrome = builtins.concatStringsSep "\n" (builtins.map
|
||||
(file: builtins.readFile "${inputs.topInputs.cascade}/chrome/includes/cascade-${file}.css")
|
||||
[ "config-mouse" "colours" "layout" "responsive" "floating-panel" "nav-bar" "tabs" ]);
|
||||
settings =
|
||||
{
|
||||
# general
|
||||
"browser.search.region" = "CN";
|
||||
"intl.locale.requested" = "zh-CN,en-US";
|
||||
"browser.aboutConfig.showWarning" = false;
|
||||
"browser.bookmarks.showMobileBookmarks" = true;
|
||||
"browser.download.panel.shown" = true;
|
||||
"browser.download.useDownloadDir" = true;
|
||||
"browser.newtab.extensionControlled" = true;
|
||||
"browser.toolbars.bookmarks.visibility" = "never";
|
||||
# allow to apply userChrome.css
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
home.file.".mozilla/firefox/profiles.ini".force = true;
|
||||
};}];
|
||||
# still enable global firefox, to install language packs
|
||||
programs.firefox = { enable = true; languagePacks = [ "zh-CN" "en-US" ]; };
|
||||
};
|
||||
}
|
||||
@@ -17,7 +17,7 @@ inputs:
|
||||
{
|
||||
packages = with inputs.pkgs;
|
||||
{
|
||||
_packages =
|
||||
_packages =
|
||||
[
|
||||
# shell
|
||||
ksh
|
||||
@@ -51,11 +51,6 @@ inputs:
|
||||
# development
|
||||
gdb try inputs.topInputs.plasma-manager.packages.x86_64-linux.rc2nix hexo-cli
|
||||
] ++ (with inputs.config.boot.kernelPackages; [ cpupower usbip ]);
|
||||
_pythonPackages = [(pythonPackages: with pythonPackages;
|
||||
[
|
||||
openai python-telegram-bot fastapi pypdf2 pandas matplotlib plotly gunicorn redis jinja2
|
||||
certifi charset-normalizer idna orjson psycopg2 inquirerpy requests tqdm
|
||||
])];
|
||||
};
|
||||
users.sharedModules = [(home-inputs:
|
||||
{
|
||||
|
||||
@@ -41,7 +41,10 @@ inputs:
|
||||
];
|
||||
_pythonPackages = [(pythonPackages: with pythonPackages;
|
||||
[
|
||||
phonopy tensorflow keras scipy scikit-learn jupyterlab autograd # localPackages.pix2tex
|
||||
phonopy tensorflow keras openai scipy scikit-learn jupyterlab autograd
|
||||
# localPackages.pix2tex
|
||||
inquirerpy requests python-telegram-bot tqdm fastapi pypdf2 pandas matplotlib plotly gunicorn redis jinja2
|
||||
certifi charset-normalizer idna orjson psycopg2
|
||||
])];
|
||||
_prebuildPackages =
|
||||
[
|
||||
|
||||
@@ -23,6 +23,5 @@ inputs:
|
||||
serif = [ "Noto Serif CJK SC" "Source Han Serif SC" "DejaVu Serif" ];
|
||||
};
|
||||
};
|
||||
nixos.users.sharedModules = [{ config.xdg.configFile."fontconfig/conf.d/10-hm-fonts.conf".force = true; }];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ inputs:
|
||||
menuentry "UEFI Shell" {
|
||||
insmod fat
|
||||
insmod chain
|
||||
chainloader @bootRoot@/shell.efi
|
||||
chainloader /shell.efi
|
||||
}
|
||||
''
|
||||
)
|
||||
|
||||
@@ -56,7 +56,7 @@ inputs:
|
||||
{
|
||||
users.chn =
|
||||
{
|
||||
directories = [ ".cache" ".config/fontconfig" ];
|
||||
directories = [ ".cache" ];
|
||||
};
|
||||
} else {});
|
||||
"${impermanence.nodatacow}" =
|
||||
|
||||
@@ -39,8 +39,7 @@ inputs:
|
||||
patches =
|
||||
{
|
||||
cjktty =
|
||||
[{
|
||||
name = "cjktty";
|
||||
{
|
||||
patch =
|
||||
let
|
||||
version = builtins.splitVersion inputs.config.boot.kernelPackages.kernel.version;
|
||||
@@ -55,16 +54,15 @@ inputs:
|
||||
hashes =
|
||||
{
|
||||
"6.1" = "11ddiammvjxx2m9v32p25l1ai759a1d6xhdpszgnihv7g2fzigf5";
|
||||
"6.7" = "1yfsmc0873xiwlirir0xfp9zyrpd09q1srgr3z4rl7i7lxzaqls8";
|
||||
"6.6" = "19ib0syj3207ifr315gdrnpv6nhh435fmgl05c7k715nng40i827";
|
||||
};
|
||||
in hashes."${major}.${minor}";
|
||||
};
|
||||
extraStructuredConfig =
|
||||
{ FONT_CJK_16x16 = inputs.lib.kernel.yes; FONT_CJK_32x32 = inputs.lib.kernel.yes; };
|
||||
}];
|
||||
};
|
||||
lantian =
|
||||
[{
|
||||
name = "lantian";
|
||||
{
|
||||
patch = null;
|
||||
# pick from xddxdd/nur-packages dce93a
|
||||
extraStructuredConfig = with inputs.lib.kernel;
|
||||
@@ -81,47 +79,9 @@ inputs:
|
||||
HZ_250 = inputs.lib.mkForce no;
|
||||
HZ = inputs.lib.mkForce (freeform "1000");
|
||||
};
|
||||
}];
|
||||
surface =
|
||||
let
|
||||
version =
|
||||
let versionArray = builtins.splitVersion inputs.config.boot.kernelPackages.kernel.version;
|
||||
in "${builtins.elemAt versionArray 0}.${builtins.elemAt versionArray 1}";
|
||||
kernelPatches = builtins.map
|
||||
(file:
|
||||
{
|
||||
name = "surface-${file.name}";
|
||||
patch = "${inputs.topInputs.linux-surface}/patches/${version}/${file.name}";
|
||||
})
|
||||
(builtins.filter
|
||||
(file: file.value == "regular")
|
||||
(inputs.localLib.attrsToList (builtins.readDir
|
||||
"${inputs.topInputs.linux-surface}/patches/${version}")));
|
||||
kernelConfig = builtins.removeAttrs
|
||||
(builtins.listToAttrs (builtins.concatLists (builtins.map
|
||||
(configString:
|
||||
if builtins.match "CONFIG_.*=." configString == [] then
|
||||
(
|
||||
let match = builtins.match "CONFIG_(.*)=(.)" configString; in with inputs.lib.kernel;
|
||||
[{
|
||||
name = builtins.elemAt match 0;
|
||||
value = { m = module; y = yes; }.${builtins.elemAt match 1};
|
||||
}]
|
||||
)
|
||||
else if builtins.match "# CONFIG_.* is not set" configString == [] then
|
||||
[{
|
||||
name = builtins.elemAt (builtins.match "# CONFIG_(.*) is not set" configString) 0;
|
||||
value = inputs.lib.kernel.unset;
|
||||
}]
|
||||
else if builtins.match "#.*" configString == [] then []
|
||||
else if configString == "" then []
|
||||
else throw "could not parse: ${configString}"
|
||||
)
|
||||
(inputs.lib.strings.splitString "\n"
|
||||
(builtins.readFile "${inputs.topInputs.linux-surface}/configs/surface-${version}.config")))))
|
||||
[ "VIDEO_IPU3_IMGU" ];
|
||||
in kernelPatches ++ [{ name = "surface-config"; patch = null; extraStructuredConfig = kernelConfig; }];
|
||||
};
|
||||
};
|
||||
in builtins.concatLists (builtins.map (name: patches.${name}) kernel.patches);
|
||||
in
|
||||
builtins.map (name: { inherit name; } // patches.${name}) kernel.patches;
|
||||
};};
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ inputs:
|
||||
{
|
||||
# marches allowed to be compiled on this machine
|
||||
marches = mkOption { type = types.nullOr (types.listOf types.nonEmptyStr); default = null; };
|
||||
includeBuildDependencies = mkOption { type = types.bool; default = inputs.topInputs.self.config.archive; };
|
||||
includeBuildDependencies = mkOption { type = types.bool; default = inputs.topInputs.self.config.production; };
|
||||
substituters = mkOption { type = types.nullOr (types.listOf types.nonEmptyStr); default = null; };
|
||||
autoOptimiseStore = mkOption { type = types.bool; default = false; };
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
inputs:
|
||||
{
|
||||
imports = inputs.localLib.mkModules [ ./plasma ];
|
||||
# imports = inputs.localLib.mkModules [ ./plasma.nix ];
|
||||
config =
|
||||
let
|
||||
inherit (inputs.lib) mkIf;
|
||||
|
||||
251
modules/users/chn/plasma.nix
Normal file
251
modules/users/chn/plasma.nix
Normal file
@@ -0,0 +1,251 @@
|
||||
inputs:
|
||||
{
|
||||
config.home-manager.users.chn.config.programs.plasma =
|
||||
{
|
||||
enable = true;
|
||||
shortcuts = inputs.lib.mkMerge
|
||||
[
|
||||
# firefox
|
||||
{ "firefox.desktop"._launch = "Meta+B"; }
|
||||
# crow translate
|
||||
{ "io.crow_translate.CrowTranslate.desktop".TranslateSelectedText = "Ctrl+Alt+E"; }
|
||||
# display
|
||||
{
|
||||
kded5.display = [ "Display" "Meta+P" ];
|
||||
kwin = { view_actual_size = "Meta+0"; view_zoom_in = [ "Meta++" "Meta+=" ]; view_zoom_out = "Meta+-"; };
|
||||
org_kde_powerdevil =
|
||||
{
|
||||
"Decrease Screen Brightness" = "Monitor Brightness Down";
|
||||
"Increase Screen Brightness" = "Monitor Brightness Up";
|
||||
};
|
||||
}
|
||||
# volume
|
||||
{
|
||||
kmix =
|
||||
{
|
||||
decrease_volume = "Volume Down";
|
||||
increase_volume = "Volume Up";
|
||||
mic_mute = [ "Meta+Volume Mute" ];
|
||||
mute = "Volume Mute";
|
||||
};
|
||||
}
|
||||
# session
|
||||
{
|
||||
ksmserver = { "Lock Session" = [ "Meta+L" "Screensaver" ]; "Log Out" = "Ctrl+Alt+Del"; };
|
||||
org_kde_powerdevil."Turn Off Screen" = "Meta+Ctrl+L";
|
||||
}
|
||||
# window
|
||||
{
|
||||
kwin =
|
||||
{
|
||||
Overview = "Meta+Tab";
|
||||
"Show Desktop" = "Meta+D";
|
||||
"Suspend Compositing" = "Alt+Shift+F12";
|
||||
"Walk Through Windows" = "Alt+Tab";
|
||||
"Walk Through Windows (Reverse)" = "Alt+Shift+Backtab";
|
||||
"Window Above Other Windows" = "Meta+Shift+PgUp";
|
||||
"Window Below Other Windows" = "Meta+Shift+PgDown";
|
||||
"Window Close" = "Alt+F4";
|
||||
"Window Maximize" = "Meta+PgUp";
|
||||
"Window Minimize" = "Meta+PgDown";
|
||||
"Window Operations Menu" = "Alt+F3";
|
||||
"Window Quick Tile Bottom" = "Meta+Down";
|
||||
"Window Quick Tile Left" = "Meta+Left";
|
||||
"Window Quick Tile Right" = "Meta+Right";
|
||||
"Window Quick Tile Top" = "Meta+Up";
|
||||
};
|
||||
}
|
||||
# virtual desktop
|
||||
{
|
||||
kwin =
|
||||
{
|
||||
"Switch One Desktop Down" = "Meta+Ctrl+Down";
|
||||
"Switch One Desktop Up" = "Meta+Ctrl+Up";
|
||||
"Switch One Desktop to the Left" = "Meta+Ctrl+Left";
|
||||
"Switch One Desktop to the Right" = "Meta+Ctrl+Right";
|
||||
"Window One Desktop Down" = "Meta+Ctrl+Shift+Down";
|
||||
"Window One Desktop Up" = "Meta+Ctrl+Shift+Up";
|
||||
"Window One Desktop to the Left" = "Meta+Ctrl+Shift+Left";
|
||||
"Window One Desktop to the Right" = "Meta+Ctrl+Shift+Right";
|
||||
};
|
||||
}
|
||||
# media
|
||||
{
|
||||
mediacontrol =
|
||||
{
|
||||
nextmedia = "Media Next";
|
||||
pausemedia = "Media Pause";
|
||||
playpausemedia = [ "Pause" "Media Play" ];
|
||||
previousmedia = "Media Previous";
|
||||
stopmedia = "Media Stop";
|
||||
};
|
||||
}
|
||||
# dolphin
|
||||
{ "org.kde.dolphin.desktop"._launch = "Meta+E"; }
|
||||
# konsole
|
||||
{ "org.kde.konsole.desktop"._launch = "Ctrl+Alt+T"; }
|
||||
# krunner
|
||||
{ "org.kde.krunner.desktop"._launch = "Alt+Space"; }
|
||||
# screenshot
|
||||
{
|
||||
"org.kde.spectacle.desktop" =
|
||||
{
|
||||
OpenWithoutScreenshot = "Ctrl+Print";
|
||||
RectangularRegionScreenShot = "Print";
|
||||
};
|
||||
}
|
||||
# settings
|
||||
{ "systemsettings.desktop"._launch = "Meta+I"; }
|
||||
# yakuake
|
||||
{ yakuake.toggle-window-state = "Meta+Space"; }
|
||||
# virt-manager
|
||||
{ "virt-manager.desktop"._launch = "Meta+V"; }
|
||||
];
|
||||
configFile = inputs.lib.mkMerge
|
||||
[
|
||||
# baloo
|
||||
# "baloofilerc"."Basic Settings"."Indexing-Enabled" = false;
|
||||
# dolphin
|
||||
{
|
||||
dolphinrc =
|
||||
{
|
||||
General = { ShowFullPath = true; FilterBar = true; RememberOpenedTabs = false; };
|
||||
PreviewSettings.Plugins = builtins.concatStringsSep ","
|
||||
[
|
||||
"blenderthumbnail"
|
||||
"comicbookthumbnail"
|
||||
"djvuthumbnail"
|
||||
"ebookthumbnail"
|
||||
"exrthumbnail"
|
||||
"marble_thumbnail_geojson"
|
||||
"marble_thumbnail_gpx"
|
||||
"jpegthumbnail"
|
||||
"marble_thumbnail_kmz"
|
||||
"marble_thumbnail_kml"
|
||||
"kraorathumbnail"
|
||||
"windowsimagethumbnail"
|
||||
"windowsexethumbnail"
|
||||
"mltpreview"
|
||||
"mobithumbnail"
|
||||
"opendocumentthumbnail"
|
||||
"marble_thumbnail_osm"
|
||||
"palathumbcreator"
|
||||
"gsthumbnail"
|
||||
"rawthumbnail"
|
||||
"svgthumbnail"
|
||||
"imagethumbnail"
|
||||
"fontthumbnail"
|
||||
"directorythumbnail"
|
||||
"textthumbnail"
|
||||
"webarchivethumbnail"
|
||||
"ffmpegthumbs"
|
||||
"audiothumbnail"
|
||||
];
|
||||
};
|
||||
}
|
||||
# theme
|
||||
{
|
||||
kcminputrc.Mouse.cursorTheme = "breeze_cursors";
|
||||
}
|
||||
|
||||
]
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
"kcminputrc"."Mouse"."cursorTheme" = "breeze_cursors";
|
||||
"kdeglobals"."KDE"."widgetStyle" = "kvantum";
|
||||
"kdeglobals"."KFileDialog Settings"."Allow Expansion" = true;
|
||||
"kdeglobals"."KFileDialog Settings"."Automatically select filename extension" = true;
|
||||
"kdeglobals"."KFileDialog Settings"."Show Bookmarks" = true;
|
||||
"kdeglobals"."KFileDialog Settings"."Show Full Path" = true;
|
||||
"kdeglobals"."KFileDialog Settings"."Show Inline Previews" = true;
|
||||
"kdeglobals"."KFileDialog Settings"."Show Preview" = true;
|
||||
"kdeglobals"."KFileDialog Settings"."Show Speedbar" = true;
|
||||
"kdeglobals"."KFileDialog Settings"."Show hidden files" = true;
|
||||
"kdeglobals"."KFileDialog Settings"."Sort by" = "Name";
|
||||
"kdeglobals"."KFileDialog Settings"."Sort directories first" = true;
|
||||
"kdeglobals"."KFileDialog Settings"."Sort hidden files last" = true;
|
||||
"kdeglobals"."KFileDialog Settings"."View Style" = "DetailTree";
|
||||
|
||||
"krunnerrc"."General"."FreeFloating" = true;
|
||||
"krunnerrc"."Plugins"."baloosearchEnabled" = false;
|
||||
"kscreenlockerrc"."Daemon"."Autolock" = false;
|
||||
|
||||
# https://www.fanbox.cc/@peas0125/posts/5405326
|
||||
"kscreenlockerrc"."Greeter.Wallpaper.org.kde.image.General"."Image" = ./wallpaper/fanbox-5405326-x4-chop.png;
|
||||
"kscreenlockerrc"."Greeter.Wallpaper.org.kde.image.General"."PreviewImage" =
|
||||
./wallpaper/fanbox-5405326-x4-chop.png;
|
||||
|
||||
|
||||
"kwinrc"."Effect-blur"."BlurStrength" = 10;
|
||||
"kwinrc"."Effect-kwin4_effect_translucency"."MoveResize" = 75;
|
||||
"kwinrc"."Effect-wobblywindows"."AdvancedMode" = true;
|
||||
"kwinrc"."Effect-wobblywindows"."Drag" = 85;
|
||||
"kwinrc"."Effect-wobblywindows"."Stiffness" = 10;
|
||||
"kwinrc"."Effect-wobblywindows"."WobblynessLevel" = 1;
|
||||
"kwinrc"."Plugins"."blurEnabled" = true;
|
||||
"kwinrc"."Plugins"."contrastEnabled" = false;
|
||||
"kwinrc"."Plugins"."kwin4_effect_dimscreenEnabled" = true;
|
||||
"kwinrc"."Plugins"."kwin4_effect_translucencyEnabled" = true;
|
||||
"kwinrc"."Plugins"."padding" = 4;
|
||||
"kwinrc"."Plugins"."wobblywindowsEnabled" = true;
|
||||
"kwinrc"."SubSession: 3435a388-a8b3-4d1d-9794-b8c30162ce16"."active" = "-1";
|
||||
"kwinrc"."SubSession: 3435a388-a8b3-4d1d-9794-b8c30162ce16"."count" = 0;
|
||||
"kwinrc"."SubSession: 6a473a77-85df-4e49-8c74-bdb06d1f0efd"."active" = "-1";
|
||||
"kwinrc"."SubSession: 6a473a77-85df-4e49-8c74-bdb06d1f0efd"."count" = 0;
|
||||
"kwinrc"."Tiling"."padding" = 4;
|
||||
"kwinrc"."Wayland"."InputMethod[$e]" = "/run/current-system/sw/share/applications/org.fcitx.Fcitx5.desktop";
|
||||
"kwinrc"."Windows"."RollOverDesktops" = true;
|
||||
"kwinrc"."Xwayland"."Scale" = 1;
|
||||
"kwinrc"."Xwayland"."XwaylandEavesdrops" = "Combinations";
|
||||
"kwinrc"."org.kde.kdecoration2"."ButtonsOnLeft" = "M";
|
||||
"kwinrc"."org.kde.kdecoration2"."ButtonsOnRight" = "BFIAX";
|
||||
"kwinrulesrc"."06734e18-08f2-47f9-a6dc-9085d95fe9b0"."Description" = "org.kde.kruler 的设置";
|
||||
"kwinrulesrc"."06734e18-08f2-47f9-a6dc-9085d95fe9b0"."above" = true;
|
||||
"kwinrulesrc"."06734e18-08f2-47f9-a6dc-9085d95fe9b0"."aboverule" = 2;
|
||||
"kwinrulesrc"."06734e18-08f2-47f9-a6dc-9085d95fe9b0"."skipswitcher" = true;
|
||||
"kwinrulesrc"."06734e18-08f2-47f9-a6dc-9085d95fe9b0"."skipswitcherrule" = 2;
|
||||
"kwinrulesrc"."06734e18-08f2-47f9-a6dc-9085d95fe9b0"."wmclass" = "org.kde.kruler";
|
||||
"kwinrulesrc"."06734e18-08f2-47f9-a6dc-9085d95fe9b0"."wmclassmatch" = 1;
|
||||
"kwinrulesrc"."1"."Description" = "element 的设置";
|
||||
"kwinrulesrc"."1"."activity" = "00000000-0000-0000-0000-000000000000";
|
||||
"kwinrulesrc"."1"."activityrule" = 2;
|
||||
"kwinrulesrc"."1"."wmclass" = "element";
|
||||
"kwinrulesrc"."1"."wmclassmatch" = 1;
|
||||
"kwinrulesrc"."2"."Description" = "org.telegram.desktop 的设置";
|
||||
"kwinrulesrc"."2"."activity" = "00000000-0000-0000-0000-000000000000";
|
||||
"kwinrulesrc"."2"."activityrule" = 2;
|
||||
"kwinrulesrc"."2"."wmclass" = "org.telegram.desktop";
|
||||
"kwinrulesrc"."2"."wmclassmatch" = 1;
|
||||
"kwinrulesrc"."3"."Description" = "org.kde.kruler 的设置";
|
||||
"kwinrulesrc"."3"."above" = true;
|
||||
"kwinrulesrc"."3"."aboverule" = 2;
|
||||
"kwinrulesrc"."3"."skipswitcher" = true;
|
||||
"kwinrulesrc"."3"."skipswitcherrule" = 2;
|
||||
"kwinrulesrc"."3"."wmclass" = "org.kde.kruler";
|
||||
"kwinrulesrc"."3"."wmclassmatch" = 1;
|
||||
"kwinrulesrc"."8c1ccf0b-abf4-4d24-a848-522a76a2440d"."Description" = "element 的设置";
|
||||
"kwinrulesrc"."8c1ccf0b-abf4-4d24-a848-522a76a2440d"."activity" = "00000000-0000-0000-0000-000000000000";
|
||||
"kwinrulesrc"."8c1ccf0b-abf4-4d24-a848-522a76a2440d"."activityrule" = 2;
|
||||
"kwinrulesrc"."8c1ccf0b-abf4-4d24-a848-522a76a2440d"."wmclass" = "element";
|
||||
"kwinrulesrc"."8c1ccf0b-abf4-4d24-a848-522a76a2440d"."wmclassmatch" = 1;
|
||||
"kwinrulesrc"."General"."count" = 3;
|
||||
"kwinrulesrc"."General"."rules" = "1,2,3";
|
||||
"kwinrulesrc"."e75e010c-c094-4e6c-a98e-fe011e563466"."Description" = "org.telegram.desktop 的设置";
|
||||
"kwinrulesrc"."e75e010c-c094-4e6c-a98e-fe011e563466"."activity" = "00000000-0000-0000-0000-000000000000";
|
||||
"kwinrulesrc"."e75e010c-c094-4e6c-a98e-fe011e563466"."activityrule" = 2;
|
||||
"kwinrulesrc"."e75e010c-c094-4e6c-a98e-fe011e563466"."wmclass" = "org.telegram.desktop";
|
||||
"kwinrulesrc"."e75e010c-c094-4e6c-a98e-fe011e563466"."wmclassmatch" = 1;
|
||||
"kxkbrc"."Layout"."DisplayNames" = "";
|
||||
"kxkbrc"."Layout"."LayoutList" = "us";
|
||||
"kxkbrc"."Layout"."Use" = true;
|
||||
"kxkbrc"."Layout"."VariantList" = "";
|
||||
"plasma-localerc"."Formats"."LANG" = "en_US.UTF-8";
|
||||
"plasma-localerc"."Translations"."LANGUAGE" = "zh_CN";
|
||||
"plasmanotifyrc"."Notifications"."PopupPosition" = "BottomRight";
|
||||
"plasmarc"."Wallpapers"."usersWallpapers" = "/home/chn/Desktop/.桌面/twin_96734339_x2.png,/home/chn/Desktop/.桌面/E_yCTfDUUAgykjX_x8.jpeg,/home/chn/Desktop/.桌面/102692178_p0_[L1][x2.00].png,/home/chn/Desktop/.桌面/111392869_p0.png,/home/chn/Desktop/.桌面/HlszomyrfyxKLtpkVixEtikq_x4_chop.png";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
inputs:
|
||||
{
|
||||
config = inputs.lib.mkIf inputs.config.nixos.system.gui.enable
|
||||
{
|
||||
home-manager.users.chn.config.home.file =
|
||||
let
|
||||
programs =
|
||||
{
|
||||
nheko =
|
||||
let
|
||||
drv = inputs.pkgs.writeTextDir "nheko.desktop" (builtins.replaceStrings
|
||||
[ "Exec=nheko %u" ] [ "Exec=bash -c 'sleep 5 && nheko'" ]
|
||||
(builtins.readFile "${inputs.pkgs.nheko}/share/applications/nheko.desktop"));
|
||||
in "${drv}/nheko.desktop";
|
||||
kclockd = "${inputs.pkgs.plasma5Packages.kdeGear.kclock}/etc/xdg/autostart/org.kde.kclockd-autostart.desktop";
|
||||
yakuake = "${inputs.pkgs.yakuake}/share/applications/org.kde.yakuake.desktop";
|
||||
telegram =
|
||||
let
|
||||
drv = inputs.pkgs.writeTextDir "org.telegram.desktop.desktop" (builtins.replaceStrings
|
||||
[ "Exec=telegram-desktop -- %u" ] [ "Exec=bash -c 'sleep 5 && telegram-desktop -autostart'" ]
|
||||
(builtins.readFile "${inputs.pkgs.telegram-desktop}/share/applications/org.telegram.desktop.desktop"));
|
||||
in "${drv}/org.telegram.desktop.desktop";
|
||||
element =
|
||||
let
|
||||
drv = inputs.pkgs.writeTextDir "element-desktop.desktop" (builtins.replaceStrings
|
||||
[ "Exec=element-desktop %u" ] [ "Exec=element-desktop --hidden" ]
|
||||
(builtins.readFile
|
||||
"${inputs.pkgs.element-desktop.desktopItem}/share/applications/element-desktop.desktop"));
|
||||
in "${drv}/element-desktop.desktop";
|
||||
# kmail =
|
||||
# let
|
||||
# drv = inputs.pkgs.writeTextDir "org.kde.kmail2.desktop" (builtins.replaceStrings
|
||||
# [ "Exec=kmail -qwindowtitle %c %u" ] [ "Exec=bash -c 'sleep 5 && kmail -qwindowtitle'" ]
|
||||
# (builtins.readFile "${inputs.pkgs.kmail}/share/applications/org.kde.kmail2.desktop"));
|
||||
# in "${drv}/org.kde.kmail2.desktop";
|
||||
kmail = "${inputs.pkgs.kmail}/share/applications/org.kde.kmail2.desktop";
|
||||
discord =
|
||||
let
|
||||
drv = inputs.pkgs.writeTextDir "discord.desktop" (builtins.replaceStrings
|
||||
[ "Exec=Discord" ] [ "Exec=Discord --start-minimized" ]
|
||||
(builtins.readFile "${inputs.pkgs.discord.desktopItem}/share/applications/discord.desktop"));
|
||||
in "${drv}/discord.desktop";
|
||||
};
|
||||
devices =
|
||||
{
|
||||
pc = [ "nheko" "kclockd" "yakuake" "telegram" "element" "kmail" "discord" ];
|
||||
surface = [ "kclockd" "yakuake" "telegram" "element" ];
|
||||
};
|
||||
in builtins.listToAttrs (builtins.map
|
||||
(file:
|
||||
{
|
||||
name = ".config/autostart/${builtins.baseNameOf (builtins.unsafeDiscardStringContext programs.${file})}";
|
||||
value.source = programs.${file};
|
||||
})
|
||||
(devices.${inputs.config.nixos.system.networking.hostname} or []));
|
||||
environment.persistence =
|
||||
let impermanence = inputs.config.nixos.system.impermanence;
|
||||
in inputs.lib.mkIf impermanence.enable
|
||||
{
|
||||
"${impermanence.root}".users.chn.directories = [ ".config/autostart" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Name=Telegram Desktop
|
||||
Comment=Official desktop version of Telegram messaging app
|
||||
TryExec=telegram-desktop
|
||||
Exec=bash -c "sleep 5 && telegram-desktop -autostart"
|
||||
Icon=telegram
|
||||
Terminal=false
|
||||
StartupWMClass=TelegramDesktop
|
||||
Type=Application
|
||||
Categories=Chat;Network;InstantMessaging;Qt;
|
||||
MimeType=x-scheme-handler/tg;
|
||||
Keywords=tg;chat;im;messaging;messenger;sms;tdesktop;
|
||||
Actions=quit;
|
||||
DBusActivatable=true
|
||||
SingleMainWindow=true
|
||||
X-GNOME-UsesNotifications=true
|
||||
X-GNOME-SingleWindow=true
|
||||
@@ -1,94 +0,0 @@
|
||||
inputs:
|
||||
{
|
||||
imports = inputs.localLib.mkModules [ ./autostart ./wallpaper ./konsole.nix ./shortcuts.nix ./theme.nix ];
|
||||
config = inputs.lib.mkIf inputs.config.nixos.system.gui.enable
|
||||
{
|
||||
home-manager.users.chn.config.programs.plasma = inputs.lib.mkMerge
|
||||
[
|
||||
# TODO: autostart, panel, discard user changed settings
|
||||
# general
|
||||
{
|
||||
enable = true;
|
||||
configFile.plasma-localerc = { Formats.LANG = "en_US.UTF-8"; Translations.LANGUAGE = "zh_CN"; };
|
||||
}
|
||||
# kwin
|
||||
{
|
||||
kwin.titlebarButtons.right = [ "help" "keep-below-windows" "keep-above-windows" "minimize" "maximize" "close" ];
|
||||
windows.allowWindowsToRememberPositions = false;
|
||||
configFile =
|
||||
{
|
||||
plasmanotifyrc.Notifications.PopupPosition = "BottomRight";
|
||||
kwinrc =
|
||||
{
|
||||
Tiling.padding = 4;
|
||||
Wayland."InputMethod[$e]" = "/run/current-system/sw/share/applications/org.fcitx.Fcitx5.desktop";
|
||||
Windows.RollOverDesktops = true;
|
||||
Compositing = { AllowTearing = false; WindowsBlockCompositing = false; };
|
||||
};
|
||||
};
|
||||
}
|
||||
# baloo
|
||||
{ configFile.baloofilerc."Basic Settings".Indexing-Enabled = false; }
|
||||
# dolphin and file chooser
|
||||
{
|
||||
configFile =
|
||||
{
|
||||
dolphinrc =
|
||||
{
|
||||
General = { ShowFullPath = true; FilterBar = true; RememberOpenedTabs = false; };
|
||||
PreviewSettings.Plugins = builtins.concatStringsSep ","
|
||||
[
|
||||
"blenderthumbnail"
|
||||
"comicbookthumbnail"
|
||||
"djvuthumbnail"
|
||||
"ebookthumbnail"
|
||||
"exrthumbnail"
|
||||
"marble_thumbnail_geojson"
|
||||
"marble_thumbnail_gpx"
|
||||
"jpegthumbnail"
|
||||
"marble_thumbnail_kmz"
|
||||
"marble_thumbnail_kml"
|
||||
"kraorathumbnail"
|
||||
"windowsimagethumbnail"
|
||||
"windowsexethumbnail"
|
||||
"mltpreview"
|
||||
"mobithumbnail"
|
||||
"opendocumentthumbnail"
|
||||
"marble_thumbnail_osm"
|
||||
"palathumbcreator"
|
||||
"gsthumbnail"
|
||||
"rawthumbnail"
|
||||
"svgthumbnail"
|
||||
"imagethumbnail"
|
||||
"fontthumbnail"
|
||||
"directorythumbnail"
|
||||
"textthumbnail"
|
||||
"webarchivethumbnail"
|
||||
"ffmpegthumbs"
|
||||
"audiothumbnail"
|
||||
];
|
||||
};
|
||||
kdeglobals."KFileDialog Settings" =
|
||||
{
|
||||
"Allow Expansion" = true;
|
||||
"Automatically select filename extension" = true;
|
||||
"Show Bookmarks" = true;
|
||||
"Show Full Path" = true;
|
||||
"Show Inline Previews" = true;
|
||||
"Show Preview" = true;
|
||||
"Show Speedbar" = true;
|
||||
"Show hidden files" = true;
|
||||
"Sort by" = "Name";
|
||||
"Sort directories first" = true;
|
||||
"Sort hidden files last" = true;
|
||||
"View Style" = "DetailTree";
|
||||
};
|
||||
};
|
||||
}
|
||||
# krunner
|
||||
{ configFile.krunnerrc = { General.FreeFloating = true; Plugins.baloosearchEnabled = false; }; }
|
||||
# lock screen
|
||||
{ configFile.kscreenlockerrc.Daemon.Autolock = false; }
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
inputs:
|
||||
{
|
||||
config = inputs.lib.mkIf inputs.config.nixos.system.gui.enable
|
||||
{
|
||||
home-manager.users.chn.config =
|
||||
{
|
||||
programs.plasma =
|
||||
{
|
||||
overrideConfig = true;
|
||||
overrideConfigFiles = [ "konsolerc" "yakuakerc" ];
|
||||
configFile =
|
||||
{
|
||||
yakuakerc =
|
||||
{
|
||||
Appearance =
|
||||
{
|
||||
HideSkinBorders = true;
|
||||
Skin = "Slate";
|
||||
Translucency = true;
|
||||
};
|
||||
"Desktop Entry".DefaultProfile = "plasma-manager.profile";
|
||||
Dialogs.FirstRun = false;
|
||||
Window =
|
||||
{
|
||||
KeepOpen = false;
|
||||
KeepOpenAfterLastSessionCloses = true;
|
||||
ShowSystrayIcon = false;
|
||||
};
|
||||
};
|
||||
konsolerc =
|
||||
{
|
||||
"Desktop Entry".DefaultProfile = "plasma-manager.profile";
|
||||
"MainWindow.Toolbar sessionToolbar".ToolButtonStyle = "IconOnly";
|
||||
};
|
||||
};
|
||||
dataFile."konsole/plasma-manager.profile" =
|
||||
{
|
||||
Appearance =
|
||||
{
|
||||
AntiAliasFonts = true;
|
||||
BoldIntense = true;
|
||||
ColorScheme = "Breeze";
|
||||
Font = "FiraCode Nerd Font Mono,10,-1,5,50,0,0,0,0,0";
|
||||
UseFontLineChararacters = true;
|
||||
WordModeAttr = false;
|
||||
};
|
||||
"Cursor Options".CursorShape = 1;
|
||||
General =
|
||||
{
|
||||
Name = "plasma-manager";
|
||||
Parent = "FALLBACK/";
|
||||
TerminalCenter = true;
|
||||
TerminalMargin = 1;
|
||||
};
|
||||
"Interaction Options" =
|
||||
{
|
||||
AutoCopySelectedText = true;
|
||||
TrimLeadingSpacesInSelectedText = true;
|
||||
TrimTrailingSpacesInSelectedText = true;
|
||||
UnderlineFilesEnabled = true;
|
||||
};
|
||||
Scrolling =
|
||||
{
|
||||
HistoryMode = 2;
|
||||
ReflowLines = false;
|
||||
};
|
||||
"Terminal Features".BlinkingCursorEnabled = true;
|
||||
};
|
||||
};
|
||||
home.file.".local/share/konsole/Breeze.colorscheme".text = builtins.replaceStrings
|
||||
[ "Opacity=1" ] [ "Opacity=0.9\nBlur=true" ]
|
||||
(builtins.readFile "${inputs.pkgs.konsole}/share/konsole/Breeze.colorscheme");
|
||||
};
|
||||
environment.persistence =
|
||||
let impermanence = inputs.config.nixos.system.impermanence;
|
||||
in inputs.lib.mkIf impermanence.enable
|
||||
{
|
||||
"${impermanence.root}".users.chn.directories = [ ".local/share/konsole" ".local/share/yakuake" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,102 +0,0 @@
|
||||
inputs:
|
||||
{
|
||||
config = inputs.lib.mkIf inputs.config.nixos.system.gui.enable
|
||||
{
|
||||
home-manager.users.chn.config.programs.plasma =
|
||||
{
|
||||
spectacle.shortcuts.captureRectangularRegion = "Print";
|
||||
shortcuts = inputs.lib.mkMerge
|
||||
[
|
||||
# firefox
|
||||
{ "firefox.desktop"._launch = "Meta+B"; }
|
||||
# crow translate
|
||||
{ "io.crow_translate.CrowTranslate.desktop".TranslateSelectedText = "Ctrl+Alt+E"; }
|
||||
# display
|
||||
{
|
||||
kded5.display = [ "Display" "Meta+P" ];
|
||||
kwin = { view_actual_size = "Meta+0"; view_zoom_in = [ "Meta++" "Meta+=" ]; view_zoom_out = "Meta+-"; };
|
||||
org_kde_powerdevil =
|
||||
{
|
||||
"Decrease Screen Brightness" = "Monitor Brightness Down";
|
||||
"Increase Screen Brightness" = "Monitor Brightness Up";
|
||||
};
|
||||
}
|
||||
# volume
|
||||
{
|
||||
kmix =
|
||||
{
|
||||
decrease_volume = "Volume Down";
|
||||
increase_volume = "Volume Up";
|
||||
mic_mute = [ "Meta+Volume Mute" ];
|
||||
mute = "Volume Mute";
|
||||
};
|
||||
}
|
||||
# session
|
||||
{
|
||||
ksmserver = { "Lock Session" = [ "Meta+L" "Screensaver" ]; "Log Out" = "Ctrl+Alt+Del"; };
|
||||
org_kde_powerdevil."Turn Off Screen" = "Meta+Ctrl+L";
|
||||
}
|
||||
# window
|
||||
{
|
||||
kwin =
|
||||
{
|
||||
ExposeAll = "Meta+Tab";
|
||||
"Show Desktop" = "Meta+D";
|
||||
"Suspend Compositing" = "Alt+Shift+F12";
|
||||
"Walk Through Windows" = "Alt+Tab";
|
||||
"Walk Through Windows (Reverse)" = "Alt+Shift+Backtab";
|
||||
"Window Above Other Windows" = "Meta+Shift+PgUp";
|
||||
"Window Below Other Windows" = "Meta+Shift+PgDown";
|
||||
"Window Close" = "Alt+F4";
|
||||
"Window Maximize" = "Meta+PgUp";
|
||||
"Window Minimize" = "Meta+PgDown";
|
||||
"Window Operations Menu" = "Alt+F3";
|
||||
"Window Quick Tile Bottom" = "Meta+Down";
|
||||
"Window Quick Tile Left" = "Meta+Left";
|
||||
"Window Quick Tile Right" = "Meta+Right";
|
||||
"Window Quick Tile Top" = "Meta+Up";
|
||||
};
|
||||
}
|
||||
# virtual desktop
|
||||
{
|
||||
kwin =
|
||||
{
|
||||
"Switch One Desktop Down" = "Meta+Ctrl+Down";
|
||||
"Switch One Desktop Up" = "Meta+Ctrl+Up";
|
||||
"Switch One Desktop to the Left" = "Meta+Ctrl+Left";
|
||||
"Switch One Desktop to the Right" = "Meta+Ctrl+Right";
|
||||
"Window One Desktop Down" = "Meta+Ctrl+Shift+Down";
|
||||
"Window One Desktop Up" = "Meta+Ctrl+Shift+Up";
|
||||
"Window One Desktop to the Left" = "Meta+Ctrl+Shift+Left";
|
||||
"Window One Desktop to the Right" = "Meta+Ctrl+Shift+Right";
|
||||
};
|
||||
}
|
||||
# media
|
||||
{
|
||||
mediacontrol =
|
||||
{
|
||||
nextmedia = "Media Next";
|
||||
pausemedia = "Media Pause";
|
||||
playpausemedia = [ "Pause" "Media Play" ];
|
||||
previousmedia = "Media Previous";
|
||||
stopmedia = "Media Stop";
|
||||
};
|
||||
}
|
||||
# dolphin
|
||||
{ "org.kde.dolphin.desktop"._launch = "Meta+E"; }
|
||||
# konsole
|
||||
{ "org.kde.konsole.desktop"._launch = "Ctrl+Alt+T"; }
|
||||
# krunner
|
||||
{ "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
|
||||
{ "org.kde.plasma-systemmonitor.desktop"._launch = "Meta+Esc"; }
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
inputs:
|
||||
{
|
||||
config = inputs.lib.mkIf inputs.config.nixos.system.gui.enable
|
||||
{
|
||||
home-manager.users.chn.config.programs.plasma =
|
||||
{
|
||||
workspace =
|
||||
{
|
||||
theme = "Fluent-round-light";
|
||||
colorScheme = "FluentLight";
|
||||
cursorTheme = "Breeze_Snow";
|
||||
lookAndFeel = "com.github.vinceliuice.Fluent-round-light";
|
||||
iconTheme = "Tela-circle";
|
||||
};
|
||||
configFile =
|
||||
{
|
||||
kdeglobals.KDE.widgetStyle = "kvantum";
|
||||
"Kvantum/kvantum.kvconfig".General.theme = "Fluent-round";
|
||||
kwinrc =
|
||||
{
|
||||
Effect-blur.BlurStrength = 10;
|
||||
Effect-kwin4_effect_translucency.MoveResize = 75;
|
||||
Effect-wobblywindows = { AdvancedMode = true; Drag = 85; Stiffness = 10; WobblynessLevel = 1; };
|
||||
Plugins =
|
||||
{
|
||||
blurEnabled = true;
|
||||
kwin4_effect_dimscreenEnabled = true;
|
||||
kwin4_effect_translucencyEnabled = true;
|
||||
padding = 4;
|
||||
wobblywindowsEnabled = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
inputs:
|
||||
{
|
||||
config.home-manager.users.chn.config.programs.plasma.configFile =
|
||||
let wallpaper = "${./pixiv-96734339-x2.png}"; in
|
||||
{
|
||||
"plasma-org.kde.plasma.desktop-appletsrc" =
|
||||
{
|
||||
"Containments.1".wallpaperplugin = "a2n.blur";
|
||||
"Containments.1.Wallpaper.a2n\\.blur.General".Image = wallpaper;
|
||||
};
|
||||
kscreenlockerrc."Greeter.Wallpaper.org\\.kde\\.image.General" = { Image = wallpaper; PreviewImage = wallpaper; };
|
||||
};
|
||||
}
|
||||
Binary file not shown.
Reference in New Issue
Block a user