diff --git a/dotfiles/config/rofi/colorful/colors.rasi b/dotfiles/config/rofi/colorful/colors.rasi index 9c8280e7..89a18f02 100644 --- a/dotfiles/config/rofi/colorful/colors.rasi +++ b/dotfiles/config/rofi/colorful/colors.rasi @@ -2,7 +2,7 @@ * { al: #00000000; - bg: #000000ff; + bg: #00000099; se: #101010ff; fg: #FFFFFFff; ac: #FFFF00ff; diff --git a/dotfiles/config/systemd/user/alarm-clock.service b/dotfiles/config/systemd/user/alarm-clock.service deleted file mode 100644 index d7868bd6..00000000 --- a/dotfiles/config/systemd/user/alarm-clock.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Alarm Clock -Wants=taffybar.service -After=status-notifier-watcher.service - -[Service] -Type=simple -ExecStart=/usr/bin/env alarm-clock-applet -ExecStop=/usr/bin/env pkill alarm-clock-applet - -[Install] -WantedBy=wm.target diff --git a/dotfiles/config/systemd/user/chromix-too.service b/dotfiles/config/systemd/user/chromix-too.service deleted file mode 100644 index a38380b7..00000000 --- a/dotfiles/config/systemd/user/chromix-too.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=chromix-too -Wants=taffybar.service -After=taffybar.service - -[Service] -Type=simple -ExecStart=/usr/bin/env chromix-too-server -ExecStop=/usr/bin/env pkill chromix-too - -[Install] -WantedBy=wm.target diff --git a/dotfiles/config/systemd/user/clipit.service b/dotfiles/config/systemd/user/clipit.service deleted file mode 100644 index 3180da1f..00000000 --- a/dotfiles/config/systemd/user/clipit.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=clipit -Wants=taffybar.service -After=taffybar.service - -[Service] -Type=simple -ExecStart=/usr/bin/env clipit -ExecStop=/usr/bin/env pkill clipit - -[Install] -WantedBy=wm.target diff --git a/dotfiles/config/systemd/user/discord.service b/dotfiles/config/systemd/user/discord.service deleted file mode 100644 index 1290ea85..00000000 --- a/dotfiles/config/systemd/user/discord.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=discord -Wants=taffybar.service -After=taffybar.service - -[Service] -ExecStart=/usr/bin/env run_unity.sh discord -Restart=always - -[Install] -WantedBy=wm.target diff --git a/dotfiles/config/systemd/user/git-sync@.service b/dotfiles/config/systemd/user/git-sync@.service deleted file mode 100644 index 0ce1a70d..00000000 --- a/dotfiles/config/systemd/user/git-sync@.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=git-sync %f %I %i - -[Service] -Type=simple -ExecStart=/usr/bin/env git_sync_directory.sh %f -ExecStop=/usr/bin/env pkill git_sync_directory.sh -Restart=always -RestartSec=3 - -[Install] -WantedBy=wm.target diff --git a/dotfiles/config/systemd/user/github-notifications.service b/dotfiles/config/systemd/user/github-notifications.service deleted file mode 100644 index bbf3da89..00000000 --- a/dotfiles/config/systemd/user/github-notifications.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=github-notifications -Wants=taffybar.service -After=taffybar.service - -[Service] -Type=simple -ExecStart=/usr/bin/env notifications-tray-icon --github-token-pass github-token -ExecStop=/usr/bin/env pkill 'notifications-tray-icon --github-token-pass github-token' - -[Install] -WantedBy=wm.target diff --git a/dotfiles/config/systemd/user/gitter.service b/dotfiles/config/systemd/user/gitter.service deleted file mode 100644 index e193e1b2..00000000 --- a/dotfiles/config/systemd/user/gitter.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=gitter -Wants=taffybar.service -After=taffybar.service - -[Service] -ExecStart=/usr/bin/env Gitter -Restart=always - -[Install] -WantedBy=wm.target diff --git a/dotfiles/config/systemd/user/kdeconnect.service b/dotfiles/config/systemd/user/kdeconnect.service deleted file mode 100644 index 4f84894e..00000000 --- a/dotfiles/config/systemd/user/kdeconnect.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=KDE Connect -Wants=taffybar.service -After=taffybar.service - -[Service] -Type=simple -ExecStart=/usr/bin/env kdeconnect-indicator -ExecStop=/usr/bin/env pkill kdeconnect-indicator - -[Install] -WantedBy=wm.target diff --git a/dotfiles/config/systemd/user/lxqt-powermanagement.service b/dotfiles/config/systemd/user/lxqt-powermanagement.service deleted file mode 100644 index b6c533ef..00000000 --- a/dotfiles/config/systemd/user/lxqt-powermanagement.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=lxqt-powermanagement -Wants=taffybar.service -After=taffybar.service - -[Service] -Type=simple -ExecStart=/usr/bin/env lxqt-powermanagement -ExecStop=/usr/bin/env pkill lxqt-powermanagement - -[Install] -WantedBy=wm.target diff --git a/dotfiles/config/systemd/user/mopidy.service b/dotfiles/config/systemd/user/mopidy.service deleted file mode 100644 index fddfda4d..00000000 --- a/dotfiles/config/systemd/user/mopidy.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=mopidy - -[Service] -Type=simple -ExecStart=/usr/bin/env mopidy -ExecStop=/usr/bin/env pkill mopidy - -[Install] -WantedBy=wm.target diff --git a/dotfiles/config/systemd/user/nm-applet.service b/dotfiles/config/systemd/user/nm-applet.service deleted file mode 100644 index 243415f3..00000000 --- a/dotfiles/config/systemd/user/nm-applet.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=NM Applet -Wants=taffybar.service -After=taffybar.service - -[Service] -Type=simple -ExecStart=/usr/bin/env nm-applet --sm-disable --indicator -ExecStop=/usr/bin/env pkill nm-applet - -[Install] -WantedBy=wm.target diff --git a/dotfiles/config/systemd/user/notify-osd.service b/dotfiles/config/systemd/user/notify-osd.service deleted file mode 100644 index 53364055..00000000 --- a/dotfiles/config/systemd/user/notify-osd.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=notify-osd - -[Service] -Type=simple -ExecStart=/usr/bin/env notify-osd -ExecStop=/usr/bin/env pkill notify-osd - -[Install] -WantedBy=wm.target diff --git a/dotfiles/config/systemd/user/pasystray.service b/dotfiles/config/systemd/user/pasystray.service deleted file mode 100644 index 3997b938..00000000 --- a/dotfiles/config/systemd/user/pasystray.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Pulse Audio System Tray -Wants=taffybar.service -After=taffybar.service - -[Service] -Type=simple -ExecStart=/usr/bin/env pasystray -ExecStop=/usr/bin/env pkill pasystray - -[Install] -WantedBy=wm.target diff --git a/dotfiles/config/systemd/user/picom.service b/dotfiles/config/systemd/user/picom.service deleted file mode 100644 index 8ad2b630..00000000 --- a/dotfiles/config/systemd/user/picom.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=picom - -[Service] -Type=simple -ExecStart=/usr/bin/env picom -cC -ExecStop=/usr/bin/env pkill picom - -[Install] -WantedBy=wm.target diff --git a/dotfiles/config/systemd/user/skippy-xd.service b/dotfiles/config/systemd/user/skippy-xd.service deleted file mode 100644 index 0c7c6cb5..00000000 --- a/dotfiles/config/systemd/user/skippy-xd.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=skippy-xd -Wants=taffybar.service -After=taffybar.service - -[Service] -Type=simple -ExecStart=/usr/bin/env skippy-xd --start-daemon -ExecStop=/usr/bin/env pkill skippy-xd - -[Install] -WantedBy=wm.target diff --git a/dotfiles/config/systemd/user/status-notifier-watcher.service b/dotfiles/config/systemd/user/status-notifier-watcher.service deleted file mode 100644 index 7a6d6d8f..00000000 --- a/dotfiles/config/systemd/user/status-notifier-watcher.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=status-notifier-watcher - -[Service] -Type=simple -ExecStart=/usr/bin/env status-notifier-watcher -ExecStop=/usr/bin/env pkill status-notifier-watcher - -[Install] -WantedBy=wm.target diff --git a/dotfiles/config/systemd/user/taffybar.service b/dotfiles/config/systemd/user/taffybar.service deleted file mode 100644 index 7fd218ff..00000000 --- a/dotfiles/config/systemd/user/taffybar.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=taffybar -Wants=status-notifier-watcher.service -After=status-notifier-watcher.service - -[Service] -Type=notify -ExecStart=/usr/bin/env imalison-taffybar -ExecStop=/usr/bin/env pkill imalison-taffybar -Restart=always -RestartSec=3 -NotifyAccess=all - -[Install] -WantedBy=wm.target diff --git a/dotfiles/config/systemd/user/udiskie.service b/dotfiles/config/systemd/user/udiskie.service deleted file mode 100644 index 7bb9d699..00000000 --- a/dotfiles/config/systemd/user/udiskie.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=udiskie -Wants=taffybar.service -After=taffybar.service - -[Service] -ExecStart=/usr/bin/env udiskie --tray --appindicator -Restart=always - -[Install] -WantedBy=wm.target diff --git a/dotfiles/config/systemd/user/volnoti.service b/dotfiles/config/systemd/user/volnoti.service deleted file mode 100644 index 99fa49e4..00000000 --- a/dotfiles/config/systemd/user/volnoti.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=volnoti - -[Service] -Type=simple -ExecStart=/usr/bin/env volnoti -n -v -ExecStop=/usr/bin/env pkill volnoti - -[Install] -WantedBy=wm.target diff --git a/dotfiles/config/systemd/user/wallpaper.service b/dotfiles/config/systemd/user/wallpaper.service deleted file mode 100644 index 967bc768..00000000 --- a/dotfiles/config/systemd/user/wallpaper.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=wallpaper - -[Service] -Type=oneshot -ExecStart=/usr/bin/env wallpaper.sh - -[Install] -WantedBy=wm.target diff --git a/dotfiles/config/systemd/user/wallpaper.timer b/dotfiles/config/systemd/user/wallpaper.timer deleted file mode 100644 index 26865d9b..00000000 --- a/dotfiles/config/systemd/user/wallpaper.timer +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Switch Wallpapers Every 15 minutes - -[Timer] -OnUnitActiveSec=5min -OnBootSec=0min - -[Install] -WantedBy=wm.target diff --git a/dotfiles/config/systemd/user/wm.target b/dotfiles/config/systemd/user/wm.target deleted file mode 100644 index 4a4ab2e4..00000000 --- a/dotfiles/config/systemd/user/wm.target +++ /dev/null @@ -1,3 +0,0 @@ -[Unit] -Description=Window Manager -AllowIsolate=yes diff --git a/dotfiles/config/systemd/user/xsettingsd.service b/dotfiles/config/systemd/user/xsettingsd.service deleted file mode 100644 index edb48588..00000000 --- a/dotfiles/config/systemd/user/xsettingsd.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=X Settings Daemon - -[Service] -ExecStart=/usr/bin/env xsettingsd-setup -ExecStop=/usr/bin/env pkill xsettingsd - -[Install] -WantedBy=wm.target diff --git a/dotfiles/config/taffybar/imalison-taffybar.cabal b/dotfiles/config/taffybar/imalison-taffybar.cabal index ad64687b..ad57320f 100644 --- a/dotfiles/config/taffybar/imalison-taffybar.cabal +++ b/dotfiles/config/taffybar/imalison-taffybar.cabal @@ -10,7 +10,7 @@ build-type: Simple extra-source-files: README.org cabal-version: >=1.10 -executable imalison-taffybar +executable taffybar hs-source-dirs: . main-is: taffybar.hs ghc-options: -threaded -rtsopts -with-rtsopts=-N diff --git a/dotfiles/config/taffybar/taffybar.hs b/dotfiles/config/taffybar/taffybar.hs index 2f66469f..60f75185 100644 --- a/dotfiles/config/taffybar/taffybar.hs +++ b/dotfiles/config/taffybar/taffybar.hs @@ -145,7 +145,7 @@ main = do (\size _ -> lift $ loadPixbufByName size "application-default-icon") layout = layoutNew defaultLayoutConfig windows = windowsNew defaultWindowsConfig - notifySystemD = void $ runCommandFromPath ["systemd-notify", "--ready"] + myWorkspacesConfig = defaultWorkspacesConfig { underlineHeight = 3 @@ -229,7 +229,6 @@ main = do -- , startWidgets = [] } startTaffybar $ - appendHook notifySystemD $ appendHook (void $ getHost False) $ withLogServer $ withToggleServer $ diff --git a/dotfiles/config/xmonad/build b/dotfiles/config/xmonad/build deleted file mode 100755 index a0f68d10..00000000 --- a/dotfiles/config/xmonad/build +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -SRC_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -output_file=$1; shift - -cd "$SRC_DIR" -exe_location="$SRC_DIR/result/bin/imalison-xmonad" -nix-build -cp -f "$exe_location" "$output_file" diff --git a/dotfiles/config/xmonad/xmonad.hs b/dotfiles/config/xmonad/xmonad.hs index 5c475ff6..160358a8 100644 --- a/dotfiles/config/xmonad/xmonad.hs +++ b/dotfiles/config/xmonad/xmonad.hs @@ -34,6 +34,8 @@ import System.IO.Unsafe import System.Process import Text.Printf import Unsafe.Coerce +import XMonad.Main (launch) +import XMonad.Core (getDirectories) import XMonad hiding ( (|||) ) import XMonad.Actions.CycleWS hiding (nextScreen) import XMonad.Actions.CycleWorkspaceByScreen @@ -100,14 +102,10 @@ myConfig = def myNavigation2DConfig = def { defaultTiledNavigation = centerNavigation } -main = - xmonad . - docks . - pagerHints . - ewmh . - withNavigation2DConfig myNavigation2DConfig $ - myConfig - +main = do + dirs <- getDirectories + (flip launch dirs) . docks . pagerHints . ewmh . withNavigation2DConfig myNavigation2DConfig $ myConfig + -- Utility functions -- Log to a file from anywhere diff --git a/dotfiles/xsession b/dotfiles/xsession index e69de29b..5b690c17 100644 --- a/dotfiles/xsession +++ b/dotfiles/xsession @@ -0,0 +1 @@ +ROFI_SYSTEMD_TERM=alacritty diff --git a/nixos/essential.nix b/nixos/essential.nix index 41d2dbe9..a0bd80ac 100644 --- a/nixos/essential.nix +++ b/nixos/essential.nix @@ -70,7 +70,7 @@ in # Tools binutils - # direnv + gawk gitFull htop ncdu diff --git a/nixos/flake.lock b/nixos/flake.lock index 8d9ac2ff..06c56a46 100644 --- a/nixos/flake.lock +++ b/nixos/flake.lock @@ -19,6 +19,26 @@ "type": "github" } }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1626168714, + "narHash": "sha256-LivElv4aPfojh8HxJy6VAmDAf7zA40S7jGGSV7+wLvg=", + "owner": "IvanMalison", + "repo": "home-manager", + "rev": "557c159dfaf17eff3bd55ad6e8433bf59f40fab0", + "type": "github" + }, + "original": { + "owner": "IvanMalison", + "repo": "home-manager", + "type": "github" + } + }, "nixos-hardware": { "locked": { "lastModified": 1625333638, @@ -74,7 +94,7 @@ }, "nixpkgs_4": { "locked": { - "narHash": "sha256-vAvfFQe4KHWheJHI4cEc2CYTzXnuRAvPu/bTH4GXhcc=", + "narHash": "sha256-oHUlQvEu4A9dWu52bZdxg29z5Xy6NVJGZjmsKwb6yo4=", "path": "/home/imalison/Projects/nixpkgs", "type": "path" }, @@ -85,7 +105,7 @@ }, "nixpkgs_5": { "locked": { - "narHash": "sha256-vAvfFQe4KHWheJHI4cEc2CYTzXnuRAvPu/bTH4GXhcc=", + "narHash": "sha256-oHUlQvEu4A9dWu52bZdxg29z5Xy6NVJGZjmsKwb6yo4=", "path": "/home/imalison/Projects/nixpkgs", "type": "path" }, @@ -96,6 +116,7 @@ }, "root": { "inputs": { + "home-manager": "home-manager", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", "taffybar": "taffybar", diff --git a/nixos/flake.nix b/nixos/flake.nix index e6948a88..c4306227 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -13,11 +13,18 @@ url = path:../dotfiles/config/xmonad/xmonad; }; nixos-hardware.url = github:nixos/nixos-hardware; + home-manager = { + url = github:IvanMalison/home-manager; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { self, nixpkgs, nixos-hardware, taffybar, xmonad, xmonad-contrib }: - let tweaks = ({...}: { + outputs = { self, nixpkgs, nixos-hardware, home-manager, taffybar, xmonad, xmonad-contrib }: + let forAll = ({...}: { nix.registry.nixpkgs.flake = nixpkgs; nixpkgs.overlays = [ taffybar.overlay xmonad.overlay xmonad-contrib.overlay ]; + imports = [ + home-manager.nixosModule + ]; }); piHardware = ({ ... }: { imports = [ @@ -29,15 +36,15 @@ nixosConfigurations = { ivanm-dfinity-razer = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - modules = [ tweaks ./machines/ivanm-dfinity-razer.nix ]; + modules = [ forAll ./machines/ivanm-dfinity-razer.nix ]; }; ryzen-shine = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - modules = [ tweaks ./machines/ryzen-shine.nix ]; + modules = [ forAll ./machines/ryzen-shine.nix ]; }; biskcomp = nixpkgs.lib.nixosSystem { system = "aarch64-linux"; - modules = [ tweaks piHardware ./machines/biskcomp.nix ]; + modules = [ forAll piHardware ./machines/biskcomp.nix ]; }; }; }; diff --git a/nixos/home-manager.nix b/nixos/home-manager.nix new file mode 100644 index 00000000..8dc3a1be --- /dev/null +++ b/nixos/home-manager.nix @@ -0,0 +1,66 @@ +{ pkgs, ... }: { + home.sessionVariablesExtra = '' + ROFI_SYSTEMD_TERM="alacritty" + ''; + + xsession = { + preferStatusNotifierItems = true; + }; + home.emptyActivationPath = false; + programs.home-manager.enable = true; + + programs.ssh = { + forwardAgent = true; + }; + + # programs.zsh = { + # enable = true; + # }; + + services.gpg-agent = { + enable = true; + defaultCacheTtl = 8 * 60 * 60; + maxCacheTtl = 8 * 60 * 60; + enableSshSupport = true; + }; + + services.picom = { + enable = true; + }; + + services.blueman-applet = { + enable = true; + }; + + services.taffybar = { + enable = true; + package = pkgs.haskellPackages.imalison-taffybar; + }; + + # notifyosd + # skippyxd + # volnoti + + services.kdeconnect = { + enable = true; + indicator = true; + }; + + services.network-manager-applet.enable = true; + + services.udiskie = { + enable = true; + tray = "always"; + }; + + services.status-notifier-watcher.enable = true; + + services.random-background = { + enable = true; + display = "center"; + interval = "1h"; + imageDirectory = "%h/Pictures/wallpaper/use"; + }; + + services.xsettingsd.enable = true; +} diff --git a/nixos/users.nix b/nixos/users.nix index e62f25da..3537e9a4 100644 --- a/nixos/users.nix +++ b/nixos/users.nix @@ -24,6 +24,9 @@ imalison = userDefaults // { name = "imalison"; shell = pkgs.zsh; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICzGkqGJm+nrMvsrfuWOLVxXHvi0UL1ULJmyfzS9sKpy imalison@biskcomp.local" + ]; }; kat = userDefaults // { name = "kat"; @@ -31,5 +34,9 @@ }; }; + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.imalison = import ./home-manager.nix; + nix.trustedUsers = ["imalison" "kat"]; }