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

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, pkgs,
homeDirectory, homeDirectory,
...
}: { }: {
gpg-agent = { services.darkman = {
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 = {
enable = true; enable = true;
package = pkgs.buildGoModule rec { package = pkgs.buildGoModule rec {
pname = "darkman"; pname = "darkman";

View File

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

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