Compare commits

..

2 commits

Author SHA1 Message Date
c3b02c5f7b improved organisation
moved host modules to hosts/modules and modified deploy script
2025-02-24 13:19:36 +10:00
9636eab7f6 added hyprpanel, fixed colmena for laptop, and minor ssh config changes 2025-02-24 13:18:46 +10:00
24 changed files with 159 additions and 80 deletions

16
deploy
View file

@ -6,6 +6,7 @@ usage="Usage: $(basename $0) [OPTIONS]
Options: Options:
-f, --fresh Remove old content in the nixstore (good for debugging) -f, --fresh Remove old content in the nixstore (good for debugging)
-b, --bootloader Reinstall the bootloader -b, --bootloader Reinstall the bootloader
-r, --remote Locally build and remotely deploy Colmena hive
-h, --help Show this message (^_^)" -h, --help Show this message (^_^)"
# delete all cached entries # delete all cached entries
@ -25,11 +26,26 @@ rebuild_flake () {
fi fi
} }
deploy_hive () {
echo "[+] Adding keys to ssh-agent"
ssh-add ~/.ssh/id_hyrule
printf "\n"
git add . --verbose
# Deploy to all Colmena hives
colmena build --experimental-flake-eval
colmena apply --experimental-flake-eval
# colmena apply --on hyrule --experimental-flake-eval
}
# check which flags were given # check which flags were given
flag_fresh=false flag_fresh=false
flag_bootloader=false flag_bootloader=false
for flag in "$@"; do for flag in "$@"; do
case "$flag" in case "$flag" in
-r|--remote)
deploy_hive
exit 0 ;;
-f|--fresh) -f|--fresh)
flag_fresh=true ;; flag_fresh=true ;;
-b|--bootloader) -b|--bootloader)

View file

@ -1,13 +0,0 @@
#!/usr/bin/env bash
set -e # terminate if any command fails
echo "[+] Adding keys to ssh-agent"
ssh-add ~/.ssh/id_hyrule
printf "\n"
git add .
# Deploy to all Colmena hives
colmena build --experimental-flake-eval
colmena apply --experimental-flake-eval
# colmena apply --on hyrule --experimental-flake-eval

View file

@ -6,3 +6,7 @@ Gorgeous
Very nice Very nice
https://github.com/linuxmobile/hyprland-dots https://github.com/linuxmobile/hyprland-dots
I love their hyprpanel!
https://www.reddit.com/r/unixporn/comments/1ha3mjw/hyprlandnixos_is_the_pretty_ucking_solid_i_love/

6
flake.lock generated
View file

