Skip to content

Commit

Permalink
treewide: stop using inputs' and self'
Browse files Browse the repository at this point in the history
  • Loading branch information
fufexan committed Aug 11, 2023
1 parent dc67ee8 commit 5f00d66
Show file tree
Hide file tree
Showing 18 changed files with 47 additions and 58 deletions.
2 changes: 1 addition & 1 deletion home/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
home = {
username = "mihai";
homeDirectory = "/home/mihai";
stateVersion = "20.09";
stateVersion = "23.11";
extraOutputsToInstall = ["doc" "devdoc"];
};

Expand Down
4 changes: 2 additions & 2 deletions home/editors/helix/default.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
inputs',
inputs,
pkgs,
...
}: {
imports = [./languages.nix];

programs.helix = {
enable = true;
package = inputs'.helix.packages.default.overrideAttrs (self: {
package = inputs.helix.packages.${pkgs.system}.default.overrideAttrs (self: {
makeWrapperArgs = with pkgs;
self.makeWrapperArgs
or []
Expand Down
9 changes: 2 additions & 7 deletions home/profiles/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,15 @@
module_args,
...
}: let
sharedModules = withSystem "x86_64-linux" ({
inputs',
self',
...
}: [
sharedModules = [
../.
../shell
module_args
{_module.args = {inherit inputs' self';};}
inputs.anyrun.homeManagerModules.default
inputs.nix-index-db.hmModules.nix-index
inputs.spicetify-nix.homeManagerModule
inputs.hyprland.homeManagerModules.default
]);
];

homeImports = {
"mihai@io" = [./io] ++ sharedModules;
Expand Down
4 changes: 2 additions & 2 deletions home/programs/eww/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
config,
pkgs,
lib,
inputs',
inputs,
...
}: let
dependencies = with pkgs; [
cfg.package

inputs'.gross.packages.gross
inputs.gross.packages.${pkgs.system}.gross
config.wayland.windowManager.hyprland.package

bash
Expand Down
4 changes: 2 additions & 2 deletions home/programs/games.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
pkgs,
inputs',
inputs,
...
}:
# games
{
home.packages = with pkgs; [
inputs'.nix-gaming.packages.osu-lazer-bin
inputs.nix-gaming.packages.${pkgs.system}.osu-lazer-bin
gamescope
prismlauncher
# (lutris.override {extraPkgs = p: [p.libnghttp2];})
Expand Down
10 changes: 8 additions & 2 deletions home/programs/spicetify.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{inputs', ...}: {
{
inputs,
pkgs,
...
}: {
# themable spotify
programs.spicetify = let
spicePkgs = inputs'.spicetify-nix.packages.default;
spicePkgs = inputs.spicetify-nix.packages.${pkgs.system}.default;
in {
enable = true;

Expand All @@ -11,6 +15,8 @@

enabledExtensions = with spicePkgs.extensions; [
fullAppDisplay
history
genre
hidePodcasts
shuffle
];
Expand Down
4 changes: 2 additions & 2 deletions home/shell/nix.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
pkgs,
self',
self,
...
}:
# nix tooling
Expand All @@ -9,7 +9,7 @@
alejandra
deadnix
statix
self'.packages.repl
self.packages.${pkgs.system}.repl
];

programs.direnv = {
Expand Down
7 changes: 4 additions & 3 deletions home/wayland/anyrun.nix
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
{
inputs',
pkgs,
inputs,
osConfig,
...
}: {
programs.anyrun = {
enable = true;

config = {
plugins = with inputs'.anyrun.packages; [
plugins = with inputs.anyrun.packages.${pkgs.system}; [
applications
randr
rink
shell
symbols
translate
inputs'.anyrun-nixos-options.packages.default
inputs.anyrun-nixos-options.packages.${pkgs.system}.default
];

width.fraction = 0.3;
Expand Down
4 changes: 2 additions & 2 deletions home/wayland/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
pkgs,
lib,
inputs',
inputs,
...
}:
# Wayland config
Expand All @@ -28,7 +28,7 @@ in {

programs.eww-hyprland = {
enable = true;
package = inputs'.eww.packages.eww-wayland;
package = inputs.eww.packages.${pkgs.system}.eww-wayland;
};

home.packages = with pkgs; [
Expand Down
4 changes: 2 additions & 2 deletions home/wayland/hyprland/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
inputs',
inputs,
lib,
pkgs,
...
Expand All @@ -9,7 +9,7 @@
home.packages = with pkgs; [
jaq
xorg.xprop
inputs'.hyprland-contrib.packages.grimblast
inputs.hyprland-contrib.packages.${pkgs.system}.grimblast
];

# start swayidle as part of hyprland, not sway
Expand Down
20 changes: 2 additions & 18 deletions hosts/default.nix
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
{
inputs,
withSystem,
sharedModules,
homeImports,
...
}: {
flake.nixosConfigurations = withSystem "x86_64-linux" ({
system,
self',
inputs',
...
}: let
systemInputs = {_module.args = {inherit self' inputs';};};
flake.nixosConfigurations = let
inherit (inputs.nixpkgs.lib) nixosSystem;
in {
io = nixosSystem {
inherit system;

modules =
[
./io
Expand All @@ -27,14 +18,11 @@
../modules/lanzaboote.nix
../modules/power-switcher.nix
{home-manager.users.mihai.imports = homeImports."mihai@io";}
systemInputs
]
++ sharedModules;
};

rog = nixosSystem {
inherit system;

modules =
[
./rog
Expand All @@ -45,21 +33,17 @@
../modules/lanzaboote.nix
../modules/power-switcher.nix
{home-manager.users.mihai.imports = homeImports."mihai@rog";}
systemInputs
]
++ sharedModules;
};

kiiro = nixosSystem {
inherit system;

modules =
[
./kiiro
{home-manager.users.mihai.imports = homeImports.server;}
systemInputs
]
++ sharedModules;
};
});
};
}
2 changes: 1 addition & 1 deletion hosts/io/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
};

boot = {
binfmt.emulatedSystems = ["aarch64-linux"];
binfmt.emulatedSystems = ["aarch64-linux" "riscv64-linux"];

# load modules on boot
kernelModules = ["acpi_call"];
Expand Down
8 changes: 7 additions & 1 deletion hosts/kiiro/hardware-configuration.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# 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.
{modulesPath, ...}: {
{
modulesPath,
lib,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
Expand All @@ -27,4 +31,6 @@
device = "/dev/disk/by-uuid/7B5A-471E";
fsType = "vfat";
};

nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}
2 changes: 1 addition & 1 deletion modules/core.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
security.sudo.wheelNeedsPassword = false;

# don't touch this
system.stateVersion = lib.mkDefault "20.09";
system.stateVersion = lib.mkDefault "23.11";

time.timeZone = lib.mkDefault "Europe/Bucharest";

Expand Down
8 changes: 3 additions & 5 deletions modules/desktop.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
inputs',
pkgs,
self,
self',
inputs,
...
}: {
boot.plymouth = {
enable = true;
themePackages = [self'.packages.catppuccin-plymouth];
themePackages = [self.packages.${pkgs.system}.catppuccin-plymouth];
theme = "catppuccin-mocha";
};

Expand Down Expand Up @@ -95,7 +94,6 @@
};

nix = {
# package = inputs'.nix-super.packages.nix;
settings = {
substituters = [
"https://nix-gaming.cachix.org"
Expand Down Expand Up @@ -139,7 +137,7 @@
# keyboard remapping
kmonad = {
enable = true;
package = inputs'.kmonad.packages.default;
package = inputs.kmonad.packages.${pkgs.system}.default;
keyboards = {
one2mini = {
device = "/dev/input/by-id/usb-Ducky_Ducky_One2_Mini_RGB_DK-V1.17-190813-event-kbd";
Expand Down
4 changes: 2 additions & 2 deletions modules/linux-enable-ir-emitter.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
config,
lib,
self',
self,
pkgs,
...
}:
Expand All @@ -18,7 +18,7 @@ in {

package = mkOption {
type = types.package;
default = pkgs.linux-enable-ir-emitter or self'.packages.linux-enable-ir-emitter;
default = pkgs.linux-enable-ir-emitter or self.packages.${pkgs.system}.linux-enable-ir-emitter;
defaultText = "pkgs.linux-enable-ir-emitter";
description = ''
Package to use for the Linux Enable IR Emitter service.
Expand Down
5 changes: 2 additions & 3 deletions modules/nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
config,
pkgs,
inputs,
inputs',
lib,
self,
...
}: {
environment.systemPackages = [
# we need git for flakes
pkgs.git
inputs'.nh.packages.default
# cool helper for rebuild
inputs.nh.packages.${pkgs.system}.default
];
environment.variables.FLAKE = "/home/mihai/Documents/code/dotfiles";

Expand Down
4 changes: 2 additions & 2 deletions modules/power-switcher.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
pkgs,
lib,
inputs',
inputs,
...
}:
# run certain commands depending whether the system is on AC or on battery
let
programs = lib.makeBinPath [inputs'.hyprland.packages.default];
programs = lib.makeBinPath [inputs.hyprland.packages.${pkgs.system}.default];

unplugged = pkgs.writeShellScript "unplugged" ''
export PATH=$PATH:${programs}
Expand Down

0 comments on commit 5f00d66

Please sign in to comment.