[NixOS] Move to home-manager
This commit is contained in:
parent
417524f92a
commit
ff6d984d4c
@ -2,7 +2,7 @@
|
||||
|
||||
* {
|
||||
al: #00000000;
|
||||
bg: #000000ff;
|
||||
bg: #00000099;
|
||||
se: #101010ff;
|
||||
fg: #FFFFFFff;
|
||||
ac: #FFFF00ff;
|
||||
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -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
|
@ -1,9 +0,0 @@
|
||||
[Unit]
|
||||
Description=wallpaper
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/env wallpaper.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=wm.target
|
@ -1,9 +0,0 @@
|
||||
[Unit]
|
||||
Description=Switch Wallpapers Every 15 minutes
|
||||
|
||||
[Timer]
|
||||
OnUnitActiveSec=5min
|
||||
OnBootSec=0min
|
||||
|
||||
[Install]
|
||||
WantedBy=wm.target
|
@ -1,3 +0,0 @@
|
||||
[Unit]
|
||||
Description=Window Manager
|
||||
AllowIsolate=yes
|
@ -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
|
@ -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
|
||||
|
@ -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 $
|
||||
|
@ -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"
|
@ -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
|
||||
|
@ -0,0 +1 @@
|
||||
ROFI_SYSTEMD_TERM=alacritty
|
@ -70,7 +70,7 @@ in
|
||||
|
||||
# Tools
|
||||
binutils
|
||||
# direnv
|
||||
gawk
|
||||
gitFull
|
||||
htop
|
||||
ncdu
|
||||
|
@ -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",
|
||||
|
@ -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 ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
66
nixos/home-manager.nix
Normal file
66
nixos/home-manager.nix
Normal file
@ -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;
|
||||
}
|
@ -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"];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user