refactor, add common modules
This commit is contained in:
parent
00af4d57aa
commit
f30ff9962c
37
flake.lock
generated
37
flake.lock
generated
@ -1,5 +1,41 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixlib": {
|
||||
"locked": {
|
||||
"lastModified": 1734829460,
|
||||
"narHash": "sha256-dPhc+f2wkmhMqMIfq+hColJdysgVxKP9ilZ5bR0NRZI=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "0a31e8d833173ae63e43fd9dbff1ccf09c4f778c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-generators": {
|
||||
"inputs": {
|
||||
"nixlib": "nixlib",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1734915500,
|
||||
"narHash": "sha256-A7CTIQ8SW0hfbhKlwK+vSsu4pD+Oaelw3v6goX6go+U=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixos-generators",
|
||||
"rev": "051d1b2dda3b2e81b38d82e2b691e5c2f4d335f4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixos-generators",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1735834308,
|
||||
@ -18,6 +54,7 @@
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixos-generators": "nixos-generators",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
|
22
flake.nix
22
flake.nix
@ -1,4 +1,3 @@
|
||||
# /etc/nixos/flake.nix
|
||||
{
|
||||
description = "flake for Yura-PC";
|
||||
|
||||
@ -6,24 +5,39 @@
|
||||
nixpkgs = {
|
||||
url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
};
|
||||
nixos-generators = {
|
||||
url = "github:nix-community/nixos-generators";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs }: {
|
||||
outputs = { self, nixpkgs, nixos-generators }: {
|
||||
nixosConfigurations = {
|
||||
Yura-PC = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./modules
|
||||
./configuration.nix
|
||||
./hosts/Yura-PC
|
||||
];
|
||||
};
|
||||
VM = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./modules
|
||||
./configuration-vm.nix
|
||||
./hosts/vm
|
||||
];
|
||||
};
|
||||
};
|
||||
# https://github.com/nix-community/nixos-generators?tab=readme-ov-file#using-in-a-flake
|
||||
packages.x86_64-linux = {
|
||||
proxmox = nixos-generators.nixosGenerate {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./modules
|
||||
./hosts/vm
|
||||
];
|
||||
format = "proxmox";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
./hardware-configuration.nix
|
||||
# <nixpkgs/nixos/modules/profiles/qemu-guest.nix>
|
||||
];
|
||||
common.kb-input.enable = true;
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
@ -110,37 +111,6 @@
|
||||
security.pam.services.sddm.enableGnomeKeyring = true;
|
||||
# security.pam.services.sddm.gnupg.enable = true;
|
||||
|
||||
services.xserver.xkb.extraLayouts = {
|
||||
minimak-4 = {
|
||||
description = "English (US, Minimak-4)";
|
||||
languages = [ "eng" ];
|
||||
# symbolsFile = /etc/nixos/minimak;
|
||||
symbolsFile = ./minimak;
|
||||
};
|
||||
minimak-8 = {
|
||||
description = "English (US, Minimak-8)";
|
||||
languages = [ "eng" ];
|
||||
# symbolsFile = /etc/nixos/minimak;
|
||||
symbolsFile = ./minimak;
|
||||
};
|
||||
minimak-12 = {
|
||||
description = "English (US, Minimak-12)";
|
||||
languages = [ "eng" ];
|
||||
# symbolsFile = /etc/nixos/minimak;
|
||||
symbolsFile = ./minimak;
|
||||
};
|
||||
};
|
||||
|
||||
i18n.inputMethod = {
|
||||
type = "fcitx5";
|
||||
enable = true;
|
||||
fcitx5.waylandFrontend = true;
|
||||
fcitx5.plasma6Support = true;
|
||||
fcitx5.addons = with pkgs; [
|
||||
fcitx5-mozc
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
@ -158,9 +128,6 @@
|
||||
group = "cazzzer";
|
||||
extraGroups = [ "networkmanager" "wheel" "docker" "wireshark" "geoclue" ];
|
||||
packages = with pkgs; [
|
||||
|
||||
kdePackages.kate
|
||||
kdePackages.yakuake
|
||||
python3
|
||||
poetry
|
||||
|
||||
@ -191,6 +158,9 @@
|
||||
programs.gnupg.agent.pinentryPackage = pkgs.pinentry-qt;
|
||||
# programs.starship.enable = true;
|
||||
programs.wireshark.enable = true;
|
||||
programs.wireshark.package = pkgs.wireshark; # wireshark-cli by default
|
||||
programs.bat.enable = true;
|
||||
programs.htop.enable = true;
|
||||
|
||||
# https://nixos.wiki/wiki/Docker
|
||||
virtualisation.docker.enable = true;
|
||||
@ -263,13 +233,19 @@
|
||||
# ];
|
||||
|
||||
workarounds.flatpak.enable = true;
|
||||
fonts.packages = with pkgs; [ nerd-fonts.fantasque-sans-mono ];
|
||||
fonts.packages = with pkgs; [
|
||||
fantasque-sans-mono
|
||||
nerd-fonts.fantasque-sans-mono
|
||||
noto-fonts
|
||||
noto-fonts-emoji
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-cjk-serif
|
||||
jetbrains-mono
|
||||
];
|
||||
# fonts.fontDir.enable = true;
|
||||
# fonts.fontconfig.allowBitmaps = false;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
bat
|
||||
# bluez
|
||||
darkman
|
||||
dust
|
||||
efibootmgr
|
||||
@ -277,16 +253,15 @@
|
||||
fastfetch
|
||||
fd
|
||||
ffmpeg
|
||||
# flatpak
|
||||
host-spawn # for flatpaks
|
||||
kdePackages.flatpak-kcm
|
||||
kdePackages.filelight
|
||||
# git
|
||||
kdePackages.flatpak-kcm
|
||||
kdePackages.kate
|
||||
kdePackages.yakuake
|
||||
gcr
|
||||
gnome-keyring # config for this and some others
|
||||
gnumake
|
||||
helix
|
||||
htop
|
||||
jetbrains-toolbox # or maybe do invidual ones?
|
||||
# jetbrains.rust-rover
|
||||
# jetbrains.pycharm-professional
|
||||
@ -295,11 +270,7 @@
|
||||
mediainfo
|
||||
micro
|
||||
mpv
|
||||
neofetch
|
||||
# neovim
|
||||
nextcloud-client
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-cjk-serif
|
||||
lxqt.pavucontrol-qt
|
||||
pinentry
|
||||
rbw
|
||||
@ -308,15 +279,10 @@
|
||||
starship
|
||||
tealdeer
|
||||
tela-circle-icon-theme
|
||||
fantasque-sans-mono
|
||||
jetbrains-mono
|
||||
virt-viewer
|
||||
waypipe
|
||||
whois
|
||||
# wireshark
|
||||
yt-dlp
|
||||
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
# wget
|
||||
];
|
||||
|
||||
# nix.package = pkgs.nixFlakes;
|
@ -7,8 +7,12 @@
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration-vm.nix
|
||||
# ./hardware-configuration-vm.nix
|
||||
];
|
||||
common.kb-input.enable = true;
|
||||
|
||||
# boot.kernelParams = [ "console=tty0" ];
|
||||
proxmox.qemuConf.bios = "ovmf";
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
@ -19,7 +23,7 @@
|
||||
"sysrq_always_enabled=1"
|
||||
];
|
||||
|
||||
boot.loader.timeout = 3;
|
||||
# boot.loader.timeout = lib.mkForce 3;
|
||||
boot.loader.systemd-boot.configurationLimit = 5;
|
||||
boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_12;
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [ zfs ];
|
||||
@ -77,37 +81,6 @@
|
||||
services.sshd.enable = true;
|
||||
services.flatpak.enable = true;
|
||||
|
||||
services.xserver.xkb.extraLayouts = {
|
||||
minimak-4 = {
|
||||
description = "English (US, Minimak-4)";
|
||||
languages = [ "eng" ];
|
||||
# symbolsFile = /etc/nixos/minimak;
|
||||
symbolsFile = ./minimak;
|
||||
};
|
||||
minimak-8 = {
|
||||
description = "English (US, Minimak-8)";
|
||||
languages = [ "eng" ];
|
||||
# symbolsFile = /etc/nixos/minimak;
|
||||
symbolsFile = ./minimak;
|
||||
};
|
||||
minimak-12 = {
|
||||
description = "English (US, Minimak-12)";
|
||||
languages = [ "eng" ];
|
||||
# symbolsFile = /etc/nixos/minimak;
|
||||
symbolsFile = ./minimak;
|
||||
};
|
||||
};
|
||||
|
||||
i18n.inputMethod = {
|
||||
type = "fcitx5";
|
||||
enable = true;
|
||||
fcitx5.waylandFrontend = true;
|
||||
fcitx5.plasma6Support = true;
|
||||
fcitx5.addons = with pkgs; [
|
||||
fcitx5-mozc
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
@ -119,25 +92,17 @@
|
||||
};
|
||||
};
|
||||
users.users.cazzzer = {
|
||||
password = "";
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPWgEzbEjbbu96MVQzkiuCrw+UGYAXN4sRe2zM6FVopq cazzzer@Yura-PC"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIApFeLVi3BOquL0Rt+gQK2CutNHaBDQ0m4PcGWf9Bc43 cazzzer@Yura-TPX13"
|
||||
];
|
||||
isNormalUser = true;
|
||||
description = "Yura";
|
||||
uid = 1000;
|
||||
group = "cazzzer";
|
||||
extraGroups = [ "networkmanager" "wheel" "docker" "wireshark" ];
|
||||
packages = with pkgs; [
|
||||
# Python
|
||||
# python3
|
||||
# poetry
|
||||
extraGroups = [ "wheel" "docker" "wireshark" ];
|
||||
|
||||
# Haskell
|
||||
# haskellPackages.ghc
|
||||
# haskellPackages.stack
|
||||
|
||||
# Node
|
||||
# nodejs_22
|
||||
# pnpm
|
||||
# bun
|
||||
];
|
||||
};
|
||||
|
||||
# Install firefox.
|
||||
@ -147,6 +112,10 @@
|
||||
programs.lazygit.enable = true;
|
||||
programs.neovim.enable = true;
|
||||
|
||||
programs.bat.enable = true;
|
||||
programs.htop.enable = true;
|
||||
programs.wireshark.enable = true;
|
||||
|
||||
# https://discourse.nixos.org/t/firefox-does-not-use-kde-window-decorations-and-cursor/32132/3
|
||||
# programs.dconf.enable = true;
|
||||
# programs.firefox = {
|
||||
@ -166,50 +135,43 @@
|
||||
# https://github.com/flatpak/flatpak/issues/2861
|
||||
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
|
||||
workarounds.flatpak.enable = true;
|
||||
fonts.packages = with pkgs; [ nerd-fonts.fantasque-sans-mono ];
|
||||
# workarounds.flatpak.enable = true;
|
||||
fonts.packages = with pkgs; [
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-cjk-serif
|
||||
fantasque-sans-mono
|
||||
nerd-fonts.fantasque-sans-mono
|
||||
jetbrains-mono
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
bat
|
||||
# bluez
|
||||
darkman
|
||||
dust
|
||||
efibootmgr
|
||||
eza
|
||||
fastfetch
|
||||
fd
|
||||
# flatpak
|
||||
host-spawn # for flatpaks
|
||||
kdePackages.flatpak-kcm
|
||||
kdePackages.filelight
|
||||
kdePackages.kate
|
||||
kdePackages.yakuake
|
||||
# git
|
||||
gnumake
|
||||
helix
|
||||
htop
|
||||
mediainfo
|
||||
micro
|
||||
mpv
|
||||
neofetch
|
||||
# neovim
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-cjk-serif
|
||||
ripgrep
|
||||
starship
|
||||
tealdeer
|
||||
tela-circle-icon-theme
|
||||
fantasque-sans-mono
|
||||
jetbrains-mono
|
||||
waypipe
|
||||
whois
|
||||
# wireshark
|
||||
yt-dlp
|
||||
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
zfs
|
||||
# wget
|
||||
];
|
||||
|
||||
# nix.package = pkgs.nixFlakes;
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
environment.etc."current-system-packages".text =
|
5
modules/common/default.nix
Normal file
5
modules/common/default.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{...}: {
|
||||
imports = [
|
||||
./kb-input.nix
|
||||
];
|
||||
}
|
42
modules/common/kb-input.nix
Normal file
42
modules/common/kb-input.nix
Normal file
@ -0,0 +1,42 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.common.kb-input;
|
||||
in {
|
||||
options = {
|
||||
common.kb-input = {
|
||||
enable = lib.mkEnableOption "input method and custom keyboard layout";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.xserver.xkb.extraLayouts = {
|
||||
minimak-4 = {
|
||||
description = "English (US, Minimak-4)";
|
||||
languages = [ "eng" ];
|
||||
symbolsFile = ./minimak;
|
||||
};
|
||||
minimak-8 = {
|
||||
description = "English (US, Minimak-8)";
|
||||
languages = [ "eng" ];
|
||||
symbolsFile = ./minimak;
|
||||
};
|
||||
minimak-12 = {
|
||||
description = "English (US, Minimak-12)";
|
||||
languages = [ "eng" ];
|
||||
symbolsFile = ./minimak;
|
||||
};
|
||||
};
|
||||
|
||||
i18n.inputMethod = {
|
||||
type = "fcitx5";
|
||||
enable = true;
|
||||
fcitx5.waylandFrontend = true;
|
||||
fcitx5.plasma6Support = true;
|
||||
fcitx5.addons = [ pkgs.fcitx5-mozc ];
|
||||
};
|
||||
};
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
{...}: {
|
||||
imports = [
|
||||
./common
|
||||
./workarounds
|
||||
];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user