aboutsummaryrefslogtreecommitdiff
path: root/nixos/.flake
diff options
context:
space:
mode:
authorJacob Janzen <jacob.a.s.janzen@gmail.com>2024-09-27 20:28:05 -0500
committerJacob Janzen <jacob.a.s.janzen@gmail.com>2024-09-27 20:28:05 -0500
commit7edb3349287bdf182510f1b377583fc9988c6dbb (patch)
treefaaa504d23b5b52fba0dd27926f10049e16191cf /nixos/.flake
parent245089884cac141b69f326ea741f7aad86f4a3ca (diff)
move more into flake
Diffstat (limited to 'nixos/.flake')
l---------nixos/.flake/home/.wallpaper1
-rw-r--r--nixos/.flake/home/core.org2
-rw-r--r--nixos/.flake/home/scripts.org43
3 files changed, 46 insertions, 0 deletions
diff --git a/nixos/.flake/home/.wallpaper b/nixos/.flake/home/.wallpaper
new file mode 120000
index 0000000..316db81
--- /dev/null
+++ b/nixos/.flake/home/.wallpaper
@@ -0,0 +1 @@
+../../../common/.wallpaper \ No newline at end of file
diff --git a/nixos/.flake/home/core.org b/nixos/.flake/home/core.org
index af108cf..0d578a8 100644
--- a/nixos/.flake/home/core.org
+++ b/nixos/.flake/home/core.org
@@ -10,11 +10,13 @@ Set up home manager for my user account and import submodules.
./fonts.nix
./hyprland.nix
./programs/core.nix
+ ./scripts.nix
./services/core.nix
];
home.username = "jane";
home.homeDirectory = "/home/jane";
+ home.file.".wallpaper".source = ./.wallpaper;
home.stateVersion = "24.05";
programs.home-manager.enable = true;
diff --git a/nixos/.flake/home/scripts.org b/nixos/.flake/home/scripts.org
new file mode 100644
index 0000000..b98b389
--- /dev/null
+++ b/nixos/.flake/home/scripts.org
@@ -0,0 +1,43 @@
+#+title: Custom Scripts
+
+Open script container.
+#+begin_src nix :tangle ~/.flake/home/scripts.nix :mkdirp yes
+ { config, pkgs, ... }:
+
+ {
+ home.file = {
+#+end_src
+
+Use =fuzzel= to open a menu to power off, reboot, or log out.
+#+begin_src nix :tangle ~/.flake/home/scripts.nix :mkdirp yes
+ ".local/bin/poweroptions.sh" = {
+ text = ''
+ #!/bin/sh
+
+ getoption () {
+ fuzzel --dmenu -l 3 -x 1 -r 10 << EOF
+ 󰐥 power off
+ 󰜉 restart
+ 󰍃 logout
+ EOF
+ }
+
+ option=$(getoption | xargs)
+ case $option in
+ '󰐥 power off')
+ systemctl poweroff;;
+ '󰜉 restart')
+ systemctl reboot;;
+ '󰍃 logout')
+ hyprctl dispatch exit;;
+ esac
+ '';
+ executable = true;
+ };
+#+end_src
+
+Close script container.
+#+begin_src nix :tangle ~/.flake/home/scripts.nix :mkdirp yes
+ };
+ }
+#+end_src