hosts/aristotle: drop
This commit is contained in:
parent
d852477b37
commit
71c309a2b0
10 changed files with 0 additions and 538 deletions
|
@ -185,7 +185,6 @@
|
|||
|
||||
### NixOS
|
||||
nixosConfigurations = {
|
||||
"aristotle" = mkNixOS "x86_64-linux" [./hosts/aristotle];
|
||||
"blacksteel" = mkNixOS "x86_64-linux" [./hosts/blacksteel];
|
||||
"dust" = mkNixOS "x86_64-linux" [./hosts/dust];
|
||||
};
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
{lib, ...}: {
|
||||
nixpkgs.config = {
|
||||
allowAliases = false;
|
||||
|
||||
allowNonSource = false;
|
||||
allowNonSourcePredicate = pkg:
|
||||
lib.elem (lib.getName pkg) [
|
||||
"adoptopenjdk-hotspot-bin"
|
||||
"cargo-bootstrap"
|
||||
"cef-binary"
|
||||
"dart"
|
||||
"osu-lazer-bin"
|
||||
"rustc-bootstrap"
|
||||
"rustc-bootstrap-wrapper"
|
||||
"sof-firmware"
|
||||
"temurin-bin"
|
||||
];
|
||||
|
||||
allowUnfree = false;
|
||||
allowUnfreePredicate = pkg:
|
||||
lib.elem (lib.getName pkg) [
|
||||
"fcitx5-pinyin-minecraft"
|
||||
"fcitx5-pinyin-moegirl"
|
||||
"libXNVCtrl"
|
||||
"nvidia-x11"
|
||||
"osu-lazer-bin"
|
||||
"steam"
|
||||
"steam-original"
|
||||
"steam-run"
|
||||
"xow_dongle-firmware"
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,168 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../../nixos/profiles/opt-in/mihomo
|
||||
../../nixos/profiles/opt-in/wireless
|
||||
|
||||
./anti-feature.nix
|
||||
./disko.nix
|
||||
./hardware-configuration.nix
|
||||
./impermanence.nix
|
||||
./lanzaboote.nix
|
||||
];
|
||||
|
||||
networking.hostName = "aristotle";
|
||||
time.timeZone = "Asia/Shanghai";
|
||||
system.stateVersion = "23.11";
|
||||
|
||||
home-manager.users.guanranwang = import ./home;
|
||||
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
yubikey-manager
|
||||
localsend
|
||||
];
|
||||
|
||||
programs.adb.enable = true;
|
||||
programs.anime-game-launcher.enable = true;
|
||||
programs.seahorse.enable = true;
|
||||
programs.steam.enable = true;
|
||||
programs.kdeconnect = {
|
||||
enable = true;
|
||||
package = pkgs.valent;
|
||||
};
|
||||
|
||||
services.power-profiles-daemon.enable = true;
|
||||
services.gvfs.enable = true;
|
||||
services.gnome = {
|
||||
gnome-keyring.enable = true;
|
||||
gnome-online-accounts.enable = true;
|
||||
sushi.enable = true;
|
||||
};
|
||||
|
||||
# https://wiki.archlinux.org/title/Gamepad#Connect_Xbox_Wireless_Controller_with_Bluetooth
|
||||
hardware.xone.enable = true; # via wired or wireless dongle
|
||||
hardware.xpadneo.enable = true; # via Bluetooth
|
||||
|
||||
# yubikey
|
||||
services.pcscd.enable = true;
|
||||
services.udev.packages = [pkgs.yubikey-personalization];
|
||||
|
||||
fonts = {
|
||||
enableDefaultPackages = false;
|
||||
packages = with pkgs; [
|
||||
(nerdfonts.override {
|
||||
fonts = ["NerdFontsSymbolsOnly"];
|
||||
})
|
||||
(inter.overrideAttrs {
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -Dm644 -t $out/share/fonts/truetype/ InterVariable*.ttf
|
||||
runHook postInstall
|
||||
'';
|
||||
})
|
||||
(jetbrains-mono.overrideAttrs {
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -Dm644 -t $out/share/fonts/truetype/ fonts/variable/*.ttf
|
||||
runHook postInstall
|
||||
'';
|
||||
})
|
||||
(source-sans.overrideAttrs {
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -Dm444 VF/*.otf -t $out/share/fonts/variable
|
||||
runHook postInstall
|
||||
'';
|
||||
})
|
||||
(source-serif.overrideAttrs {
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -Dm444 VAR/*.otf -t $out/share/fonts/variable
|
||||
runHook postInstall
|
||||
'';
|
||||
})
|
||||
source-han-sans-vf-otf
|
||||
source-han-serif-vf-otf
|
||||
noto-fonts-color-emoji
|
||||
];
|
||||
fontconfig.defaultFonts = {
|
||||
emoji = [
|
||||
"Noto Color Emoji"
|
||||
];
|
||||
# Append emoji font for Qt apps, they might use the monochrome emoji
|
||||
monospace = [
|
||||
"JetBrains Mono"
|
||||
"Source Han Sans SC VF"
|
||||
"Symbols Nerd Font"
|
||||
"Noto Color Emoji"
|
||||
];
|
||||
sansSerif = [
|
||||
"Inter Variable"
|
||||
"Source Han Sans SC VF"
|
||||
"Noto Color Emoji"
|
||||
];
|
||||
serif = [
|
||||
"Source Serif 4 Variable"
|
||||
"Source Han Serif SC VF"
|
||||
"Noto Color Emoji"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
console = {
|
||||
earlySetup = true;
|
||||
keyMap = "dvorak";
|
||||
};
|
||||
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings.default_session.command = "${lib.getExe pkgs.greetd.tuigreet} --cmd sway";
|
||||
};
|
||||
|
||||
# polkit
|
||||
security.polkit.enable = true;
|
||||
systemd.user.services.polkit-gnome-authentication-agent-1 = {
|
||||
description = "polkit-gnome-authentication-agent-1";
|
||||
wantedBy = ["graphical-session.target"];
|
||||
wants = ["graphical-session.target"];
|
||||
after = ["graphical-session.target"];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 1;
|
||||
TimeoutStopSec = 10;
|
||||
};
|
||||
};
|
||||
|
||||
security.pam.services.swaylock = {};
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
xdgOpenUsePortal = true;
|
||||
wlr.enable = true;
|
||||
extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
||||
# https://gitlab.archlinux.org/archlinux/packaging/packages/sway/-/blob/main/sway-portals.conf
|
||||
config."sway" = {
|
||||
default = "gtk";
|
||||
"org.freedesktop.impl.portal.ScreenCast" = "wlr";
|
||||
"org.freedesktop.impl.portal.Screenshot" = "wlr";
|
||||
"org.freedesktop.impl.portal.Inhibit" = "none";
|
||||
};
|
||||
};
|
||||
|
||||
### Removes debounce time
|
||||
# https://www.reddit.com/r/linux_gaming/comments/ku6gth
|
||||
environment.etc."libinput/local-overrides.quirks".text = ''
|
||||
[Never Debounce]
|
||||
MatchUdevType=mouse
|
||||
ModelBouncingKeys=1
|
||||
'';
|
||||
}
|
|
@ -1,78 +0,0 @@
|
|||
let
|
||||
disks = ["/dev/nvme0n1"];
|
||||
# compress-force: https://t.me/archlinuxcn_group/3054167
|
||||
mountOptions = ["defaults" "compress-force=zstd" "noatime"];
|
||||
cryptSettings = {
|
||||
allowDiscards = true;
|
||||
bypassWorkqueues = true;
|
||||
};
|
||||
in {
|
||||
disko.devices = {
|
||||
disk = {
|
||||
"one" = {
|
||||
type = "disk";
|
||||
device = builtins.elemAt disks 0;
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
"esp" = {
|
||||
size = "2G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = ["defaults" "umask=007"];
|
||||
};
|
||||
};
|
||||
"cryptroot" = {
|
||||
end = "-16G";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "cryptroot";
|
||||
settings = cryptSettings;
|
||||
content = {
|
||||
type = "btrfs";
|
||||
subvolumes = {
|
||||
"/@nix" = {
|
||||
mountpoint = "/nix";
|
||||
inherit mountOptions;
|
||||
};
|
||||
"/@persist" = {
|
||||
mountpoint = "/persist";
|
||||
inherit mountOptions;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
"cryptswap" = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "cryptswap";
|
||||
settings = cryptSettings;
|
||||
content = {
|
||||
type = "swap";
|
||||
resumeDevice = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
nodev = {
|
||||
"/" = {
|
||||
fsType = "tmpfs";
|
||||
mountOptions = [
|
||||
"defaults"
|
||||
"size=2G"
|
||||
"mode=755"
|
||||
"nodev"
|
||||
"nosuid"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
{inputs, ...}: {
|
||||
imports = [
|
||||
inputs.nixpkgs.nixosModules.notDetected
|
||||
inputs.nixos-hardware.nixosModules.lenovo-legion-y530-15ich
|
||||
];
|
||||
|
||||
services.hdapsd.enable = false;
|
||||
services.thermald.enable = true;
|
||||
|
||||
security.rtkit.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
settings.General.FastConnectable = true;
|
||||
};
|
||||
|
||||
# nouveou
|
||||
services.xserver.videoDrivers = [];
|
||||
|
||||
# novideo
|
||||
# hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
# hardware.nvidia.nvidiaSettings = false;
|
||||
# environment.sessionVariables."MOZ_ENABLE_WAYLAND" = "0";
|
||||
# networking.networkmanager.enable = false;
|
||||
# services.xserver.desktopManager.gnome.enable = true;
|
||||
# services.xserver.displayManager.gdm.enable = true;
|
||||
# # https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1562
|
||||
# services.udev.extraRules = ''
|
||||
# ENV{DEVNAME}=="/dev/dri/card1", TAG+="mutter-device-preferred-primary"
|
||||
# '';
|
||||
|
||||
boot.loader.timeout = 0;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid"];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
}
|
|
@ -1,62 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
[
|
||||
./theme.nix
|
||||
./xdg-mime.nix
|
||||
]
|
||||
++ map (n: ../../../home/applications/${n}) [
|
||||
"fcitx5"
|
||||
"firefox"
|
||||
"foot"
|
||||
"go"
|
||||
"mpv"
|
||||
"nautilus"
|
||||
"nix"
|
||||
"sway"
|
||||
"thunderbird"
|
||||
"ydict"
|
||||
];
|
||||
|
||||
# https://wiki.archlinux.org/title/Fish#Start_X_at_login
|
||||
programs.fish.loginShellInit = ''
|
||||
if test -z "$DISPLAY" -a "$XDG_VTNR" = 1
|
||||
exec sway
|
||||
end
|
||||
'';
|
||||
|
||||
home.packages =
|
||||
(with pkgs; [
|
||||
amberol
|
||||
dconf-editor
|
||||
file-roller
|
||||
fractal
|
||||
gnome-calculator
|
||||
hyperfine
|
||||
loupe
|
||||
mousai
|
||||
seahorse
|
||||
|
||||
(prismlauncher.override {
|
||||
glfw = glfw-wayland-minecraft;
|
||||
gamemodeSupport = false;
|
||||
})
|
||||
mumble
|
||||
osu-lazer-bin
|
||||
])
|
||||
++ (with inputs.self.legacyPackages.${pkgs.stdenv.hostPlatform.system}.scripts; [
|
||||
lofi
|
||||
]);
|
||||
|
||||
home.sessionVariables = {
|
||||
# https://github.com/ppy/osu-framework/pull/6292
|
||||
"OSU_SDL3" = "1";
|
||||
};
|
||||
|
||||
programs.mangohud.enable = true;
|
||||
programs.obs-studio.enable = true;
|
||||
services.ssh-agent.enable = true;
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
home.pointerCursor = {
|
||||
name = "Adwaita";
|
||||
package = pkgs.adwaita-icon-theme;
|
||||
size = 24;
|
||||
gtk.enable = true;
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||
|
||||
gtk3.bookmarks = [
|
||||
"file://${config.home.homeDirectory}/Documents/Projects/flake"
|
||||
];
|
||||
|
||||
iconTheme = {
|
||||
name = "Adwaita";
|
||||
package = pkgs.adwaita-icon-theme;
|
||||
};
|
||||
|
||||
theme = {
|
||||
name = "Adwaita-dark";
|
||||
package = pkgs.gnome-themes-extra;
|
||||
};
|
||||
};
|
||||
|
||||
dconf.settings = {
|
||||
"org/gnome/desktop/interface" = {
|
||||
"color-scheme" = "prefer-dark";
|
||||
};
|
||||
|
||||
# Make GTK listen to fontconfig
|
||||
"org/gnome/desktop/wm/preferences" = {
|
||||
"titlebar-font" = "Sans Bold 11";
|
||||
};
|
||||
"org/gnome/desktop/interface" = {
|
||||
"font-name" = "Sans 11";
|
||||
"document-font-name" = "Sans 11";
|
||||
"monospace-font-name" = "Monospace 10";
|
||||
};
|
||||
};
|
||||
|
||||
# ??? this commit broke nautilus's spacing ???
|
||||
# https://github.com/nix-community/home-manager/commit/e9b9ecef4295a835ab073814f100498716b05a96
|
||||
xdg.configFile."gtk-4.0/gtk.css".text = lib.mkForce config.gtk.gtk4.extraCss;
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
{lib, ...}: {
|
||||
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
|
||||
xdg.mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications =
|
||||
{
|
||||
"inode/directory" = ["org.gnome.Nautilus.desktop"];
|
||||
}
|
||||
### Browser
|
||||
// lib.genAttrs [
|
||||
"text/html"
|
||||
"x-scheme-handler/http"
|
||||
"x-scheme-handler/https"
|
||||
"x-scheme-handler/about"
|
||||
"x-scheme-handler/unknown"
|
||||
] (_n: ["firefox.desktop"])
|
||||
### Audio player
|
||||
// lib.genAttrs [
|
||||
"audio/aac"
|
||||
"audio/flac"
|
||||
"audio/mpeg"
|
||||
"audio/ogg"
|
||||
"audio/wav"
|
||||
] (_n: ["io.bassi.Amberol.desktop"])
|
||||
### Image viewer
|
||||
// lib.genAttrs [
|
||||
"image/gif"
|
||||
"image/jpeg"
|
||||
"image/png"
|
||||
"image/webp"
|
||||
] (_n: ["org.gnome.Loupe.desktop"])
|
||||
### Video player
|
||||
// lib.genAttrs [
|
||||
"video/mp4"
|
||||
"video/mpeg"
|
||||
"video/webm"
|
||||
] (_n: ["mpv.desktop"])
|
||||
### Code editor
|
||||
// lib.genAttrs [
|
||||
"text/css"
|
||||
"text/html"
|
||||
"text/javascript"
|
||||
"text/plain"
|
||||
] (_n: ["nvim.desktop"]);
|
||||
};
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
{lib, ...}: {
|
||||
sops.age.sshKeyPaths = lib.mkForce ["/persist/etc/ssh/ssh_host_ed25519_key"];
|
||||
fileSystems."/persist".neededForBoot = true;
|
||||
environment.persistence."/persist" = {
|
||||
hideMounts = true;
|
||||
directories = [
|
||||
"/var/log"
|
||||
"/var/lib"
|
||||
"/etc/secureboot"
|
||||
];
|
||||
files = [
|
||||
"/etc/ssh/ssh_host_ed25519_key"
|
||||
"/etc/ssh/ssh_host_ed25519_key.pub"
|
||||
"/etc/ssh/ssh_host_rsa_key"
|
||||
"/etc/ssh/ssh_host_rsa_key.pub"
|
||||
];
|
||||
users.guanranwang = {
|
||||
directories = [
|
||||
"Desktop"
|
||||
"Documents"
|
||||
"Downloads"
|
||||
"Music"
|
||||
"Pictures"
|
||||
"Videos"
|
||||
#"Public"
|
||||
#"Templates"
|
||||
|
||||
".ssh"
|
||||
".mozilla/firefox"
|
||||
".thunderbird"
|
||||
|
||||
".cache"
|
||||
".local/share"
|
||||
".local/state"
|
||||
|
||||
".config/gh"
|
||||
".config/Mumble"
|
||||
".config/fcitx5"
|
||||
".config/obs-studio"
|
||||
];
|
||||
files = [
|
||||
".config/sops/age/keys.txt"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
environment.systemPackages = [pkgs.sbctl];
|
||||
boot.lanzaboote = {
|
||||
enable = true;
|
||||
pkiBundle = "/etc/secureboot";
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue