diff --git a/SwarselSystems.org b/SwarselSystems.org index 809d5f0..148eab1 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -718,9 +718,10 @@ In contrast, this defines home-manager systems, which I only have one of. #+begin_src nix :tangle no :noweb-ref flakehomeconf "swarsel@home-manager" = inputs.home-manager.lib.homeManagerConfiguration { - pkgs = homepkgs; + pkgs = pkgsFor.x86_64-linux; + extraSpecialArgs = { inherit inputs outputs; }; modules = homeModules ++ mixedModules ++ [ - ./profiles/home-manager/home.nix + ./profiles/home-manager/ ]; }; @@ -1795,77 +1796,28 @@ My old laptop, replaced by a new one, since most basic functions have stopped to #+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 :noweb yes :tangle profiles/home-manager/home.nix - { config, pkgs, ... }: +#+begin_src nix :tangle profiles/home-manager/default.nix + { inputs, outputs, config, pkgs, ... }: { - 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; - <> + imports = [] ++ (builtins.attrValues outputs.homeManagerModules); nixpkgs = { + overlays = outputs.overlays; 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)\" @@ -1873,44 +1825,39 @@ Special things to note here: We are running xcape to allow =CAPS= to act as =CTR 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"; - }; + home-manager.users.swarsel.swarselsystems = { + isLaptop = true; + isNixos = false; + wallpaper = ../../wallpaper/surfacewp.png; + temperatureHwmon = { + isAbsolutePath = true; + path = "/sys/devices/platform/thinkpad_hwmon/hwmon/"; + input-filename = "temp1_input"; + }; + monitors = { + main = { + name = "California Institute of Technology 0x1407 Unknown"; + mode = "1920x1080"; # TEMPLATE + scale = "1"; + position = "2560,0"; + workspace = "2:二"; + output = "eDP-1"; }; - - keybindings = let - inherit (config.wayland.windowManager.sway.config) modifier; - in { + }; + inputs = { + "1:1:AT_Translated_Set_2_keyboard" = { + xkb_layout = "us"; + xkb_options = "grp:win_space_toggle"; + xkb_variant = "altgr-intl"; }; - - startup = [ - ]; - }; - + keybindings = { + }; }; + } + #+end_src **** Threed (Surface Pro 3) diff --git a/flake.nix b/flake.nix index c8c1b96..41475bb 100644 --- a/flake.nix +++ b/flake.nix @@ -306,9 +306,10 @@ homeConfigurations = { "swarsel@home-manager" = inputs.home-manager.lib.homeManagerConfiguration { - pkgs = homepkgs; + pkgs = pkgsFor.x86_64-linux; + extraSpecialArgs = { inherit inputs outputs; }; modules = homeModules ++ mixedModules ++ [ - ./profiles/home-manager/home.nix + ./profiles/home-manager/ ]; }; diff --git a/profiles/fourside/home.nix b/profiles/fourside/home.nix deleted file mode 100644 index 05fe326..0000000 --- a/profiles/fourside/home.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ config, pkgs, lib, ... }: with lib; -{ - - wayland.windowManager.sway = { - config = rec { - # update for actual inputs here, - - # workspaceOutputAssign = [ - # { output = "eDP-1"; workspace = "1:一"; } - # { output = "DP-4"; workspace = "2:二"; } - # ]; - - - - }; - }; -} diff --git a/profiles/fourside/nixos.nix b/profiles/fourside/nixos.nix deleted file mode 100644 index 0990207..0000000 --- a/profiles/fourside/nixos.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ config, pkgs, ... }: - -{ - - - boot = { - loader.systemd-boot.enable = true; - loader.efi.canTouchEfiVariables = true; - # kernelPackages = pkgs.linuxPackages_latest; - }; - - - services.thinkfan = { - enable = false; - }; - services.power-profiles-daemon.enable = true; - services.fwupd.enable = true; - - services.nswitch-rcm = { - enable = true; - package = pkgs.fetchurl { - url = "https://github.com/Atmosphere-NX/Atmosphere/releases/download/1.3.2/fusee.bin"; - hash = "sha256-5AXzNsny45SPLIrvWJA9/JlOCal5l6Y++Cm+RtlJppI="; - }; - }; - - - - -} diff --git a/profiles/home-manager/default.nix b/profiles/home-manager/default.nix new file mode 100644 index 0000000..61def1b --- /dev/null +++ b/profiles/home-manager/default.nix @@ -0,0 +1,55 @@ +{ inputs, outputs, config, pkgs, ... }: +{ + + imports = [ ] ++ (builtins.attrValues outputs.homeManagerModules); + + nixpkgs = { + overlays = outputs.overlays; + config = { + allowUnfree = true; + }; + }; + + services.xcape = { + enable = true; + mapExpression = { + Control_L = "Escape"; + }; + }; + + programs.zsh.initExtra = " +export GPG_TTY=\"$(tty)\" +export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) +gpgconf --launch gpg-agent + "; + + home-manager.users.swarsel.swarselsystems = { + isLaptop = true; + isNixos = false; + wallpaper = ../../wallpaper/surfacewp.png; + temperatureHwmon = { + isAbsolutePath = true; + path = "/sys/devices/platform/thinkpad_hwmon/hwmon/"; + input-filename = "temp1_input"; + }; + monitors = { + main = { + name = "California Institute of Technology 0x1407 Unknown"; + mode = "1920x1080"; # TEMPLATE + scale = "1"; + position = "2560,0"; + workspace = "2:二"; + output = "eDP-1"; + }; + }; + inputs = { + "1:1:AT_Translated_Set_2_keyboard" = { + xkb_layout = "us"; + xkb_options = "grp:win_space_toggle"; + xkb_variant = "altgr-intl"; + }; + }; + keybindings = { }; + }; + +} diff --git a/profiles/home-manager/home.nix b/profiles/home-manager/home.nix deleted file mode 100644 index 5e54b3d..0000000 --- a/profiles/home-manager/home.nix +++ /dev/null @@ -1,155 +0,0 @@ -{ config, pkgs, ... }: - -{ - 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; - - enable = true; - base16Scheme = ../../../wallpaper/swarsel.yaml; - # base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml"; - polarity = "dark"; - opacity.popups = 0.5; - cursor = { - package = pkgs.capitaine-cursors; - name = "capitaine-cursors"; - size = 16; - }; - fonts = { - sizes = { - terminal = 10; - applications = 11; - }; - serif = { - # package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; }); - package = pkgs.cantarell-fonts; - # package = pkgs.montserrat; - name = "Cantarell"; - # name = "FiraCode Nerd Font Propo"; - # name = "Montserrat"; - }; - - sansSerif = { - # package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; }); - package = pkgs.cantarell-fonts; - # package = pkgs.montserrat; - name = "Cantarell"; - # name = "FiraCode Nerd Font Propo"; - # name = "Montserrat"; - }; - - monospace = { - package = pkgs.nerdfonts.override { fonts = [ "FiraCode" ]; }; - name = "FiraCode Nerd Font Mono"; - }; - - emoji = { - package = pkgs.noto-fonts-emoji; - name = "Noto Color Emoji"; - }; - }; - - - 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 = [ - ]; - - }; - - }; -}