Skip to content

Commit 6281561

Browse files
committed
update
0 parents  commit 6281561

File tree

118 files changed

+12234
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+12234
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

NixOS/ROGSTRIX/hardware.nix

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Do not modify this file! It was generated by ‘nixos-generate-config’
2+
# and may be overwritten by future invocations. Please make changes
3+
# to /etc/nixos/configuration.nix instead.
4+
{ config, lib, pkgs, modulesPath, ... }:
5+
6+
{
7+
imports =
8+
[ (modulesPath + "/installer/scan/not-detected.nix")
9+
];
10+
11+
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usbhid" "usb_storage" "sd_mod" ];
12+
boot.initrd.kernelModules = [ ];
13+
boot.kernelModules = [ "kvm-intel" ];
14+
boot.extraModulePackages = [ ];
15+
16+
fileSystems."/" =
17+
{ device = "/dev/disk/by-uuid/9d104e6d-0e4b-4e25-b562-1114198d6d49";
18+
fsType = "ext4";
19+
};
20+
21+
fileSystems."/boot" =
22+
{ device = "/dev/disk/by-uuid/8C89-0FE3";
23+
fsType = "vfat";
24+
options = [ "fmask=0077" "dmask=0077" ];
25+
};
26+
27+
swapDevices =
28+
[ { device = "/dev/disk/by-uuid/9e80538f-23fd-42d2-8001-1aeafe9c559a"; }
29+
];
30+
31+
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
32+
# (the default) this is the recommended approach. When using systemd-networkd it's
33+
# still possible to use this option, but it's recommended to use it in conjunction
34+
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
35+
networking.useDHCP = lib.mkDefault true;
36+
# networking.interfaces.enp0s20f0u5.useDHCP = lib.mkDefault true;
37+
# networking.interfaces.enp108s0.useDHCP = lib.mkDefault true;
38+
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
39+
40+
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
41+
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
42+
}

NixOS/ROGSTRIX/home.nix

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{ ... }: {
2+
imports = [
3+
../../homemanager
4+
];
5+
home.file.".config/uwsm/env".text = ''
6+
export GMB_BACKEND=nvidia-drm
7+
export __GLX_VENDOR_LIBRARY_NAME=nvidia
8+
# export LIBVA_DRIVER_NAME=nvidia
9+
'';
10+
}

NixOS/ROGSTRIX/host.nix

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Edit this configuration file to define what should be installed on
2+
# your system. Help is available in the configuration.nix(5) man page
3+
# and in the NixOS manual (accessible by running ‘nixos-help’).
4+
5+
{ config, pkgs, inputs, ... }:
6+
7+
{
8+
imports =
9+
[
10+
# Include the results of the hardware scan.
11+
./hardware.nix
12+
../common
13+
]
14+
++ (with inputs.nixos-hardware.nixosModules; [
15+
common-cpu-intel
16+
common-gpu-nvidia
17+
common-pc-ssd
18+
]);
19+
20+
services.xserver.videoDrivers = [ "nvidia" ];
21+
22+
hardware.graphics = {
23+
enable = true;
24+
};
25+
26+
hardware.nvidia = {
27+
modesetting.enable = true;
28+
powerManagement.enable = false;
29+
powerManagement.finegrained = false;
30+
open = false;
31+
nvidiaSettings = true;
32+
package = config.boot.kernelPackages.nvidiaPackages.stable;
33+
prime = {
34+
offload = {
35+
enable = true;
36+
enableOffloadCmd = true;
37+
};
38+
intelBusId = "PCI:1:0:0";
39+
nvidiaBusId = "PCI:0:2:0";
40+
};
41+
};
42+
43+
# Bootloader.
44+
boot.kernelPackages = pkgs.linuxKernel.packages.linux_zen;
45+
boot.loader.systemd-boot.enable = true;
46+
boot.loader.efi.canTouchEfiVariables = true;
47+
48+
# Allow unfree packages
49+
nixpkgs.config.allowUnfree = true;
50+
51+
environment.systemPackages = with pkgs; [
52+
nvtopPackages.full
53+
];
54+
55+
# This value determines the NixOS release from which the default
56+
# settings for stateful data, like file locations and database versions
57+
# on your system were taken. It‘s perfectly fine and recommended to leave
58+
# this value at the release version of the first install of this system.
59+
# Before changing this value read the documentation for this option
60+
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
61+
system.stateVersion = "24.11"; # Did you read the comment?
62+
}

