Compare commits

...

3 Commits

Author SHA1 Message Date
Ryan Hamamura
cc09d65964 chore(format): apply nixfmt formatting 2026-04-23 14:02:27 -10:00
Ryan Hamamura
e819878e9f feat: add niri 2026-04-20 19:36:01 -10:00
Ryan Hamamura
c8a9e615c5 chore: remove unecessary hardware file 2026-04-20 19:05:36 -10:00
6 changed files with 237 additions and 178 deletions

View File

@@ -8,5 +8,9 @@
wrapper-modules.url = "github:BirdeeHub/nix-wrapper-modules"; wrapper-modules.url = "github:BirdeeHub/nix-wrapper-modules";
}; };
outputs = inputs: inputs.flake-parts.lib.mkFlake {inherit inputs;} (inputs.import-tree ./modules); outputs =
inputs:
inputs.flake-parts.lib.mkFlake {
inherit inputs;
} (inputs.import-tree ./modules);
} }

View File

@@ -1,8 +0,0 @@
{ self, inputs, ... }: {
flake.nixosModules.fioHardware = { config, lib, pkgs, modulesPath, ... }: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
};
}

32
modules/features/niri.nix Normal file
View File

@@ -0,0 +1,32 @@
{ self, inputs, ... }:
{
flake.nixosModules.niri =
{ pkgs, lib, ... }:
{
programs.niri = {
enable = true;
package = self.packages.${pkgs.stdenv.hostPlatform.system}.myNiri;
};
};
perSystem =
{ pkgs, lib, ... }:
{
packages.myNiri = inputs.wrapper-modules.wrappers.niri.wrap {
inherit pkgs;
settings = {
input.keyboard = {
xkb.layout = "us,ua";
};
layout.gaps = 5;
binds = {
"Mod+Return".spawn-sh = lib.getExe pkgs.alacritty;
"Mod+Q".close-window = null;
};
};
};
};
}

View File

@@ -1,16 +1,23 @@
{ self, inputs, ... }: { { self, inputs, ... }:
{
flake.nixosModules.fioConfiguration = { pkgs, lib, ... }: { flake.nixosModules.fioConfiguration =
{ pkgs, lib, ... }:
{
imports = [ imports = [
self.nixosModules.fioHardware self.nixosModules.fioHardware
self.nixosModules.niri
]; ];
# Bootloader. # Bootloader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [
"nix-command"
"flakes"
];
networking.hostName = "fio"; networking.hostName = "fio";
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
@@ -93,7 +100,10 @@
users.users.ryan = { users.users.ryan = {
isNormalUser = true; isNormalUser = true;
description = "Ryan Hamamura"; description = "Ryan Hamamura";
extraGroups = [ "networkmanager" "wheel" ]; extraGroups = [
"networkmanager"
"wheel"
];
shell = pkgs.zsh; shell = pkgs.zsh;
packages = with pkgs; [ packages = with pkgs; [
kdePackages.kate kdePackages.kate

View File

@@ -1,4 +1,5 @@
{ self, inputs, ... }: { { self, inputs, ... }:
{
flake.nixosConfigurations.fio = inputs.nixpkgs.lib.nixosSystem { flake.nixosConfigurations.fio = inputs.nixpkgs.lib.nixosSystem {
modules = [ modules = [
self.nixosModules.fioConfiguration self.nixosModules.fioConfiguration

View File

@@ -1,11 +1,26 @@
{ self, inputs, ... }: { { self, inputs, ... }:
{
flake.nixosModules.fioHardware = { config, lib, pkgs, modulesPath, ... }: { flake.nixosModules.fioHardware =
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.availableKernelModules = [
"xhci_pci"
"nvme"
"usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
@@ -18,12 +33,17 @@
fileSystems."/boot" = { fileSystems."/boot" = {
device = "/dev/disk/by-uuid/3779-802B"; device = "/dev/disk/by-uuid/3779-802B";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ]; options = [
"fmask=0077"
"dmask=0077"
];
}; };
swapDevices = [ { swapDevices = [
{
device = "/dev/disk/by-uuid/812e6cdb-6cfb-402f-9e47-88b2d337c39e"; device = "/dev/disk/by-uuid/812e6cdb-6cfb-402f-9e47-88b2d337c39e";
} ]; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;