@ -560,11 +560,11 @@
}, },
"nixpkgs_6": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1729880355, "lastModified": 1739866667,
"narHash": "sha256-RP+OQ6koQQLX5nw0NmcDrzvGL8HDLnyXt/jHhL1jwjM=", "narHash": "sha256-EO1ygNKZlsAC9avfcwHkKGMsmipUk1Uc0TbrEZpkn64=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "18536bf04cd71abd345f9579158841376fdd0c5a", "rev": "73cf49b8ad837ade2de76f87eb53fc85ed5d4680",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -4,7 +4,6 @@
inputs = { inputs = {
# nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; # nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
#nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
#home-manager = { #home-manager = {
# url = "github:nix-community/home-manager"; # url = "github:nix-community/home-manager";
@ -23,6 +22,11 @@
# is this necessary? (aren't I enabling it in `configuration.nix` anyways?) # is this necessary? (aren't I enabling it in `configuration.nix` anyways?)
hyprland.url = "github:hyprwm/Hyprland"; hyprland.url = "github:hyprwm/Hyprland";
hyprpanel = {
url = "github:Jas-SinghFSU/HyprPanel";
#inputs.nixpkgs.follows = "nixpkgs";
};
swww.url = "github:LGFae/swww"; swww.url = "github:LGFae/swww";
# TODO: declarative flatpak management # TODO: declarative flatpak management
@ -30,14 +34,8 @@
ags.url = "github:Aylur/ags"; ags.url = "github:Aylur/ags";
hyprpanel.url = "github:Jas-SinghFSU/HyprPanel";
# colmena.url = "github:zhaofengli/colmena"; # colmena.url = "github:zhaofengli/colmena";
colmena.url = "github:zhaofengli/colmena/?rev=47b6414d800c8471e98ca072bc0835345741a56a"; colmena.url = "github:zhaofengli/colmena/?rev=47b6414d800c8471e98ca072bc0835345741a56a";
# alternative to colmena (currently in testing)
#deploy-rs.url = "github:serokell/deploy-rs";
#wishlist.url = "path:/home/me/nixdots/flakes/wishlist";
}; };
outputs = { outputs = {
@ -47,18 +45,20 @@
hyprland, hyprland,
grub2-themes, grub2-themes,
nixcord, nixcord,
hyprpanel,
colmena, colmena,
#deploy-rs,
... ...
} @ inputs: let } @ inputs: let
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
config = { config = {
allowUnfree = true; allowUnfree = true;
}; };
overlays = [
inputs.hyprpanel.overlay
];
}; };
# TODO: come back to this its really cool # TODO: come back to this its really cool
@ -93,36 +93,8 @@
grub2-themes.nixosModules.default grub2-themes.nixosModules.default
]; ];
}; };
# meine vps
# hyrule = nixpkgs.lib.nixosSystem {
# # manually set system architecture since
# # this is for a remote deployment
# system = "x86_64-linux";
# specialargs = {inherit inputs pkgs;};
#
# modules = [
# ./hosts/hyrule
# ];
# };
}; };
# remote deployment with deploy-rs
# deploy.nodes.hyrule = {
# hostname = "imbored.dev";
# # create a primary profile called "system"
# profiles.system = {
# user = "root"; # user to deploy to
# path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.hyrule;
#
# # ssh configuration for reaching the server
# sshUser = "ae";
# #interactiveSudo = true; # TODO: use this and revoke passwordless sudo for ae
# sshOpts = ["-i" "/home/me/.ssh/id_hyrule"];
# remoteBuild = false; # build locally then deploy to remote host
# };
# };
# remote deployment to my servers!! # remote deployment to my servers!!
colmenaHive = colmena.lib.makeHive { colmenaHive = colmena.lib.makeHive {
meta = { meta = {

View file

@ -11,6 +11,7 @@
}; };
imports = [ imports = [
#inputs.hyprpanel.packages.homeManagerModules.hyprpanel
../modules/git.nix ../modules/git.nix
../modules/bat.nix ../modules/bat.nix
../modules/fish.nix ../modules/fish.nix
@ -115,6 +116,9 @@
user = "ae"; user = "ae";
port = 22; port = 22;
identityFile = "~/.ssh/id_hyrule"; identityFile = "~/.ssh/id_hyrule";
setEnv = {
TERM = "linux";
};
}; };
subspace = { subspace = {
hostname = "imbored.dev"; hostname = "imbored.dev";
@ -122,9 +126,80 @@
port = 22; port = 22;
identityFile = "~/.ssh/id_subspace"; identityFile = "~/.ssh/id_subspace";
}; };
youcue = {
hostname = "moss.labs.eait.uq.edu.au";
user = "s4740056";
port = 22;
identityFile = "~/.ssh/id_youcue";
setEnv = {
TERM = "xterm-256color";
};
};
deadlyserver = {
hostname = "deadlyserver.com";
user = "emile";
port = 29843;
identityFile = "~/.ssh/id_deadlyserver";
setEnv = {
TERM = "xterm-256color";
};
};
}; };
}; };
/*
hyprpanel = {
enable = true;
# automatically restart when config changes
systemd.enable = true; # TODO: change to false
# add `exec-once hyprpanel` to hyprland config
hyprland.enable = true;
# fix the overwrite issue with hyprpanel on NixOS
overwrite.enable = true;
# import a theme from './themes/*.json'
# theme = "";
# override the final config
#override = {};
# config the bar layouts for monitors
layout = {
"bar.layouts" = {
"0" = {
left = ["dashboard" "workspaces"];
middle = ["media"];
right = ["volume" "systray" "notifications"];
};
};
};
# settings = {
# bar.launcher.autoDetectIcon = true;
# bar.workspaces.show_icons = true;
#
# menus.clock = {
# time = {
# military = true;
# hideSeconds = true;
# };
# weather.unit = "metric";
# };
#
# menus.dashboard.directories.enabled = false;
# menus.dashboard.stats.enable_gpu = true;
#
# theme.bar.transparent = true;
#
# theme.font = {
# name = "CaskaydiaCove NF";
# size = "16px";
# };
# };
};
*/
# I want to use fish as my login shell but it always # I want to use fish as my login shell but it always
# goes terrible cause it isn't POSIX compliant, so # goes terrible cause it isn't POSIX compliant, so
# instead Bash is my login and it will just exec fish # instead Bash is my login and it will just exec fish

