Skip to content

Commit

Permalink
refactor(*): move stuff around
Browse files Browse the repository at this point in the history
  • Loading branch information
drainpixie committed Sep 29, 2024
1 parent 1c219bb commit 7f3b8f3
Show file tree
Hide file tree
Showing 8 changed files with 177 additions and 200 deletions.
17 changes: 0 additions & 17 deletions common/tmux.nix

This file was deleted.

6 changes: 3 additions & 3 deletions common/vscode.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# NOTE: For now we use FHS as we have `Settings Sync`
# This is impure and will change in the future.
{pkgs, ...}: let
insiders = (pkgs.vscode.override {isInsiders = true;}).overrideAttrs (oldAttrs: rec {
src = builtins.fetchTarball {
insiders = (pkgs.vscode.override {isInsiders = true;}).overrideAttrs (oldAttrs: {
src = fetchTarball {
url = "https://code.visualstudio.com/sha/download?build=insider&os=linux-x64";
sha256 = "06lvxcd01idv6y6305qwq0n6vn942z9lfs526nd83vp35jasayv4";
};
Expand All @@ -11,5 +11,5 @@
buildInputs = oldAttrs.buildInputs ++ [pkgs.krb5];
});
in {
home.packages = [insiders.fhs];
home.packages = [insiders.fhs pkgs.nil];
}
14 changes: 6 additions & 8 deletions hosts/incubator/ssh.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
_: {
services = {
openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;

PermitRootLogin = "prohibit-password";
};
PermitRootLogin = "prohibit-password";
};
};
}
26 changes: 11 additions & 15 deletions hosts/timeline/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
./audio.nix
./xserver.nix
./hardware.nix

../../common/system.nix
];

networking.hostName = "timeline";
powerManagement.enable = true;

hardware = {
bluetooth.enable = true;
bluetooth.powerOnBoot = true;
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};

