From 0d9f480b3508dfcf089f77a4072734f1ac59719d Mon Sep 17 00:00:00 2001 From: Milo Moisson Date: Thu, 4 Jan 2024 02:11:15 +0100 Subject: [PATCH] refactor: change tofi font to have icon, nits --- home-manager/assets/workstyle.toml | 16 ++---- home-manager/modules/vm/default.nix | 5 +- home-manager/modules/vm/search.nix | 2 +- nixos/hardware/archaic-wiro-laptop.nix | 68 ++++++++++++++------------ nixos/modules/backup.nix | 10 ++-- 5 files changed, 48 insertions(+), 53 deletions(-) diff --git a/home-manager/assets/workstyle.toml b/home-manager/assets/workstyle.toml index 14b8514..5e7175f 100644 --- a/home-manager/assets/workstyle.toml +++ b/home-manager/assets/workstyle.toml @@ -7,22 +7,14 @@ "firefox" = "" "kitty" = "" -"file manager" = "" -"libreoffice calc" = "" +"ya" = "" -"nvim" = "" +"helix" = "🧬" "transmission" = "" "music" = "" -"visual studio code" = "󰘐" -# TODO fix -"libreoffice writer" = "" -"libreoffice" = "" -"calculator" = "" -"videostream" = "" -"mpv" = "" -"disk usage" = "" -".pdf" = "" +"mpv" = "" +"imv" = "" [other] "fallback_icon" = "" diff --git a/home-manager/modules/vm/default.nix b/home-manager/modules/vm/default.nix index f04c77b..f9fa7d1 100644 --- a/home-manager/modules/vm/default.nix +++ b/home-manager/modules/vm/default.nix @@ -136,10 +136,7 @@ in }]; }; - startup = [ - # TODO: pipe to other log file, like a standard log output folder - { command = "${getExe' pkgs.workstyle "workstyle"} &> /tmp/workstyle.log"; always = true; } - ]; + startup = [{ command = "${getExe' pkgs.workstyle "workstyle"} &> /var/log/workstyle.log"; always = true; }]; focus.followMouse = false; diff --git a/home-manager/modules/vm/search.nix b/home-manager/modules/vm/search.nix index a186082..30d459a 100644 --- a/home-manager/modules/vm/search.nix +++ b/home-manager/modules/vm/search.nix @@ -12,7 +12,7 @@ let in { config = { - wayland.windowManager.sway.config.menu = "${getExe' pkgs.tofi "tofi-drun"} --font ${pkgs.inter}/share/fonts/opentype/Inter-Regular.otf | xargs ${getExe' pkgs.sway "swaymsg"} exec --"; + wayland.windowManager.sway.config.menu = "${getExe' pkgs.tofi "tofi-drun"} --font ${pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; }}/share/fonts/truetype/JetBrainsMonoNerdFont-Regular.ttf | xargs ${getExe' pkgs.sway "swaymsg"} exec --"; xdg.configFile."tofi/config".text = keyValueFormat { font-size = 14; diff --git a/nixos/hardware/archaic-wiro-laptop.nix b/nixos/hardware/archaic-wiro-laptop.nix index 07929ae..3e763d5 100644 --- a/nixos/hardware/archaic-wiro-laptop.nix +++ b/nixos/hardware/archaic-wiro-laptop.nix @@ -4,40 +4,46 @@ , modulesPath , ... }: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "sd_mod" "rtsx_pci_sdmmc" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = { - device = "/dev/disk/by-uuid/c3e74034-2dc2-4462-a4f1-82fc5f8e7daf"; - fsType = "ext4"; - }; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/A18B-9B1D"; - fsType = "vfat"; - }; + config = { + local.screen = { + width = 1920; + height = 1080; + }; + + system.stateVersion = "23.05"; - swapDevices = [ - { device = "/dev/disk/by-uuid/6206464f-5261-404c-b2f5-dbb450d30550"; } - ]; + # --- Generated by `nixos-generate-config` --- + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; + fileSystems."/" = { + device = "/dev/disk/by-uuid/c3e74034-2dc2-4462-a4f1-82fc5f8e7daf"; + fsType = "ext4"; + }; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/A18B-9B1D"; + fsType = "vfat"; + }; - system.stateVersion = "23.05"; + swapDevices = [ + { device = "/dev/disk/by-uuid/6206464f-5261-404c-b2f5-dbb450d30550"; } + ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + }; } diff --git a/nixos/modules/backup.nix b/nixos/modules/backup.nix index 8c20378..868b2cb 100644 --- a/nixos/modules/backup.nix +++ b/nixos/modules/backup.nix @@ -7,10 +7,9 @@ with lib; let - + inherit (config.age.secrets) restic-backup-pass googledrive-rclone-config; hostname = config.networking.hostName; mainUsername = config.local.user.username; - in { config.services.restic.backups = { @@ -18,8 +17,8 @@ in google-drive = { repository = "rclone:googledrive:/Backups/${hostname}"; initialize = true; - passwordFile = config.age.secrets.restic-backup-pass.path; - rcloneConfigFile = config.age.secrets.googledrive-rclone-config.path; + passwordFile = restic-backup-pass.path; + rcloneConfigFile = googledrive-rclone-config.path; paths = [ "/home/${mainUsername}/Documents" @@ -63,8 +62,9 @@ in # Backup documents and large files archaic-bak = { initialize = true; - passwordFile = config.age.secrets.restic-backup-pass.path; + passwordFile = restic-backup-pass.path; paths = [ "/home/${mainUsername}/Documents" ]; + # TODO repository = "/mnt/${mainUsername}/ArchaicBak/Backups/${hostname}"; }; };