NixOS/common/audio.nix

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{...}: {
2+
services.pulseaudio.enable = false;
3+
security.rtkit.enable = true;
4+
services.pipewire = {
5+
enable = true;
6+
alsa.enable = true;
7+
alsa.support32Bit = true;
8+
jack.enable = true;
9+
pulse.enable = true;
10+
};
11+
12+
programs = {
13+
noisetorch.enable = true;
14+
};
15+
}

NixOS/common/bluetooth.nix

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{...}: {
2+
hardware.bluetooth = {
3+
enable = true;
4+
powerOnBoot = true;
5+
settings = {
6+
General = {
7+
experimental = true;
8+
};
9+
};
10+
};
11+
}

NixOS/common/default.nix

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{ pkgs, ... }: {
2+
imports =
3+
[
4+
# Include the results of the hardware scan.
5+
./audio.nix
6+
./bluetooth.nix
7+
./desktop.nix
8+
./flatpak.nix
9+
./i18n.nix
10+
./keymap.nix
11+
./network.nix
12+
./services.nix
13+
./steam.nix
14+
./sudoers.nix
15+
./toolbox.nix
16+
./virtualize.nix
17+
];
18+
19+
# Define a user account. Don't forget to set a password with ‘passwd’.
20+
users.users.upiscium = {
21+
shell = pkgs.zsh;
22+
isNormalUser = true;
23+
description = "uPiscium";
24+
extraGroups = [ "networkmanager" "wheel" ];
25+
# packages = with pkgs; [ ];
26+
};
27+
28+
nix = {
29+
settings = {
30+
auto-optimise-store = true;
31+
experimental-features = [ "nix-command" "flakes" ];
32+
};
33+
gc = {
34+
automatic = true;
35+
dates = "weekly";
36+
options = "--delete-older-than 7d";
37+
};
38+
};
39+
}

NixOS/common/desktop.nix

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{inputs, pkgs, ...}: {
2+
environment.systemPackages = with pkgs; [
3+
sddm-chili-theme
4+
];
5+
6+
xdg.portal.enable = true;
7+
xdg.portal.extraPortals = with pkgs; [
8+
xdg-desktop-portal-gtk
9+
];
10+
11+
services.xserver.enable = true;
12+
services.xserver = {
13+
xkb = {
14+
layout = "us";
15+
variant = "";
16+
};
17+
};
18+
19+
programs.hyprland = {
20+
enable = true;
21+
withUWSM = true;
22+
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
23+
};
24+
25+
services.displayManager.sddm = {
26+
enable = true;
27+
theme = "chili";
28+
wayland.enable = true;
29+
};
30+
}

NixOS/common/flatpak.nix

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{pkgs, ...}: {
2+
services.flatpak.enable = true;
3+
systemd.services.flatpak-repo = {
4+
wantedBy = ["multi-user.target"];
5+
path = [pkgs.flatpak];
6+
script = ''
7+
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
8+
'';
9+
};
10+
}

