chore: re-organize

Signed-off-by: jolheiser <john.olheiser@gmail.com>
teamcity
jolheiser 2023-08-31 23:09:18 -05:00
parent d7795d2481
commit de45aa148e
Signed by: jolheiser
GPG Key ID: B853ADA5DA7BBF7A
40 changed files with 54 additions and 81 deletions

View File

@ -1,2 +1,2 @@
"apps/firefox/work.nix":
"apps/gui/firefox/work.nix":
- age105cm5awxxegyrqthh4vhnxzr0tdy86q8uq52wkkjacfkutp2vprqwseak7

2
.gitattributes vendored
View File

@ -1 +1 @@
apps/firefox/work.nix filter=git-age diff=git-age
apps/gui/firefox/work.nix filter=git-age diff=git-age

Binary file not shown.

View File

@ -1,9 +1,7 @@
{pkgs, ...}: {
imports = [
./common.nix
../nogui
./firefox.nix
./go.nix
./gtk.nix
./spotifyd.nix
./tiny.nix
@ -18,23 +16,21 @@
spotify-tui
# LSPs
gopls
lua-language-server
marksman
nodePackages.yaml-language-server
# Formatters
alejandra
nodePackages.lua-fmt
python3Packages.black
# IDEs
jetbrains.goland
# Personal NUR
nur.repos.jolheiser.git-age
nur.repos.jolheiser.gomodinit
nur.repos.jolheiser.imp
nur.repos.jolheiser.kv
nur.repos.jolheiser.tclip
nur.repos.jolheiser.tmpl
];
};

Binary file not shown.

View File

@ -8,8 +8,9 @@
./bottom.nix
./exa.nix
./fzf.nix
./gpg.nix
./git.nix
./go.nix
./gpg.nix
./helix.nix
./jq.nix
./lazygit.nix
@ -29,12 +30,19 @@
fd
just
ripgrep
usql
# LSPs
gopls
nil
# Formatters
alejandra
gofumpt
# Personal NUR
nur.repos.jolheiser.git-age
nur.repos.jolheiser.tclip
];
activation.report-changes = config.lib.dag.entryAnywhere ''
${pkgs.nvd}/bin/nvd --nix-bin-dir=${pkgs.nix}/bin diff $oldGenPath $newGenPath

View File

@ -36,7 +36,7 @@
};
};
};
commonConfig = {server ? false}: {
commonConfig = {gui ? true}: {
config,
pkgs,
...
@ -46,33 +46,26 @@
owner = username;
};
in {
config =
{
nixpkgs.overlays = [overlays];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.${username}.imports =
if !server
then [./apps]
else [./apps/common.nix];
extraSpecialArgs = {
flakePath = "/home/${username}/.config/nixpkgs";
};
config = {
nixpkgs.overlays = [overlays];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.${username}.imports =
if gui
then [./apps/gui]
else [./apps/nogui];
extraSpecialArgs = {
flakePath = "/home/${username}/.config/nixpkgs";
};
}
// (
if !server
then {
age.secrets = {
ssh-config = userSecret ./secrets/shared/ssh-config.age;
ssh-config-work = userSecret ./secrets/shared/ssh-config-work.age;
spotify-pw = userSecret ./secrets/shared/spotify-pw.age;
irc-pw = userSecret ./secrets/shared/irc-pw.age;
};
}
else {}
);
};
age.secrets = {
ssh-config = userSecret ./secrets/shared/ssh-config.age;
ssh-config-work = userSecret ./secrets/shared/ssh-config-work.age;
spotify-pw = userSecret ./secrets/shared/spotify-pw.age;
irc-pw = userSecret ./secrets/shared/irc-pw.age;
};
};
};
username = "jolheiser";
in
@ -83,9 +76,8 @@
modules = [
home-manager.nixosModules.home-manager
agenix.nixosModules.default
./machines/common
./machines/chai
commonConfig
(commonConfig {})
({pkgs, ...}: {
config = {
nixpkgs.overlays = [
@ -95,7 +87,7 @@
];
home-manager.users.${username}.programs = {
git.package = pkgs.gitSVN;
firefox.profiles.default.bookmarks = [(import ./apps/firefox/work.nix)];
firefox.profiles.default.bookmarks = [(import ./apps/gui/firefox/work.nix)];
};
age.secrets = {
netrc = {
@ -118,17 +110,17 @@
modules = [
home-manager.nixosModules.home-manager
agenix.nixosModules.default
./machines/common
./machines/matcha
commonConfig
(commonConfig {})
];
};
"dragonwell" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
home-manager.nixosModules.home-manager
agenix.nixosModules.default
./machines/dragonwell
(commonConfig {server = true;})
(commonConfig {gui = false;})
];
};
};

View File

@ -1,7 +1,7 @@
{pkgs, ...}: let
username = "jolheiser";
in {
imports = [./hardware.nix ../common];
imports = [./hardware.nix ../common/gui];
boot = {
kernelPackages = pkgs.linuxPackages_latest;

View File

@ -1,4 +1,6 @@
{
{pkgs, ...}: {
imports = [../nogui];
sound.enable = true;
hardware.pulseaudio.enable = false;
security = {rtkit.enable = true;};
@ -9,4 +11,12 @@
alsa.enable = true;
};
};
services.xserver = {
enable = true;
displayManager.lightdm.enable = true;
desktopManager.cinnamon.enable = true;
layout = "us";
xkbVariant = "";
};
}

View File

@ -1,6 +1,4 @@
{pkgs, ...}: {
imports = [./sound.nix ./xserver.nix];
console.colors = [
"1e1e2e"
"585b70"

View File

@ -1,9 +0,0 @@
{pkgs, ...}: {
services.xserver = {
enable = true;
displayManager.lightdm.enable = true;
desktopManager.cinnamon.enable = true;
layout = "us";
xkbVariant = "";
};
}

View File

@ -1,26 +1,7 @@
{pkgs, ...}: let
username = "jolheiser";
in {
imports = [./hardware.nix];
nixpkgs.config.allowUnfree = true;
nix = {
gc.automatic = true;
package = pkgs.nixVersions.nix_2_15;
settings = {
experimental-features = ["flakes" "nix-command" "repl-flake"];
auto-optimise-store = true;
warn-dirty = false;
};
};
system.activationScripts.diff = {
supportsDryActivation = true;
text = ''
${pkgs.nvd}/bin/nvd --nix-bin-dir=${pkgs.nix}/bin diff /run/current-system "$systemConfig"
'';
};
imports = [./hardware.nix ../common/nogui];
boot.tmp.cleanOnBoot = true;
zramSwap.enable = true;
@ -32,10 +13,7 @@ in {
};
services = {
openssh = {
enable = true;
};
openssh.enable = true;
tailscale.enable = true;
};

View File

@ -1,7 +1,7 @@
{pkgs, ...}: let
username = "jolheiser";
in {
imports = [./hardware.nix ../common];
imports = [./hardware.nix ../common/gui];
boot = {
kernelPackages = pkgs.linuxPackages_latest;