Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
harukafractus committed Dec 23, 2024
1 parent 74eac3d commit b246589
Show file tree
Hide file tree
Showing 12 changed files with 227 additions and 298 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ NUR: [![Build and populate cache](https://github.com/harukafractus/nix/actions/w


### Darwin
> nix run --extra-experimental-features "nix-command flakes" nix-darwin -- switch --flake .#[device_name]
> nix run --extra-experimental-features "nix-command flakes" nix-darwin -- switch --flake .#[device_name]
### Standalone Home Manager
> nix run home-manager/master -- switch --flake [dir]
30 changes: 12 additions & 18 deletions configs/darwin-configuration.nix → configs/darwin.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ pkgs, home-manager, ... }:
{ mac-hostname, username }:
{ pkgs, home-manager, ... }: {
networking.hostName = mac-hostname;

{
nixpkgs.overlays = [ (import ../nur-everything/overlays/mac-apps) ];

# List packages installed in system profile. To search by name, run:
Expand All @@ -20,7 +21,7 @@
sol
python3Full
libreoffice-bin
#standardnotes
imagemagick
];

# Enable trackpad tap to click
Expand All @@ -35,9 +36,7 @@

system.defaults.CustomUserPreferences = {
# Enable Debug Menu
NSGlobalDomain = {
_NS_4445425547 = true;
};
NSGlobalDomain = { _NS_4445425547 = true; };

# Disable .DS_Store Writing
"com.apple.desktopservices" = {
Expand All @@ -52,16 +51,13 @@
FXEnableExtensionChangeWarning = false; # Changing file extension warning
};
# Show battery percentage
"com.apple.controlcenter.plist" = {
BatteryShowPercentage = true;
};
"com.apple.controlcenter.plist" = { BatteryShowPercentage = true; };
};


# Define user `haruka`
users.users.haruka = {
name = "haruka";
home = "/Users/haruka";
# Define user
users.users.${username} = {
name = username;
home = "/Users/${username}";
};

# Configure zsh as an interactive shell.
Expand All @@ -70,9 +66,7 @@
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.haruka = import (
./home-manager.nix
);
users.${username} = import (./home.nix { inherit username; });
};

# Enable flakes and optimise store during every build
Expand All @@ -86,5 +80,5 @@

# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
nix.package = pkgs.nix;
nix.package = pkgs.nix;
}
51 changes: 27 additions & 24 deletions configs/home-manager.nix → configs/home.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{ username }:
{ pkgs, config, lib, ... }: {
home = {
username = "haruka";
homeDirectory = "/Users/haruka";
username = username;
homeDirectory = if pkgs.stdenv.isDarwin then
"/Users/${username}"
else
"/home/${username}";
stateVersion = "24.11";
shellAliases = {
gc = "sudo nix-collect-garbage -d";
};
shellAliases = { gc = "sudo nix-collect-garbage -d; nix-collect-garbage -d"; };
};

home.file.".nanorc" = {
Expand All @@ -16,20 +18,14 @@
programs.git = {
enable = true;
extraConfig = {
init = {
defaultBranch = "main";
};
init = { defaultBranch = "main"; };
user = {
email = "[email protected]";
name = "harukafractus";
signingkey = "~/.ssh/id_rsa.pub";
};
gpg = {
format = "ssh";
};
commit = {
gpgSign = true;
};
gpg = { format = "ssh"; };
commit = { gpgSign = true; };
};
};

Expand All @@ -40,7 +36,7 @@
source-han-sans
source-han-mono
source-han-serif
source-han-code-jp
source-han-code-jp
meslo-lgs-nf
fortune-kind
cowsay
Expand Down Expand Up @@ -71,8 +67,6 @@
};
};



dconf.settings = if pkgs.stdenv.isLinux then {
"org/gnome/desktop/peripherals/touchpad" = {
"natural-scroll" = false;
Expand All @@ -84,15 +78,23 @@
show-battery-percentage = true;
};

"org/gnome/nautilus/preferences" = { default-folder-viewer="list-view"; };
"org/gnome/nautilus/list-view" = { default-zoom-level="small"; };
"org/gnome/nautilus/preferences" = { default-folder-viewer = "list-view"; };
"org/gnome/nautilus/list-view" = { default-zoom-level = "small"; };

"org/gnome/settings-daemon/peripherals/touchscreen" = { orientation-lock=true; };
"org/gnome/settings-daemon/peripherals/touchscreen" = {
orientation-lock = true;
};
"org/gnome/desktop/datetime" = { automatic-timezone = true; };
"org/gnome/system/location" = { enabled = true; };
"org/gnome/mutter" = { edge-tiling = true; };
"org/gnome/mutter" = {
edge-tiling = true;
experimental-features = [ "scale-monitor-framebuffer" ];
};

"org/gnome/desktop/app-folders" = { folder-children = ["LibreOffice" "Utilities" ]; };
"org/gnome/desktop/app-folders" = {
folder-children = [ "LibreOffice" "Utilities" ];
};

"org/gnome/desktop/app-folders/folders/LibreOffice" = {
name = "LibreOffice";
apps = [
Expand All @@ -113,6 +115,7 @@
];
};

"org/gnome/shell" = { app-picker-layout = []; };
} else {};
"org/gnome/shell" = { app-picker-layout = [ ]; };
} else
{ };
}
122 changes: 10 additions & 112 deletions flake.lock
100755 → 100644

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b246589

Please sign in to comment.