NixOS/common/i18n.nix

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{ config, pkgs, inputs, ... }: {
2+
time.timeZone = "Asia/Tokyo";
3+
i18n.defaultLocale = "en_US.UTF-8";
4+
5+
i18n.extraLocaleSettings = {
6+
LC_ADDRESS = "en_US.UTF-8";
7+
LC_IDENTIFICATION = "en_US.UTF-8";
8+
LC_MEASUREMENT = "en_US.UTF-8";
9+
LC_MONETARY = "en_US.UTF-8";
10+
LC_NAME = "en_US.UTF-8";
11+
LC_NUMERIC = "en_US.UTF-8";
12+
LC_PAPER = "en_US.UTF-8";
13+
LC_TELEPHONE = "en_US.UTF-8";
14+
LC_TIME = "en_US.UTF-8";
15+
};
16+
17+
i18n.inputMethod = {
18+
type = "fcitx5";
19+
fcitx5.addons = with pkgs; [ fcitx5-mozc ];
20+
};
21+
22+
fonts = {
23+
packages = with pkgs; [
24+
noto-fonts-cjk-serif
25+
noto-fonts-cjk-sans
26+
noto-fonts-emoji
27+
nerd-fonts.caskaydia-cove
28+
];
29+
fontDir.enable = true;
30+
fontconfig = {
31+
defaultFonts = {
32+
serif = [ "Noto Serif CJK JP" "Noto Color Emoji" ];
33+
sansSerif = [ "Noto Sans CJK JP" "Noto Color Emoji" ];
34+
monospace = [ "Caskaydia Cove Nerd Font" ];
35+
emoji = [ "Noto Color Emoji" ];
36+
};
37+
};
38+
};
39+
}

NixOS/common/keymap.nix

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{ ... }: {
2+
services.keyd = {
3+
enable = true;
4+
keyboards.default = {
5+
ids = [ "*" ];
6+
settings = {
7+
main = {
8+
# capslock = "overload(control, esc)";
9+
capslock = "esc";
10+
muhenkan = "leftalt";
11+
# space = "overload(shift, space)";
12+
};
13+
};
14+
};
15+
};
16+
}

NixOS/common/network.nix

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{hostname, ...}: {
2+
services.openssh.enable = true;
3+
programs.kdeconnect.enable = true;
4+
5+
networking.hostName = hostname;
6+
networking.networkmanager.enable = true;
7+
networking.firewall = {
8+
enable = true;
9+
trustedInterfaces = [];
10+
allowedTCPPorts = [];
11+
allowedUDPPorts = [];
12+
allowedTCPPortRanges = [
13+
# {from=0; to=0;}
14+
];
15+
allowedUDPPortRanges = [
16+
# {from=0; to=0;}
17+
];
18+
};
19+
20+
services.avahi = {
21+
enable = true;
22+
openFirewall = true;
23+
};
24+
}

NixOS/common/services.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{...}: {
2+
services.gvfs.enable = true;
3+
services.udisks2.enable = true;
4+
services.devmon.enable = true;
5+
services.printing.enable = true;
6+
}

NixOS/common/steam.nix

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{...}: {
2+
programs.steam = {
3+
enable = true;
4+
remotePlay.openFirewall = true;
5+
dedicatedServer.openFirewall = true;
6+
};
7+
}

NixOS/common/sudoers.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{...}: {
2+
security.sudo.wheelNeedsPassword = false;
3+
}

NixOS/common/toolbox.nix

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{ pkgs, ... }: {
2+
environment.systemPackages = with pkgs; [
3+
curl
4+
lshw
5+
neovim
6+
nix-index
7+
usbutils
8+
vim
9+
wget
10+
zsh
11+
];
12+
environment.pathsToLink = [ "/share/zsh" ];
13+
14+
programs = {
15+
git = {
16+
enable = true;
17+
};
18+
vim.enable = true;
19+
neovim = {
20+
enable = true;
21+
defaultEditor = true;
22+
viAlias = true;
23+
};
24+
zsh = {
25+
enable = true;
26+
};
27+
nix-ld.enable = true;
28+
};
29+
}

NixOS/common/virtualize.nix

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{...}: {
2+
virtualisation = {
3+
docker = {
4+
enable = true;
5+
rootless = {
6+
enable = true;
7+
setSocketVariable = true;
8+
};
9+
};
10+
};
11+
}

0 commit comments

Comments
 (0)