1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-30 11:37:44 +00:00
This commit is contained in:
RGBCube 2023-05-10 21:20:32 +03:00
parent 537deded95
commit a36664a390
6 changed files with 17 additions and 37 deletions

4
.gitignore vendored
View file

@ -5,7 +5,6 @@
!machines/asus/docker/
!machines/asus/git/
!machines/asus/neovim/
!machines/asus/neovim/config/
!machines/asus/neovim/nvchad/
!machines/asus/networkmanager/
!machines/asus/nixpkgs/
@ -15,9 +14,6 @@
!machines/asus/system/
!machines/asus/xserver/
!packages/
!packages/nvchad/
!flake.lock
!.editorconfig
!.gitignore

View file

@ -43,26 +43,24 @@
system = hostPlatform;
config.allowUnfree = true;
overlays = [fenix.overlays.default];
overlays = [
fenix.overlays.default
];
};
# Helper functiona for DRY.
# Helper function for DRY.
homeManagerConfiguration = userName: attrs: {
home-manager.users.${userName} = attrs;
};
homeManagerConfigurationWithArgs = userName: attrsFunc: {
home-manager.users.${userName} = args: attrsFunc args;
};
# Q: Can't we just do "./foo" ?
# Q: Can't we just do supply a relative path "./foo" ?
# A: When configuring our system with flakes, Nix copies them to the
# Nix store to run them. So we can't use relative paths as they will refer
# to a file which is in the Nix store, and is immutable because it is in
# the Nix store, which beats the point of abusing Home Managers
# mkOutOfStoreSymlink to create symlinks to mutable files.
# To avoid this, we must give an absolute path to a file,
# so we do this. The $PWD is replaced by the rebuild script
# so we do this. The @pwd@ here is replaced by the rebuild script
# with the working directory, then changed back after the build.
# And yes, this is a major hack.
projectPath = "@pwd@";
@ -90,6 +88,6 @@
};
builtins.foldl' nixpkgs.lib.recursiveUpdate {} (builtins.map importConfiguration [
./machines/asus # HACK: Use a function to list the directory.
./machines/asus
]);
}

View file

@ -1 +0,0 @@
-- TODO

View file

@ -1,14 +1,18 @@
{ pkgs, lib, homeManagerConfigurationWithArgs, projectPath, ... }:
{ pkgs, lib, homeManagerConfiguration, projectPath, ... }:
{
# Nuking nano out of orbit.
environment.defaultPackages = [];
programs.nano.syntaxHighlight = false;
environment.systemPackages = with pkgs; [
neovim-qt
];
}
//
(homeManagerConfigurationWithArgs "nixos" ({ config, ... }: {
(homeManagerConfiguration "nixos" ({ config, ... }: {
programs.neovim.enable = true;
programs.neovim = {
# Does not work with Nushell for some reason, I just set it manually.

View file

@ -11,7 +11,6 @@ pkgs: with pkgs; []
]
++ [ # EDITORS
neovim-qt
jetbrains.idea-ultimate
]
@ -19,6 +18,10 @@ pkgs: with pkgs; []
wine
]
++ [ # FIRMWARE
linux-firmware
]
++ [ # GAMES
openttd
]

View file

@ -1,20 +0,0 @@
{ stdenvNoCC, fetchFromGitHub, ...}:
stdenvNoCC.mkDerivation rec {
name = "nvchad";
version = "2.0";
src = fetchFromGitHub {
owner = "NvChad";
repo = "NvChad";
rev = "refs/heads/v${version}";
sha256 = "sha256-bfDNMy4pjdSwYAjyhN09fGLJguoooJAQm1nKneCpKcU=";
};
preferLocalBuild = true;
installPhase = ''
mkdir -p $out
cp -r ./ $out
'';
}