View file

@ -1,24 +1,28 @@
import { AppLauncher } from "./widgets/applauncher.js" import { AppLauncher } from "./widgets/applauncher.js"
import { Notifications } from "./widgets/notifications.js" //import { Notifications } from "./widgets/notifications.js"
/*
const date = Variable('', { const date = Variable('', {
poll: [1000, 'date'], poll: [1000, 'date'],
}) })
*/
/*
const Bar = (monitor = 0) => Widget.Window({ const Bar = (monitor = 0) => Widget.Window({
monitor, monitor,
name: 'bar${monitor}', name: 'bar${monitor}',
anchor: ['top', 'left', 'right'], anchor: ['top', 'left', 'right'],
child: Widget.Label({ label: date.bind() }), child: Widget.Label({ label: date.bind() }),
}) })
*/
App.config({ App.config({
style: "./style.css", style: "./style.css",
// icons: "./assets", // icons: "./assets",
windows: [ windows: [
Bar(), //Bar(),
AppLauncher, AppLauncher,
Notifications() //Notifications()
] ]
// gtkTheme: "Adwaita-dark", // gtkTheme: "Adwaita-dark",
// cursorTheme: "Qogir", // cursorTheme: "Qogir",

View file

@ -2,10 +2,10 @@ const WINDOW_NAME = "fullscreen";
const Fullscreen = (children) => Widget.Box({ const Fullscreen = (children) => Widget.Box({
vertical: true, vertical: true,
css: "background-image: url('https://images2.alphacoders.com/135/1351579.png');" css: "background-image: url('~/downloads/wallpaper/kill-my-firstborn/astronaut-pink-blue.png');",
+ "background-size: cover;" //+ "background-size: cover;"
+ "background-position: center;" //+ "background-position: center;"
+ "background-repeat: no-repeat;", //+ "background-repeat: no-repeat;",
children: children, children: children,
}) })

View file

@ -6,7 +6,8 @@
}: let }: let
home-manager = builtins.fetchTarball { home-manager = builtins.fetchTarball {
url = "https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz"; url = "https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz";
sha256 = "15k41il0mvmwyv6jns4z8k6khhmb22jk5gpcqs1paym3l01g6abn"; sha256 = "0c07xj74vsj37d3a8f98i9rhhhr99ckwlp45n40f0qkmigm3pk8s";
#sha256 = "15k41il0mvmwyv6jns4z8k6khhmb22jk5gpcqs1paym3l01g6abn";
}; };
in { in {
imports = [ imports = [
@ -37,7 +38,7 @@ in {
efiSupport = true; efiSupport = true;
#efiInstallAsRemovable = true; # in case canTouchEfiVariables doesn't work on this system #efiInstallAsRemovable = true; # in case canTouchEfiVariables doesn't work on this system
device = "nodev"; device = "nodev";
useOSProber = true; useOSProber = false;
}; };
# GitHub: vinceliuice/grub2-themes # GitHub: vinceliuice/grub2-themes
grub2-theme = { grub2-theme = {
@ -118,19 +119,34 @@ in {
isNormalUser = true; isNormalUser = true;
extraGroups = ["wheel"]; extraGroups = ["wheel"];
shell = pkgs.bash; #pkgs.fish shell = pkgs.bash; #pkgs.fish
packages = with pkgs; [ packages = let
firefox # TODO: can I just do this: https://nix.dev/manual/nix/2.18/command-ref/new-cli/nix3-flake#url-like-syntax
nitch # instead to use colmena's flake.nix by specifying a rev hash in the flake input?
starfetch colmena-src = pkgs.fetchFromGitHub {
owner = "zhaofengli";
repo = "colmena";
rev = "47b6414d800c8471e98ca072bc0835345741a56a";
sha256 = "rINodqeUuezuCWOnpJgrH7u9vJ86fYT+Dj8Mu8T/IBc=";
};
colmena-latest = pkgs.callPackage "${colmena-src}/package.nix" {};
in
with pkgs; [
firefox
nitch
starfetch
# flatpak requires gnome-software hyprpanel
# for graphical applications
flatpak
gnome-software
jetbrains.rider # flatpak requires gnome-software
gitkraken # for graphical applications
]; flatpak
gnome-software
colmena-latest
jetbrains.rider
gitkraken
];
}; };
# user for my professional jobs and stuff # user for my professional jobs and stuff
@ -163,10 +179,11 @@ in {
home-manager = { home-manager = {
users.me = import ../../homes/me; users.me = import ../../homes/me;
#extraSpecialArgs = {inherit inputs pkgs;};
sharedModules = [ sharedModules = [
inputs.nixcord.homeManagerModules.nixcord
inputs.ags.homeManagerModules.default inputs.ags.homeManagerModules.default
{nixpkgs.overlays = [inputs.hyprpanel.overlay];} inputs.nixcord.homeManagerModules.nixcord
#{nixpkgs.overlays = [inputs.hyprpanel.overlay];}
]; ];
}; };
@ -180,13 +197,16 @@ in {
wl-clipboard # clipboard for wayland wl-clipboard # clipboard for wayland
pavucontrol pavucontrol
(callPackage ./sddm-theme-corners.nix {}).sddm-theme-corners (callPackage ../sddm-theme-corners.nix {}).sddm-theme-corners
# dependencies for my sddm theme: # dependencies for my sddm theme:
pkgs.libsForQt5.qt5.qtgraphicaleffects pkgs.libsForQt5.qt5.qtgraphicaleffects
python311 # I use 3.11 since it's in a pretty stable state now python311 # I use 3.11 since it's in a pretty stable state now
poetry # python dependency management and packaging poetry # python dependency management and packaging
# DEBUG: using neofetch temporarily to see if my system upgrades properly
neofetch
# fish plugins # fish plugins
grc # colorise command outputs grc # colorise command outputs
@ -208,6 +228,7 @@ in {
brightnessctl brightnessctl
acpi acpi
vim vim
powertop
# Unix Commands # Unix Commands
wget wget
@ -219,8 +240,8 @@ in {
programs = { programs = {
hyprland = { hyprland = {
enable = true; enable = true;
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; #package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland; #portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
xwayland.enable = true; xwayland.enable = true;
}; };

View file

@ -121,7 +121,7 @@ in {
rev = "47b6414d800c8471e98ca072bc0835345741a56a"; rev = "47b6414d800c8471e98ca072bc0835345741a56a";
sha256 = "rINodqeUuezuCWOnpJgrH7u9vJ86fYT+Dj8Mu8T/IBc="; sha256 = "rINodqeUuezuCWOnpJgrH7u9vJ86fYT+Dj8Mu8T/IBc=";
}; };
colmena-new = pkgs.callPackage "${colmena-src}/package.nix" {}; colmena-latest = pkgs.callPackage "${colmena-src}/package.nix" {};
in in
with pkgs; [ with pkgs; [
firefox firefox
@ -132,7 +132,7 @@ in {
flatpak flatpak
gnome-software gnome-software
colmena-new colmena-latest
gitkraken gitkraken
# NOTE: downloadthing this causes my PC to freak!! ("too many open files" error) # NOTE: downloadthing this causes my PC to freak!! ("too many open files" error)