Skip to content

Commit

Permalink
Improve nix codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Sigmanificient committed Sep 23, 2023
1 parent 6771cc3 commit 2a2a524
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 23 deletions.
3 changes: 1 addition & 2 deletions config/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ hostname }:
{ config, pkgs, ... }:
{ hostname, pkgs, ... }:
{
imports =
[
Expand Down
20 changes: 11 additions & 9 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@

home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${username} = import ./home;
home-manager.extraSpecialArgs = {
inherit ecsls;
conf = { inherit username system; };
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.${username} = import ./home;
extraSpecialArgs = {
inherit username system ecsls;
};
};
}

Expand All @@ -64,8 +65,9 @@
Bacon = nixpkgs.lib.nixosSystem {
inherit system;

specialArgs = { hostname = "Bacon"; };
modules = default_modules ++ [
(import ./config { hostname = "Bacon"; })
./config
./hardware/bacon.nix

nixos-hardware.nixosModules.asus-battery
Expand All @@ -77,11 +79,11 @@

Sigmachine = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { hostname = "Sigmachine"; };

modules = default_modules ++ [
(import ./config { hostname = "Sigmachine"; })
./config
./hardware/sigmachine.nix
# ./config/github_runner.nix
./config/sigmachine.nix
];
};
Expand Down
21 changes: 11 additions & 10 deletions home/default.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{ pkgs, conf, ecsls, ... }:
{ pkgs, username, ... }:
{
nixpkgs.config.allowUnfree = true;

imports = [
(import ./nvim { inherit ecsls pkgs conf; })
./nvim

./bash
./btop
Expand All @@ -26,15 +26,20 @@
];

home = {
username = "${conf.username}";
homeDirectory = "/home/${conf.username}";
inherit username;
homeDirectory = "/home/${username}";

stateVersion = "22.11";
sessionVariables = {
EDITOR = pkgs.nano;
};

packages = with pkgs; [
packages = with pkgs; let
vencord = (discord.override {
withOpenASAR = true;
withVencord = true;
});
in [
# settings
arandr
brightnessctl
Expand All @@ -46,13 +51,9 @@
pavucontrol

# messaging
(discord.override {
withOpenASAR = true;
withVencord = true;
})

teams
tdesktop
vencord

# dev
gnumake
Expand Down
4 changes: 2 additions & 2 deletions home/nvim/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, ecsls, conf, ... }:
{ pkgs, ecsls, system, ... }:
{
home.file.nvim_conf = {
source = ./lua;
Expand All @@ -25,7 +25,7 @@
llvmPackages_latest.clang
nodejs # Copilot
xclip # Clipboard fix
ecsls.packages.${conf.system}.default
ecsls.packages.${system}.default
];

};
Expand Down

0 comments on commit 2a2a524

Please sign in to comment.