Compare commits
4 Commits
f329f8b501
...
44ce54628e
| Author | SHA1 | Date |
|---|---|---|
|
|
44ce54628e | |
|
|
893fad3b9c | |
|
|
50b6262b06 | |
|
|
f5e578c184 |
13
flake.nix
13
flake.nix
|
|
@ -41,11 +41,17 @@
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
home-manager,
|
home-manager,
|
||||||
install-system,
|
install-system,
|
||||||
|
nix-vscode-extensions,
|
||||||
stylix,
|
stylix,
|
||||||
...
|
...
|
||||||
}@inputs:
|
}@inputs:
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
overlays = [ nix-vscode-extensions.overlays.default ];
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
|
|
@ -53,7 +59,6 @@
|
||||||
host = "laptop";
|
host = "laptop";
|
||||||
profile = "desktop";
|
profile = "desktop";
|
||||||
username = "josh";
|
username = "josh";
|
||||||
gpgSigningKey = "0x530DA0331EFE99F5";
|
|
||||||
in nixpkgs.lib.nixosSystem {
|
in nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
|
|
@ -61,8 +66,8 @@
|
||||||
inherit host;
|
inherit host;
|
||||||
inherit profile;
|
inherit profile;
|
||||||
inherit username;
|
inherit username;
|
||||||
inherit gpgSigningKey;
|
|
||||||
};
|
};
|
||||||
|
pkgs = pkgs;
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/${host}
|
./hosts/${host}
|
||||||
];
|
];
|
||||||
|
|
@ -80,6 +85,7 @@
|
||||||
inherit profile;
|
inherit profile;
|
||||||
inherit username;
|
inherit username;
|
||||||
};
|
};
|
||||||
|
pkgs = pkgs;
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/${host}
|
./hosts/${host}
|
||||||
];
|
];
|
||||||
|
|
@ -97,6 +103,7 @@
|
||||||
inherit profile;
|
inherit profile;
|
||||||
inherit username;
|
inherit username;
|
||||||
};
|
};
|
||||||
|
pkgs = pkgs;
|
||||||
modules = [
|
modules = [
|
||||||
(nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix")
|
(nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix")
|
||||||
{ environment.systemPackages = [ install-system.packages.${system}.default ]; }
|
{ environment.systemPackages = [ install-system.packages.${system}.default ]; }
|
||||||
|
|
@ -114,7 +121,7 @@
|
||||||
inherit profile;
|
inherit profile;
|
||||||
inherit username;
|
inherit username;
|
||||||
};
|
};
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = pkgs;
|
||||||
modules = [
|
modules = [
|
||||||
./homes/josh/home.nix
|
./homes/josh/home.nix
|
||||||
stylix.homeModules.stylix
|
stylix.homeModules.stylix
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
gpgSigningKey,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
profile,
|
profile,
|
||||||
|
|
@ -25,6 +27,23 @@ with lib;
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
user = {
|
||||||
|
name = "Joshua Yuen";
|
||||||
|
email = "joshuayuen99@gmail.com";
|
||||||
|
# We need to do this to pass through the (optional) signing key from the hosts/* file
|
||||||
|
signingkey = if gpgSigningKey != "" then gpgSigningKey else config.modules.gpg.signingKey;
|
||||||
|
};
|
||||||
|
commit.gpgsign = true;
|
||||||
|
init.defaultBranch = "main";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable GPG-agent for git signing
|
||||||
|
modules.gpg.enable = true;
|
||||||
|
|
||||||
# Let Home Manager install and manage itself
|
# Let Home Manager install and manage itself
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,4 +12,6 @@
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
./host-packages.nix
|
./host-packages.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
modules.gpg.signingKey = "0x530DA0331EFE99F5";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ in
|
||||||
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
useGlobalPkgs = false;
|
useGlobalPkgs = true;
|
||||||
backupFileExtension = "backup";
|
backupFileExtension = "backup";
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit
|
inherit
|
||||||
|
|
@ -24,6 +24,7 @@ in
|
||||||
profile
|
profile
|
||||||
username
|
username
|
||||||
;
|
;
|
||||||
|
gpgSigningKey = config.modules.gpg.signingKey;
|
||||||
};
|
};
|
||||||
users.${username} = {
|
users.${username} = {
|
||||||
imports = [ ../../homes/${username}/home.nix ];
|
imports = [ ../../homes/${username}/home.nix ];
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,12 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./direnv.nix
|
./direnv.nix
|
||||||
|
./discord.nix
|
||||||
./firefox.nix
|
./firefox.nix
|
||||||
|
./gpg.nix
|
||||||
./fzf.nix
|
./fzf.nix
|
||||||
./hyprland
|
./hyprland
|
||||||
./kitty.nix
|
./kitty.nix
|
||||||
./overlays.nix
|
|
||||||
./stylix.nix
|
./stylix.nix
|
||||||
./vscodium.nix
|
./vscodium.nix
|
||||||
./walker.nix
|
./walker.nix
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.modules.discord;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
programs.discord = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.discord;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.modules.gpg;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services = {
|
||||||
|
gpg-agent = {
|
||||||
|
enable = true;
|
||||||
|
enableSshSupport = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
pinentry.package = pkgs.pinentry-qt;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = [ pkgs.gnupg ];
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
gpg = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
nixpkgs = {
|
|
||||||
overlays = [
|
|
||||||
inputs.nix-vscode-extensions.overlays.default
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -24,6 +24,7 @@
|
||||||
redhat.ansible
|
redhat.ansible
|
||||||
redhat.vscode-yaml
|
redhat.vscode-yaml
|
||||||
rvest.vs-code-prettier-eslint
|
rvest.vs-code-prettier-eslint
|
||||||
|
vscodevim.vim
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,9 @@
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./discord.nix
|
||||||
./displayManager.nix
|
./displayManager.nix
|
||||||
|
./gpg.nix
|
||||||
./hyprland.nix
|
./hyprland.nix
|
||||||
./localsend.nix
|
./localsend.nix
|
||||||
./pipewire.nix
|
./pipewire.nix
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
{
|
||||||
|
options.modules.discord = {
|
||||||
|
enable = mkEnableOption {
|
||||||
|
default = false;
|
||||||
|
description = "Enable Discord";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
{
|
||||||
|
options.modules.gpg = {
|
||||||
|
enable = mkEnableOption {
|
||||||
|
default = false;
|
||||||
|
description = "Enable gpg-agent";
|
||||||
|
};
|
||||||
|
|
||||||
|
signingKey = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "";
|
||||||
|
description = "The key ID to sign with for git";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -23,4 +23,6 @@
|
||||||
modules.shell.defaultShell = "zsh";
|
modules.shell.defaultShell = "zsh";
|
||||||
|
|
||||||
modules.pipewire.enable = true;
|
modules.pipewire.enable = true;
|
||||||
|
|
||||||
|
modules.discord.enable = true;
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue