mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
feat: add nixos and hm config
This commit is contained in:
parent
8db7f8a1e9
commit
ffafb4a329
54 changed files with 1282 additions and 0 deletions
0
nixcfgs/.gitignore
vendored
Normal file
0
nixcfgs/.gitignore
vendored
Normal file
110
nixcfgs/flake.lock
generated
Normal file
110
nixcfgs/flake.lock
generated
Normal file
|
|
@ -0,0 +1,110 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1760130406,
|
||||||
|
"narHash": "sha256-GKMwBaFRw/C1p1VtjDz4DyhyzjKUWyi1K50bh8lgA2E=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "d305eece827a3fe317a2d70138f53feccaf890a1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nix-darwin": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1751313918,
|
||||||
|
"narHash": "sha256-HsJM3XLa43WpG+665aGEh8iS8AfEwOIQWk3Mke3e7nk=",
|
||||||
|
"owner": "nix-darwin",
|
||||||
|
"repo": "nix-darwin",
|
||||||
|
"rev": "e04a388232d9a6ba56967ce5b53a8a6f713cdfcf",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-darwin",
|
||||||
|
"ref": "master",
|
||||||
|
"repo": "nix-darwin",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nix-flatpak": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1751276396,
|
||||||
|
"narHash": "sha256-oOYrnKStMsOXST+wKnzuSZ49h8Dr1Q3mIn2f5Kb5GAw=",
|
||||||
|
"owner": "gmodena",
|
||||||
|
"repo": "nix-flatpak",
|
||||||
|
"rev": "59adb9ad1cbd915494fc35cd0e0a9d582ca9de74",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "gmodena",
|
||||||
|
"repo": "nix-flatpak",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1754182383,
|
||||||
|
"narHash": "sha256-hON5G3ENyUGUpqImXT+Ag7TWbBsfthwqxMcAw8EiKw8=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "e960e6e1dc689e2b5fe9e3ee824fc12860d9f27c",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"plasma-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"home-manager": [
|
||||||
|
"home-manager"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1759321049,
|
||||||
|
"narHash": "sha256-8XkU4gIrLT2DJZWQyvsP5woXGZF5eE/7AnKfwQkiwYU=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "plasma-manager",
|
||||||
|
"rev": "205dcfd4a30d4a5d1b4f28defee69daa7c7252cd",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "plasma-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"nix-darwin": "nix-darwin",
|
||||||
|
"nix-flatpak": "nix-flatpak",
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"plasma-manager": "plasma-manager"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
66
nixcfgs/flake.nix
Normal file
66
nixcfgs/flake.nix
Normal file
|
|
@ -0,0 +1,66 @@
|
||||||
|
{
|
||||||
|
description = "A simple NixOS flake";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
|
nix-flatpak.url = "github:gmodena/nix-flatpak";
|
||||||
|
nix-darwin = {
|
||||||
|
url = "github:nix-darwin/nix-darwin/master";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
home-manager = {
|
||||||
|
url = "github:nix-community/home-manager";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
plasma-manager = {
|
||||||
|
url = "github:nix-community/plasma-manager";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
inputs.home-manager.follows = "home-manager";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = {
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
nix-flatpak,
|
||||||
|
nix-darwin,
|
||||||
|
home-manager,
|
||||||
|
plasma-manager,
|
||||||
|
...
|
||||||
|
} @ inputs: let
|
||||||
|
system = "x86_64-linux";
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
in {
|
||||||
|
nixosConfigurations.zp = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = [
|
||||||
|
nix-flatpak.nixosModules.nix-flatpak
|
||||||
|
./hosts/zp.nix
|
||||||
|
./hardware-configuration.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
nixosConfigurations.zephyrus = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = [
|
||||||
|
./hosts/zephyrus
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
# nix-flatpak.homeManagerModules.nix-flatpak
|
||||||
|
home-manager.sharedModules = [plasma-manager.homeModules.plasma-manager nix-flatpak.homeManagerModules.nix-flatpak];
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.users.js0ny = import ./users/js0ny;
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
darwinConfigurations."zen" = nix-darwin.lib.darwinSystem {
|
||||||
|
system = "aarch64-darwin";
|
||||||
|
modules = [
|
||||||
|
./hosts/zen
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
126
nixcfgs/hosts/zephyrus/configuration.nix
Normal file
126
nixcfgs/hosts/zephyrus/configuration.nix
Normal file
|
|
@ -0,0 +1,126 @@
|
||||||
|
# Edit this configuration file to define what should be installed on
|
||||||
|
# your system. Help is available in the configuration.nix(5) man page, on
|
||||||
|
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||||
|
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ # Include the results of the hardware scan.
|
||||||
|
./hardware-configuration.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Use the systemd-boot EFI boot loader.
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
# Use latest kernel.
|
||||||
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
|
# networking.hostName = "nixos"; # Define your hostname.
|
||||||
|
# Pick only one of the below networking options.
|
||||||
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
# networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "Europe/London";
|
||||||
|
|
||||||
|
# Configure network proxy if necessary
|
||||||
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
|
||||||
|
# Select internationalisation properties.
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
# console = {
|
||||||
|
# font = "Lat2-Terminus16";
|
||||||
|
# keyMap = "us";
|
||||||
|
# useXkbConfig = true; # use xkb.options in tty.
|
||||||
|
# };
|
||||||
|
|
||||||
|
# Enable the X11 windowing system.
|
||||||
|
# services.xserver.enable = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Configure keymap in X11
|
||||||
|
# services.xserver.xkb.layout = "us";
|
||||||
|
# services.xserver.xkb.options = "eurosign:e,caps:escape";
|
||||||
|
|
||||||
|
# Enable CUPS to print documents.
|
||||||
|
# services.printing.enable = true;
|
||||||
|
|
||||||
|
# Enable sound.
|
||||||
|
# services.pulseaudio.enable = true;
|
||||||
|
# OR
|
||||||
|
# services.pipewire = {
|
||||||
|
# enable = true;
|
||||||
|
# pulse.enable = true;
|
||||||
|
# };
|
||||||
|
|
||||||
|
# Enable touchpad support (enabled default in most desktopManager).
|
||||||
|
# services.libinput.enable = true;
|
||||||
|
|
||||||
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
|
users.users.js0ny = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||||
|
packages = with pkgs; [
|
||||||
|
tree
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# programs.firefox.enable = true;
|
||||||
|
|
||||||
|
# List packages installed in system profile.
|
||||||
|
# You can use https://search.nixos.org/ to find more packages (and options).
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||||
|
wget
|
||||||
|
];
|
||||||
|
|
||||||
|
# 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;
|
||||||
|
# };
|
||||||
|
|
||||||
|
# List services that you want to enable:
|
||||||
|
|
||||||
|
# Enable the OpenSSH daemon.
|
||||||
|
# services.openssh.enable = true;
|
||||||
|
|
||||||
|
# Open ports in the firewall.
|
||||||
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||||
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
|
# Or disable the firewall altogether.
|
||||||
|
# networking.firewall.enable = false;
|
||||||
|
|
||||||
|
# Copy the NixOS configuration file and link it from the resulting system
|
||||||
|
# (/run/current-system/configuration.nix). This is useful in case you
|
||||||
|
# accidentally delete configuration.nix.
|
||||||
|
# system.copySystemConfiguration = true;
|
||||||
|
|
||||||
|
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||||
|
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||||
|
#
|
||||||
|
# Most users should NEVER change this value after the initial install, for any reason,
|
||||||
|
# even if you've upgraded your system to a new NixOS release.
|
||||||
|
#
|
||||||
|
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||||
|
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
||||||
|
# to actually do that.
|
||||||
|
#
|
||||||
|
# This value being lower than the current NixOS release does NOT mean your system is
|
||||||
|
# out of date, out of support, or vulnerable.
|
||||||
|
#
|
||||||
|
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||||
|
# and migrated your data accordingly.
|
||||||
|
#
|
||||||
|
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||||
|
system.stateVersion = "25.05"; # Did you read the comment?
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
27
nixcfgs/hosts/zephyrus/default.nix
Normal file
27
nixcfgs/hosts/zephyrus/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
# ~/.config/nixcfgs/hosts/zephyrus/default.nix
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
nix-flatpak,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
../../modules/nixos
|
||||||
|
../../modules/nixos/laptop.nix
|
||||||
|
../../modules/nixos/disable-nvidia.nix
|
||||||
|
../../modules/nixos/additional-packages.nix
|
||||||
|
../../modules/nixos/libvirt.nix
|
||||||
|
../../modules/nixos/docker.nix
|
||||||
|
../../modules/nixos/firefox.nix
|
||||||
|
../../modules/nixos/desktop/gnome.nix
|
||||||
|
../../modules/nixos/desktop/kde.nix
|
||||||
|
../../modules/nixos/display-manager/ly.nix
|
||||||
|
./hardware-configuration.nix
|
||||||
|
./keyd.nix
|
||||||
|
./packages.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
networking.hostName = "zephyrus";
|
||||||
|
system.stateVersion = "25.05";
|
||||||
|
}
|
||||||
58
nixcfgs/hosts/zephyrus/hardware-configuration.nix
Normal file
58
nixcfgs/hosts/zephyrus/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,58 @@
|
||||||
|
# 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" "xhci_pci" "thunderbolt" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/ed71c463-1cf6-449d-9aa8-ed715fe7ad74";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/home" =
|
||||||
|
{ device = "/dev/disk/by-uuid/ed71c463-1cf6-449d-9aa8-ed715fe7ad74";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@home" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/swap" =
|
||||||
|
{ device = "/dev/disk/by-uuid/ed71c463-1cf6-449d-9aa8-ed715fe7ad74";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@swap" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/nix" =
|
||||||
|
{ device = "/dev/disk/by-uuid/ed71c463-1cf6-449d-9aa8-ed715fe7ad74";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@nix" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/0BDA-B0A4";
|
||||||
|
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.wlp3s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
23
nixcfgs/hosts/zephyrus/keyd.nix
Normal file
23
nixcfgs/hosts/zephyrus/keyd.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
keyd
|
||||||
|
];
|
||||||
|
|
||||||
|
services.keyd = {
|
||||||
|
enable = true;
|
||||||
|
keyboards = {
|
||||||
|
externalKeyboard = {
|
||||||
|
ids = [ "0b05:19b6:d167885d" ]; # ASUS Keyboard
|
||||||
|
settings = {
|
||||||
|
main = {
|
||||||
|
capslock = "overload(control, esc)";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
12
nixcfgs/hosts/zephyrus/packages.nix
Normal file
12
nixcfgs/hosts/zephyrus/packages.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
asusctl
|
||||||
|
supergfxctl
|
||||||
|
];
|
||||||
|
|
||||||
|
services.asusd.enable = true;
|
||||||
|
services.supergfxd.enable = true;
|
||||||
|
}
|
||||||
|
|
||||||
47
nixcfgs/hosts/zp.nix
Normal file
47
nixcfgs/hosts/zp.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
# Edit this configuration file to define what should be installed on
|
||||||
|
# your system. Help is available in the configuration.nix(5) man page, on
|
||||||
|
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||||
|
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ # Include the results of the hardware scan.
|
||||||
|
../common/nixos.nix
|
||||||
|
../common/desktop-linux.nix
|
||||||
|
../common/packages-fonts.nix
|
||||||
|
../common/packages-desktop.nix
|
||||||
|
../common/packages-headless.nix
|
||||||
|
../common/nvidia.nix
|
||||||
|
../common/flatpak.nix
|
||||||
|
../common/wine.nix
|
||||||
|
../common/firefox.nix
|
||||||
|
../common/gnome.nix
|
||||||
|
../common/docker.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
networking.hostName = "zp"; # Define your hostname.
|
||||||
|
|
||||||
|
|
||||||
|
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||||
|
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||||
|
#
|
||||||
|
# Most users should NEVER change this value after the initial install, for any reason,
|
||||||
|
# even if you've upgraded your system to a new NixOS release.
|
||||||
|
#
|
||||||
|
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||||
|
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
||||||
|
# to actually do that.
|
||||||
|
#
|
||||||
|
# This value being lower than the current NixOS release does NOT mean your system is
|
||||||
|
# out of date, out of support, or vulnerable.
|
||||||
|
#
|
||||||
|
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||||
|
# and migrated your data accordingly.
|
||||||
|
#
|
||||||
|
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||||
|
system.stateVersion = "25.05"; # Did you read the comment?
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
0
nixcfgs/modules/common/default.nix
Normal file
0
nixcfgs/modules/common/default.nix
Normal file
0
nixcfgs/modules/home/dev/c.nix
Normal file
0
nixcfgs/modules/home/dev/c.nix
Normal file
11
nixcfgs/modules/home/dev/java.nix
Normal file
11
nixcfgs/modules/home/dev/java.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
jdt-language-server
|
||||||
|
jdk21
|
||||||
|
];
|
||||||
|
programs.vscode.profiles.default.extensions = with pkgs.vscode-extensions; [
|
||||||
|
redhat.java
|
||||||
|
vscjava.vscode-spring-initializr
|
||||||
|
vscjava.vscode-java-pack
|
||||||
|
];
|
||||||
|
}
|
||||||
11
nixcfgs/modules/home/dev/nix.nix
Normal file
11
nixcfgs/modules/home/dev/nix.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
alejandra
|
||||||
|
nil
|
||||||
|
nixd
|
||||||
|
];
|
||||||
|
programs.vscode.profiles.default.extensions = with pkgs.vscode-extensions; [
|
||||||
|
kamadorueda.alejandra
|
||||||
|
jnoortheen.nix-ide
|
||||||
|
];
|
||||||
|
}
|
||||||
13
nixcfgs/modules/home/dev/python.nix
Normal file
13
nixcfgs/modules/home/dev/python.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
uv
|
||||||
|
ruff
|
||||||
|
];
|
||||||
|
programs.vscode.profiles.default.extensions = with pkgs.vscode-extensions; [
|
||||||
|
ms-python.python
|
||||||
|
ms-python.debugpy
|
||||||
|
ms-python.vscode-pylance
|
||||||
|
charliermarsh.ruff
|
||||||
|
njpwerner.autodocstring
|
||||||
|
];
|
||||||
|
}
|
||||||
0
nixcfgs/modules/home/gnome.nix
Normal file
0
nixcfgs/modules/home/gnome.nix
Normal file
7
nixcfgs/modules/home/programs/eza.nix
Normal file
7
nixcfgs/modules/home/programs/eza.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
programs.eza = {
|
||||||
|
enable = true;
|
||||||
|
colors = "always";
|
||||||
|
icons = "always";
|
||||||
|
};
|
||||||
|
}
|
||||||
8
nixcfgs/modules/home/programs/fzf.nix
Normal file
8
nixcfgs/modules/home/programs/fzf.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
programs.fzf = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
enableFishIntegration = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
11
nixcfgs/modules/home/programs/lsd.nix
Normal file
11
nixcfgs/modules/home/programs/lsd.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
programs.lsd = {
|
||||||
|
enable = true;
|
||||||
|
colors = "always";
|
||||||
|
icons = "always";
|
||||||
|
enableBashIntegration = true;
|
||||||
|
enableFishIntegration = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
6
nixcfgs/modules/home/programs/nvim.nix
Normal file
6
nixcfgs/modules/home/programs/nvim.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
programs.neovim = {
|
||||||
|
enable = true;
|
||||||
|
defaultEditor = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
21
nixcfgs/modules/home/programs/rime.nix
Normal file
21
nixcfgs/modules/home/programs/rime.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
i18n.inputMethod = {
|
||||||
|
enable = true;
|
||||||
|
# enabled = "fcitx5"; dep.
|
||||||
|
# enableGtk2 = true;
|
||||||
|
# enableGtk3 = true;
|
||||||
|
type = "fcitx5";
|
||||||
|
fcitx5 = {
|
||||||
|
waylandFrontend = true;
|
||||||
|
addons = with pkgs; [
|
||||||
|
fcitx5-rime
|
||||||
|
kdePackages.fcitx5-configtool
|
||||||
|
kdePackages.fcitx5-qt
|
||||||
|
fcitx5-gtk
|
||||||
|
fcitx5-chinese-addons
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
8
nixcfgs/modules/home/programs/starship.nix
Normal file
8
nixcfgs/modules/home/programs/starship.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
programs.starship = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
enableFishIntegration = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
6
nixcfgs/modules/home/programs/vscodium.nix
Normal file
6
nixcfgs/modules/home/programs/vscodium.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
programs.vscode = {
|
||||||
|
package = pkgs.vscodium;
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
6
nixcfgs/modules/home/programs/zed-editor.nix
Normal file
6
nixcfgs/modules/home/programs/zed-editor.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
programs.zed-editor = {
|
||||||
|
enable = true;
|
||||||
|
extensions = ["nix"];
|
||||||
|
};
|
||||||
|
}
|
||||||
8
nixcfgs/modules/home/programs/zoxide.nix
Normal file
8
nixcfgs/modules/home/programs/zoxide.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
programs.zoxide = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
enableFishIntegration = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
7
nixcfgs/modules/nixos/additional-packages.nix
Normal file
7
nixcfgs/modules/nixos/additional-packages.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
chromium
|
||||||
|
nil
|
||||||
|
nixd
|
||||||
|
];
|
||||||
|
}
|
||||||
8
nixcfgs/modules/nixos/chromium.nix
Normal file
8
nixcfgs/modules/nixos/chromium.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
programs.chromium = {
|
||||||
|
extraOpts = {
|
||||||
|
"BrowserSignin" = 0;
|
||||||
|
"PasswordManagerEnabled" = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
105
nixcfgs/modules/nixos/configuration.nix
Normal file
105
nixcfgs/modules/nixos/configuration.nix
Normal file
|
|
@ -0,0 +1,105 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
# Use the systemd-boot EFI boot loader.
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
security.pam.services.login.enableGnomeKeyring = true;
|
||||||
|
|
||||||
|
# Use latest kernel.
|
||||||
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
|
# Pick only one of the below networking options.
|
||||||
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "Europe/London";
|
||||||
|
|
||||||
|
# Configure network proxy if necessary
|
||||||
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
|
||||||
|
# Select internationalisation properties.
|
||||||
|
i18n = {
|
||||||
|
defaultLocale = "en_GB.UTF-8";
|
||||||
|
# extraLocales = [
|
||||||
|
# "en_GB.UTF-8/UTF-8"
|
||||||
|
# ];
|
||||||
|
extraLocaleSettings = {
|
||||||
|
# LC_CTYPE = "en_GB.UTF-8";
|
||||||
|
LC_ALL = "en_GB.UTF-8";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# console = {
|
||||||
|
# font = "Lat2-Terminus16";
|
||||||
|
# keyMap = "us";
|
||||||
|
# useXkbConfig = true; # use xkb.options in tty.
|
||||||
|
# };
|
||||||
|
|
||||||
|
# Configure keymap in X11
|
||||||
|
services.xserver.xkb.layout = "us";
|
||||||
|
# services.xserver.xkb.options = "eurosign:e,caps:escape";
|
||||||
|
|
||||||
|
# Enable CUPS to print documents.
|
||||||
|
services.printing.enable = true;
|
||||||
|
|
||||||
|
# Enable sound.
|
||||||
|
# services.pulseaudio.enable = true;
|
||||||
|
# OR
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware.bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
powerOnBoot = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.shellAliases = {
|
||||||
|
nrs = "sudo nixos-rebuild switch --flake ~/.dotfiles/nixcfgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
# 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;
|
||||||
|
};
|
||||||
|
|
||||||
|
# List services that you want to enable:
|
||||||
|
|
||||||
|
# Enable the OpenSSH daemon.
|
||||||
|
services.openssh.enable = true;
|
||||||
|
|
||||||
|
# Open ports in the firewall.
|
||||||
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||||
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
|
# Or disable the firewall altogether.
|
||||||
|
# networking.firewall.enable = false;
|
||||||
|
|
||||||
|
# Copy the NixOS configuration file and link it from the resulting system
|
||||||
|
# (/run/current-system/configuration.nix). This is useful in case you
|
||||||
|
# accidentally delete configuration.nix.
|
||||||
|
# system.copySystemConfiguration = true;
|
||||||
|
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||||
|
|
||||||
|
# Enable touchpad support (enabled default in most desktopManager).
|
||||||
|
services.libinput.enable = true;
|
||||||
|
|
||||||
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
|
users.users.js0ny = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = ["wheel" "docker" "libvirtd" "dialout"]; # Enable ‘sudo’ for the user.
|
||||||
|
packages = with pkgs; [
|
||||||
|
tree
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.flatpak.enable = true;
|
||||||
|
}
|
||||||
7
nixcfgs/modules/nixos/default.nix
Normal file
7
nixcfgs/modules/nixos/default.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
imports = [
|
||||||
|
./configuration.nix
|
||||||
|
./packages.nix
|
||||||
|
./fonts.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
5
nixcfgs/modules/nixos/desktop/gnome.nix
Normal file
5
nixcfgs/modules/nixos/desktop/gnome.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.desktopManager.gnome.enable = true;
|
||||||
|
}
|
||||||
7
nixcfgs/modules/nixos/desktop/hyprland.nix
Normal file
7
nixcfgs/modules/nixos/desktop/hyprland.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{...}: {
|
||||||
|
programs.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
withUWSM = false;
|
||||||
|
xwayland.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
6
nixcfgs/modules/nixos/desktop/kde.nix
Normal file
6
nixcfgs/modules/nixos/desktop/kde.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.desktopManager.plasma6.enable = true;
|
||||||
|
}
|
||||||
|
|
||||||
26
nixcfgs/modules/nixos/disable-nvidia.nix
Normal file
26
nixcfgs/modules/nixos/disable-nvidia.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
boot.extraModprobeConfig = ''
|
||||||
|
blacklist nouveau
|
||||||
|
options nouveau modeset=0
|
||||||
|
'';
|
||||||
|
|
||||||
|
services.udev.extraRules = ''
|
||||||
|
# Remove NVIDIA USB xHCI Host Controller devices, if present
|
||||||
|
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||||
|
# Remove NVIDIA USB Type-C UCSI devices, if present
|
||||||
|
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||||
|
# Remove NVIDIA Audio devices, if present
|
||||||
|
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||||
|
# Remove NVIDIA VGA/3D controller devices
|
||||||
|
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||||
|
'';
|
||||||
|
services.xserver.videoDrivers = [ "modesetting" ];
|
||||||
|
boot.blacklistedKernelModules = [ "nouveau" "nvidia" "nvidia_drm" "nvidia_modeset" ];
|
||||||
|
hardware.nvidia = {
|
||||||
|
# enable = false;
|
||||||
|
modesetting.enable = false;
|
||||||
|
powerManagement.enable = false;
|
||||||
|
};
|
||||||
|
}
|
||||||
8
nixcfgs/modules/nixos/display-manager/gdm.nix
Normal file
8
nixcfgs/modules/nixos/display-manager/gdm.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.displayManager.gdm = {
|
||||||
|
enable = true;
|
||||||
|
wayland = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
3
nixcfgs/modules/nixos/display-manager/ly.nix
Normal file
3
nixcfgs/modules/nixos/display-manager/ly.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{...}: {
|
||||||
|
services.displayManager.ly.enable = true;
|
||||||
|
}
|
||||||
6
nixcfgs/modules/nixos/display-manager/sddm.nix
Normal file
6
nixcfgs/modules/nixos/display-manager/sddm.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{...}: {
|
||||||
|
services.displayManager.sddm = {
|
||||||
|
enable = true;
|
||||||
|
wayland.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
16
nixcfgs/modules/nixos/docker.nix
Normal file
16
nixcfgs/modules/nixos/docker.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
virtualisation = {
|
||||||
|
docker.enable = true;
|
||||||
|
podman.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# systemd.services.docker = {
|
||||||
|
# serviceConfig = {
|
||||||
|
# Environment = [
|
||||||
|
# "HTTP_PROXY=127.0.0.1:7897"
|
||||||
|
# "HTTPS_PROXY=127.0.0.1:7897"
|
||||||
|
# "NO_PROXY=localhost,127.0.0.1,.example.com"
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
}
|
||||||
33
nixcfgs/modules/nixos/firefox.nix
Normal file
33
nixcfgs/modules/nixos/firefox.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
programs.firefox = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
languagePacks = ["zh-CN"];
|
||||||
|
|
||||||
|
preferences = {
|
||||||
|
"widget.use-xdg-desktop-portal.file-picker" = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
policies = {
|
||||||
|
DisableTelemetry = true;
|
||||||
|
BlockAboutConfig = false;
|
||||||
|
DontCheckDefaultBrowser = true;
|
||||||
|
|
||||||
|
ExtensionSettings = let
|
||||||
|
moz = short: "https://addons.mozilla.org/firefox/downloads/latest/${short}/latest.xpi";
|
||||||
|
in {
|
||||||
|
"*".installation_mode = "blocked";
|
||||||
|
|
||||||
|
"uBlock0@raymondhill.net" = {
|
||||||
|
install_url = moz "ublock-origin";
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
updates_disabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
55
nixcfgs/modules/nixos/fonts.nix
Normal file
55
nixcfgs/modules/nixos/fonts.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
maple-mono.NF
|
||||||
|
sarasa-gothic
|
||||||
|
lxgw-wenkai
|
||||||
|
lxgw-neoxihei
|
||||||
|
noto-fonts-cjk-sans
|
||||||
|
noto-fonts
|
||||||
|
noto-fonts-emoji
|
||||||
|
nerd-fonts.jetbrains-mono
|
||||||
|
];
|
||||||
|
|
||||||
|
fonts = {
|
||||||
|
enableDefaultPackages = true;
|
||||||
|
|
||||||
|
fontconfig = {
|
||||||
|
enable = true;
|
||||||
|
defaultFonts = {
|
||||||
|
monospace = ["Maple Mono NF" "JetBrainsMono Nerd Font"];
|
||||||
|
serif = ["LXGW WenKai"];
|
||||||
|
sansSerif = ["LXGW Neo XiHei"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
fontDir.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
system.fsPackages = [pkgs.bindfs];
|
||||||
|
fileSystems = let
|
||||||
|
mkRoSymBind = path: {
|
||||||
|
device = path;
|
||||||
|
fsType = "fuse.bindfs";
|
||||||
|
options = ["ro" "resolve-symlinks" "x-gvfs-hide"];
|
||||||
|
};
|
||||||
|
aggregated = pkgs.buildEnv {
|
||||||
|
name = "system-fonts-and-icons";
|
||||||
|
paths = with pkgs; [
|
||||||
|
libsForQt5.breeze-qt5
|
||||||
|
|
||||||
|
noto-fonts
|
||||||
|
noto-fonts-emoji
|
||||||
|
noto-fonts-cjk-sans
|
||||||
|
noto-fonts-cjk-serif
|
||||||
|
];
|
||||||
|
pathsToLink = ["/share/fonts" "/share/icons"];
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
# Create an FHS mount to support flatpak host icons/fonts
|
||||||
|
"/usr/share/icons" = mkRoSymBind "${aggregated}/share/icons";
|
||||||
|
"/usr/share/fonts" = mkRoSymBind "${aggregated}/share/fonts";
|
||||||
|
};
|
||||||
|
}
|
||||||
11
nixcfgs/modules/nixos/laptop.nix
Normal file
11
nixcfgs/modules/nixos/laptop.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
# ~/.config/nix-config/common/packages-headless.nix
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# nixpkgs.config.allowUnfree = true;
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
powertop
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
22
nixcfgs/modules/nixos/libvirt.nix
Normal file
22
nixcfgs/modules/nixos/libvirt.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
virt-manager
|
||||||
|
];
|
||||||
|
virtualisation.libvirtd = {
|
||||||
|
enable = true;
|
||||||
|
qemu = {
|
||||||
|
package = pkgs.qemu_kvm;
|
||||||
|
runAsRoot = true;
|
||||||
|
swtpm.enable = true;
|
||||||
|
ovmf = {
|
||||||
|
enable = true;
|
||||||
|
packages = [
|
||||||
|
(pkgs.OVMF.override {
|
||||||
|
secureBoot = true;
|
||||||
|
tpmSupport = true;
|
||||||
|
}).fd
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
11
nixcfgs/modules/nixos/nvidia.nix
Normal file
11
nixcfgs/modules/nixos/nvidia.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
hardware.nvidia = {
|
||||||
|
open = false;
|
||||||
|
};
|
||||||
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
hardware.graphics = {
|
||||||
|
enable = true;
|
||||||
|
enable32Bit = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
18
nixcfgs/modules/nixos/packages.nix
Normal file
18
nixcfgs/modules/nixos/packages.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
# ~/.config/nix-config/common/packages-headless.nix
|
||||||
|
{pkgs, ...}: {
|
||||||
|
# nixpkgs.config.allowUnfree = true;
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
vim
|
||||||
|
wget
|
||||||
|
curl
|
||||||
|
git
|
||||||
|
tmux
|
||||||
|
pciutils
|
||||||
|
usbutils
|
||||||
|
smartmontools
|
||||||
|
wl-clipboard
|
||||||
|
noto-fonts
|
||||||
|
noto-fonts-cjk-sans
|
||||||
|
noto-fonts-emoji
|
||||||
|
];
|
||||||
|
}
|
||||||
8
nixcfgs/modules/nixos/wine.nix
Normal file
8
nixcfgs/modules/nixos/wine.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
# https://nixos.wiki/wiki/Wine
|
||||||
|
{pkgs, ...}: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
wineWowPackages.stable
|
||||||
|
winetricks
|
||||||
|
wineWowPackages.waylandFull
|
||||||
|
];
|
||||||
|
}
|
||||||
48
nixcfgs/users/js0ny/default.nix
Normal file
48
nixcfgs/users/js0ny/default.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
# ~/.config/nixcfgs/users/js0ny/default.nix
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
nix-flatpak,
|
||||||
|
plasma-manager,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
./packages/cli.nix
|
||||||
|
./packages/gui.nix
|
||||||
|
./packages/flatpak.nix
|
||||||
|
./programs/chromium.nix
|
||||||
|
./programs/gnome.nix
|
||||||
|
./programs/plasma.nix
|
||||||
|
./programs/shell.nix
|
||||||
|
./programs/vscodium.nix
|
||||||
|
./programs/git.nix
|
||||||
|
../../modules/home/dev/java.nix
|
||||||
|
../../modules/home/dev/nix.nix
|
||||||
|
../../modules/home/dev/python.nix
|
||||||
|
../../modules/home/programs/eza.nix
|
||||||
|
../../modules/home/programs/fzf.nix
|
||||||
|
../../modules/home/programs/lsd.nix
|
||||||
|
../../modules/home/programs/nvim.nix
|
||||||
|
../../modules/home/programs/rime.nix
|
||||||
|
../../modules/home/programs/starship.nix
|
||||||
|
../../modules/home/programs/zed-editor.nix
|
||||||
|
../../modules/home/programs/zoxide.nix
|
||||||
|
# ./flatpak.nix
|
||||||
|
];
|
||||||
|
home.username = "js0ny";
|
||||||
|
home.homeDirectory = "/home/js0ny";
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
home-manager
|
||||||
|
gcr
|
||||||
|
];
|
||||||
|
|
||||||
|
services.gnome-keyring.enable = true;
|
||||||
|
|
||||||
|
xdg.mimeApps = {
|
||||||
|
defaultApplications = {
|
||||||
|
"application/pdf" = "org.kde.okular.desktop";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.stateVersion = "25.05";
|
||||||
|
}
|
||||||
52
nixcfgs/users/js0ny/packages/cli.nix
Normal file
52
nixcfgs/users/js0ny/packages/cli.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
# ~/.config/nix-config/common/packages-headless.nix
|
||||||
|
{pkgs, ...}: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
age
|
||||||
|
aichat
|
||||||
|
beancount
|
||||||
|
bat
|
||||||
|
btop
|
||||||
|
gnumake
|
||||||
|
chezmoi
|
||||||
|
cmake
|
||||||
|
curlie
|
||||||
|
duf
|
||||||
|
dust
|
||||||
|
fd
|
||||||
|
ffmpeg
|
||||||
|
delta
|
||||||
|
glow
|
||||||
|
hyperfine
|
||||||
|
just
|
||||||
|
lazygit
|
||||||
|
lsd
|
||||||
|
pandoc
|
||||||
|
dos2unix
|
||||||
|
nushell
|
||||||
|
procs
|
||||||
|
ripgrep
|
||||||
|
ripgrep-all
|
||||||
|
tlrc
|
||||||
|
zoxide
|
||||||
|
vim
|
||||||
|
wget
|
||||||
|
git
|
||||||
|
fastfetch
|
||||||
|
fzf
|
||||||
|
kitty
|
||||||
|
zsh
|
||||||
|
fish
|
||||||
|
zoxide
|
||||||
|
wakatime-cli
|
||||||
|
# Langs
|
||||||
|
# lua
|
||||||
|
luajit
|
||||||
|
lua51Packages.luarocks
|
||||||
|
ghostscript
|
||||||
|
mermaid-cli
|
||||||
|
tectonic
|
||||||
|
# Misc
|
||||||
|
ta-lib
|
||||||
|
ddgr
|
||||||
|
];
|
||||||
|
}
|
||||||
26
nixcfgs/users/js0ny/packages/flatpak.nix
Normal file
26
nixcfgs/users/js0ny/packages/flatpak.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
# https://github.com/gmodena/nix-flatpak
|
||||||
|
{nix-flatpak, ...}: {
|
||||||
|
services.flatpak.remotes = [
|
||||||
|
{
|
||||||
|
name = "flathub";
|
||||||
|
location = "https://dl.flathub.org/repo/flathub.flatpakrepo";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
services.flatpak.packages = [
|
||||||
|
# { appId = "com.google.Chrome"; origin = "flathub" }
|
||||||
|
# "com.google.Chrome"
|
||||||
|
# "com.valvesoftware.Steam"
|
||||||
|
"com.qq.QQ"
|
||||||
|
"com.tencent.WeChat"
|
||||||
|
# "eu.betterbird.Betterbird"
|
||||||
|
# "com.baidu.NetDisk"
|
||||||
|
"com.discordapp.Discord"
|
||||||
|
"com.spotify.Client"
|
||||||
|
"com.google.EarthPro"
|
||||||
|
"com.wps.Office"
|
||||||
|
"md.obsidian.Obsidian"
|
||||||
|
# "app.zen_browser.zen"
|
||||||
|
# "com.vivaldi.Vivaldi"
|
||||||
|
"com.getpostman.Postman"
|
||||||
|
];
|
||||||
|
}
|
||||||
28
nixcfgs/users/js0ny/packages/gui.nix
Normal file
28
nixcfgs/users/js0ny/packages/gui.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
kitty
|
||||||
|
ghostty
|
||||||
|
alacritty
|
||||||
|
kdePackages.dolphin
|
||||||
|
kdePackages.okular
|
||||||
|
kdePackages.elisa
|
||||||
|
papirus-icon-theme
|
||||||
|
firefox
|
||||||
|
pcloud
|
||||||
|
telegram-desktop
|
||||||
|
steam
|
||||||
|
jetbrains.idea-ultimate
|
||||||
|
jetbrains.rider
|
||||||
|
warp-terminal
|
||||||
|
# clash-verge-rev
|
||||||
|
haruna
|
||||||
|
sioyek
|
||||||
|
vimiv-qt
|
||||||
|
imv
|
||||||
|
localsend
|
||||||
|
neovide
|
||||||
|
cherry-studio
|
||||||
|
vivaldi
|
||||||
|
kdePackages.kdeconnect-kde
|
||||||
|
];
|
||||||
|
}
|
||||||
15
nixcfgs/users/js0ny/programs/chromium.nix
Normal file
15
nixcfgs/users/js0ny/programs/chromium.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
programs.chromium = {
|
||||||
|
enable = true;
|
||||||
|
commandLineArgs = [
|
||||||
|
"--enable-wayland-ime"
|
||||||
|
];
|
||||||
|
extensions = [
|
||||||
|
{id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";} # ublock origin
|
||||||
|
{id = "ghmbeldphafepmbegfdlkpapadhbakde";} # proton pass
|
||||||
|
{id = "eimadpbcbfnmbkopoojfekhnkhdbieeh";} # dark reader
|
||||||
|
{id = "gfbliohnnapiefjpjlpjnehglfpaknnc";} # surfingkeys
|
||||||
|
{id = "bpoadfkcbjbfhfodiogcnhhhpibjhbnh";} # immersive translate
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
16
nixcfgs/users/js0ny/programs/default.nix
Normal file
16
nixcfgs/users/js0ny/programs/default.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
imports = [
|
||||||
|
./shell.nix
|
||||||
|
./vscodium.nix
|
||||||
|
../../../modules/home/dev/java.nix
|
||||||
|
../../../modules/home/dev/python.nix
|
||||||
|
../../../modules/home/programs/eza.nix
|
||||||
|
../../../modules/home/programs/fzf.nix
|
||||||
|
../../../modules/home/programs/lsd.nix
|
||||||
|
../../../modules/home/programs/nvim.nix
|
||||||
|
../../../modules/home/programs/rime.nix
|
||||||
|
../../../modules/home/programs/starship.nix
|
||||||
|
../../../modules/home/programs/zed-editor.nix
|
||||||
|
../../../modules/home/programs/zoxide.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
7
nixcfgs/users/js0ny/programs/git.nix
Normal file
7
nixcfgs/users/js0ny/programs/git.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
userName = "js0ny";
|
||||||
|
userEmail = "contact@js0ny.net";
|
||||||
|
};
|
||||||
|
}
|
||||||
48
nixcfgs/users/js0ny/programs/gnome.nix
Normal file
48
nixcfgs/users/js0ny/programs/gnome.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
gnome-tweaks
|
||||||
|
sushi
|
||||||
|
orchis-theme
|
||||||
|
gnomeExtensions.dash-to-dock
|
||||||
|
gnomeExtensions.caffeine
|
||||||
|
gnomeExtensions.logo-menu
|
||||||
|
gnomeExtensions.kimpanel
|
||||||
|
gnomeExtensions.clipboard-indicator
|
||||||
|
gnomeExtensions.advanced-alttab-window-switcher
|
||||||
|
gnomeExtensions.paperwm
|
||||||
|
gnomeExtensions.blur-my-shell
|
||||||
|
gnomeExtensions.appindicator
|
||||||
|
gnomeExtensions.gsconnect
|
||||||
|
];
|
||||||
|
programs.gnome-shell.enable = true;
|
||||||
|
programs.gnome-shell.extensions = [
|
||||||
|
{package = pkgs.gnomeExtensions.dash-to-dock;}
|
||||||
|
{package = pkgs.gnomeExtensions.caffeine;}
|
||||||
|
{package = pkgs.gnomeExtensions.logo-menu;}
|
||||||
|
{package = pkgs.gnomeExtensions.kimpanel;}
|
||||||
|
{package = pkgs.gnomeExtensions.appindicator;}
|
||||||
|
{package = pkgs.gnomeExtensions.gsconnect;}
|
||||||
|
{package = pkgs.gnomeExtensions.clipboard-indicator;}
|
||||||
|
{package = pkgs.gnomeExtensions.advanced-alttab-window-switcher;}
|
||||||
|
];
|
||||||
|
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/desktop/interface" = {
|
||||||
|
icon-theme = "Papirus";
|
||||||
|
accent-color = "pink";
|
||||||
|
show-battery-percentage = true;
|
||||||
|
};
|
||||||
|
"org/gnome/epiphany" = {
|
||||||
|
ask-for-default = false;
|
||||||
|
};
|
||||||
|
"org/gnome/epiphany/web" = {
|
||||||
|
remember-passwords = false;
|
||||||
|
enable-mouse-gestures = true;
|
||||||
|
};
|
||||||
|
"org/gnome/shell/extensions/Logo-menu" = {
|
||||||
|
menu-button-icon-image = 23;
|
||||||
|
symbolic-icon = true;
|
||||||
|
use-custom-icon = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
48
nixcfgs/users/js0ny/programs/plasma.nix
Normal file
48
nixcfgs/users/js0ny/programs/plasma.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
programs.plasma = {
|
||||||
|
enable = true;
|
||||||
|
workspace.iconTheme = "Papirus";
|
||||||
|
input.touchpads = [
|
||||||
|
{
|
||||||
|
disableWhileTyping = true;
|
||||||
|
enable = true;
|
||||||
|
leftHanded = true;
|
||||||
|
middleButtonEmulation = true;
|
||||||
|
name = "ASUP1208:00 093A:3011 Touchpad";
|
||||||
|
productId = "3011";
|
||||||
|
vendorId = "093A";
|
||||||
|
naturalScroll = true;
|
||||||
|
pointerSpeed = 0;
|
||||||
|
tapToClick = true;
|
||||||
|
accelerationProfile = "none";
|
||||||
|
scrollSpeed = 0.15;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
panels = [
|
||||||
|
# Windows-like panel at the bottom
|
||||||
|
{
|
||||||
|
location = "bottom";
|
||||||
|
widgets = [
|
||||||
|
"org.kde.plasma.kickoff"
|
||||||
|
"org.kde.plasma.icontasks"
|
||||||
|
"org.kde.plasma.marginsseparator"
|
||||||
|
"org.kde.plasma.systemtray"
|
||||||
|
"org.kde.plasma.digitalclock"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
# Global menu at the top
|
||||||
|
{
|
||||||
|
location = "top";
|
||||||
|
height = 26;
|
||||||
|
widgets = ["org.kde.plasma.pager"];
|
||||||
|
opacity = "translucent";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
programs.okular = {
|
||||||
|
enable = true;
|
||||||
|
accessibility.changeColors.mode = "InvertLightness";
|
||||||
|
general.mouseMode = "TextSelect";
|
||||||
|
};
|
||||||
|
}
|
||||||
30
nixcfgs/users/js0ny/programs/shell.nix
Normal file
30
nixcfgs/users/js0ny/programs/shell.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
{pkgs, ...}: let
|
||||||
|
commonAliases = {
|
||||||
|
v = "nvim";
|
||||||
|
g = "lazygit";
|
||||||
|
ni = "touch";
|
||||||
|
cls = "clear";
|
||||||
|
ii = "open";
|
||||||
|
c = "codium";
|
||||||
|
aic = "aichat -s";
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
programs.fish = {
|
||||||
|
enable = true;
|
||||||
|
interactiveShellInit = "set fish_greeting";
|
||||||
|
# preferAbbrs = true;
|
||||||
|
shellAbbrs = commonAliases;
|
||||||
|
};
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
autocd = true;
|
||||||
|
autosuggestion.enable = true;
|
||||||
|
syntaxHighlighting.enable = true;
|
||||||
|
dotDir = "/home/js0ny/.config/zsh";
|
||||||
|
shellAliases = commonAliases;
|
||||||
|
};
|
||||||
|
programs.bash = {
|
||||||
|
enable = true;
|
||||||
|
shellAliases = commonAliases;
|
||||||
|
};
|
||||||
|
}
|
||||||
17
nixcfgs/users/js0ny/programs/vscodium.nix
Normal file
17
nixcfgs/users/js0ny/programs/vscodium.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
programs.vscode = {
|
||||||
|
package = pkgs.vscodium;
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.vscode.profiles.default = {
|
||||||
|
extensions = with pkgs.vscode-extensions; [
|
||||||
|
golang.go
|
||||||
|
vscodevim.vim
|
||||||
|
pkief.material-icon-theme
|
||||||
|
catppuccin.catppuccin-vsc
|
||||||
|
vspacecode.vspacecode
|
||||||
|
vspacecode.whichkey
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue