From 50d37c0e6b8170fd20a6422df3e07927c9dad04b Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Wed, 30 Oct 2024 22:41:50 -0400 Subject: [PATCH] some stuff --- flake.lock | 53 ++++++++++++++++++++++++++------ flake.nix | 76 +++++++++++++++++++++++++++++++++++++++------- home/core.nix | 1 + home/default.nix | 9 ++++-- home/git.nix | 3 +- home/shairport.nix | 6 ---- 6 files changed, 119 insertions(+), 29 deletions(-) delete mode 100644 home/shairport.nix diff --git a/flake.lock b/flake.lock index f86ca1d..50051a5 100644 --- a/flake.lock +++ b/flake.lock @@ -57,18 +57,36 @@ "type": "github" } }, - "nixpkgs": { + "nix-ld": { + "inputs": { + "nixpkgs": "nixpkgs" + }, "locked": { - "lastModified": 1725693463, - "narHash": "sha256-ZPzhebbWBOr0zRWW10FfqfbJlan3G96/h3uqhiFqmwg=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "68e7dce0a6532e876980764167ad158174402c6f", + "lastModified": 1728031945, + "narHash": "sha256-NRkLjdMtVfC6dD1gEbYZWFEtbmC2xfD6ft1IP7l76Vw=", + "owner": "Mic92", + "repo": "nix-ld", + "rev": "4524c512e8729ccb5a1b9239d01e1474cbf074a2", "type": "github" }, "original": { - "owner": "nixos", - "ref": "nixos-24.05", + "owner": "Mic92", + "repo": "nix-ld", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1727634051, + "narHash": "sha256-S5kVU7U82LfpEukbn/ihcyNt2+EvG7Z5unsKW9H/yFA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "06cf0e1da4208d3766d898b7fdab6513366d45b9", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -89,12 +107,29 @@ "type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1726243404, + "narHash": "sha256-sjiGsMh+1cWXb53Tecsm4skyFNag33GPbVgCdfj3n9I=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "345c263f2f53a3710abe117f28a5cb86d0ba4059", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "darwin": "darwin", "home-manager": "home-manager", "nix-flatpak": "nix-flatpak", - "nixpkgs": "nixpkgs", + "nix-ld": "nix-ld", + "nixpkgs": "nixpkgs_2", "nixpkgs-darwin": "nixpkgs-darwin" } } diff --git a/flake.nix b/flake.nix index 11613f9..02bac2b 100644 --- a/flake.nix +++ b/flake.nix @@ -1,9 +1,10 @@ { description = "Wyatt's nix configuration suite"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.4.1"; nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-24.05-darwin"; + nix-ld.url = "github:Mic92/nix-ld"; home-manager = { url = "github:nix-community/home-manager/release-24.05"; inputs.nixpkgs.follows = "nixpkgs"; @@ -18,6 +19,7 @@ self, nixpkgs, nix-flatpak, + nix-ld, darwin, home-manager, ... @@ -25,7 +27,7 @@ userName = "wyatt"; userEmail = "wyatt@wyattjmiller.com"; extraSpecialArgs = { - inherit userName userEmail; + inherit userName userEmail ; }; in { # Primary laptop - MacBook Pro (2023, M3) @@ -36,10 +38,10 @@ hostname = "sephiroth"; }; modules = [ - ./modules/nix-core.nix - ./modules/darwin/configuration.nix - ./modules/darwin/apps.nix - ./modules/host-users.nix + ./modules/common/nix-core.nix + ./modules/common/host-users.nix + ./modules/machine/sephiroth/configuration.nix + ./modules/machine/sephiroth/apps.nix home-manager.darwinModules.home-manager { @@ -59,11 +61,12 @@ hostname = "cloud"; }; modules = [ - nix-flatpak.nixosModules.nix-flatpak - ./modules/nixos/hardware-configuration.nix - ./modules/nix-core.nix - ./modules/nixos/configuration.nix - ./modules/host-users.nix + nix-flatpak.nixosModules.nix-flatpak + nix-ld.nixosModules.nix-ld + ./modules/common/nix-core.nix + ./modules/common/host-users.nix + ./modules/machine/cloud/hardware-configuration.nix + ./modules/machine/cloud/configuration.nix home-manager.nixosModules.home-manager { @@ -76,5 +79,56 @@ } ]; }; + + # Apartment appliance server + nixosConfigurations."valefor" = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { + inherit userName userEmail; + hostname = "valefor"; + }; + # modules = [ + # nix-ld.nixosModules.nix-ld + # ./modules/nix-core.nix + # ./modules/host-users.nix + # + # home-manager.nixosModules.home-manager + # { + # home-manager.useGlobalPkgs = true; + # home-manager.useUserPackages = true; + # home-manager.extraSpecialArgs = extraSpecialArgs; + # home-manager.users.${userName}.imports = [ + # ./home + # ]; + # } + # ]; + }; + + # Storage, status, game, and media server + nixosConfigurations."ixion" = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { + inherit userName userEmail; + hostname = "ixion"; + }; + # modules = [ + # nix-flatpak.nixosModules.nix-flatpak + # nix-ld.nixosModules.nix-ld + # ./modules/nixos/hardware-configuration.nix + # ./modules/nix-core.nix + # ./modules/nixos/configuration.nix + # ./modules/host-users.nix + # + # home-manager.nixosModules.home-manager + # { + # home-manager.useGlobalPkgs = true; + # home-manager.useUserPackages = true; + # home-manager.extraSpecialArgs = extraSpecialArgs; + # home-manager.users.${userName}.imports = [ + # ./home + # ]; + # } + # ]; + }; }; } diff --git a/home/core.nix b/home/core.nix index a483bf2..9cfbd15 100644 --- a/home/core.nix +++ b/home/core.nix @@ -22,6 +22,7 @@ aria2 yt-dlp imv + xdg-utils # misc cowsay diff --git a/home/default.nix b/home/default.nix index 6506390..b9fc959 100644 --- a/home/default.nix +++ b/home/default.nix @@ -36,12 +36,17 @@ in { sessionVariables = { XDG_CURRENT_DESKTOP = "sway"; + XDG_SESSION_TYPE = "wayland"; + XDG_CONFIG_HOME = "$HOME/.config"; + XDG_CACHE_HOME = "$HOME/.cache"; + XDG_DATA_HOME = "$HOME/.local/share"; + XDG_STATE_HOME = "$HOME/.local/state"; }; pointerCursor = { gtk.enable = true; - package = pkgs.bibata-cursors; - name = "Bibata-Modern-Classic"; + package = pkgs.catppuccin-cursors.mochaDark; + name = "catppuccin-mocha-dark-cursors"; size = 22; }; diff --git a/home/git.nix b/home/git.nix index 43bbe6e..532edb6 100644 --- a/home/git.nix +++ b/home/git.nix @@ -32,7 +32,8 @@ # common aliases br = "branch"; co = "checkout"; - st = "status"; + st = "status -sb"; + status = "status -sb"; ls = "log --pretty=format:\"%C(yellow)%h%Cred%d\\\\ %Creset%s%Cblue\\\\ [%cn]\" --decorate"; ll = "log --pretty=format:\"%C(yellow)%h%Cred%d\\\\ %Creset%s%Cblue\\\\ [%cn]\" --decorate --numstat"; cm = "commit -m"; diff --git a/home/shairport.nix b/home/shairport.nix deleted file mode 100644 index e92b3ce..0000000 --- a/home/shairport.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ pkgs, ... }: { - services.shairport-sync = { - enable = pkgs.stdenv.isLinux; - openFirewall = pkgs.stdenv.isLinux; - }; -}