mirror of
https://github.com/youwen5/nixos.git
synced 2024-11-24 17:53:51 -08:00
Compare commits
8 commits
e5a4f927a3
...
f05231223b
Author | SHA1 | Date | |
---|---|---|---|
f05231223b | |||
88dd424203 | |||
c1257d3ba1 | |||
2a92bc9e69 | |||
598736167a | |||
a97e676fb7 | |||
4a6b3a895d | |||
9fbf576165 |
23 changed files with 6018 additions and 1709 deletions
42
flake.lock
42
flake.lock
|
@ -24,11 +24,11 @@
|
|||
},
|
||||
"bleedingpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1724117083,
|
||||
"narHash": "sha256-26Zgap4D9E8PRL9jvc4Df9POMNGFS9fMwKz+SiGrlXI=",
|
||||
"lastModified": 1724277913,
|
||||
"narHash": "sha256-88IaCyNgVQHq1WoyK1mSOzedz3UAfwhtDLUca7qGB3I=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "44f636f8cb95238dabd5f33d00557329c0681cd5",
|
||||
"rev": "4c97b427ece2d45026ab6c5264adb67c763e7927",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -57,11 +57,11 @@
|
|||
},
|
||||
"catppuccin": {
|
||||
"locked": {
|
||||
"lastModified": 1724048768,
|
||||
"narHash": "sha256-OZ9OXsPQi+fNdMM7SBPtU8OB1ntLzOvUwA/3zYJY6Eo=",
|
||||
"lastModified": 1724156255,
|
||||
"narHash": "sha256-rpUCeS/QZwQdJmDrvCm0hRi8bFvQNQKAnIMK5ZDBfpM=",
|
||||
"owner": "catppuccin",
|
||||
"repo": "nix",
|
||||
"rev": "ff4128f8ea57879050145cf077a27b9d3a9cbf33",
|
||||
"rev": "8886a68edadb1d93c7101337f995ffce4b410ff2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -404,11 +404,11 @@
|
|||
"homebrew-cask": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1724120139,
|
||||
"narHash": "sha256-vVE53gBCJPc3/dj7OHvQ7mNuUk1bWVpNR4c0jKe+K9U=",
|
||||
"lastModified": 1724279485,
|
||||
"narHash": "sha256-izbAx5wx4QS332G9dJ/E1U/NA9nrUjS0qS6b1thPQuE=",
|
||||
"owner": "homebrew",
|
||||
"repo": "homebrew-cask",
|
||||
"rev": "606d3429e6fae79849c0eaf4bbcf05ff1570051a",
|
||||
"rev": "761ddda3d71597c6b594af9416492fbf67ec813e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -420,11 +420,11 @@
|
|||
"homebrew-core": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1724119620,
|
||||
"narHash": "sha256-p+M24z3IDeIJBppaWWTpaz63WMGvi3HGW/mQHQVYpgM=",
|
||||
"lastModified": 1724279403,
|
||||
"narHash": "sha256-k/OW0HDkdJHfo1E52PyfeEyBDH0LwXuM1VmmFxCvYk0=",
|
||||
"owner": "homebrew",
|
||||
"repo": "homebrew-core",
|
||||
"rev": "cd06a79081ce6e08b475e01315cdf1cb51952d77",
|
||||
"rev": "7270362c593e96b2368834f6a87cd0d904874eb9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -502,11 +502,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723859949,
|
||||
"narHash": "sha256-kiaGz4deGYKMjJPOji/JVvSP/eTefrIA3rAjOnOpXl4=",
|
||||
"lastModified": 1724219898,
|
||||
"narHash": "sha256-7PwlnEQDIbww8+nk0CHLeYTYMA23F/CkynHsX7Mxk+s=",
|
||||
"owner": "LnL7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "076b9a905af8a52b866c8db068d6da475839d97b",
|
||||
"rev": "d6703b988728b89456b32bac242c8689902e5a5b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -651,11 +651,11 @@
|
|||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1724118730,
|
||||
"narHash": "sha256-UwtVD2FyD7FjfLLmqGLsCBCQgLC1Jj78e1PhiVb0MJk=",
|
||||
"lastModified": 1724222231,
|
||||
"narHash": "sha256-IFlMn1lgVsZQZC9WklY9YKcCdI0mUxSYZ7EfkaKCsQU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "39081a41067a7bdb66f6f85a3fee9693ff8a21b1",
|
||||
"rev": "b7f419a759f70126e220533b724cc17e8528b184",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -773,11 +773,11 @@
|
|||
},
|
||||
"stablepkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1723938990,
|
||||
"narHash": "sha256-9tUadhnZQbWIiYVXH8ncfGXGvkNq3Hag4RCBEMUk7MI=",
|
||||
"lastModified": 1724098845,
|
||||
"narHash": "sha256-D5HwjQw/02fuXbR4LCTo64koglP2j99hkDR79/3yLOE=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c42fcfbdfeae23e68fc520f9182dde9f38ad1890",
|
||||
"rev": "f1bad50880bae73ff2d82fafc22010b4fc097a9c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
156
flake.nix
156
flake.nix
|
@ -3,38 +3,52 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
stablepkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||
|
||||
bleedingpkgs.url = "github:nixos/nixpkgs/master";
|
||||
nix-darwin.url = "github:LnL7/nix-darwin";
|
||||
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
nix-darwin = {
|
||||
url = "github:LnL7/nix-darwin";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nix-homebrew.url = "github:zhaofengli-wip/nix-homebrew";
|
||||
|
||||
homebrew-core = {
|
||||
url = "github:homebrew/homebrew-core";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
homebrew-cask = {
|
||||
url = "github:homebrew/homebrew-cask";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
catppuccin.url = "github:catppuccin/nix";
|
||||
|
||||
lanzaboote = {
|
||||
url = "github:nix-community/lanzaboote/v0.4.1";
|
||||
|
||||
# Optional but recommended to limit the size of your system closure.
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
lix-module = {
|
||||
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0.tar.gz";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
apple-silicon = {
|
||||
url = "github:tpwrules/nixos-apple-silicon";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nixvim = {
|
||||
url = "github:nix-community/nixvim";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
@ -54,85 +68,33 @@
|
|||
nix-homebrew,
|
||||
apple-silicon,
|
||||
...
|
||||
} @ inputs: rec {
|
||||
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
|
||||
} @ inputs: let
|
||||
in rec {
|
||||
formatter = with nixpkgs.legacyPackages; {
|
||||
x86_64-linux = x86_64-linux.alejandra;
|
||||
aarch64-linux = aarch64-linux.alejandra;
|
||||
aarch64-darwin = aarch64-darwin.alejandra;
|
||||
};
|
||||
|
||||
nixosConfigurations = {
|
||||
demeter = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs;};
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
modules = [
|
||||
./hosts/demeter
|
||||
./modules/nixos/gaming
|
||||
./modules/nixos/audio
|
||||
./modules/nixos/networking
|
||||
./modules/nixos/fonts
|
||||
./modules/nixos/greeter
|
||||
./modules/nixos/core
|
||||
./overlays
|
||||
|
||||
catppuccin.nixosModules.catppuccin
|
||||
lix-module.nixosModules.default
|
||||
lanzaboote.nixosModules.lanzaboote
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.backupFileExtension = "backup";
|
||||
home-manager.users.youwen = {
|
||||
imports = [
|
||||
./users/youwen/linux/desktop
|
||||
./users/youwen/linux/packages/x86_64
|
||||
./users/youwen/linux/programs
|
||||
./users/youwen/common/neofetch
|
||||
./users/youwen/common/neovim
|
||||
./users/youwen/common
|
||||
inputs.catppuccin.homeManagerModules.catppuccin
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
callisto = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs;};
|
||||
system = "aarch64-linux";
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
system = "aarch64-linux";
|
||||
};
|
||||
modules = [
|
||||
./hosts/callisto
|
||||
./modules/nixos/audio
|
||||
./modules/nixos/networking
|
||||
./modules/nixos/fonts
|
||||
./modules/nixos/greeter
|
||||
./modules/nixos/core
|
||||
|
||||
apple-silicon.nixosModules.apple-silicon-support
|
||||
catppuccin.nixosModules.catppuccin
|
||||
lix-module.nixosModules.default
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.backupFileExtension = "backup";
|
||||
home-manager.users.youwen = {
|
||||
imports = [
|
||||
./users/youwen/common
|
||||
./users/youwen/common/neofetch/asahi-only.nix
|
||||
./users/youwen/linux/laptop
|
||||
./users/youwen/linux/packages/aarch-64
|
||||
./users/youwen/common/neovim
|
||||
|
||||
inputs.catppuccin.homeManagerModules.catppuccin
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
};
|
||||
}
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
signal-desktop =
|
||||
bleedingpkgs.legacyPackages.${self.system}.signal-desktop;
|
||||
})
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
adrastea = nixpkgs.lib.nixosSystem {
|
||||
|
@ -140,65 +102,13 @@
|
|||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/adrastea
|
||||
./modules/nixos/gaming
|
||||
./modules/nixos/audio
|
||||
./modules/nixos/networking
|
||||
./modules/nixos/fonts
|
||||
./modules/nixos/greeter
|
||||
./modules/nixos/core
|
||||
|
||||
catppuccin.nixosModules.catppuccin
|
||||
lix-module.nixosModules.default
|
||||
# lanzaboote.nixosModules.lanzaboote
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.backupFileExtension = "backup";
|
||||
home-manager.users.youwen = {
|
||||
imports = [
|
||||
./users/youwen/linux/laptop
|
||||
./users/youwen/linux/packages/x86_64
|
||||
./users/youwen/linux/programs
|
||||
./users/youwen/common/neovim
|
||||
./users/youwen/common
|
||||
./users/youwen/common/neofetch
|
||||
./hosts/adrastea/home-manager-overrides.nix
|
||||
inputs.catppuccin.homeManagerModules.catppuccin
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
formatter.aarch64-darwin = nixpkgs.legacyPackages.aarch64-darwin.alejandra;
|
||||
formatter.aarch64-linux = nixpkgs.legacyPackages.aarch64-linux.alejandra;
|
||||
# Build darwin flake using:
|
||||
# $ darwin-rebuild build --flake .#Youwens-MacBook-Pro
|
||||
darwinConfigurations.phobos = nix-darwin.lib.darwinSystem {
|
||||
specialArgs = {inherit inputs;};
|
||||
modules = [
|
||||
./hosts/phobos
|
||||
home-manager.darwinModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.youwen.imports = [
|
||||
./users/youwen/darwin/darwin-home.nix
|
||||
./users/youwen/common/core.nix
|
||||
./users/youwen/common/neofetch
|
||||
./users/youwen/common/neovim
|
||||
];
|
||||
home-manager.backupFileExtension = "backup";
|
||||
|
||||
# Optionally, use home-manager.extraSpecialArgs to pass
|
||||
# arguments to home.nix
|
||||
}
|
||||
nix-homebrew.darwinModules.nix-homebrew
|
||||
./modules/darwin/homebrew.nix
|
||||
./modules/darwin/yabai.nix
|
||||
./modules/darwin/skhd.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
227
hosts/adrastea/configuration.nix
Executable file
227
hosts/adrastea/configuration.nix
Executable file
|
@ -0,0 +1,227 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = 15;
|
||||
# Lanzaboote currently replaces the systemd-boot module.
|
||||
# This setting is usually set to true in configuration.nix
|
||||
# generated at installation time. So we force it to false
|
||||
# for now.
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
consoleMode = "auto";
|
||||
};
|
||||
};
|
||||
|
||||
# boot.lanzaboote = {
|
||||
# enable = false;
|
||||
# pkiBundle = "/etc/secureboot";
|
||||
# };
|
||||
|
||||
services.keyd = {
|
||||
enable = true;
|
||||
keyboards = {
|
||||
default = {
|
||||
ids = ["*"];
|
||||
settings = {
|
||||
main = {
|
||||
capslock = "esc";
|
||||
leftalt = "leftcontrol";
|
||||
leftcontrol = "leftalt";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-52d1be6d-b32f-41e0-a6d7-2ff52599fe7c".device = "/dev/disk/by-uuid/52d1be6d-b32f-41e0-a6d7-2ff52599fe7c";
|
||||
|
||||
services.tlp.enable = true;
|
||||
|
||||
networking.hostName = "adrastea"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# select kernel
|
||||
boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
systemd.services = {NetworkManager-wait-online.enable = false;};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
# You can disable this if you're only using the Wayland session.
|
||||
services.xserver.enable = false;
|
||||
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
libraries = with pkgs; [icu xorg.libXtst xorg.libXi];
|
||||
};
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
powerManagement.finegrained = false;
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
prime = {
|
||||
amdgpuBusId = "PCI:4:0:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
hardware.graphics.enable = true;
|
||||
|
||||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
# services.desktopManager.plasma6.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
xkb.layout = "us";
|
||||
xkb.variant = "";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.youwen = {
|
||||
isNormalUser = true;
|
||||
description = "Youwen Wu";
|
||||
extraGroups = ["networkmanager" "wheel" "nixos" "realtime"];
|
||||
};
|
||||
|
||||
users.groups.realtime = {};
|
||||
|
||||
nix.settings = {
|
||||
trusted-users = ["root" "youwen"];
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
};
|
||||
|
||||
services.udev.extraRules = ''
|
||||
KERNEL=="cpu_dma_latency", GROUP="realtime"
|
||||
'';
|
||||
|
||||
security.pam.loginLimits = [
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "rtprio";
|
||||
value = 98;
|
||||
}
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "memlock";
|
||||
value = "unlimited";
|
||||
}
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "nice";
|
||||
value = -11;
|
||||
}
|
||||
];
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
wget
|
||||
git
|
||||
curl
|
||||
librewolf
|
||||
gnumake
|
||||
gcc
|
||||
cachix
|
||||
gnupg
|
||||
openssh
|
||||
python3
|
||||
steam-run
|
||||
|
||||
# deps for neovim compilation
|
||||
lua51Packages.lua
|
||||
lua51Packages.luarocks
|
||||
tree-sitter
|
||||
];
|
||||
|
||||
environment.variables = {
|
||||
EDITOR = "nvim";
|
||||
NIX_AUTO_RUN = 1;
|
||||
};
|
||||
|
||||
# tells electron apps to use Wayland
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
||||
programs.hyprland.enable = true;
|
||||
|
||||
programs.zsh.enable = false;
|
||||
programs.fish.enable = true;
|
||||
users.users.youwen.shell = pkgs.fish;
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "24.05"; # Did you read the comment?
|
||||
}
|
252
hosts/adrastea/default.nix
Executable file → Normal file
252
hosts/adrastea/default.nix
Executable file → Normal file
|
@ -1,227 +1,35 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
{inputs, ...}: {
|
||||
imports = with inputs; [
|
||||
./configuration.nix
|
||||
../../modules/nixos/gaming
|
||||
../../modules/nixos/audio
|
||||
../../modules/nixos/networking
|
||||
../../modules/nixos/fonts
|
||||
../../modules/nixos/greeter
|
||||
../../modules/nixos/core
|
||||
../../overlays
|
||||
|
||||
# Bootloader.
|
||||
boot.loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = 15;
|
||||
# Lanzaboote currently replaces the systemd-boot module.
|
||||
# This setting is usually set to true in configuration.nix
|
||||
# generated at installation time. So we force it to false
|
||||
# for now.
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
consoleMode = "auto";
|
||||
};
|
||||
};
|
||||
|
||||
# boot.lanzaboote = {
|
||||
# enable = false;
|
||||
# pkiBundle = "/etc/secureboot";
|
||||
# };
|
||||
|
||||
services.keyd = {
|
||||
enable = true;
|
||||
keyboards = {
|
||||
default = {
|
||||
ids = ["*"];
|
||||
settings = {
|
||||
main = {
|
||||
capslock = "esc";
|
||||
leftalt = "leftcontrol";
|
||||
leftcontrol = "leftalt";
|
||||
};
|
||||
};
|
||||
catppuccin.nixosModules.catppuccin
|
||||
lix-module.nixosModules.default
|
||||
# lanzaboote.nixosModules.lanzaboote
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.backupFileExtension = "backup";
|
||||
home-manager.users.youwen = {
|
||||
imports = [
|
||||
./home-manager-extras
|
||||
../../users/youwen/linux/laptop
|
||||
../../users/youwen/linux/packages/x86_64
|
||||
../../users/youwen/linux/programs
|
||||
../../users/youwen/common/neovim
|
||||
../../users/youwen/common
|
||||
../../users/youwen/common/neofetch
|
||||
inputs.catppuccin.homeManagerModules.catppuccin
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-52d1be6d-b32f-41e0-a6d7-2ff52599fe7c".device = "/dev/disk/by-uuid/52d1be6d-b32f-41e0-a6d7-2ff52599fe7c";
|
||||
|
||||
services.tlp.enable = true;
|
||||
|
||||
networking.hostName = "adrastea"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# select kernel
|
||||
boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
systemd.services = {NetworkManager-wait-online.enable = false;};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
# You can disable this if you're only using the Wayland session.
|
||||
services.xserver.enable = false;
|
||||
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
libraries = with pkgs; [icu xorg.libXtst xorg.libXi];
|
||||
};
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
powerManagement.finegrained = false;
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
prime = {
|
||||
amdgpuBusId = "PCI:4:0:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
hardware.graphics.enable = true;
|
||||
|
||||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
# services.desktopManager.plasma6.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
xkb.layout = "us";
|
||||
xkb.variant = "";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.youwen = {
|
||||
isNormalUser = true;
|
||||
description = "Youwen Wu";
|
||||
extraGroups = ["networkmanager" "wheel" "nixos" "realtime"];
|
||||
};
|
||||
|
||||
users.groups.realtime = {};
|
||||
|
||||
nix.settings = {
|
||||
trusted-users = ["root" "youwen"];
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
};
|
||||
|
||||
services.udev.extraRules = ''
|
||||
KERNEL=="cpu_dma_latency", GROUP="realtime"
|
||||
'';
|
||||
|
||||
security.pam.loginLimits = [
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "rtprio";
|
||||
value = 98;
|
||||
}
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "memlock";
|
||||
value = "unlimited";
|
||||
}
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "nice";
|
||||
value = -11;
|
||||
}
|
||||
];
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
wget
|
||||
git
|
||||
curl
|
||||
librewolf
|
||||
gnumake
|
||||
gcc
|
||||
cachix
|
||||
gnupg
|
||||
openssh
|
||||
python3
|
||||
steam-run
|
||||
|
||||
# deps for neovim compilation
|
||||
lua51Packages.lua
|
||||
lua51Packages.luarocks
|
||||
tree-sitter
|
||||
];
|
||||
|
||||
environment.variables = {
|
||||
EDITOR = "nvim";
|
||||
NIX_AUTO_RUN = 1;
|
||||
};
|
||||
|
||||
# tells electron apps to use Wayland
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
||||
programs.hyprland.enable = true;
|
||||
|
||||
programs.zsh.enable = false;
|
||||
programs.fish.enable = true;
|
||||
users.users.youwen.shell = pkgs.fish;
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "24.05"; # Did you read the comment?
|
||||
}
|
||||
|
|
5062
hosts/callisto/asahi-fix.patch
Normal file
5062
hosts/callisto/asahi-fix.patch
Normal file
File diff suppressed because it is too large
Load diff
212
hosts/callisto/configuration.nix
Executable file
212
hosts/callisto/configuration.nix
Executable file
|
@ -0,0 +1,212 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
# ./apple-silicon-support
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = false;
|
||||
|
||||
hardware.asahi = {
|
||||
peripheralFirmwareDirectory = ./firmware;
|
||||
useExperimentalGPUDriver = true;
|
||||
experimentalGPUInstallMode = "overlay";
|
||||
};
|
||||
|
||||
boot.extraModprobeConfig = ''
|
||||
options hid_apple iso_layout=0
|
||||
'';
|
||||
|
||||
boot.kernelParams = ["apple_dcp.show_notch=1"];
|
||||
|
||||
networking.hostName = "callisto"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
networking.wireless.iwd = {
|
||||
enable = true;
|
||||
settings.General.EnableNetworkConfiguration = true;
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
inputs.apple-silicon.overlays.apple-silicon-overlay
|
||||
(final: prev: {
|
||||
hyprland = prev.hyprland.overrideAttrs (oldAttrs: {
|
||||
src = oldAttrs.src;
|
||||
patches =
|
||||
oldAttrs.patches
|
||||
or []
|
||||
++ [
|
||||
./asahi-fix.patch
|
||||
];
|
||||
});
|
||||
})
|
||||
];
|
||||
|
||||
programs.light.enable = true;
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
# networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
# You can disable this if you're only using the Wayland session.
|
||||
services.xserver.enable = false;
|
||||
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
libraries = with pkgs; [icu xorg.libXtst xorg.libXi];
|
||||
};
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
xkb.layout = "us";
|
||||
xkb.variant = "";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.youwen = {
|
||||
isNormalUser = true;
|
||||
description = "Youwen Wu";
|
||||
extraGroups = ["networkmanager" "wheel" "nixos" "realtime"];
|
||||
};
|
||||
|
||||
users.groups.realtime = {};
|
||||
|
||||
nix.settings = {
|
||||
trusted-users = ["root" "youwen"];
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
};
|
||||
|
||||
services.udev.extraRules = ''
|
||||
KERNEL=="cpu_dma_latency", GROUP="realtime"
|
||||
KERNEL=="macsmc-battery", SUBSYSTEM=="power_supply", ATTR{charge_control_end_threshold}="80", ATTR{charge_control_start_threshold}="70"
|
||||
'';
|
||||
|
||||
security.pam.loginLimits = [
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "rtprio";
|
||||
value = 98;
|
||||
}
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "memlock";
|
||||
value = "unlimited";
|
||||
}
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "nice";
|
||||
value = -11;
|
||||
}
|
||||
];
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
wget
|
||||
git
|
||||
curl
|
||||
];
|
||||
|
||||
environment.variables = {
|
||||
EDITOR = "nvim";
|
||||
NIX_AUTO_RUN = 1;
|
||||
};
|
||||
services.keyd = {
|
||||
enable = true;
|
||||
keyboards = {
|
||||
default = {
|
||||
ids = ["*"];
|
||||
settings = {
|
||||
main = {
|
||||
capslock = "esc";
|
||||
leftmeta = "leftcontrol";
|
||||
leftalt = "leftmeta";
|
||||
leftcontrol = "leftalt";
|
||||
rightmeta = "leftalt";
|
||||
rightalt = "layer(rightalt)";
|
||||
};
|
||||
rightalt = {
|
||||
i = "up";
|
||||
j = "left";
|
||||
k = "down";
|
||||
l = "right";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.tlp.enable = true;
|
||||
|
||||
# tells electron apps to use Wayland
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
||||
programs.hyprland.enable = true;
|
||||
# programs.hyprland.package = inputs.stablepkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "24.11"; # Did you read the comment?
|
||||
|
||||
programs.zsh.enable = false;
|
||||
programs.fish.enable = true;
|
||||
users.users.youwen.shell = pkgs.fish;
|
||||
}
|
221
hosts/callisto/default.nix
Executable file → Normal file
221
hosts/callisto/default.nix
Executable file → Normal file
|
@ -1,198 +1,41 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
system,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
# ./apple-silicon-support
|
||||
];
|
||||
imports = with inputs; [
|
||||
./configuration.nix
|
||||
../../modules/nixos/audio
|
||||
../../modules/nixos/networking
|
||||
../../modules/nixos/fonts
|
||||
../../modules/nixos/greeter
|
||||
../../modules/nixos/core
|
||||
../../overlays
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = false;
|
||||
|
||||
hardware.asahi = {
|
||||
peripheralFirmwareDirectory = ./firmware;
|
||||
useExperimentalGPUDriver = true;
|
||||
experimentalGPUInstallMode = "overlay";
|
||||
};
|
||||
|
||||
boot.extraModprobeConfig = ''
|
||||
options hid_apple iso_layout=0
|
||||
'';
|
||||
|
||||
boot.kernelParams = ["apple_dcp.show_notch=1"];
|
||||
|
||||
networking.hostName = "callisto"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
networking.wireless.iwd = {
|
||||
enable = true;
|
||||
settings.General.EnableNetworkConfiguration = true;
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [inputs.apple-silicon.overlays.apple-silicon-overlay];
|
||||
|
||||
programs.light.enable = true;
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
# networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
# You can disable this if you're only using the Wayland session.
|
||||
services.xserver.enable = false;
|
||||
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
libraries = with pkgs; [icu xorg.libXtst xorg.libXi];
|
||||
};
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
xkb.layout = "us";
|
||||
xkb.variant = "";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.youwen = {
|
||||
isNormalUser = true;
|
||||
description = "Youwen Wu";
|
||||
extraGroups = ["networkmanager" "wheel" "nixos" "realtime"];
|
||||
};
|
||||
|
||||
users.groups.realtime = {};
|
||||
|
||||
nix.settings = {
|
||||
trusted-users = ["root" "youwen"];
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
};
|
||||
|
||||
services.udev.extraRules = ''
|
||||
KERNEL=="cpu_dma_latency", GROUP="realtime"
|
||||
KERNEL=="macsmc-battery", SUBSYSTEM=="power_supply", ATTR{charge_control_end_threshold}="80", ATTR{charge_control_start_threshold}="70"
|
||||
'';
|
||||
|
||||
security.pam.loginLimits = [
|
||||
apple-silicon.nixosModules.apple-silicon-support
|
||||
catppuccin.nixosModules.catppuccin
|
||||
lix-module.nixosModules.default
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "rtprio";
|
||||
value = 98;
|
||||
}
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "memlock";
|
||||
value = "unlimited";
|
||||
}
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "nice";
|
||||
value = -11;
|
||||
}
|
||||
];
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
wget
|
||||
git
|
||||
curl
|
||||
];
|
||||
|
||||
environment.variables = {
|
||||
EDITOR = "nvim";
|
||||
NIX_AUTO_RUN = 1;
|
||||
};
|
||||
services.keyd = {
|
||||
enable = true;
|
||||
keyboards = {
|
||||
default = {
|
||||
ids = ["*"];
|
||||
settings = {
|
||||
main = {
|
||||
capslock = "esc";
|
||||
leftmeta = "leftcontrol";
|
||||
leftalt = "leftmeta";
|
||||
leftcontrol = "leftalt";
|
||||
rightmeta = "leftalt";
|
||||
rightalt = "layer(rightalt)";
|
||||
};
|
||||
rightalt = {
|
||||
i = "up";
|
||||
j = "left";
|
||||
k = "down";
|
||||
l = "right";
|
||||
};
|
||||
};
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.backupFileExtension = "backup";
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
inherit system;
|
||||
};
|
||||
};
|
||||
};
|
||||
home-manager.users.youwen = {
|
||||
imports = [
|
||||
../../users/youwen/common
|
||||
../../users/youwen/linux/laptop
|
||||
../../users/youwen/linux/packages/aarch-64
|
||||
../../users/youwen/common/neovim
|
||||
./home-manager-extras
|
||||
|
||||
services.tlp.enable = true;
|
||||
|
||||
# tells electron apps to use Wayland
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
||||
programs.hyprland.enable = true;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "24.11"; # Did you read the comment?
|
||||
|
||||
programs.zsh.enable = false;
|
||||
programs.fish.enable = true;
|
||||
users.users.youwen.shell = pkgs.fish;
|
||||
inputs.catppuccin.homeManagerModules.catppuccin
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
42
hosts/callisto/hardware-configuration.nix
Executable file → Normal file
42
hosts/callisto/hardware-configuration.nix
Executable file → Normal file
|
@ -1,32 +1,32 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["usb_storage" "sdhci_pci"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
boot.initrd.availableKernelModules = [ "usb_storage" "sdhci_pci" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/bc88058e-6e3a-4987-b78e-e19cb5611608";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/mapper/crypted";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/852F-07F1";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0022" "dmask=0022"];
|
||||
};
|
||||
boot.initrd.luks.devices."crypted".device = "/dev/disk/by-uuid/f4c552be-a4c2-4ca0-aec6-ed692d78fe24";
|
||||
|
||||
swapDevices = [];
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/852F-07F1";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
39
hosts/callisto/hardware-configuration.nix.old
Executable file
39
hosts/callisto/hardware-configuration.nix.old
Executable file
|
@ -0,0 +1,39 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||
|
||||
boot.initrd.availableKernelModules = ["usb_storage" "sdhci_pci"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/bc88058e-6e3a-4987-b78e-e19cb5611608";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/852F-07F1";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0022" "dmask=0022"];
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
||||
}
|
4
hosts/callisto/home-manager-extras/default.nix
Normal file
4
hosts/callisto/home-manager-extras/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{pkgs, ...}: {
|
||||
wayland.windowManager.hyprland.package = pkgs.lib.mkForce pkgs.hyprland;
|
||||
home.file.".config/neofetch/config.conf".source = ./neofetch-asahi.conf;
|
||||
}
|
210
hosts/demeter/configuration.nix
Executable file
210
hosts/demeter/configuration.nix
Executable file
|
@ -0,0 +1,210 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = 15;
|
||||
# Lanzaboote currently replaces the systemd-boot module.
|
||||
# This setting is usually set to true in configuration.nix
|
||||
# generated at installation time. So we force it to false
|
||||
# for now.
|
||||
systemd-boot = {
|
||||
enable = false;
|
||||
consoleMode = "auto";
|
||||
};
|
||||
};
|
||||
|
||||
boot.lanzaboote = {
|
||||
enable = true;
|
||||
pkiBundle = "/etc/secureboot";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-af320a0f-b388-43f5-b5a3-af2b47cfc716".device = "/dev/disk/by-uuid/af320a0f-b388-43f5-b5a3-af2b47cfc716";
|
||||
|
||||
networking.hostName = "demeter"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# select kernel
|
||||
boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
systemd.services = {NetworkManager-wait-online.enable = false;};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
# You can disable this if you're only using the Wayland session.
|
||||
services.xserver.enable = false;
|
||||
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
libraries = with pkgs; [icu xorg.libXtst xorg.libXi];
|
||||
};
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
powerManagement.finegrained = false;
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
};
|
||||
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
};
|
||||
|
||||
services.blueman.enable = true;
|
||||
|
||||
hardware.graphics.enable = true;
|
||||
|
||||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
services.flatpak.enable = true;
|
||||
|
||||
# services.desktopManager.plasma6.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
xkb.layout = "us";
|
||||
xkb.variant = "";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.youwen = {
|
||||
isNormalUser = true;
|
||||
description = "Youwen Wu";
|
||||
extraGroups = ["networkmanager" "wheel" "nixos" "realtime"];
|
||||
};
|
||||
|
||||
users.groups.realtime = {};
|
||||
|
||||
nix.settings = {
|
||||
trusted-users = ["root" "youwen"];
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
};
|
||||
|
||||
services.udev.extraRules = ''
|
||||
KERNEL=="cpu_dma_latency", GROUP="realtime"
|
||||
'';
|
||||
|
||||
security.pam.loginLimits = [
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "rtprio";
|
||||
value = 98;
|
||||
}
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "memlock";
|
||||
value = "unlimited";
|
||||
}
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "nice";
|
||||
value = -11;
|
||||
}
|
||||
];
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
wget
|
||||
git
|
||||
curl
|
||||
librewolf
|
||||
gnumake
|
||||
gcc
|
||||
cachix
|
||||
gnupg
|
||||
openssh
|
||||
python3
|
||||
steam-run
|
||||
|
||||
# deps for neovim compilation
|
||||
lua51Packages.lua
|
||||
lua51Packages.luarocks
|
||||
tree-sitter
|
||||
];
|
||||
|
||||
environment.variables = {
|
||||
EDITOR = "nvim";
|
||||
NIX_AUTO_RUN = 1;
|
||||
};
|
||||
|
||||
# tells electron apps to use Wayland
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
||||
programs.hyprland.enable = true;
|
||||
|
||||
programs.zsh.enable = false;
|
||||
programs.fish.enable = true;
|
||||
users.users.youwen.shell = pkgs.fish;
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "24.05"; # Did you read the comment?
|
||||
}
|
234
hosts/demeter/default.nix
Executable file → Normal file
234
hosts/demeter/default.nix
Executable file → Normal file
|
@ -1,210 +1,42 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
system,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
imports = with inputs; [
|
||||
./configuration.nix
|
||||
../../modules/nixos/gaming
|
||||
../../modules/nixos/audio
|
||||
../../modules/nixos/networking
|
||||
../../modules/nixos/fonts
|
||||
../../modules/nixos/greeter
|
||||
../../modules/nixos/core
|
||||
../../overlays
|
||||
|
||||
# Bootloader.
|
||||
boot.loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = 15;
|
||||
# Lanzaboote currently replaces the systemd-boot module.
|
||||
# This setting is usually set to true in configuration.nix
|
||||
# generated at installation time. So we force it to false
|
||||
# for now.
|
||||
systemd-boot = {
|
||||
enable = false;
|
||||
consoleMode = "auto";
|
||||
};
|
||||
};
|
||||
|
||||
boot.lanzaboote = {
|
||||
enable = true;
|
||||
pkiBundle = "/etc/secureboot";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-af320a0f-b388-43f5-b5a3-af2b47cfc716".device = "/dev/disk/by-uuid/af320a0f-b388-43f5-b5a3-af2b47cfc716";
|
||||
|
||||
networking.hostName = "demeter"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# select kernel
|
||||
boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
systemd.services = {NetworkManager-wait-online.enable = false;};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
# You can disable this if you're only using the Wayland session.
|
||||
services.xserver.enable = false;
|
||||
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
libraries = with pkgs; [icu xorg.libXtst xorg.libXi];
|
||||
};
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
powerManagement.finegrained = false;
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
};
|
||||
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
};
|
||||
|
||||
services.blueman.enable = true;
|
||||
|
||||
hardware.graphics.enable = true;
|
||||
|
||||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
services.flatpak.enable = true;
|
||||
|
||||
# services.desktopManager.plasma6.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
xkb.layout = "us";
|
||||
xkb.variant = "";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.youwen = {
|
||||
isNormalUser = true;
|
||||
description = "Youwen Wu";
|
||||
extraGroups = ["networkmanager" "wheel" "nixos" "realtime"];
|
||||
};
|
||||
|
||||
users.groups.realtime = {};
|
||||
|
||||
nix.settings = {
|
||||
trusted-users = ["root" "youwen"];
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
};
|
||||
|
||||
services.udev.extraRules = ''
|
||||
KERNEL=="cpu_dma_latency", GROUP="realtime"
|
||||
'';
|
||||
|
||||
security.pam.loginLimits = [
|
||||
catppuccin.nixosModules.catppuccin
|
||||
lix-module.nixosModules.default
|
||||
lanzaboote.nixosModules.lanzaboote
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "rtprio";
|
||||
value = 98;
|
||||
}
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "memlock";
|
||||
value = "unlimited";
|
||||
}
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "nice";
|
||||
value = -11;
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.backupFileExtension = "backup";
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
inherit system;
|
||||
};
|
||||
home-manager.users.youwen = {
|
||||
imports = [
|
||||
../../users/youwen/linux/desktop
|
||||
../../users/youwen/linux/packages/x86_64
|
||||
../../users/youwen/linux/programs
|
||||
../../users/youwen/common/neofetch
|
||||
../../users/youwen/common/neovim
|
||||
../../users/youwen/common
|
||||
catppuccin.homeManagerModules.catppuccin
|
||||
nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
wget
|
||||
git
|
||||
curl
|
||||
librewolf
|
||||
gnumake
|
||||
gcc
|
||||
cachix
|
||||
gnupg
|
||||
openssh
|
||||
python3
|
||||
steam-run
|
||||
|
||||
# deps for neovim compilation
|
||||
lua51Packages.lua
|
||||
lua51Packages.luarocks
|
||||
tree-sitter
|
||||
];
|
||||
|
||||
environment.variables = {
|
||||
EDITOR = "nvim";
|
||||
NIX_AUTO_RUN = 1;
|
||||
};
|
||||
|
||||
# tells electron apps to use Wayland
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
||||
programs.hyprland.enable = true;
|
||||
|
||||
programs.zsh.enable = false;
|
||||
programs.fish.enable = true;
|
||||
users.users.youwen.shell = pkgs.fish;
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "24.05"; # Did you read the comment?
|
||||
}
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/2616d86c-aac2-4780-9527-7b11192e783f";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/B826-E14B";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp6s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
0
hosts/demeter/home-manager/default.nix
Normal file
0
hosts/demeter/home-manager/default.nix
Normal file
57
hosts/phobos/configuration.nix
Executable file
57
hosts/phobos/configuration.nix
Executable file
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# Expose the package set, including overlays, for convenience.
|
||||
# darwinPackages = inputs.self.darwinConfigurations."Youwens-MacBook-Pro".pkgs;
|
||||
|
||||
# List packages installed in system profile. To search by name, run:
|
||||
# $ nix-env -qaP | grep wget
|
||||
environment.systemPackages = with pkgs; [];
|
||||
|
||||
# Use a custom configuration.nix location.
|
||||
# $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix
|
||||
# environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix";
|
||||
|
||||
# Auto upgrade nix package and the daemon service.
|
||||
services.nix-daemon.enable = true;
|
||||
# nix.package = pkgs.nix;
|
||||
|
||||
nix.settings.experimental-features = "nix-command flakes";
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Create /etc/zshrc that loads the nix-darwin environment.
|
||||
programs.zsh.enable = true; # default shell on catalina
|
||||
programs.fish.enable = true;
|
||||
programs.bash.enable = true;
|
||||
|
||||
system.configurationRevision =
|
||||
config.self.rev or config.self.dirtyRev or null;
|
||||
|
||||
nixpkgs.hostPlatform = "aarch64-darwin";
|
||||
|
||||
# Used for backwards compatibility, please read the changelog before changing.
|
||||
# $ darwin-rebuild changelog
|
||||
system.stateVersion = 4;
|
||||
|
||||
users.users.youwen = {
|
||||
home = "/Users/youwen";
|
||||
description = "Youwen Wu";
|
||||
shell = pkgs.fish;
|
||||
};
|
||||
|
||||
security.pam.enableSudoTouchIdAuth = true;
|
||||
|
||||
fonts = {
|
||||
packages = with pkgs; [
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
(nerdfonts.override {fonts = ["CascadiaCode"];})
|
||||
(google-fonts.override {fonts = ["Lora"];})
|
||||
];
|
||||
};
|
||||
}
|
77
hosts/phobos/default.nix
Executable file → Normal file
77
hosts/phobos/default.nix
Executable file → Normal file
|
@ -1,57 +1,22 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# Expose the package set, including overlays, for convenience.
|
||||
# darwinPackages = inputs.self.darwinConfigurations."Youwens-MacBook-Pro".pkgs;
|
||||
|
||||
# List packages installed in system profile. To search by name, run:
|
||||
# $ nix-env -qaP | grep wget
|
||||
environment.systemPackages = with pkgs; [];
|
||||
|
||||
# Use a custom configuration.nix location.
|
||||
# $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix
|
||||
# environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix";
|
||||
|
||||
# Auto upgrade nix package and the daemon service.
|
||||
services.nix-daemon.enable = true;
|
||||
# nix.package = pkgs.nix;
|
||||
|
||||
nix.settings.experimental-features = "nix-command flakes";
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Create /etc/zshrc that loads the nix-darwin environment.
|
||||
programs.zsh.enable = true; # default shell on catalina
|
||||
programs.fish.enable = true;
|
||||
programs.bash.enable = true;
|
||||
|
||||
system.configurationRevision =
|
||||
config.self.rev or config.self.dirtyRev or null;
|
||||
|
||||
nixpkgs.hostPlatform = "aarch64-darwin";
|
||||
|
||||
# Used for backwards compatibility, please read the changelog before changing.
|
||||
# $ darwin-rebuild changelog
|
||||
system.stateVersion = 4;
|
||||
|
||||
users.users.youwen = {
|
||||
home = "/Users/youwen";
|
||||
description = "Youwen Wu";
|
||||
shell = pkgs.fish;
|
||||
};
|
||||
|
||||
security.pam.enableSudoTouchIdAuth = true;
|
||||
|
||||
fonts = {
|
||||
packages = with pkgs; [
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
(nerdfonts.override {fonts = ["CascadiaCode"];})
|
||||
(google-fonts.override {fonts = ["Lora"];})
|
||||
];
|
||||
};
|
||||
{inputs, ...}: {
|
||||
imports = with inputs; [
|
||||
./configuration.nix
|
||||
home-manager.darwinModules.home-manager
|
||||
{
|
||||
extraSpecialArgs = {inherit inputs;};
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.youwen.imports = [
|
||||
../../users/youwen/darwin/darwin-home.nix
|
||||
../../users/youwen/common/core.nix
|
||||
../../users/youwen/common/neofetch
|
||||
../../users/youwen/common/neovim
|
||||
];
|
||||
home-manager.backupFileExtension = "backup";
|
||||
}
|
||||
nix-homebrew.darwinModules.nix-homebrew
|
||||
../../modules/darwin/homebrew.nix
|
||||
../../modules/darwin/yabai.nix
|
||||
../../modules/darwin/skhd.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,828 +0,0 @@
|
|||
# See this wiki page for more info:
|
||||
# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
|
||||
print_info() {
|
||||
|
||||
# prin " $(color 6) コンピューター"
|
||||
prin "$(color 16)┌──────────────────────────────────────────┐"
|
||||
|
||||
info " $(color 1) OS " distro
|
||||
info " $(color 1) Host " model
|
||||
info " $(color 1) Kernel " kernel
|
||||
# info " $(color 1) Uptime " uptime
|
||||
info " $(color 2) Packages " packages
|
||||
info " $(color 2) Shell " shell
|
||||
info " $(color 2) Resolution " resolution
|
||||
info " $(color 3) DE " de
|
||||
# info " $(color 3) 缾WM " wm
|
||||
# info " $(color 12) WM Theme " wm_theme
|
||||
# info "$(color 13) Theme " theme
|
||||
# info "$(color 14) Icons " icons
|
||||
info " $(color 3) Terminal " term
|
||||
# info " Font " font
|
||||
# info " Terminal Font " term_font
|
||||
|
||||
prin "$(color 16)└──────────────────────────────────────────┘"
|
||||
prin " "
|
||||
info " $(color 6) " title
|
||||
prin "$(color 16)┌──────────────────────────────────────────┐"
|
||||
|
||||
info " $(color 12) CPU " cpu
|
||||
info " $(color 12) GPU " gpu
|
||||
info " $(color 13) GPU Driver " gpu_driver # Linux/macOS only
|
||||
info " $(color 13) Memory " memory
|
||||
|
||||
# info "CPU Usage" cpu_usage
|
||||
# info "Disk" disk
|
||||
# info "Battery" battery
|
||||
# info "Song" song
|
||||
# [[ "$player" ]] && prin "Music Player" "$player"
|
||||
# info "Local IP" local_ip
|
||||
# info "Public IP" public_ip
|
||||
# info "Users" users
|
||||
# info "Locale" locale # This only works on glibc systems.
|
||||
|
||||
prin "$(color 16)└──────────────────────────────────────────┘"
|
||||
prin " "
|
||||
prin " $(color 1) $(color 2) $(color 3) $(color 4) $(color 5) $(color 6) $(color 7) $(color 8) $(color 16)"
|
||||
|
||||
}
|
||||
|
||||
# Title
|
||||
|
||||
# Hide/Show Fully qualified domain name.
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --title_fqdn
|
||||
title_fqdn="off"
|
||||
|
||||
# Kernel
|
||||
|
||||
# Shorten the output of the kernel function.
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --kernel_shorthand
|
||||
# Supports: Everything except *BSDs (except PacBSD and PC-BSD)
|
||||
#
|
||||
# Example:
|
||||
# on: '4.8.9-1-ARCH'
|
||||
# off: 'Linux 4.8.9-1-ARCH'
|
||||
kernel_shorthand="false"
|
||||
|
||||
# Distro
|
||||
|
||||
# Shorten the output of the distro function
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'tiny', 'off'
|
||||
# Flag: --distro_shorthand
|
||||
# Supports: Everything except Windows and Haiku
|
||||
distro_shorthand="on"
|
||||
|
||||
# Show/Hide OS Architecture.
|
||||
# Show 'x86_64', 'x86' and etc in 'Distro:' output.
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --os_arch
|
||||
#
|
||||
# Example:
|
||||
# on: 'Arch Linux x86_64'
|
||||
# off: 'Arch Linux'
|
||||
os_arch="on"
|
||||
|
||||
# Uptime
|
||||
|
||||
# Shorten the output of the uptime function
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'tiny', 'off'
|
||||
# Flag: --uptime_shorthand
|
||||
#
|
||||
# Example:
|
||||
# on: '2 days, 10 hours, 3 mins'
|
||||
# tiny: '2d 10h 3m'
|
||||
# off: '2 days, 10 hours, 3 minutes'
|
||||
uptime_shorthand="on"
|
||||
|
||||
# Memory
|
||||
|
||||
# Show memory pecentage in output.
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --memory_percent
|
||||
#
|
||||
# Example:
|
||||
# on: '1801MiB / 7881MiB (22%)'
|
||||
# off: '1801MiB / 7881MiB'
|
||||
memory_percent="off"
|
||||
|
||||
# Change memory output unit.
|
||||
#
|
||||
# Default: 'mib'
|
||||
# Values: 'kib', 'mib', 'gib'
|
||||
# Flag: --memory_unit
|
||||
#
|
||||
# Example:
|
||||
# kib '1020928KiB / 7117824KiB'
|
||||
# mib '1042MiB / 6951MiB'
|
||||
# gib: ' 0.98GiB / 6.79GiB'
|
||||
memory_unit="mib"
|
||||
|
||||
# Packages
|
||||
|
||||
# Show/Hide Package Manager names.
|
||||
#
|
||||
# Default: 'tiny'
|
||||
# Values: 'on', 'tiny' 'off'
|
||||
# Flag: --package_managers
|
||||
#
|
||||
# Example:
|
||||
# on: '998 (pacman), 8 (flatpak), 4 (snap)'
|
||||
# tiny: '908 (pacman, flatpak, snap)'
|
||||
# off: '908'
|
||||
package_managers="tiny"
|
||||
|
||||
# Shell
|
||||
|
||||
# Show the path to $SHELL
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --shell_path
|
||||
#
|
||||
# Example:
|
||||
# on: '/bin/bash'
|
||||
# off: 'bash'
|
||||
shell_path="off"
|
||||
|
||||
# Show $SHELL version
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --shell_version
|
||||
#
|
||||
# Example:
|
||||
# on: 'bash 4.4.5'
|
||||
# off: 'bash'
|
||||
shell_version="on"
|
||||
|
||||
# CPU
|
||||
|
||||
# CPU speed type
|
||||
#
|
||||
# Default: 'bios_limit'
|
||||
# Values: 'scaling_cur_freq', 'scaling_min_freq', 'scaling_max_freq', 'bios_limit'.
|
||||
# Flag: --speed_type
|
||||
# Supports: Linux with 'cpufreq'
|
||||
# NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value.
|
||||
speed_type="bios_limit"
|
||||
|
||||
# CPU speed shorthand
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'.
|
||||
# Flag: --speed_shorthand
|
||||
# NOTE: This flag is not supported in systems with CPU speed less than 1 GHz
|
||||
#
|
||||
# Example:
|
||||
# on: 'i7-6500U (4) @ 3.1GHz'
|
||||
# off: 'i7-6500U (4) @ 3.100GHz'
|
||||
speed_shorthand="off"
|
||||
|
||||
# Enable/Disable CPU brand in output.
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --cpu_brand
|
||||
#
|
||||
# Example:
|
||||
# on: 'Intel i7-6500U'
|
||||
# off: 'i7-6500U (4)'
|
||||
cpu_brand="on"
|
||||
|
||||
# CPU Speed
|
||||
# Hide/Show CPU speed.
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --cpu_speed
|
||||
#
|
||||
# Example:
|
||||
# on: 'Intel i7-6500U (4) @ 3.1GHz'
|
||||
# off: 'Intel i7-6500U (4)'
|
||||
cpu_speed="on"
|
||||
|
||||
# CPU Cores
|
||||
# Display CPU cores in output
|
||||
#
|
||||
# Default: 'logical'
|
||||
# Values: 'logical', 'physical', 'off'
|
||||
# Flag: --cpu_cores
|
||||
# Support: 'physical' doesn't work on BSD.
|
||||
#
|
||||
# Example:
|
||||
# logical: 'Intel i7-6500U (4) @ 3.1GHz' (All virtual cores)
|
||||
# physical: 'Intel i7-6500U (2) @ 3.1GHz' (All physical cores)
|
||||
# off: 'Intel i7-6500U @ 3.1GHz'
|
||||
cpu_cores="logical"
|
||||
|
||||
# CPU Temperature
|
||||
# Hide/Show CPU temperature.
|
||||
# Note the temperature is added to the regular CPU function.
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'C', 'F', 'off'
|
||||
# Flag: --cpu_temp
|
||||
# Supports: Linux, BSD
|
||||
# NOTE: For FreeBSD and NetBSD-based systems, you'll need to enable
|
||||
# coretemp kernel module. This only supports newer Intel processors.
|
||||
#
|
||||
# Example:
|
||||
# C: 'Intel i7-6500U (4) @ 3.1GHz [27.2°C]'
|
||||
# F: 'Intel i7-6500U (4) @ 3.1GHz [82.0°F]'
|
||||
# off: 'Intel i7-6500U (4) @ 3.1GHz'
|
||||
cpu_temp="off"
|
||||
|
||||
# GPU
|
||||
|
||||
# Enable/Disable GPU Brand
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --gpu_brand
|
||||
#
|
||||
# Example:
|
||||
# on: 'AMD HD 7950'
|
||||
# off: 'HD 7950'
|
||||
gpu_brand="on"
|
||||
|
||||
# Which GPU to display
|
||||
#
|
||||
# Default: 'all'
|
||||
# Values: 'all', 'dedicated', 'integrated'
|
||||
# Flag: --gpu_type
|
||||
# Supports: Linux
|
||||
#
|
||||
# Example:
|
||||
# all:
|
||||
# GPU1: AMD HD 7950
|
||||
# GPU2: Intel Integrated Graphics
|
||||
#
|
||||
# dedicated:
|
||||
# GPU1: AMD HD 7950
|
||||
#
|
||||
# integrated:
|
||||
# GPU1: Intel Integrated Graphics
|
||||
gpu_type="all"
|
||||
|
||||
# Resolution
|
||||
|
||||
# Display refresh rate next to each monitor
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --refresh_rate
|
||||
# Supports: Doesn't work on Windows.
|
||||
#
|
||||
# Example:
|
||||
# on: '1920x1080 @ 60Hz'
|
||||
# off: '1920x1080'
|
||||
refresh_rate="off"
|
||||
|
||||
# Gtk Theme / Icons / Font
|
||||
|
||||
# Shorten output of GTK Theme / Icons / Font
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --gtk_shorthand
|
||||
#
|
||||
# Example:
|
||||
# on: 'Numix, Adwaita'
|
||||
# off: 'Numix [GTK2], Adwaita [GTK3]'
|
||||
gtk_shorthand="off"
|
||||
|
||||
# Enable/Disable gtk2 Theme / Icons / Font
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --gtk2
|
||||
#
|
||||
# Example:
|
||||
# on: 'Numix [GTK2], Adwaita [GTK3]'
|
||||
# off: 'Adwaita [GTK3]'
|
||||
gtk2="on"
|
||||
|
||||
# Enable/Disable gtk3 Theme / Icons / Font
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --gtk3
|
||||
#
|
||||
# Example:
|
||||
# on: 'Numix [GTK2], Adwaita [GTK3]'
|
||||
# off: 'Numix [GTK2]'
|
||||
gtk3="on"
|
||||
|
||||
# IP Address
|
||||
|
||||
# Website to ping for the public IP
|
||||
#
|
||||
# Default: 'http://ident.me'
|
||||
# Values: 'url'
|
||||
# Flag: --ip_host
|
||||
public_ip_host="http://ident.me"
|
||||
|
||||
# Public IP timeout.
|
||||
#
|
||||
# Default: '2'
|
||||
# Values: 'int'
|
||||
# Flag: --ip_timeout
|
||||
public_ip_timeout=2
|
||||
|
||||
# Desktop Environment
|
||||
|
||||
# Show Desktop Environment version
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --de_version
|
||||
de_version="on"
|
||||
|
||||
# Disk
|
||||
|
||||
# Which disks to display.
|
||||
# The values can be any /dev/sdXX, mount point or directory.
|
||||
# NOTE: By default we only show the disk info for '/'.
|
||||
#
|
||||
# Default: '/'
|
||||
# Values: '/', '/dev/sdXX', '/path/to/drive'.
|
||||
# Flag: --disk_show
|
||||
#
|
||||
# Example:
|
||||
# disk_show=('/' '/dev/sdb1'):
|
||||
# 'Disk (/): 74G / 118G (66%)'
|
||||
# 'Disk (/mnt/Videos): 823G / 893G (93%)'
|
||||
#
|
||||
# disk_show=('/'):
|
||||
# 'Disk (/): 74G / 118G (66%)'
|
||||
#
|
||||
disk_show=('/')
|
||||
|
||||
# Disk subtitle.
|
||||
# What to append to the Disk subtitle.
|
||||
#
|
||||
# Default: 'mount'
|
||||
# Values: 'mount', 'name', 'dir', 'none'
|
||||
# Flag: --disk_subtitle
|
||||
#
|
||||
# Example:
|
||||
# name: 'Disk (/dev/sda1): 74G / 118G (66%)'
|
||||
# 'Disk (/dev/sdb2): 74G / 118G (66%)'
|
||||
#
|
||||
# mount: 'Disk (/): 74G / 118G (66%)'
|
||||
# 'Disk (/mnt/Local Disk): 74G / 118G (66%)'
|
||||
# 'Disk (/mnt/Videos): 74G / 118G (66%)'
|
||||
#
|
||||
# dir: 'Disk (/): 74G / 118G (66%)'
|
||||
# 'Disk (Local Disk): 74G / 118G (66%)'
|
||||
# 'Disk (Videos): 74G / 118G (66%)'
|
||||
#
|
||||
# none: 'Disk: 74G / 118G (66%)'
|
||||
# 'Disk: 74G / 118G (66%)'
|
||||
# 'Disk: 74G / 118G (66%)'
|
||||
disk_subtitle="mount"
|
||||
|
||||
# Disk percent.
|
||||
# Show/Hide disk percent.
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --disk_percent
|
||||
#
|
||||
# Example:
|
||||
# on: 'Disk (/): 74G / 118G (66%)'
|
||||
# off: 'Disk (/): 74G / 118G'
|
||||
disk_percent="on"
|
||||
|
||||
# Song
|
||||
|
||||
# Manually specify a music player.
|
||||
#
|
||||
# Default: 'auto'
|
||||
# Values: 'auto', 'player-name'
|
||||
# Flag: --music_player
|
||||
#
|
||||
# Available values for 'player-name':
|
||||
#
|
||||
# amarok
|
||||
# audacious
|
||||
# banshee
|
||||
# bluemindo
|
||||
# clementine
|
||||
# cmus
|
||||
# deadbeef
|
||||
# deepin-music
|
||||
# dragon
|
||||
# elisa
|
||||
# exaile
|
||||
# gnome-music
|
||||
# gmusicbrowser
|
||||
# gogglesmm
|
||||
# guayadeque
|
||||
# io.elementary.music
|
||||
# iTunes
|
||||
# juk
|
||||
# lollypop
|
||||
# mocp
|
||||
# mopidy
|
||||
# mpd
|
||||
# muine
|
||||
# netease-cloud-music
|
||||
# olivia
|
||||
# playerctl
|
||||
# pogo
|
||||
# pragha
|
||||
# qmmp
|
||||
# quodlibet
|
||||
# rhythmbox
|
||||
# sayonara
|
||||
# smplayer
|
||||
# spotify
|
||||
# strawberry
|
||||
# tauonmb
|
||||
# tomahawk
|
||||
# vlc
|
||||
# xmms2d
|
||||
# xnoise
|
||||
# yarock
|
||||
music_player="auto"
|
||||
|
||||
# Format to display song information.
|
||||
#
|
||||
# Default: '%artist% - %album% - %title%'
|
||||
# Values: '%artist%', '%album%', '%title%'
|
||||
# Flag: --song_format
|
||||
#
|
||||
# Example:
|
||||
# default: 'Song: Jet - Get Born - Sgt Major'
|
||||
song_format="%artist% - %album% - %title%"
|
||||
|
||||
# Print the Artist, Album and Title on separate lines
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --song_shorthand
|
||||
#
|
||||
# Example:
|
||||
# on: 'Artist: The Fratellis'
|
||||
# 'Album: Costello Music'
|
||||
# 'Song: Chelsea Dagger'
|
||||
#
|
||||
# off: 'Song: The Fratellis - Costello Music - Chelsea Dagger'
|
||||
song_shorthand="off"
|
||||
|
||||
# 'mpc' arguments (specify a host, password etc).
|
||||
#
|
||||
# Default: ''
|
||||
# Example: mpc_args=(-h HOST -P PASSWORD)
|
||||
mpc_args=()
|
||||
|
||||
# Text Colors
|
||||
|
||||
# Text Colors
|
||||
#
|
||||
# Default: 'distro'
|
||||
# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num'
|
||||
# Flag: --colors
|
||||
#
|
||||
# Each number represents a different part of the text in
|
||||
# this order: 'title', '@', 'underline', 'subtitle', 'colon', 'info'
|
||||
#
|
||||
# Example:
|
||||
# colors=(distro) - Text is colored based on Distro colors.
|
||||
# colors=(4 6 1 8 8 6) - Text is colored in the order above.
|
||||
colors=(distro)
|
||||
|
||||
# Text Options
|
||||
|
||||
# Toggle bold text
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --bold
|
||||
bold="on"
|
||||
|
||||
# Enable/Disable Underline
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --underline
|
||||
underline_enabled="on"
|
||||
|
||||
# Underline character
|
||||
#
|
||||
# Default: '-'
|
||||
# Values: 'string'
|
||||
# Flag: --underline_char
|
||||
underline_char="-"
|
||||
|
||||
# Info Separator
|
||||
# Replace the default separator with the specified string.
|
||||
#
|
||||
# Default: ':'
|
||||
# Flag: --separator
|
||||
#
|
||||
# Example:
|
||||
# separator="->": 'Shell-> bash'
|
||||
# separator=" =": 'WM = dwm'
|
||||
separator=":"
|
||||
|
||||
# Color Blocks
|
||||
|
||||
# Color block range
|
||||
# The range of colors to print.
|
||||
#
|
||||
# Default: '0', '15'
|
||||
# Values: 'num'
|
||||
# Flag: --block_range
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# Display colors 0-7 in the blocks. (8 colors)
|
||||
# neofetch --block_range 0 7
|
||||
#
|
||||
# Display colors 0-15 in the blocks. (16 colors)
|
||||
# neofetch --block_range 0 15
|
||||
block_range=(0 15)
|
||||
|
||||
# Toggle color blocks
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --color_blocks
|
||||
color_blocks="on"
|
||||
|
||||
# Color block width in spaces
|
||||
#
|
||||
# Default: '3'
|
||||
# Values: 'num'
|
||||
# Flag: --block_width
|
||||
block_width=3
|
||||
|
||||
# Color block height in lines
|
||||
#
|
||||
# Default: '1'
|
||||
# Values: 'num'
|
||||
# Flag: --block_height
|
||||
block_height=1
|
||||
|
||||
# Color Alignment
|
||||
#
|
||||
# Default: 'auto'
|
||||
# Values: 'auto', 'num'
|
||||
# Flag: --col_offset
|
||||
#
|
||||
# Number specifies how far from the left side of the terminal (in spaces) to
|
||||
# begin printing the columns, in case you want to e.g. center them under your
|
||||
# text.
|
||||
# Example:
|
||||
# col_offset="auto" - Default behavior of neofetch
|
||||
# col_offset=7 - Leave 7 spaces then print the colors
|
||||
col_offset="auto"
|
||||
|
||||
# Progress Bars
|
||||
|
||||
# Bar characters
|
||||
#
|
||||
# Default: '-', '='
|
||||
# Values: 'string', 'string'
|
||||
# Flag: --bar_char
|
||||
#
|
||||
# Example:
|
||||
# neofetch --bar_char 'elapsed' 'total'
|
||||
# neofetch --bar_char '-' '='
|
||||
bar_char_elapsed="-"
|
||||
bar_char_total="="
|
||||
|
||||
# Toggle Bar border
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --bar_border
|
||||
bar_border="on"
|
||||
|
||||
# Progress bar length in spaces
|
||||
# Number of chars long to make the progress bars.
|
||||
#
|
||||
# Default: '15'
|
||||
# Values: 'num'
|
||||
# Flag: --bar_length
|
||||
bar_length=15
|
||||
|
||||
# Progress bar colors
|
||||
# When set to distro, uses your distro's logo colors.
|
||||
#
|
||||
# Default: 'distro', 'distro'
|
||||
# Values: 'distro', 'num'
|
||||
# Flag: --bar_colors
|
||||
#
|
||||
# Example:
|
||||
# neofetch --bar_colors 3 4
|
||||
# neofetch --bar_colors distro 5
|
||||
bar_color_elapsed="distro"
|
||||
bar_color_total="distro"
|
||||
|
||||
# Info display
|
||||
# Display a bar with the info.
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'bar', 'infobar', 'barinfo', 'off'
|
||||
# Flags: --cpu_display
|
||||
# --memory_display
|
||||
# --battery_display
|
||||
# --disk_display
|
||||
#
|
||||
# Example:
|
||||
# bar: '[---=======]'
|
||||
# infobar: 'info [---=======]'
|
||||
# barinfo: '[---=======] info'
|
||||
# off: 'info'
|
||||
cpu_display="off"
|
||||
memory_display="off"
|
||||
battery_display="off"
|
||||
disk_display="off"
|
||||
|
||||
# Backend Settings
|
||||
|
||||
# Image backend.
|
||||
#
|
||||
# Default: 'ascii'
|
||||
# Values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'off',
|
||||
# 'pot', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty'
|
||||
# Flag: --backend
|
||||
image_backend="kitty"
|
||||
|
||||
# Image Source
|
||||
#
|
||||
# Which image or ascii file to display.
|
||||
#
|
||||
# Default: 'auto'
|
||||
# Values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/'
|
||||
# 'command output (neofetch --ascii "$(fortune | cowsay -W 30)")'
|
||||
# Flag: --source
|
||||
#
|
||||
# NOTE: 'auto' will pick the best image source for whatever image backend is used.
|
||||
# In ascii mode, distro ascii art will be used and in an image mode, your
|
||||
# wallpaper will be used.
|
||||
# image_source=$(find "${XDG_CONFIG_HOME:-$HOME/.config}/neofetch/pngs/" -name "*.png" | sort -R | head -1)
|
||||
|
||||
# Ascii Options
|
||||
|
||||
# Ascii distro
|
||||
# Which distro's ascii art to display.
|
||||
#
|
||||
# Default: 'auto'
|
||||
# Values: 'auto', 'distro_name'
|
||||
# Flag: --ascii_distro
|
||||
# NOTE: AIX, Alpine, Anarchy, Android, Antergos, antiX, "AOSC OS",
|
||||
# "AOSC OS/Retro", Apricity, ArcoLinux, ArchBox, ARCHlabs,
|
||||
# ArchStrike, XFerience, ArchMerge, Arch, Artix, Arya, Bedrock,
|
||||
# Bitrig, BlackArch, BLAG, BlankOn, BlueLight, bonsai, BSD,
|
||||
# BunsenLabs, Calculate, Carbs, CentOS, Chakra, ChaletOS,
|
||||
# Chapeau, Chrom*, Cleanjaro, ClearOS, Clear_Linux, Clover,
|
||||
# Condres, Container_Linux, CRUX, Cucumber, Debian, Deepin,
|
||||
# DesaOS, Devuan, DracOS, DarkOs, DragonFly, Drauger, Elementary,
|
||||
# EndeavourOS, Endless, EuroLinux, Exherbo, Fedora, Feren, FreeBSD,
|
||||
# FreeMiNT, Frugalware, Funtoo, GalliumOS, Garuda, Gentoo, Pentoo,
|
||||
# gNewSense, GNOME, GNU, GoboLinux, Grombyang, Guix, Haiku, Huayra,
|
||||
# Hyperbola, janus, Kali, KaOS, KDE_neon, Kibojoe, Kogaion,
|
||||
# Korora, KSLinux, Kubuntu, LEDE, LFS, Linux_Lite,
|
||||
# LMDE, Lubuntu, Lunar, macos, Mageia, MagpieOS, Mandriva,
|
||||
# Manjaro, Maui, Mer, Minix, LinuxMint, MX_Linux, Namib,
|
||||
# Neptune, NetBSD, Netrunner, Nitrux, NixOS, Nurunner,
|
||||
# NuTyX, OBRevenge, OpenBSD, openEuler, OpenIndiana, openmamba,
|
||||
# OpenMandriva, OpenStage, OpenWrt, osmc, Oracle, OS Elbrus, PacBSD,
|
||||
# Parabola, Pardus, Parrot, Parsix, TrueOS, PCLinuxOS, Peppermint,
|
||||
# popos, Porteus, PostMarketOS, Proxmox, Puppy, PureOS, Qubes, Radix,
|
||||
# Raspbian, Reborn_OS, Redstar, Redcore, Redhat, Refracted_Devuan,
|
||||
# Regata, Rosa, sabotage, Sabayon, Sailfish, SalentOS, Scientific,
|
||||
# Septor, SereneLinux, SharkLinux, Siduction, Slackware, SliTaz,
|
||||
# SmartOS, Solus, Source_Mage, Sparky, Star, SteamOS, SunOS,
|
||||
# openSUSE_Leap, openSUSE_Tumbleweed, openSUSE, SwagArch, Tails,
|
||||
# Trisquel, Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu-MATE, Ubuntu-Studio,
|
||||
# Ubuntu, Venom, Void, Obarun, windows10, Windows7, Xubuntu, Zorin,
|
||||
# and IRIX have ascii logos
|
||||
# NOTE: Arch, Ubuntu, Redhat, and Dragonfly have 'old' logo variants.
|
||||
# Use '{distro name}_old' to use the old logos.
|
||||
# NOTE: Ubuntu has flavor variants.
|
||||
# Change this to Lubuntu, Kubuntu, Xubuntu, Ubuntu-GNOME,
|
||||
# Ubuntu-Studio, Ubuntu-Mate or Ubuntu-Budgie to use the flavors.
|
||||
# NOTE: Arcolinux, Dragonfly, Fedora, Alpine, Arch, Ubuntu,
|
||||
# CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, OpenBSD, android,
|
||||
# Antrix, CentOS, Cleanjaro, ElementaryOS, GUIX, Hyperbola,
|
||||
# Manjaro, MXLinux, NetBSD, Parabola, POP_OS, PureOS,
|
||||
# Slackware, SunOS, LinuxLite, OpenSUSE, Raspbian,
|
||||
# postmarketOS, and Void have a smaller logo variant.
|
||||
# Use '{distro name}_small' to use the small variants.
|
||||
ascii_distro="auto"
|
||||
|
||||
# Ascii Colors
|
||||
#
|
||||
# Default: 'distro'
|
||||
# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num'
|
||||
# Flag: --ascii_colors
|
||||
#
|
||||
# Example:
|
||||
# ascii_colors=(distro) - Ascii is colored based on Distro colors.
|
||||
# ascii_colors=(4 6 1 8 8 6) - Ascii is colored using these colors.
|
||||
ascii_colors=(distro)
|
||||
|
||||
# Bold ascii logo
|
||||
# Whether or not to bold the ascii logo.
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --ascii_bold
|
||||
ascii_bold="on"
|
||||
|
||||
# Image Options
|
||||
|
||||
# Image loop
|
||||
# Setting this to on will make neofetch redraw the image constantly until
|
||||
# Ctrl+C is pressed. This fixes display issues in some terminal emulators.
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --loop
|
||||
image_loop="off"
|
||||
|
||||
# Thumbnail directory
|
||||
#
|
||||
# Default: '~/.cache/thumbnails/neofetch'
|
||||
# Values: 'dir'
|
||||
thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch"
|
||||
|
||||
# Crop mode
|
||||
#
|
||||
# Default: 'normal'
|
||||
# Values: 'normal', 'fit', 'fill'
|
||||
# Flag: --crop_mode
|
||||
#
|
||||
# See this wiki page to learn about the fit and fill options.
|
||||
# https://github.com/dylanaraps/neofetch/wiki/What-is-Waifu-Crop%3F
|
||||
crop_mode="normal"
|
||||
|
||||
# Crop offset
|
||||
# Note: Only affects 'normal' crop mode.
|
||||
#
|
||||
# Default: 'center'
|
||||
# Values: 'northwest', 'north', 'northeast', 'west', 'center'
|
||||
# 'east', 'southwest', 'south', 'southeast'
|
||||
# Flag: --crop_offset
|
||||
crop_offset="northwest"
|
||||
|
||||
# Image size
|
||||
# The image is half the terminal width by default.
|
||||
#
|
||||
# Default: 'auto'
|
||||
# Values: 'auto', '00px', '00%', 'none'
|
||||
# Flags: --image_size
|
||||
# --size
|
||||
image_size="270px"
|
||||
|
||||
# Gap between image and text
|
||||
#
|
||||
# Default: '3'
|
||||
# Values: 'num', '-num'
|
||||
# Flag: --gap
|
||||
gap=8
|
||||
|
||||
# Image offsets
|
||||
# Only works with the w3m backend.
|
||||
#
|
||||
# Default: '0'
|
||||
# Values: 'px'
|
||||
# Flags: --xoffset
|
||||
# --yoffset
|
||||
yoffset=0
|
||||
xoffset=2
|
||||
|
||||
# Image background color
|
||||
# Only works with the w3m backend.
|
||||
#
|
||||
# Default: ''
|
||||
# Values: 'color', 'blue'
|
||||
# Flag: --bg_color
|
||||
background_color=
|
||||
|
||||
# Misc Options
|
||||
|
||||
# Stdout mode
|
||||
# Turn off all colors and disables image backend (ASCII/Image).
|
||||
# Useful for piping into another command.
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'
|
||||
stdout="off"
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
home.file.".config/neofetch/config.conf".source = ./neofetch-asahi.conf;
|
||||
}
|
|
@ -1,6 +1,12 @@
|
|||
{pkgs, ...}: {
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
system,
|
||||
...
|
||||
}: {
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = inputs.stablepkgs.legacyPackages.${system}.hyprland;
|
||||
settings = {
|
||||
exec-once = ["waypaper --restore"];
|
||||
"$mod" = "SUPER";
|
||||
|
@ -198,7 +204,6 @@
|
|||
"col.inactive_border" = "rgba(b4befecc) rgba(6c7086cc) 45deg";
|
||||
layout = "dwindle";
|
||||
resize_on_border = "true";
|
||||
sensitivity = "0.5";
|
||||
};
|
||||
|
||||
misc = {
|
||||
|
@ -224,6 +229,9 @@
|
|||
special = true;
|
||||
};
|
||||
};
|
||||
input = {
|
||||
sensitivity = "-0.65";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
tap-to-click = false;
|
||||
scroll_factor = 0.5;
|
||||
};
|
||||
wayland.windowManager.hyprland.settings.general.sensitivity = lib.mkForce 1.0;
|
||||
wayland.windowManager.hyprland.settings.input.sensitivity = lib.mkForce "0.0";
|
||||
wayland.windowManager.hyprland.settings.env = [
|
||||
"HYPRCURSOR_THEME,Bibata-Modern-Ice"
|
||||
"HYPRCURSOR_SIZE,24"
|
||||
|
|
|
@ -12,11 +12,13 @@
|
|||
background_opacity = "0.8";
|
||||
allow_remote_control = "socket-only";
|
||||
listen_on = "unix:/tmp/kitty";
|
||||
action_alias = "kitty_scrollback_nvim kitten /home/youwen/.local/share/nvim/lazy/kitty-scrollback.nvim/python/kitty_scrollback_nvim.py";
|
||||
# action_alias = "kitty_scrollback_nvim kitten /home/youwen/.local/share/nvim/lazy/kitty-scrollback.nvim/python/kitty_scrollback_nvim.py";
|
||||
scrollback_pager = ''nvim --noplugin -c "set signcolumn=no showtabline=0" -c "silent write! /tmp/kitty_scrollback_buffer | te cat /tmp/kitty_scrollback_buffer - "'';
|
||||
};
|
||||
keybindings = {
|
||||
"kitty_mod+h" = "kitty_scrollback_nvim";
|
||||
"kitty_mod+g" = "kitty_scrollback_nvim --config ksb_builtin_last_cmd_output";
|
||||
# "kitty_mod+h" = "kitty_scrollback_nvim";
|
||||
# "kitty_mod+g" = "kitty_scrollback_nvim --config ksb_builtin_last_cmd_output";
|
||||
"kitty_mod+h" = "show_scrollback";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue