feat: start using config'

This commit is contained in:
jacekpoz 2023-09-09 00:05:59 +02:00
parent cdafce17bc
commit 7cc1348cbb
No known key found for this signature in database
GPG key ID: 94E812A8B12AAE3C
7 changed files with 40 additions and 48 deletions

View file

@ -1,7 +1,7 @@
{
pkgs,
hostname,
username,
config',
...
}: {
# fuck broadcom
@ -21,7 +21,7 @@
];
trusted-users = [
"root"
username
config'.username
];
};
@ -34,7 +34,7 @@
nix-direnv.enable = true;
};
users.users.${username} = {
users.users.${config'.username} = {
isNormalUser = true;
extraGroups = [ "wheel" "docker" ];
shell = pkgs.zsh;

View file

@ -3,19 +3,14 @@
inputs,
pkgs,
self,
username,
config',
...
}: let
mkNixPak = inputs.nixpak.lib.nixpak {
inherit (pkgs) lib;
inherit pkgs;
};
in {
}: {
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
extraSpecialArgs = {inherit inputs self mkNixPak;};
users.${username} = {
extraSpecialArgs = {inherit inputs self config';};
users.${config'.username} = {
imports = [
inputs.neovim-flake.homeManagerModules.default
../../modules/cli/starship.nix
@ -33,8 +28,8 @@ in {
};
home = {
inherit username;
homeDirectory = "/home/${username}";
inherit (config') username;
homeDirectory = "/home/${config'.username}";
packages = let
fenix = inputs.fenix.packages.${pkgs.system};
in with pkgs; [

View file

@ -5,33 +5,35 @@
}: let
inherit (inputs) self;
inherit (inputs.home-manager.nixosModules) home-manager;
laptopHostname = "niks";
serverHostname = "chmura";
dupa = "dupa";
in {
${laptopHostname} = lib.nixosSystem {
niks = lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit lib inputs self;
hostname = laptopHostname;
username = "jacek";
inherit lib inputs self dupa;
config' = {
hostname = "niks";
username = "jacek";
gtk-theme = "Catppuccin-Mocha-Standard-Green-dark";
};
};
modules = [
./${laptopHostname}
home-manager
./niks
inputs.home-manager.nixosModules.home-manager
];
};
${serverHostname} = lib.nixosSystem {
chmura = lib.nixosSystem {
system = "x86_86-linux";
specialArgs = {
inherit lib inputs self;
hostname = serverHostname;
username = "chmura";
config' = {
hostname = "chmura";
username = "chmura";
};
};
modules = [
./${serverHostname}
home-manager
./chmura
inputs.home-manager.nixosModules.home-manager
];
};
}

View file

@ -3,8 +3,7 @@
pkgs,
lib,
inputs,
hostname,
username,
config',
...
}: {
nixpkgs = {
@ -63,7 +62,7 @@
};
networking = {
hostName = hostname;
hostName = config'.hostname;
networkmanager.enable = true;
firewall.checkReversePath = "loose";
};
@ -139,7 +138,7 @@
noto-fonts-emoji
];
users.users.${username} = {
users.users.${config'.username} = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "libvirtd" ];
shell = pkgs.zsh;

View file

@ -1,7 +1,7 @@
{
inputs,
pkgs,
username,
config',
...
}: let
greeter = "gtkgreet";
@ -18,7 +18,7 @@ in {
enable = true;
settings.default_session = {
command = "${inputs.hyprland.packages.${pkgs.system}.hyprland}/bin/Hyprland --config ${hyprlandConfig}";
user = username;
user = config'.username;
};
};

View file

@ -3,19 +3,14 @@
inputs,
pkgs,
self,
username,
config',
...
}: let
mkNixPak = inputs.nixpak.lib.nixpak {
inherit (pkgs) lib;
inherit pkgs;
};
in {
}: {
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
extraSpecialArgs = {inherit inputs self mkNixPak;};
users.${username} = {
extraSpecialArgs = {inherit inputs self config';};
users.${config'.username} = {
imports = [
inputs.hyprland.homeManagerModules.default
inputs.anyrun.homeManagerModules.default
@ -36,8 +31,8 @@ in {
};
home = {
inherit username;
homeDirectory = "/home/${username}";
inherit (config') username;
homeDirectory = "/home/${config'.username}";
packages = let
hyprcontrib = inputs.hyprcontrib.packages.${pkgs.system};
shadower = inputs.shadower.packages.${pkgs.system};

View file

@ -1,12 +1,13 @@
{
config,
pkgs,
config',
...
}: {
gtk = {
enable = true;
theme = {
name = "Catppuccin-Mocha-Standard-Green-dark";
name = config'.gtk-theme;
package = pkgs.catppuccin-gtk.override {
size = "standard";
accents = [ "green" ];
@ -24,7 +25,7 @@
};
home = {
sessionVariables = {
GTK_THEME = "${config.gtk.theme.name}";
GTK_THEME = config.gtk.theme.name;
GTK_USE_PORTAL = "1";
};