refactor: separate home configurations from lite/work to full/main
This commit is contained in:
@@ -8,16 +8,6 @@
|
|||||||
./secrets.nix
|
./secrets.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Users
|
|
||||||
users.users."guz" = {
|
|
||||||
useDefaultShell = true;
|
|
||||||
isNormalUser = true;
|
|
||||||
|
|
||||||
hashedPasswordFile = builtins.toString config.sops.secrets."guz/password".path;
|
|
||||||
extraGroups = ["wheel" "guz"];
|
|
||||||
};
|
|
||||||
users.groups."guz" = {};
|
|
||||||
|
|
||||||
# GnuPG keyring
|
# GnuPG keyring
|
||||||
programs.gnupg.agent = {
|
programs.gnupg.agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
21
flake.nix
21
flake.nix
@@ -52,7 +52,7 @@
|
|||||||
# Home manager NixOS module
|
# Home manager NixOS module
|
||||||
homeNixOSModules = [
|
homeNixOSModules = [
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
./home.nix
|
./colors.nix
|
||||||
];
|
];
|
||||||
in {
|
in {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
@@ -62,7 +62,8 @@
|
|||||||
homeNixOSModules
|
homeNixOSModules
|
||||||
++ [
|
++ [
|
||||||
./hosts/battleship/configuration.nix
|
./hosts/battleship/configuration.nix
|
||||||
./hosts/battleship/home.nix
|
inputs.stylix.nixosModules.stylix
|
||||||
|
./home/guz/configuration.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
"fighter" = nixpkgs.lib.nixosSystem {
|
"fighter" = nixpkgs.lib.nixosSystem {
|
||||||
@@ -71,18 +72,30 @@
|
|||||||
homeNixOSModules
|
homeNixOSModules
|
||||||
++ [
|
++ [
|
||||||
./hosts/fighter/configuration.nix
|
./hosts/fighter/configuration.nix
|
||||||
./hosts/fighter/home.nix
|
inputs.stylix.nixosModules.stylix
|
||||||
|
./home/guz-lite/configuration.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
|
"guz-lite" = home-manager.lib.homeManagerConfiguration {
|
||||||
|
extraSpecialArgs = {inherit inputs self;};
|
||||||
|
modules = [
|
||||||
|
inputs.stylix.homeManagerModules.stylix
|
||||||
|
./colors.nix
|
||||||
|
inputs.xremap.homeManagerModules.default
|
||||||
|
./home/guz-lite
|
||||||
|
];
|
||||||
|
pkgs = import nixpkgs {system = "x86_64-linux";};
|
||||||
|
};
|
||||||
"guz" = home-manager.lib.homeManagerConfiguration {
|
"guz" = home-manager.lib.homeManagerConfiguration {
|
||||||
extraSpecialArgs = {inherit inputs self;};
|
extraSpecialArgs = {inherit inputs self;};
|
||||||
modules = [
|
modules = [
|
||||||
inputs.stylix.homeManagerModules.stylix
|
inputs.stylix.homeManagerModules.stylix
|
||||||
./colors.nix
|
./colors.nix
|
||||||
./home
|
inputs.xremap.homeManagerModules.default
|
||||||
|
./home/guz
|
||||||
];
|
];
|
||||||
pkgs = import nixpkgs {system = "x86_64-linux";};
|
pkgs = import nixpkgs {system = "x86_64-linux";};
|
||||||
};
|
};
|
||||||
|
|||||||
22
home.nix
22
home.nix
@@ -1,22 +0,0 @@
|
|||||||
{
|
|
||||||
inputs,
|
|
||||||
pkgs,
|
|
||||||
self,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
# Home-manager configurations for when it is used as a NixOS module.
|
|
||||||
imports = [
|
|
||||||
inputs.stylix.nixosModules.stylix
|
|
||||||
./colors.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.backupFileExtension = "bkp";
|
|
||||||
home-manager.extraSpecialArgs = {inherit inputs self;};
|
|
||||||
home-manager.users.guz = import ./home;
|
|
||||||
|
|
||||||
programs.zsh.enable = true;
|
|
||||||
users.users."guz".shell = pkgs.zsh;
|
|
||||||
|
|
||||||
}
|
|
||||||
47
home/guz-lite/apps.nix
Normal file
47
home/guz-lite/apps.nix
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
xdg.mimeApps.enable = true;
|
||||||
|
xdg.mimeApps.defaultApplications = let
|
||||||
|
browser = "zen.desktop";
|
||||||
|
email = "thunderbird.desktop";
|
||||||
|
in {
|
||||||
|
"text/html" = browser;
|
||||||
|
"x-scheme-handler/http" = browser;
|
||||||
|
"x-scheme-handler/https" = browser;
|
||||||
|
"x-scheme-handler/about" = browser;
|
||||||
|
"x-scheme-handler/unknown" = browser;
|
||||||
|
|
||||||
|
"message/rfc822" = email;
|
||||||
|
"x-scheme-handler/mailto" = email;
|
||||||
|
"text/calendar" = email;
|
||||||
|
"text/x-vcard" = email;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Zen Browser (Main browser)
|
||||||
|
programs.zen-browser.enable = true;
|
||||||
|
|
||||||
|
# Brave (Work browser)
|
||||||
|
programs.chromium.enable = true;
|
||||||
|
programs.chromium.package = pkgs.brave;
|
||||||
|
# programs.chromium.extensions = let
|
||||||
|
# libredirect = builtins.fetchurl {
|
||||||
|
# url = "https://github.com/libredirect/browser_extension/releases/download/v3.1.0/libredirect-3.1.0.crx";
|
||||||
|
# sha256 = "sha256:003q48gzyr282yk1l267myx4ba8dfb656lpxspx2gjhqmfdz9g8b";
|
||||||
|
# };
|
||||||
|
# in [
|
||||||
|
programs.chromium.extensions = [
|
||||||
|
{id = "eimadpbcbfnmbkopoojfekhnkhdbieeh";} # Dark Reader
|
||||||
|
{id = "oldceeleldhonbafppcapldpdifcinji";} # Language Tool
|
||||||
|
# {
|
||||||
|
# id = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; # TODO: Find correct id
|
||||||
|
# version = "3.1.0";
|
||||||
|
# crxPath = libredirect;
|
||||||
|
# } # Libredirect
|
||||||
|
{id = "edibdbjcniadpccecjdfdjjppcpchdlm";} # I still don't care about cookies
|
||||||
|
{id = "dphilobhebphkdjbpfohgikllaljmgbn";} # SimpleLogin
|
||||||
|
{id = "cbghhgpcnddeihccjmnadmkaejncjndb";} # Vencord
|
||||||
|
];
|
||||||
|
|
||||||
|
# Thunderbird (Email client)
|
||||||
|
programs.thunderbird.enable = true;
|
||||||
|
programs.thunderbird.profiles = {};
|
||||||
|
}
|
||||||
32
home/guz-lite/configuration.nix
Normal file
32
home/guz-lite/configuration.nix
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
self,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
# Users
|
||||||
|
users.users."guz" = {
|
||||||
|
useDefaultShell = true;
|
||||||
|
isNormalUser = true;
|
||||||
|
|
||||||
|
hashedPasswordFile = builtins.toString config.sops.secrets."guz/password".path;
|
||||||
|
extraGroups = ["wheel" "guz"];
|
||||||
|
};
|
||||||
|
users.groups."guz" = {};
|
||||||
|
|
||||||
|
# Home-manager configurations for when it is used as a NixOS module.
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.backupFileExtension = "bkp";
|
||||||
|
home-manager.extraSpecialArgs = {inherit inputs self;};
|
||||||
|
home-manager.users.guz = import ./default.nix;
|
||||||
|
|
||||||
|
programs.zsh.enable = true;
|
||||||
|
users.users."guz".shell = pkgs.zsh;
|
||||||
|
|
||||||
|
# Xremap run-as-user
|
||||||
|
hardware.uinput.enable = true;
|
||||||
|
users.groups.uinput.members = ["guz"];
|
||||||
|
users.groups.input.members = ["guz"];
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
|
||||||
lib,
|
lib,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
# Desktop Environment
|
# Desktop Environment
|
||||||
@@ -1,39 +1,4 @@
|
|||||||
{pkgs, ...}: {
|
{pkgs, ...}: {
|
||||||
xdg.mimeApps.enable = true;
|
|
||||||
xdg.mimeApps.defaultApplications = let
|
|
||||||
browser = "zen.desktop";
|
|
||||||
email = "thunderbird.desktop";
|
|
||||||
in {
|
|
||||||
"text/html" = browser;
|
|
||||||
"x-scheme-handler/http" = browser;
|
|
||||||
"x-scheme-handler/https" = browser;
|
|
||||||
"x-scheme-handler/about" = browser;
|
|
||||||
"x-scheme-handler/unknown" = browser;
|
|
||||||
|
|
||||||
"message/rfc822" = email;
|
|
||||||
"x-scheme-handler/mailto" = email;
|
|
||||||
"text/calendar" = email;
|
|
||||||
"text/x-vcard" = email;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Zen Browser (Main browser)
|
|
||||||
programs.zen-browser.enable = true;
|
|
||||||
|
|
||||||
# Brave (Work browser)
|
|
||||||
programs.chromium.enable = true;
|
|
||||||
programs.chromium.package = pkgs.brave;
|
|
||||||
programs.chromium.extensions = [
|
|
||||||
{id = "eimadpbcbfnmbkopoojfekhnkhdbieeh";} # Dark Reader
|
|
||||||
{id = "oldceeleldhonbafppcapldpdifcinji";} # Language Tool
|
|
||||||
{id = "edibdbjcniadpccecjdfdjjppcpchdlm";} # I still don't care about cookies
|
|
||||||
{id = "dphilobhebphkdjbpfohgikllaljmgbn";} # SimpleLogin
|
|
||||||
{id = "cbghhgpcnddeihccjmnadmkaejncjndb";} # Vencord
|
|
||||||
];
|
|
||||||
|
|
||||||
# Thunderbird (Email client)
|
|
||||||
programs.thunderbird.enable = true;
|
|
||||||
programs.thunderbird.profiles = {};
|
|
||||||
|
|
||||||
# Freetube (YouTube client)
|
# Freetube (YouTube client)
|
||||||
programs.freetube.enable = true;
|
programs.freetube.enable = true;
|
||||||
programs.freetube.settings = {
|
programs.freetube.settings = {
|
||||||
9
home/guz/configuration.nix
Normal file
9
home/guz/configuration.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{lib, ...}: {
|
||||||
|
# Home-manager configurations for when it is used as a NixOS module.
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
../guz-lite/configuration.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
home-manager.users.guz = lib.mkForce import ./default.nix;
|
||||||
|
}
|
||||||
17
home/guz/default.nix
Normal file
17
home/guz/default.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{self, ...}: {
|
||||||
|
home.username = "guz";
|
||||||
|
home.homeDirectory = "/home/guz";
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
../guz-lite
|
||||||
|
|
||||||
|
./apps.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# The *state version* indicates which default
|
||||||
|
# settings are in effect and will therefore help avoid breaking
|
||||||
|
# program configurations. Switching to a higher state version
|
||||||
|
# typically requires performing some manual steps, such as data
|
||||||
|
# conversion or moving files.
|
||||||
|
home.stateVersion = "24.11";
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user