renaming
This commit is contained in:
parent
39c2567fd2
commit
4b252ef608
6 changed files with 14 additions and 28 deletions
154
configuration.nix
Normal file
154
configuration.nix
Normal file
|
|
@ -0,0 +1,154 @@
|
|||
{pkgs, ...}: {
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
configurationLimit = 10;
|
||||
};
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = 2;
|
||||
};
|
||||
kernelParams = [
|
||||
"quiet"
|
||||
"rd.udev.log_level=3"
|
||||
"rd.systemd.show_status=auto"
|
||||
];
|
||||
initrd.verbose = false;
|
||||
consoleLogLevel = 3;
|
||||
kernelPackages = pkgs.linuxPackages;
|
||||
};
|
||||
|
||||
time.timeZone = "Asia/Jakarta";
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
|
||||
services = {
|
||||
fwupd.enable = true;
|
||||
xserver.xkb.layout = "us";
|
||||
locate.enable = true;
|
||||
printing.enable = true;
|
||||
openssh.enable = false;
|
||||
pulseaudio.enable = false;
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = false; # temporarily set to 'false' to fix openblas issue
|
||||
pulse.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
security.rtkit.enable = true;
|
||||
|
||||
nix = {
|
||||
settings = {
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
# Nix
|
||||
nh
|
||||
alejandra
|
||||
# system devel
|
||||
python3
|
||||
gcc
|
||||
clang
|
||||
# system utils
|
||||
firmware-updater
|
||||
mtr
|
||||
gnupg
|
||||
ddate
|
||||
testdisk
|
||||
tree
|
||||
wget
|
||||
btop
|
||||
dysk
|
||||
plocate
|
||||
traceroute
|
||||
rlwrap
|
||||
entr
|
||||
unzip
|
||||
ffmpeg
|
||||
imagemagick
|
||||
# extra utils
|
||||
fd
|
||||
bat
|
||||
xh
|
||||
tlrc
|
||||
dust
|
||||
hyperfine
|
||||
ripgrep
|
||||
fzf
|
||||
eza
|
||||
];
|
||||
shellAliases = {
|
||||
l = "eza --long --all";
|
||||
ll = "eza --long";
|
||||
ls = "eza --long";
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
fish.enable = true;
|
||||
starship.enable = true;
|
||||
atuin = {
|
||||
enable = true;
|
||||
settings.sync_address = "https://api.atuin.sh";
|
||||
};
|
||||
nix-ld = {
|
||||
enable = true;
|
||||
libraries = with pkgs; [fuse e2fsprogs];
|
||||
};
|
||||
tmux = {
|
||||
enable = true;
|
||||
clock24 = true;
|
||||
baseIndex = 1;
|
||||
shortcut = "a";
|
||||
keyMode = "vi";
|
||||
terminal = "screen-256color";
|
||||
escapeTime = 0;
|
||||
extraConfig = ''
|
||||
set -g pane-base-index 1
|
||||
set-window-option -g pane-base-index 1
|
||||
set-option -g renumber-windows on
|
||||
set-option -g status-right "\"#W\""
|
||||
set -ga terminal-overrides ",*:RGB"
|
||||
set -g mouse on
|
||||
set -g set-clipboard on
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
fonts = {
|
||||
packages = with pkgs; [
|
||||
# GUI fonts
|
||||
inter
|
||||
corefonts
|
||||
vista-fonts
|
||||
roboto
|
||||
cantarell-fonts
|
||||
# fonts for i18n
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-cjk-serif
|
||||
noto-fonts-color-emoji
|
||||
noto-fonts-monochrome-emoji
|
||||
unifont
|
||||
unifont_upper
|
||||
unifont-csur
|
||||
# terminal fonts
|
||||
nerd-fonts.iosevka
|
||||
];
|
||||
fontconfig = {
|
||||
antialias = true;
|
||||
subpixel.rgba = "rgb";
|
||||
};
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
config.common.default = ["gtk"];
|
||||
extraPortals = with pkgs; [xdg-desktop-portal-wlr];
|
||||
};
|
||||
}
|
||||
21
flake.nix
21
flake.nix
|
|
@ -41,20 +41,17 @@
|
|||
];
|
||||
};
|
||||
})
|
||||
./hosts/phostron/nixos.nix
|
||||
./profiles/kde.nix
|
||||
./users/coyote/nixos.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = {inherit inputs;};
|
||||
users.coyote.imports = [./users/coyote/home.nix];
|
||||
};
|
||||
}
|
||||
./hosts/phostron/configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
homeConfigurations.coyote = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
extraSpecialArgs = {inherit inputs;};
|
||||
modules = [
|
||||
./users/coyote/home.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
30
hosts/phostron/configuration.nix
Normal file
30
hosts/phostron/configuration.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../configuration.nix
|
||||
../../profiles/kde.nix
|
||||
../../users/coyote/configuration.nix
|
||||
];
|
||||
|
||||
system.stateVersion = "26.05"; # I hope you know what you're doing. :)
|
||||
|
||||
services.displayManager.sddm.settings = {
|
||||
Theme = {
|
||||
Font = "Inter";
|
||||
CursorSize = 18;
|
||||
};
|
||||
};
|
||||
|
||||
hardware = {
|
||||
bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = false;
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "phostron";
|
||||
networkmanager.enable = true;
|
||||
firewall.enable = true;
|
||||
};
|
||||
}
|
||||
37
hosts/phostron/hardware-configuration.nix
Normal file
37
hosts/phostron/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# 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 = ["nvme" "ehci_pci" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/24fb172c-c29f-40c3-ae4d-ff652358563a";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/DFC9-994A";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0077" "dmask=0077"];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{device = "/dev/disk/by-uuid/91d96247-85c3-4e0a-93a2-5632b96179b6";}
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
92
users/coyote/configuration.nix
Normal file
92
users/coyote/configuration.nix
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
USER_ID = 1000;
|
||||
KEY_FILE = "id_ed25519";
|
||||
in {
|
||||
users = {
|
||||
users.coyote = {
|
||||
isNormalUser = true;
|
||||
description = "coyote";
|
||||
extraGroups = ["wheel" "networkmanager"];
|
||||
uid = USER_ID;
|
||||
};
|
||||
defaultUserShell = pkgs.unstable.fish;
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
# utils
|
||||
ghostscript
|
||||
tectonic
|
||||
# lisps
|
||||
chicken
|
||||
guile
|
||||
sbcl
|
||||
unstable.racket
|
||||
# devel
|
||||
ast-grep
|
||||
nodejs
|
||||
lua
|
||||
luarocks
|
||||
stylua
|
||||
mermaid-cli
|
||||
unstable.lazygit
|
||||
# LSPs
|
||||
ty
|
||||
nil
|
||||
marksman
|
||||
systemd-lsp
|
||||
bash-language-server
|
||||
];
|
||||
sessionVariables.SSH_AUTH_SOCK = "/run/user/${builtins.toString USER_ID}/ssh-agent";
|
||||
};
|
||||
|
||||
programs = {
|
||||
starship = {
|
||||
package = pkgs.unstable.starship;
|
||||
transientPrompt.enable = true;
|
||||
transientPrompt.left = "starship module character";
|
||||
settings = {
|
||||
"$schema" = "https://starship.rs/config-schema.json";
|
||||
"git_status" = {
|
||||
ahead = ">";
|
||||
behind = "<";
|
||||
diverged = "<>";
|
||||
renamed = "r";
|
||||
deleted = "x";
|
||||
};
|
||||
character = {
|
||||
success_symbol = "[λ](bold green)";
|
||||
error_symbol = "[λ](bold red)";
|
||||
};
|
||||
};
|
||||
};
|
||||
ssh.startAgent = true;
|
||||
obs-studio = {
|
||||
enable = true;
|
||||
enableVirtualCamera = true;
|
||||
plugins = with pkgs.obs-studio-plugins; [
|
||||
input-overlay
|
||||
droidcam-obs
|
||||
wlrobs
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.ssh-add-key = {
|
||||
wantedBy = ["default.target"];
|
||||
after = ["ssh-agent.service"];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStartPre = "${pkgs.coreutils-full}/bin/sleep 1";
|
||||
ExecStart = [
|
||||
"${pkgs.openssh}/bin/ssh-add ${config.users.users.coyote.home}/.ssh/${KEY_FILE}"
|
||||
];
|
||||
Restart = "on-failure";
|
||||
RestartSec = 1;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -2,17 +2,7 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
literate-vim = pkgs.vimUtils.buildVimPlugin {
|
||||
name = "literate.vim";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zyedidia";
|
||||
repo = "literate.vim";
|
||||
rev = "4ffd45cb1657b67f4ed0eb639478a69209ec1f94";
|
||||
sha256 = "sha256-X5iJyjeLBkKh4tUoDG8VDO6DwYVOI9DpRqpic8NinwA=";
|
||||
};
|
||||
};
|
||||
in {
|
||||
}: {
|
||||
programs.vim = {
|
||||
enable = true;
|
||||
packageConfigurable = pkgs.unstable.vim-full;
|
||||
|
|
@ -20,8 +10,6 @@ in {
|
|||
gruvbox
|
||||
rainbow
|
||||
vim-indent-guides
|
||||
literate-vim
|
||||
neomake
|
||||
];
|
||||
defaultEditor = true;
|
||||
extraConfig = ''
|
||||
|
|
|
|||
Reference in a new issue