Skip to content

Commit

Permalink
feat: add back reference home-manager config
Browse files Browse the repository at this point in the history
  • Loading branch information
Swarsel committed Jul 21, 2024
1 parent 36a874e commit 13d11e1
Show file tree
Hide file tree
Showing 4 changed files with 446 additions and 34 deletions.
140 changes: 138 additions & 2 deletions SwarselSystems.org
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,20 @@ Lastly I define some common module lists that I can simply load depending on the

# Home-Manager modules wanted on non-NixOS systems
homeModules = [
({ ... }: { nix.extraOptions = "experimental-features = nix-command flakes"; })
({ inputs, config, ... }: {
nixpkgs = {
overlays = [
(import ./overlays { inherit inputs; }).additions
(import ./overlays { inherit inputs; }).modifications
(import ./overlays { inherit inputs; }).nixpkgs-stable
inputs.nur.overlay
inputs.emacs-overlay.overlay
inputs.nixgl.overlay
];
config.allowUnfree = true;
};
})
inputs.stylix.homeManagerModules.stylix
];

Expand Down Expand Up @@ -717,9 +731,9 @@ In contrast, this defines home-manager systems, which I only have one of.

#+begin_src nix :tangle no :noweb-ref flakehomeconf

"leons@PCisLee" = inputs.home-manager.lib.homeManagerConfiguration {
"swarsel@fedora" = inputs.home-manager.lib.homeManagerConfiguration {
modules = homeModules ++ mixedModules ++ [
./profiles/surface/home.nix
./profiles/home-manager/home.nix
];
};

Expand Down Expand Up @@ -1789,6 +1803,128 @@ in
}

#+end_src

**** Home-manager only

***** Home manager
:PROPERTIES:
:CUSTOM_ID: h:483a26b5-5a40-4417-9ffb-67cc2cf07161
:END:

Special things to note here: We are running xcape to allow =CAPS= to act as =CTRL= and =ESC=. Also we are using =nixGL= in most places.

#+begin_src nix :tangle profile/home-manager/home.nix

{ config, pkgs, lib, fetchFromGitHub, ... }:

{
programs.home-manager.enable = true;
home.username = "swarsel";
home.homeDirectory = "/home/swarsel";

home.stateVersion = "23.05"; # Please read the comment before changing.

stylix.image = ../../wallpaper/surfacewp.png;
<<theme>>

nixpkgs = {
config = {
allowUnfree = true;
allowUnfreePredicate = (_: true);
};
};
services.xcape = {
enable = true;
mapExpression = {
Control_L = "Escape";
};
};
#keyboard config
home.keyboard.layout = "us";

sops.age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/sops" ];

# waybar config
programs.waybar.settings.mainBar.cpu.format = "{icon0} {icon1} {icon2} {icon3}";

programs.waybar.settings.mainBar.temperature.hwmon-path = "/sys/devices/platform/coretemp.0/hwmon/hwmon3/temp3_input";
programs.waybar.settings.mainBar.modules-right = ["custom/outer-left-arrow-dark" "mpris" "custom/left-arrow-light"
"network"
"custom/left-arrow-dark"
"pulseaudio"
"custom/left-arrow-light"
"battery"
"custom/left-arrow-dark"
"temperature"
"custom/left-arrow-light"
"disk"
"custom/left-arrow-dark"
"memory"
"custom/left-arrow-light"
"cpu"
"custom/left-arrow-dark"
"tray"
"custom/left-arrow-light"
"clock#2"
"custom/left-arrow-dark"
"clock#1" ];
services.blueman-applet.enable = true;
home.packages = with pkgs; [
# nixgl.auto.nixGLDefault
evince
# nodejs_20

# messaging
# we use gomuks for RAM preservation, but keep schildi around for files and images
];

programs.zsh.initExtra = "
export GPG_TTY=\"$(tty)\"
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
gpgconf --launch gpg-agent
";

# sway config
wayland.windowManager.sway= {
config = rec {
input = {
"*" = {
xkb_layout = "us";
xkb_options = "ctrl:nocaps,grp:win_space_toggle";
xkb_variant = "altgr-intl";
};
"type:touchpad" = {
dwt = "enabled";
tap = "enabled";
natural_scroll = "enabled";
middle_emulation = "enabled";
};
};

output = {
eDP-1 = {
mode = "2160x1440@59.955Hz";
scale = "1";
bg = "~/.dotfiles/wallpaper/surfacewp.png fill";
};
};

keybindings = let
inherit (config.wayland.windowManager.sway.config) modifier;
in {
};

startup = [
];

};

};
}

#+end_src


**** Threed (Surface Pro 3)
:PROPERTIES:
:CUSTOM_ID: h:7b1a8f91-ef43-433c-ba4c-c5baf50e1de4
Expand Down
18 changes: 16 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,20 @@

# Home-Manager modules wanted on non-NixOS systems
homeModules = [
({ ... }: { nix.extraOptions = "experimental-features = nix-command flakes"; })
({ inputs, config, ... }: {
nixpkgs = {
overlays = [
(import ./overlays { inherit inputs; }).additions
(import ./overlays { inherit inputs; }).modifications
(import ./overlays { inherit inputs; }).nixpkgs-stable
inputs.nur.overlay
inputs.emacs-overlay.overlay
inputs.nixgl.overlay
];
config.allowUnfree = true;
};
})
inputs.stylix.homeManagerModules.stylix
];

Expand Down Expand Up @@ -289,9 +303,9 @@

homeConfigurations = {

"leons@PCisLee" = inputs.home-manager.lib.homeManagerConfiguration {
"swarsel@fedora" = inputs.home-manager.lib.homeManagerConfiguration {
modules = homeModules ++ mixedModules ++ [
./profiles/surface/home.nix
./profiles/home-manager/home.nix
];
};

Expand Down
Loading

0 comments on commit 13d11e1

Please sign in to comment.