Compare commits

..

No commits in common. "0e909382804fa784626e992a014abaeab1cca5d1" and "326148e7951edf8442f56bfbf3171cd4a6263e74" have entirely different histories.

8 changed files with 51 additions and 90 deletions

View File

@ -27,36 +27,19 @@
outputs = outputs =
{ {
self,
darwin, darwin,
nixpkgs, nixpkgs,
home-manager, home-manager,
nix-rosetta-builder, nix-rosetta-builder,
... ...
}@inputs: }@inputs:
let
sharedArgs = { inherit inputs self; };
in
{ {
nixosModules = { darwinConfigurations = {
base = ./modules/base; larstvei-macbookpro = darwin.lib.darwinSystem {
nixos = ./modules/nixos;
graphical = ./modules/nixos/graphical;
};
homeModules = {
full = ./modules/home/full;
desktop = ./modules/desktop;
minimal = ./modules/home/minimal;
};
darwinModules = {
base = ./modules/darwin;
};
darwinConfigurations.larstvei-macbookpro = darwin.lib.darwinSystem {
system = "aarch64-darwin"; system = "aarch64-darwin";
specialArgs = sharedArgs;
specialArgs = { inherit inputs; };
modules = [ modules = [
home-manager.darwinModules.default home-manager.darwinModules.default
./machines/macbook ./machines/macbook
@ -64,23 +47,24 @@
{ nix-rosetta-builder.onDemand = true; } { nix-rosetta-builder.onDemand = true; }
]; ];
}; };
};
nixosConfigurations = nixosConfigurations.thinkpad = nixpkgs.lib.nixosSystem {
let system = "x86_64-linux";
mkLinux = specialArgs = { inherit inputs; };
system: path:
nixpkgs.lib.nixosSystem {
system = system;
specialArgs = sharedArgs;
modules = [ modules = [
home-manager.nixosModules.default home-manager.nixosModules.default
path ./machines/thinkpad
]; ];
}; };
in
{ nixosConfigurations.vm-aarch64 = nixpkgs.lib.nixosSystem {
thinkpad = mkLinux "x86_64-linux" ./machines/thinkpad; system = "aarch64-linux";
vm-aarch64 = mkLinux "aarch64-linux" ./machines/vm-aarch64; specialArgs = { inherit inputs; };
modules = [
home-manager.nixosModules.default
./machines/vm-aarch64
];
}; };
}; };
} }

View File

@ -1,13 +1,8 @@
{ { pkgs, inputs, ... }:
self,
pkgs,
inputs,
...
}:
{ {
imports = [ imports = [
self.nixosModules.base ../../modules/base
self.darwinModules.base ../../modules/darwin
]; ];
system.primaryUser = "larstvei"; system.primaryUser = "larstvei";
@ -23,6 +18,6 @@
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
extraSpecialArgs = { inherit inputs; }; extraSpecialArgs = { inherit inputs; };
users.larstvei.imports = [ self.homeModules.full ]; users.larstvei.imports = [ ../../modules/home/full ];
}; };
} }

View File

