feat: integrate system config

This commit is contained in:
2023-12-23 00:34:40 +01:00
parent f082d6eb65
commit 044e96eda4
140 changed files with 638 additions and 229 deletions

View File

@@ -1,21 +1,15 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
ags = {
url = "github:Aylur/ags";
};
ags.url = "github:Aylur/ags";
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
anyrun = {
url = "github:Kirottu/anyrun";
inputs.nixpkgs.follows = "nixpkgs";
@@ -29,38 +23,68 @@
nixvim,
anyrun,
...
}: let
username = "theaninova";
system = "x86_64-linux";
stateVersion = "23.11";
} @ inputs: let
inherit (nixpkgs.lib) genAttrs listToAttrs;
eachSystem = genAttrs ["x86_64-linux"];
legacyPackages = eachSystem (system:
import nixpkgs {
inherit system;
config = {
allowUnfree = true;
allowUnsupportedSystem = true;
experimental-features = "nix-command flakes";
};
overlays = [
(final: prev: {anyrunPlugins = anyrun.packages.${prev.system};})
];
});
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [
(final: prev: {anyrunPlugins = anyrun.packages.${prev.system};})
];
};
mkHome = {
username,
desktop,
system,
}:
home-manager.lib.homeManagerConfiguration rec {
homeDirectory = "/home/${username}";
modules = [
ags.homeManagerModules.default
nixvim.homeManagerModules.nixvim
anyrun.homeManagerModules.default
./home/packages
./home/programs
./home/services
./home/desktops/${desktop}
];
pkgs = legacyPackages.${system};
};
homeDirPrefix =
if pkgs.stdenv.hostPlatform.isDarwin
then "/Users"
else "/home";
homeDirectory = "${homeDirPrefix}/${username}";
home = import ./home.nix {
inherit homeDirectory pkgs stateVersion system username;
};
mkHost = {
hostname,
system,
stateVersion,
}:
nixpkgs.lib.nixosSystem {
pkgs = legacyPackages.${system};
modules = [
./modules/nixos/hid-fanatecff
./hosts/${hostname}
{
networking.hostName = hostname;
system.stateVersion = stateVersion;
}
];
specialArgs = inputs;
};
in {
homeConfigurations.theaninova = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
homeConfigurations.theaninova = mkHome {
username = "theaninova";
desktop = "hyprland";
};
modules = [
ags.homeManagerModules.default
nixvim.homeManagerModules.nixvim
anyrun.homeManagerModules.default
home
];
nixosConfigurations.MONSTER = mkHost {
hostname = "MONSTER";
system = "x86_64-linux";
stateVersion = "23.05";
};
};
}

View File

@@ -1,36 +0,0 @@
{
homeDirectory,
pkgs,
stateVersion,
system,
username,
}: let
packages = import ./packages.nix {inherit pkgs;};
in {
imports = [./desktops/hyprland/hyprland.nix];
home = {
inherit homeDirectory packages stateVersion username;
shellAliases = {
reload-home-manager-config = "home-manager switch --flake ${homeDirectory}/.config/home-manager";
};
keyboard = {
layout = "us";
variant = "altgr-intl";
};
};
nixpkgs = {
config = {
inherit system;
allowUnfree = true;
allowUnsupportedSystem = true;
experimental-features = "nix-command flakes";
};
};
programs = import ./programs.nix {inherit pkgs;};
services = import ./services.nix {inherit pkgs homeDirectory;};
}

2
home/default.nix Normal file
View File

@@ -0,0 +1,2 @@
{...}: {
}

View File

@@ -1,17 +1,9 @@
{
pkgs,
homeDirectory,
...
}: {
gpg-agent = {
enable = true;
enableSshSupport = true;
pinentryFlavor = "gnome3";
};
# fix pinentry on non-gnome with this in
# the system config: services.dbus.packages = with pkgs; [ gcr ];
gnome-keyring.enable = true;
darkman = {
services.darkman = {
enable = true;
package = pkgs.buildGoModule rec {
pname = "darkman";

View File

@@ -3,6 +3,10 @@
pkgs,
...
}: {
imports = [
./darkman.nix
];
wayland.windowManager.hyprland = {
enable = true;
enableNvidiaPatches = true;
@@ -46,6 +50,7 @@
input = {
accel_profile = "flat";
kb_layout = "cc1-thea";
# kb_options = "grp:alt_shift_toggle";
numlock_by_default = true;
};
bind = import ./keybinds.nix;

Some files were not shown because too many files have changed in this diff Show More