Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting + updating actions to v3 #11

Merged
merged 3 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/flake_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Nix
uses: cachix/install-nix-action@v24
Expand Down
17 changes: 0 additions & 17 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;
};
}
2 changes: 1 addition & 1 deletion home/desktop/cli/extra/fd.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{pkgs, ...}: {
{ pkgs, ... }: {
home.packages = with pkgs; [
fd
];
Expand Down
2 changes: 1 addition & 1 deletion home/desktop/cli/extra/rm-improved.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{pkgs, ...}: {
{ pkgs, ... }: {
home.packages = with pkgs; [
rm-improved
];
Expand Down
4 changes: 2 additions & 2 deletions home/desktop/cli/extra/zoxide.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{pkgs, ...}: {
{ pkgs, ... }: {
programs.zoxide = {
enable = true;
enableZshIntegration = true;
options = [];
options = [ ];
};
}
2 changes: 1 addition & 1 deletion home/desktop/cli/fetch/neofetch/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{pkgs, ...}: {
{ pkgs, ... }: {
home.packages = with pkgs; [
neofetch
imagemagick # Dependency for neofetch so it displays images
Expand Down
4 changes: 2 additions & 2 deletions home/desktop/cli/fetch/nitch/default.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{pkgs, ...}: {
home.packages = [pkgs.nitch];
{ pkgs, ... }: {
home.packages = [ pkgs.nitch ];
}
4 changes: 2 additions & 2 deletions home/desktop/cli/fetch/pfetch/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{pkgs, ...}: {
{ pkgs, ... }: {
home = {
packages = with pkgs; [pfetch];
packages = with pkgs; [ pfetch ];
sessionVariables.PF_INFO = "ascii title os kernel shell term desktop memory pkgs uptime scheme palette";
};
}
7 changes: 3 additions & 4 deletions home/desktop/cli/rice/btop/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
config,
pkgs,
...
{ config
, pkgs
, ...
}: {
xdg.configFile."btop/themes/catppuccin_macchiato.theme".text = ''
#Bashtop grayscale theme
Expand Down
2 changes: 1 addition & 1 deletion home/desktop/cli/rice/cava/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{pkgs, ...}: {
{ pkgs, ... }: {
home.packages = with pkgs; [
cava
];
Expand Down
Loading