Remove extraneous arguments; fix anytype hash; fix imports; make home build
diff --git a/src/apps/personal/comma.nix b/src/apps/personal/comma.nix
index 7a8fa47..477c4e6 100644
--- a/src/apps/personal/comma.nix
+++ b/src/apps/personal/comma.nix
@@ -1,4 +1,4 @@
-{ config, pkgs, nixpkgs, ... }:
+{ pkgs, ... }:
let
comma = import ( pkgs.fetchFromGitHub {
owner = "nix-community";
diff --git a/src/apps/personal/git.nix b/src/apps/personal/git.nix
index 37a52ea..fbac0df 100644
--- a/src/apps/personal/git.nix
+++ b/src/apps/personal/git.nix
@@ -1,4 +1,4 @@
-{ config, pkgs, nixpkgs }: {
+{ ... }: {
programs.git = {
enable = true;
diff --git a/src/apps/personal/go.nix b/src/apps/personal/go.nix
index dcf5a90..629d1cf 100644
--- a/src/apps/personal/go.nix
+++ b/src/apps/personal/go.nix
@@ -1,3 +1,3 @@
-{ config, pkgs, nixpkgs }: {
+{ ... }: {
programs.go.enable = true;
}
\ No newline at end of file
diff --git a/src/apps/personal/gpg.nix b/src/apps/personal/gpg.nix
index 71b5dba..a064ed0 100644
--- a/src/apps/personal/gpg.nix
+++ b/src/apps/personal/gpg.nix
@@ -1,4 +1,4 @@
-{ config, pkgs, nixpkgs }: {
+{ pkgs, ... }: {
programs.gpg.enable = true;
services.gpg-agent = {
enable = true;
diff --git a/src/apps/personal/nodejs.nix b/src/apps/personal/nodejs.nix
index b8ed6ac..cfb562b 100644
--- a/src/apps/personal/nodejs.nix
+++ b/src/apps/personal/nodejs.nix
@@ -1,7 +1,5 @@
-{ config, pkgs, nixpkgs }: {
+{ pkgs, ... }: {
home.packages = with pkgs; [
nodejs-17_x
];
-
- programs.steam.enable = true;
}
\ No newline at end of file
diff --git a/src/apps/personal/overlay/anytype.nix b/src/apps/personal/overlays/anytype.nix
similarity index 94%
rename from src/apps/personal/overlay/anytype.nix
rename to src/apps/personal/overlays/anytype.nix
index e40117d..7106f27 100644
--- a/src/apps/personal/overlay/anytype.nix
+++ b/src/apps/personal/overlays/anytype.nix
@@ -1,6 +1,6 @@
final: prev: let
build = "57693545";
- sha = "sha256-ayexUZNn7QGHjXYO/+1kUebTmAzdVpwG9Ile8Uh3i8Q=";
+ sha = "sha256-QyexUZNn7QGHjXYO/+1kUebTmAzdVpwG9Ile8Uh3i8Q=";
pname = "anytype";
name = "${pname}-${build}";
diff --git a/src/apps/personal/overlays/nur.nix b/src/apps/personal/overlays/nur.nix
new file mode 100644
index 0000000..9373b18
--- /dev/null
+++ b/src/apps/personal/overlays/nur.nix
@@ -0,0 +1,8 @@
+final: prev: let
+ nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz");
+in {
+ nur = nur {
+ nurpkgs = prev;
+ pkgs = prev;
+ };
+}
\ No newline at end of file
diff --git a/src/apps/personal/spotify.nix b/src/apps/personal/spotify.nix
index c341bf4..e79f372 100644
--- a/src/apps/personal/spotify.nix
+++ b/src/apps/personal/spotify.nix
@@ -1,4 +1,4 @@
-{ config, pkgs, nixpkgs }: {
+{ pkgs, ... }: {
home.packages = with pkgs; [
spotify
];
diff --git a/src/apps/personal/steam.nix b/src/apps/personal/steam.nix
index 095bc0f..181add1 100644
--- a/src/apps/personal/steam.nix
+++ b/src/apps/personal/steam.nix
@@ -1,7 +1,11 @@
-{ config, pkgs, nixpkgs }: {
+{ pkgs, ... }: {
home.packages = with pkgs; [
steam-run
];
- programs.steam.enable = true;
+ # Due to opening the firewall and creating udev rules,
+ # steam proper can only be installed in the main system configuration.
+
+ # Steam-run is a FHS-compliant wrapper (around any executable), which
+ # we can run here, but the main steam package is not here
}
\ No newline at end of file
diff --git a/src/apps/personal/vscode.nix b/src/apps/personal/vscode.nix
index e1b2c2e..925c633 100644
--- a/src/apps/personal/vscode.nix
+++ b/src/apps/personal/vscode.nix
@@ -1,4 +1,4 @@
-{ config, pkgs, nixpkgs }: {
+{ pkgs, ... }: {
programs.vscode.enable = true;
programs.vscode.package = pkgs.vscode-fhs;
}
\ No newline at end of file
diff --git a/src/apps/personal/zsh.nix b/src/apps/personal/zsh.nix
index 1f1f129..650948a 100644
--- a/src/apps/personal/zsh.nix
+++ b/src/apps/personal/zsh.nix
@@ -1,4 +1,4 @@
-{ config, pkgs, nixpkgs }: {
+{ config, ... }: {
programs.zsh = {
enable = true;
oh-my-zsh = {
diff --git a/src/home.nix b/src/home.nix
index e266584..8a11c25 100644
--- a/src/home.nix
+++ b/src/home.nix
@@ -1,18 +1,12 @@
-{ config, pkgs, nixpkgs }:
+{ pkgs, lib, ... }:
let
variables = import ./common/variables.nix;
- personalPackages = let
- toPkg = file: {
- name = builtins.replaceStrings [ ".nix" ] [ "" ] file;
- value = "./apps/personal/${file}";
- };
- in pkgs.lib.mapAttrs' toPkg (builtins.readDir (./. + "/apps/personal/"));
+ personalPackages = import ./utils/nixFilesIn.nix lib ./apps/personal;
+ overlays = import ./utils/nixFilesIn.nix lib ./apps/personal/overlays;
in {
- import = personalPackages;
+ imports = personalPackages;
- nixpkgs.overlays = [
- (import ./overlays/anytype.nix)
- ];
+ nixpkgs.overlays = map (f: import f) overlays;
home.packages = with pkgs; [ # New apps should be on new lines
anytype
@@ -28,15 +22,11 @@
file
nur.repos.kira-bruneau.rofi-wayland
rofimoji
- anytype-latest
htop
hue-cli
zip
- mindustry-alpha-wayland
element
tdesktop
]; # Use *only* for packages that need no configuration;
# other packages should go in ./apps/personal/
-
- home.stateVersion = variables.stateVersion;
}
\ No newline at end of file
diff --git a/src/utils/nixFilesIn.nix b/src/utils/nixFilesIn.nix
new file mode 100644
index 0000000..b5340bd
--- /dev/null
+++ b/src/utils/nixFilesIn.nix
@@ -0,0 +1,2 @@
+# Modified from http://chriswarbo.net/projects/nixos/useful_hacks.html
+lib: dir: map (name: dir + "/${name}") (lib.attrNames (lib.filterAttrs (name: _: lib.hasSuffix ".nix" name) (builtins.readDir dir)))