diff options
Diffstat (limited to 'hosts/local/p16')
| -rw-r--r-- | hosts/local/p16/configuration.nix | 68 | ||||
| -rw-r--r-- | hosts/local/p16/default.nix | 7 | ||||
| -rw-r--r-- | hosts/local/p16/home.nix | 61 | ||||
| -rw-r--r-- | hosts/local/p16/keyboard.nix | 42 |
4 files changed, 132 insertions, 46 deletions
diff --git a/hosts/local/p16/configuration.nix b/hosts/local/p16/configuration.nix index e0b81ca..47d7aaa 100644 --- a/hosts/local/p16/configuration.nix +++ b/hosts/local/p16/configuration.nix @@ -5,49 +5,20 @@ inputs, pkgs, ... -}: -# let -# wrappers = -# inputs.wrapper-manager.lib.build -# { -# inherit pkgs; -# modules = [ -# ../../../wrappers/chromium -# ../../../wrappers/brave -# ../../../wrappers/zellij -# ../../../wrappers/alacritty -# ]; -# }; -# in -{ +}: { imports = [ # Include the results of the hardware scan. ../../base.nix ../../linux.nix # ../../syncthing.nix - # ../../unfree.nix - ../wayland.nix + ../../unfree.nix + ../niri.nix ../gui.nix - # ./keyboard.nix + ./keyboard.nix + ../syncthing.nix # ../android.nix ]; - # environment.systemPackages = [ - # wrappers - # ]; - # - - nixpkgs.config = { - allowUnfree = true; - }; - environment = { - etc = { - "sway/config".source = ./swayconfig; - "xdg/waybar/config".source = ./waybarconfig; - "xdg/waybar/styles.css".source = ./waybarstyle.css; - }; - }; - # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; @@ -57,7 +28,19 @@ networking = { hostName = "p16"; # Define your hostname. - firewall.enable = false; + # firewall = { + # allowedTCPPorts = [80 443]; + # allowedUDPPortRanges = [ + # { + # from = 4000; + # to = 4007; + # } + # { + # from = 8000; + # to = 8010; + # } + # ]; + # }; }; nix.settings.trusted-users = ["root" "y"]; @@ -65,23 +48,16 @@ time.timeZone = "Asia/Bangkok"; # time.timeZone = "Europe/Madrid"; - # List services that you want to enable: + services.fwupd.enable = true; + # environment.systemPackages = [pkgs.linuxKernel.packages.linux_6_17.tp_smapi]; + services.fprintd.enable = true; services.openssh.enable = true; services.openssh.ports = [5555]; - #flatpak - # services.flatpak.enable = true; - # xdg.portal.enable = true; - #/flatpak - # don't sleep if closed lid; - #services.logind.lidSwitchExternalPower = "ignore"; - #services.logind.lidSwitchDocked = "ignore"; - #services.logind.lidSwitch = "ignore"; - services.tailscale = { enable = true; - useRoutingFeatures = "both"; + useRoutingFeatures = "client"; }; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions diff --git a/hosts/local/p16/default.nix b/hosts/local/p16/default.nix index edd555a..2ce8fd6 100644 --- a/hosts/local/p16/default.nix +++ b/hosts/local/p16/default.nix @@ -3,4 +3,11 @@ inputs: [ inputs.nixos-hardware.nixosModules.lenovo-thinkpad-p16s-amd-gen4 ./hardware-configuration.nix ./configuration.nix + inputs.home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = {inputs = inputs;}; + home-manager.users.y = ./home.nix; + } ] diff --git a/hosts/local/p16/home.nix b/hosts/local/p16/home.nix new file mode 100644 index 0000000..99be68a --- /dev/null +++ b/hosts/local/p16/home.nix @@ -0,0 +1,61 @@ +{ + inputs, + config, + pkgs, + lib, + ... +}: { + imports = [ + inputs.niri.homeModules.niri + inputs.dankMaterialShell.homeModules.dankMaterialShell.default + inputs.dankMaterialShell.homeModules.dankMaterialShell.niri + ]; + # Home Manager needs a bit of information about you and the + # paths it should manage. + home.username = "y"; + home.homeDirectory = "/home/y"; + # xdg = { + # enable = true; + # autostart.enable = true; + # userDirs = { + # enable = true; + # createDirectories = true; + # }; + # portal = { + # enable = true; + # }; + # }; + + programs.dankMaterialShell = { + enable = true; + + enableClipboard = true; + enableSystemd = true; + enableSystemMonitoring = true; + enableVPN = true; + enableBrightnessControl = true; + # enableNightMode = true; + enableAudioWavelength = true; + enableCalendarEvents = true; + enableDynamicTheming = true; + }; + + # gtk.theme.package = pkgs.colloid-gtk-theme; + # gtk.theme.name = "Colloid"; + # gtk.iconTheme = { + # package = lib.mkForce pkgs.colloid-icon-theme; + # name = lib.mkForce "Colloid"; + # }; + # 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 can update Home Manager without changing this value. See + # the Home Manager release notes for a list of state version + # changes in each release. + home.stateVersion = "25.05"; + + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; +} diff --git a/hosts/local/p16/keyboard.nix b/hosts/local/p16/keyboard.nix new file mode 100644 index 0000000..f6cfa8c --- /dev/null +++ b/hosts/local/p16/keyboard.nix @@ -0,0 +1,42 @@ +{_pkgs, ...}: { + services.logind.settings.Login = { + # don’t shutdown when power button is short-pressed + HandlePowerKey = "ignore"; + }; + + # config file keeps getting rewritten but I don't know by who + # i18n.inputMethod = { + # enable = true; + # type = "fcitx5"; + # fcitx5.addons = with pkgs; [ + # fcitx5-mozc + # # mozc-ut is better, wat do + # fcitx5-gtk + # libsForQt5.fcitx5-qt + # fcitx5-lua + # fcitx5-configtool + # fcitx5-rime + # ]; + # }; + environment.variables = { + QT_IM_MODULE = "fcitx"; + XMODIFIERS = "@im=fcitx"; + FCITX_SOCKET = "default"; + }; + + #kmonad + services.kmonad = { + enable = true; + keyboards = { + myKmonadOutput = { + device = "/dev/input/by-path/platform-i8042-serio-0-event-kbd"; + config = builtins.readFile ../keyboards/thinkpad-numpad.kbd; + }; + usbThinkpad = { + # device = "/dev/input/by-id/usb-Lenovo_ThinkPad_Compact_USB_Keyboard_with_TrackPoint-event-kbd"; + device = "/dev/input/by-id/usb-Lenovo_TrackPoint_Keyboard_II-event-kbd"; + config = builtins.readFile ../keyboards/thinkpad-usb.kbd; + }; + }; + }; +} |