@ -1,16 +1,15 @@
{ self, ... }:
{ {
imports = [ imports = [
./keyboard ./keyboard
./hardware ./hardware
self.nixosModules.base ../../modules/base
self.nixosModules.nixos ../../modules/nixos
self.nixosModules.graphical ../../modules/nixos/graphical
]; ];
home-manager.users.larstvei.imports = [ home-manager.users.larstvei.imports = [
self.homeModules.full ../../modules/home/full
self.homeModules.desktop ../../modules/desktop
]; ];
services.gnome.gnome-keyring.enable = true; services.gnome.gnome-keyring.enable = true;

View File

@ -1,13 +1,14 @@
{ self, ... }:
{ {
imports = [ imports = [
./hardware ./hardware
self.nixosModules.base ../../modules/base
self.nixosModules.nixos ../../modules/nixos
# ../../modules/nixos-graphical
]; ];
home-manager.users.larstvei.imports = [ home-manager.users.larstvei.imports = [
self.homeModules.minimal ../../modules/home/minimal
# ../../modules/desktop
]; ];
networking.hostName = "larstvei-vm"; networking.hostName = "larstvei-vm";

View File

@ -47,10 +47,6 @@
services.darkman = { services.darkman = {
enable = true; enable = true;
settings = { settings.portal = true;
portal = true;
lat = 59.9;
lng = 10.7;
};
}; };
} }

View File

@ -61,7 +61,7 @@ in
"$mod, code:28, exec, kitty" # T (code:28) "$mod, code:28, exec, kitty" # T (code:28)
"$mod, code:26, exec, emacs" # E (code:26) "$mod, code:26, exec, emacs" # E (code:26)
"$mod, code:56, exec, zen-beta" # B (code:56) "$mod, code:56, exec, zen-beta" # B (code:56)
"$mod, code:40, exec, ${pkgs.darkman}/bin/darkman toggle" # D (code:40) "$mod, code:40, exec, darkman toggle" # D (code:40)
"$mod, code:65, exec, ${nanostatus}/bin/nanostatus-toggle" # Space (code:65) "$mod, code:65, exec, ${nanostatus}/bin/nanostatus-toggle" # Space (code:65)
"$mod SHIFT, code:58, exec, ${toggle-mirror-display}/bin/toggle-mirror-display" # M (code:58) + Shift "$mod SHIFT, code:58, exec, ${toggle-mirror-display}/bin/toggle-mirror-display" # M (code:58) + Shift

View File

@ -1,4 +1,3 @@
{ pkgs, ... }:
let let
theme = import ../theme; theme = import ../theme;
in in
@ -16,10 +15,7 @@ in
settings = { settings = {
exec-once = [ exec-once = [ "swaylock || hyprctl dispatch exit" ];
"uwsm finalize"
"swaylock || hyprctl dispatch exit"
];
misc.disable_hyprland_logo = true; misc.disable_hyprland_logo = true;
@ -65,16 +61,14 @@ in
services.darkman = { services.darkman = {
lightModeScripts.hyprland-light = '' lightModeScripts.hyprland-light = ''
while read -r line; do export "$line"; done < <(${pkgs.systemd}/bin/systemctl --user show-environment) hyprctl keyword misc:background_color 0x${theme.bg.light}
${pkgs.hyprland}/bin/hyprctl keyword misc:background_color 0x${theme.bg.light} hyprctl keyword general:col.active_border 0xFF${theme.primary.light}
${pkgs.hyprland}/bin/hyprctl keyword general:col.active_border 0xFF${theme.primary.light} hyprctl keyword general:col.inactive_border 0xFF${theme.secondary.light}
${pkgs.hyprland}/bin/hyprctl keyword general:col.inactive_border 0xFF${theme.secondary.light}
''; '';
darkModeScripts.hyprland-dark = '' darkModeScripts.hyprland-dark = ''
while read -r line; do export "$line"; done < <(${pkgs.systemd}/bin/systemctl --user show-environment) hyprctl keyword misc:background_color 0x${theme.bg.dark}
${pkgs.hyprland}/bin/hyprctl keyword misc:background_color 0x${theme.bg.dark} hyprctl keyword general:col.active_border 0xFF${theme.primary.dark}
${pkgs.hyprland}/bin/hyprctl keyword general:col.active_border 0xFF${theme.primary.dark} hyprctl keyword general:col.inactive_border 0xFF${theme.secondary.dark}
${pkgs.hyprland}/bin/hyprctl keyword general:col.inactive_border 0xFF${theme.secondary.dark}
''; '';
}; };
} }

View File

@ -4,7 +4,7 @@
enable = true; enable = true;
settings = rec { settings = rec {
initial_session = { initial_session = {
command = "${pkgs.uwsm}/bin/uwsm start hyprland-uwsm.desktop"; command = "hyprland > /dev/null 2>&1";
user = "larstvei"; user = "larstvei";
}; };
default_session = initial_session; default_session = initial_session;
@ -23,15 +23,7 @@
extraPortals = [ extraPortals = [
pkgs.xdg-desktop-portal-hyprland pkgs.xdg-desktop-portal-hyprland
pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-gtk
pkgs.darkman
]; ];
config.hyprland."org.freedesktop.impl.portal.Settings" = "darkman";
config.hyprland = {
default = [
"hyprland"
"gtk"
];
"org.freedesktop.impl.portal.Settings" = [ "darkman" ];
};
}; };
} }