mirror of
https://github.com/sadan4/dotfiles.git
synced 2025-06-24 13:17:01 -04:00
really big refactor
This commit is contained in:
parent
1d4904a4c9
commit
375a1b2e89
20 changed files with 188 additions and 151 deletions
|
@ -1,9 +1,35 @@
|
|||
{ ... }:
|
||||
{ pkgs, inputs, ... }:
|
||||
let
|
||||
NAME = "meyer";
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
(import ../modules/networkManager.nix { inherit NAME; })
|
||||
(import ../../systemModules/networkManager.nix { inherit NAME; })
|
||||
(import ../../systemModules/sops.nix { inherit NAME; })
|
||||
(import ../../systemModules/vm.nix { inherit NAME; })
|
||||
(import ../../programs/wireshark.nix { inherit NAME; })
|
||||
];
|
||||
users = {
|
||||
users = {
|
||||
"${NAME}" = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel" # Enable ‘sudo’ for the user.
|
||||
"audio"
|
||||
"sound"
|
||||
"video"
|
||||
"input"
|
||||
"tty"
|
||||
"plugdev"
|
||||
];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
};
|
||||
};
|
||||
home-manager = {
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
users = {
|
||||
"${NAME}" = import ./home.nix;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
82
common/users/meyer/home.nix
Normal file
82
common/users/meyer/home.nix
Normal file
|
@ -0,0 +1,82 @@
|
|||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
let
|
||||
files = import ../../files.nix { inherit config; };
|
||||
shell = import ../../shell.nix { inherit config pkgs; };
|
||||
pkgTypes = import ../../pkgs.nix { inherit pkgs config; };
|
||||
packages = pkgTypes.dev ++ pkgTypes.gui ++ pkgTypes.general ++ pkgTypes.scripts ++ pkgTypes.gaming;
|
||||
in
|
||||
{
|
||||
nixpkgs.config.allowInsecurePredicate = (pkg: true);
|
||||
imports = [
|
||||
../homeModules/flameshot.nix
|
||||
../homeModules/arrpc.nix
|
||||
../homeModules/zsh.nix
|
||||
../homeModules/desktopEntries.nix
|
||||
./sops.nix
|
||||
];
|
||||
programs.java.enable = true;
|
||||
programs.java.package = pkgs.temurin-bin-17;
|
||||
programs.git.enable = true;
|
||||
programs.git.userName = "sadan";
|
||||
programs.git.userEmail = "117494111+sadan4@users.noreply.github.com";
|
||||
programs.git.extraConfig = {
|
||||
gpg.format = "ssh";
|
||||
user = {
|
||||
signingkey = "~/.ssh/id_ed25519";
|
||||
};
|
||||
commit.gpgsign = true;
|
||||
core.autocrlf = "input";
|
||||
pull.rebase = true;
|
||||
push.autoSetupRemote = true;
|
||||
init.defaultBranch = "main";
|
||||
rerere.enabled = true;
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfreePredicate = (pkg: true);
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
# nixpkg.config.allowUnfree = true;
|
||||
# manage.
|
||||
home.username = "meyer";
|
||||
home.homeDirectory = "/home/meyer";
|
||||
|
||||
|
||||
# This value determines the Home Manager release that your configuration is
|
||||
# compatible with. This helps avoid breakage when a new Home Manager release
|
||||
# introduces backwards incompatible changes.
|
||||
#
|
||||
# You should not change this value, even if you update Home Manager. If you do
|
||||
# want to update the value, then make sure to first check the Home Manager
|
||||
# release notes.
|
||||
home.stateVersion = "23.11"; # Please read the comment before changing.
|
||||
# The home.packages option allows you to install Nix packages into your
|
||||
# environment.
|
||||
home = {
|
||||
inherit packages;
|
||||
};
|
||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||
# plain files is through 'home.file'.
|
||||
home.file = files;
|
||||
|
||||
# Home Manager can also manage your environment variables through
|
||||
# 'home.sessionVariables'. If you don't want to manage your shell through Home
|
||||
# Manager then you have to manually source 'hm-session-vars.sh' located at
|
||||
# either
|
||||
#
|
||||
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
# or
|
||||
#
|
||||
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
# or
|
||||
#
|
||||
# /etc/profiles/per-user/meyer/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
home.shellAliases = shell.dev.aliases;
|
||||
home.sessionPath = shell.dev.path;
|
||||
home.sessionVariables = shell.dev.env;
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
}
|
15
common/users/meyer/sops.nix
Normal file
15
common/users/meyer/sops.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ config, inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
];
|
||||
sops = {
|
||||
age.keyFile = "/home/${config.home.username}/.config/sops/age/keys.txt";
|
||||
defaultSopsFile = ../../../secrets.yaml;
|
||||
secrets.hosts = {
|
||||
format = "binary";
|
||||
sopsFile = ../../../secrets/hosts;
|
||||
path = "/home/${config.home.username}/.config/gh/hosts.yml";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue