Skip to content

Commit

Permalink
Auto lint/format
Browse files Browse the repository at this point in the history
  • Loading branch information
redyf authored and github-actions[bot] committed Jan 10, 2024
1 parent 2b11352 commit 060f533
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 143 deletions.
34 changes: 0 additions & 34 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

156 changes: 80 additions & 76 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,99 +30,103 @@
};
};

outputs = {
self,
nixpkgs,
hyprland,
home-manager,
NixOS-WSL,
spicetify-nix,
...
} @ inputs: let
supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
outputs =
{ self
, nixpkgs
, hyprland
, home-manager
, NixOS-WSL
, spicetify-nix
, ...
} @ inputs:
let
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];

# Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
# Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;

# Nixpkgs instantiated for supported system types.
nixpkgsFor = forAllSystems (system: import nixpkgs {inherit system;});
in {
nixosConfigurations = {
redyf =
nixpkgs.lib.nixosSystem
{
# Nixpkgs instantiated for supported system types.
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
in
{
nixosConfigurations = {
redyf =
nixpkgs.lib.nixosSystem
{
system = "x86_64-linux";
specialArgs = {
inherit
inputs
hyprland
spicetify-nix
;
};
modules = [
./hosts/redyf/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager = {
useUserPackages = true;
useGlobalPkgs = false;
extraSpecialArgs = { inherit inputs spicetify-nix; };
users.redyf = ./home/desktop/home.nix;
};
}
hyprland.nixosModules.default
{ programs.hyprland.enable = true; }
];
};
laptop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit
inputs
hyprland
spicetify-nix
;
inherit inputs hyprland;
};
modules = [
./hosts/redyf/configuration.nix
./hosts/laptop/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager = {
useUserPackages = true;
useGlobalPkgs = false;
extraSpecialArgs = {inherit inputs spicetify-nix;};
users.redyf = ./home/desktop/home.nix;
extraSpecialArgs = { inherit inputs; };
users.redyf = ./home/laptop/laptop.nix;
};
}
hyprland.nixosModules.default
{programs.hyprland.enable = true;}
{ programs.hyprland.enable = true; }
];
};
laptop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit inputs hyprland;
wsl = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
{ nix.registry.nixpkgs.flake = nixpkgs; }
./hosts/wsl/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager = {
useUserPackages = true;
useGlobalPkgs = false;
users.red = ./home/wsl/home.nix;
};
}
NixOS-WSL.nixosModules.wsl
];
};
modules = [
./hosts/laptop/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager = {
useUserPackages = true;
useGlobalPkgs = false;
extraSpecialArgs = {inherit inputs;};
users.redyf = ./home/laptop/laptop.nix;
};
}
hyprland.nixosModules.default
{programs.hyprland.enable = true;}
];
};
wsl = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
{nix.registry.nixpkgs.flake = nixpkgs;}
./hosts/wsl/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager = {
useUserPackages = true;
useGlobalPkgs = false;
users.red = ./home/wsl/home.nix;
};
}
NixOS-WSL.nixosModules.wsl
];
};
};
devShells = forAllSystems (system: let
pkgs = nixpkgsFor.${system};
in {
default = pkgs.mkShell {
buildInputs = with pkgs; [
git
nixpkgs-fmt
statix
];
};
});
devShells = forAllSystems (system:
let
pkgs = nixpkgsFor.${system};
in
{
default = pkgs.mkShell {
buildInputs = with pkgs; [
git
nixpkgs-fmt
statix
];
};
});

formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt;
};
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt;
};
}
15 changes: 8 additions & 7 deletions home/desktop/cli/shell/zsh/default.nix
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{
config,
pkgs,
lib,
...
}: let
{ config
, pkgs
, lib
, ...
}:
let
themepkg = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "zsh-syntax-highlighting";
rev = "06d519c20798f0ebe275fc3a8101841faaeee8ea";
sha256 = "sha256-Q7KmwUd9fblprL55W0Sf4g7lRcemnhjh4/v+TacJSfo=";
};
in {
in
{
programs.zsh = {
enable = true;
dotDir = ".config/zsh";
Expand Down
5 changes: 3 additions & 2 deletions home/desktop/pkgs/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
let
pkgs = import <nixpkgs> {};
in {
pkgs = import <nixpkgs> { };
in
{
# nvchad = pkgs.callPackage ./nvchad.nix {};
}
47 changes: 23 additions & 24 deletions hosts/redyf/configuration.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
config,
pkgs,
inputs,
...
{ config
, pkgs
, inputs
, ...
}: {
imports = [
# Include the results of the hardware scan.
Expand All @@ -11,10 +10,10 @@

# Bootloader.
boot = {
kernelModules = ["v4l2loopback"]; # Autostart kernel modules on boot
extraModulePackages = with config.boot.kernelPackages; [v4l2loopback]; # loopback module to make OBS virtual camera work
kernelParams = ["nvidia.NVreg_PreserveVideoMemoryAllocations=1"];
supportedFilesystems = ["ntfs"];
kernelModules = [ "v4l2loopback" ]; # Autostart kernel modules on boot
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; # loopback module to make OBS virtual camera work
kernelParams = [ "nvidia.NVreg_PreserveVideoMemoryAllocations=1" ];
supportedFilesystems = [ "ntfs" ];
loader = {
systemd-boot.enable = false;
timeout = 10;
Expand All @@ -30,12 +29,12 @@
configurationLimit = 3;
theme =
pkgs.fetchFromGitHub
{
owner = "Lxtharia";
repo = "minegrub-theme";
rev = "193b3a7c3d432f8c6af10adfb465b781091f56b3";
sha256 = "1bvkfmjzbk7pfisvmyw5gjmcqj9dab7gwd5nmvi8gs4vk72bl2ap";
};
{
owner = "Lxtharia";
repo = "minegrub-theme";
rev = "193b3a7c3d432f8c6af10adfb465b781091f56b3";
sha256 = "1bvkfmjzbk7pfisvmyw5gjmcqj9dab7gwd5nmvi8gs4vk72bl2ap";
};

# theme = pkgs.fetchFromGitHub {
# owner = "shvchk";
Expand Down Expand Up @@ -155,9 +154,9 @@
fontconfig = {
enable = true;
defaultFonts = {
serif = ["Times, Noto Serif"];
sansSerif = ["Helvetica Neue LT Std, Helvetica, Noto Sans"];
monospace = ["Courier Prime, Courier, Noto Sans Mono"];
serif = [ "Times, Noto Serif" ];
sansSerif = [ "Helvetica Neue LT Std, Helvetica, Noto Sans" ];
monospace = [ "Courier Prime, Courier, Noto Sans Mono" ];
};
};
};
Expand Down Expand Up @@ -202,7 +201,7 @@
opengl = {
enable = true;
driSupport32Bit = true;
extraPackages = with pkgs; [nvidia-vaapi-driver];
extraPackages = with pkgs; [ nvidia-vaapi-driver ];
};
};

Expand All @@ -226,7 +225,7 @@
enableContribAndExtras = true;
};
};
videoDrivers = ["nvidia"];
videoDrivers = [ "nvidia" ];
layout = "br";
xkbVariant = "";
libinput = {
Expand Down Expand Up @@ -266,7 +265,7 @@
description = "redyf";
initialPassword = "123456";
shell = pkgs.zsh;
extraGroups = ["networkmanager" "wheel" "input" "docker" "libvirtd"];
extraGroups = [ "networkmanager" "wheel" "input" "docker" "libvirtd" ];
};
};
};
Expand All @@ -279,7 +278,7 @@
wheelNeedsPassword = true;
extraRules = [
{
users = ["redyf"];
users = [ "redyf" ];
keepEnv = true;
persist = true;
}
Expand All @@ -300,8 +299,8 @@
extraOptions = "experimental-features = nix-command flakes";
settings = {
auto-optimise-store = true;
substituters = ["https://hyprland.cachix.org"];
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
substituters = [ "https://hyprland.cachix.org" ];
trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
};
gc = {
automatic = true;
Expand Down

0 comments on commit 060f533

Please sign in to comment.