systemd.services.NetworkManager-wait-online.enable = false;
Expand All @@ -23,11 +24,7 @@
boot = {
kernelPackages = pkgs.linuxPackages_latest;
loader = {
systemd-boot = {
enable = true;
netbootxyz.enable = true;
};

systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
Expand All @@ -37,6 +34,7 @@
uid = 1000;
home = "/home/akemi";

# TODO: Zsh
shell = pkgs.bash;
isNormalUser = true;
initialPassword = "changeme";
Expand All @@ -49,15 +47,13 @@
};

# `slock` needs to disable OOM killer, for some reason.
security.wrappers = {
slock = {
setuid = true;
security.wrappers.slock = {
setuid = true;

owner = "root";
group = "root";
owner = "root";
group = "root";

source = "${pkgs.slock}/bin/slock";
};
source = "${pkgs.slock}/bin/slock";
};

system.stateVersion = "23.11";
Expand Down
55 changes: 53 additions & 2 deletions users/akemi/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{pkgs, ...}: {
{pkgs, ...}: let
my = import ../../common/colours.nix;
in {
imports = [
./terminal.nix
./desktop.nix
./gnome.nix
./games.nix

../../common/neovim
Expand Down Expand Up @@ -35,10 +36,60 @@
enable = true;

music = "$HOME/msc";
videos = "$HOME/vid";
desktop = "$HOME/dsk";
download = "$HOME/dwl";
pictures = "$HOME/img";
documents = "$HOME/doc";
};

portal = {
enable = true;
xdgOpenUsePortal = true;

extraPortals = builtins.attrValues {
inherit
(pkgs)
xdg-desktop-portal-gtk
;
};

configPackages = builtins.attrValues {
inherit
(pkgs)
xdg-desktop-portal-gtk
xdg-desktop-portal
;
};
};
};

xresources.properties = {
"*.foreground" = my.primary.foreground;
"*.background" = my.primary.background;

"*.color0" = my.normal.black;
"*.color8" = my.bright.black;

"*.color1" = my.normal.red;
"*.color9" = my.bright.red;
"*.color2" = my.normal.green;
"*.color10" = my.bright.green;
"*.color3" = my.normal.yellow;
"*.color11" = my.bright.yellow;

"*.color4" = my.normal.blue;
"*.color12" = my.bright.blue;

"*.color5" = my.normal.magenta;
"*.color13" = my.bright.magenta;

"*.color6" = my.normal.cyan;
"*.color14" = my.bright.cyan;

"*.color7" = my.normal.white;
"*.color15" = my.bright.white;

"*.cursorColor" = my.primary.foreground;
};
}
149 changes: 103 additions & 46 deletions users/akemi/desktop.nix
Original file line number Diff line number Diff line change
@@ -1,61 +1,118 @@
{pkgs, ...}: let
my = import ../../common/colours.nix;
extensions = builtins.attrValues {
inherit
(pkgs.gnomeExtensions)
caffeine
impatience
launch-new-instance
light-style
;
};
in {
fonts.fontconfig.enable = true;

home.packages = builtins.attrValues {
inherit
(pkgs)
# utils

pinentry-gnome3
slock
# apps

google-chrome
pavucontrol
obsidian
spotify
vesktop
gparted
# fonts

meslo-lgs-nf
;
home.packages =
builtins.attrValues {
inherit
(pkgs)
# utils

pinentry-gnome3
slock
# apps

google-chrome
pavucontrol
obsidian
spotify
vesktop
gparted
# fonts

meslo-lgs-nf
;

inherit
(pkgs.faye)
beedii
azuki
;
};
inherit
(pkgs.faye)
beedii
azuki
;
}
++ extensions;

dconf = {
enable = true;

settings = {
# Preferences
"org/gnome/shell" = {
disable-user-extensions = false;
disabled-extensions = [];
enabled-extensions = map (p: p.extensionUuid) extensions;
};

# Keybindings
"org/gnome/desktop/wm/keybindings" = {
close = ["<Super>q"];
toggle-maximized = ["<Super>m"];
toggle-fullscreen = ["<Super>f"];

xresources.properties = {
"*.foreground" = my.primary.foreground;
"*.background" = my.primary.background;
move-to-workspace-1 = ["<Shift><Super>1"];
move-to-workspace-2 = ["<Shift><Super>2"];
move-to-workspace-3 = ["<Shift><Super>3"];
move-to-workspace-4 = ["<Shift><Super>4"];
move-to-workspace-5 = ["<Shift><Super>5"];

"*.color0" = my.normal.black;
"*.color8" = my.bright.black;
switch-to-workspace-1 = ["<Super>1"];
switch-to-workspace-2 = ["<Super>2"];
switch-to-workspace-3 = ["<Super>3"];
switch-to-workspace-4 = ["<Super>4"];
switch-to-workspace-5 = ["<Super>5"];
};

"*.color1" = my.normal.red;
"*.color9" = my.bright.red;
"*.color2" = my.normal.green;
"*.color10" = my.bright.green;
"*.color3" = my.normal.yellow;
"*.color11" = my.bright.yellow;
"org/gnome/shell/keybindings" = {
switch-to-application-1 = [];
switch-to-application-2 = [];
switch-to-application-3 = [];
switch-to-application-4 = [];
switch-to-application-5 = [];
switch-to-application-6 = [];
switch-to-application-7 = [];
switch-to-application-8 = [];
switch-to-application-9 = [];
switch-to-application-10 = [];
};

"*.color4" = my.normal.blue;
"*.color12" = my.bright.blue;
"org/gnome/settings-daemon/plugins/media-keys" = {
custom-keybindings = [
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/"
];
};

"*.color5" = my.normal.magenta;
"*.color13" = my.bright.magenta;
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
binding = "<Super>Return";
command = "urxvt";
name = "Launch terminal";
};

"*.color6" = my.normal.cyan;
"*.color14" = my.bright.cyan;
# TODO: Make it a proper script/plugin whatever
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
binding = "<Super>j";
command = "/home/akemi/dot/sketchpad/notes.sh";
name = "Launch notes sketchpad";
};

"*.color7" = my.normal.white;
"*.color15" = my.bright.white;
# UI
"org/gnome/desktop/interface" = {
font-name = "azuki_font 11";
};

"*.cursorColor" = my.primary.foreground;
"org/gtk/gtk4/settings/file-chooser" = {
show-hidden = true;
sort-directories-first = true;
view-type = "list";
};
};
};
}
Loading

0 comments on commit 7f3b8f3

Please sign in to comment.