Compare commits

..

10 Commits

Author SHA1 Message Date
0fda8d240b
fixes, updates, etc. 2023-04-09 13:49:53 +01:00
560050a801
updated README with latest changes for Mac 2023-04-02 23:33:43 +01:00
8f003727fc
some mac fixes 2023-04-02 22:28:10 +01:00
4677d65add
added some xdg to macos 2023-04-02 18:11:39 +01:00
06bf35ff27
removed gitkraken 2023-04-02 18:07:28 +01:00
19db410ad5
fixes for NixOS 2023-04-02 18:01:14 +01:00
8c7aed6264
fixed ssh on mac 2023-04-02 16:45:31 +01:00
d0248123ab
inital support for macos 2023-04-02 16:03:21 +01:00
39a0b2e5d0
began reorganising 2023-03-29 06:58:29 +01:00
28133afd92
removed zoxide 2023-03-15 17:26:19 +00:00
143 changed files with 373 additions and 159 deletions

View File

@ -2,8 +2,13 @@
A Nix flake for my system configuration - WIP. A Nix flake for my system configuration - WIP.
## Structure ## Structure
- `./maddie` - A folder for my home-manager config - `./maddie` - A folder for my home-manager configs (aka my user)
- `./system` - A folder for my system-wide config - `./maddie/macos` - Specifically macOS (darwin) home configuration
- `./maddie/nixos` - Specifically NixOS home configuration
- `./maddie/common` - Home configuration available on all systems
- `./systems` - A folder for my system-wide configs
- `./systems/mmacbookpro/` - System configuration for my MacBook Pro (M.MacBookPro)
- `./systems/mdesktop` - System configuration for my desktop (M.Desktop)
- `overlays.nix` - A file for my nixpkgs overlays - `overlays.nix` - A file for my nixpkgs overlays
## Many thanks ## Many thanks

View File

@ -1,5 +1,25 @@
{ {
"nodes": { "nodes": {
"darwin": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1680266963,
"narHash": "sha256-IW/lzbUCOcldLHWHjNSg1YoViDnZOmz0ZJL7EH9OkV8=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "99d4187d11be86b49baa3a1aec0530004072374f",
"type": "github"
},
"original": {
"owner": "LnL7",
"repo": "nix-darwin",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -8,11 +28,11 @@
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1678109311, "lastModified": 1680389554,
"narHash": "sha256-Q64FoCH5rp3XHoC8u1+KyjLEFGTY7kX9YaIaYfugvfY=", "narHash": "sha256-+8FUmS4GbDMynQErZGXKg+wU76rq6mI5fprxFXFWKSM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "04d6cad67557512452decbfe888c68fa11338a96", "rev": "ddd8866c0306c48f465e7f48432e6f1ecd1da7f8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -23,11 +43,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1678116888, "lastModified": 1680487167,
"narHash": "sha256-/Y4RTkPq+RVJjkoM/mYyCREFLZhvtISc/rLcgM1vLvo=", "narHash": "sha256-9FNIqrxDZgSliGGN2XJJSvcDYmQbgOANaZA4UWnTdg4=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "49596eb4e50b18337aad3b73317371bcd4e3b047", "rev": "53dad94e874c9586e71decf82d972dfb640ef044",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -37,6 +57,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"darwin": "darwin",
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }

View File

@ -1,36 +1,67 @@
{ {
description = "Maddie's NixOS configuration"; description = "Maddie's Nix configurations";
inputs = { inputs = {
# Home manager # Home manager
home-manager.url = "github:nix-community/home-manager"; home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
darwin.url = "github:LnL7/nix-darwin";
darwin.inputs.nixpkgs.follows = "nixpkgs";
}; };
outputs = { self, nixpkgs, home-manager }: outputs = { self, nixpkgs, home-manager, darwin }:
let let
username = "spy"; username = "maddie";
utils = import ./utils nixpkgs;
nixpkgs_x86_64 = import nixpkgs {
config.allowUnfree = true;
config.allowUnsupportedSystem = false;
config.allowBroken = false;
overlays = import ./overlays.nix;
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; config.allowUnfree = true; overlays = import ./overlays.nix; }; };
utils = import ./utils pkgs;
specialArgs = { inherit username; inherit pkgs; }; nixpkgs_aarch64 = import nixpkgs {
config.allowUnfree = true;
config.allowUnsupportedSystem = false;
config.allowBroken = false;
overlays = import ./overlays.nix;
system = "aarch64-darwin";
};
in in
{ {
packages.${system} = { nixosConfigurations."luna" = nixpkgs.lib.nixosSystem {
nixosConfigurations.luna = nixpkgs.lib.nixosSystem { specialArgs = { inherit username; };
inherit system; pkgs = nixpkgs_x86_64;
inherit pkgs; system = "x86_64-linux";
inherit specialArgs;
modules = [ modules = [
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
home-manager.users.${username}.imports = utils.nixFilesIn ./maddie; home-manager.users.${username}.imports = utils.nixFilesIn ./maddie/common ++ utils.nixFilesIn ./maddie/nixos;
home-manager.extraSpecialArgs = specialArgs; home-manager.extraSpecialArgs = { inherit username; pkgs = nixpkgs_x86_64; };
} }
] ++ utils.nixFilesIn ./system; ] ++ utils.nixFilesIn ./systems/mdesktop;
};
}; };
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt; darwinConfigurations."MMacBookPro" = darwin.lib.darwinSystem
{
pkgs = nixpkgs_aarch64;
specialArgs = { inherit username; };
system = "aarch64-darwin";
modules = [
home-manager.darwinModules.home-manager
{
home-manager.useUserPackages = true;
home-manager.users.${username}.imports = utils.nixFilesIn ./maddie/common ++ utils.nixFilesIn ./maddie/macos;
home-manager.extraSpecialArgs = { inherit username; pkgs = nixpkgs_aarch64; };
}
] ++ utils.nixFilesIn ./systems/mmacbookpro;
};
formatter.x86_64-linux = nixpkgs_x86_64.legacyPackages.x86_64-linux.nixpkgs-fmt;
formatter.aarch64-darwin = nixpkgs_aarch64.legacyPackages.aarch64-darwin.nixpkgs-fmt;
}; };
} }

View File

@ -1,11 +0,0 @@
{ config, pkgs, ... }:
{
programs.browserpass = {
enable = true;
browsers = [
"chromium"
"firefox"
];
};
}

View File

@ -0,0 +1,8 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
amfora
lynx
];
}

View File

@ -4,6 +4,5 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
python3Full # Python python3Full # Python
go # Go go # Go
gcc # C
]; ];
} }

View File

@ -3,7 +3,6 @@
{ {
# Misc editors # Misc editors
home.packages = with pkgs; [ home.packages = with pkgs; [
vscode
helix helix
vis vis
]; ];

16
maddie/common/exa.nix Normal file
View File

@ -0,0 +1,16 @@
{ config, ... }:
{
programs.exa = {
enable = true;
enableAliases = true;
extraOptions = [
"--group-directories-first"
"--time-style=long-iso"
"--git"
"-h"
"-g"
];
icons = true;
};
}

View File

@ -2,7 +2,6 @@
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
gitkraken
gh gh
]; ];
@ -18,7 +17,7 @@
userName = "Madeleine"; userName = "Madeleine";
userEmail = "maddie@spyhoodle.me"; userEmail = "maddie@spyhoodle.me";
signing = { signing = {
key = "467EFD918D5E770AD1EE2CE699CD1AB536E1C7AD"; key = "FA50688B9EB6D8AA070C8241C296DE8C9053683F";
signByDefault = true; signByDefault = true;
gpgPath = "gpg2"; gpgPath = "gpg2";
}; };
@ -37,5 +36,14 @@
init.defaultBranch = "development"; init.defaultBranch = "development";
pull.rebase = "merges"; pull.rebase = "merges";
}; };
ignores = [
"**/.DS_Store"
"**/._.DS_Store"
".DS_Store"
"._.DS_Store"
"**/*.swp"
"*.swp"
];
}; };
} }

View File

@ -52,9 +52,7 @@ return require('packer').startup(function(use)
use { use {
'xiyaowong/nvim-transparent', 'xiyaowong/nvim-transparent',
config = function() config = function()
require('transparent').setup({ vim.g.transparent_enabled = false
enable = false;
})
end end
} }

View File

@ -4,6 +4,5 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
xorg.xkill # Kill X11 programs with mouse xorg.xkill # Kill X11 programs with mouse
killall # Kill programs killall # Kill programs
gotop # Process manager in go
]; ];
} }

View File

@ -5,8 +5,6 @@
# Aliases # Aliases
shellAliases = { shellAliases = {
# Core Programs # Core Programs
ls = "ls -lhN --color=auto --group-directories-first";
ll = "ls -av";
cp = "cp -iv"; cp = "cp -iv";
mv = "mv -iv"; mv = "mv -iv";
rm = "rm -vI"; rm = "rm -vI";

View File

@ -1,11 +1,6 @@
{ config, pkgs, username, ... }: { config, pkgs, username, ... }:
{ {
# Drawterm
home.packages = with pkgs; [
drawterm
];
# SSH # SSH
programs.ssh = { programs.ssh = {
enable = true; enable = true;

14
maddie/common/wezterm.nix Normal file
View File

@ -0,0 +1,14 @@
{ config, pkgs, ... }:
{
programs.wezterm = {
enable = true;
extraConfig = ''
return {
color_scheme = 'OneDark (base16)',
hide_tab_bar_if_only_one_tab = true,
window_close_confirmation = 'NeverPrompt'
}
'';
};
}

21
maddie/common/xdg.nix Normal file
View File

@ -0,0 +1,21 @@
{ config, ... }:
{
home = {
sessionVariables = {
# Force use of XDG Dir Spec
CUDA_CACHE_PATH = "${config.xdg.cacheHome}/nv";
LESSHISTFILE = "${config.xdg.configHome}/less/history";
LESSKEY = "${config.xdg.configHome}/less/keys";
WINEPREFIX = "${config.xdg.dataHome}/wine";
_JAVA_OPTIONS = "-Djava.util.prefs.userRoot=${config.xdg.configHome}/java";
};
shellAliases = {
# Force use of XDG Dir Spec
wget = "wget --hsts-file='${config.xdg.dataHome}/wget-hsts'";
rxrdb = "xrdb -load '${config.xdg.configHome}/.config/X11/xresources'";
nvidia-settings = "nvidia-settings --config='${config.xdg.configHome}'/nvidia/settings";
};
};
}

View File

@ -1,48 +0,0 @@
{ config, ... }:
{
programs.firefox = {
enable = true;
profiles = {
"maddie" = {
name = "Maddie";
bookmarks = [
{
name = "Home";
bookmarks = [
{
name = "BT Home Hub";
url = "http://192.168.1.254/";
}
{
name = "Home Assistant";
url = "http://192.168.1.105:8123/lovelace/0";
}
{
name = "Security Cameras";
url = "http://192.168.1.108/";
}
{
name = "Fast";
url = "https://fast.com/";
}
];
}
{
name = "Nix";
bookmarks = [
{
name = "NixOS Packages";
url = "https://search.nixos.org/packages";
}
{
name = "NixOS Options";
url = "https://search.nixos.org/options";
}
];
}
];
};
};
};
}

10
maddie/macos/home.nix Normal file
View File

@ -0,0 +1,10 @@
{ config, username, pkgs, lib, ... }:
{
programs.home-manager.enable = true;
home = {
inherit username;
homeDirectory = lib.mkForce "/Users/${username}";
stateVersion = "23.05";
};
}

View File

@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
drawterm
];
}

View File

@ -0,0 +1,12 @@
{ config, ... }:
{
programs.librewolf = {
enable = true;
settings = {
"browser.uidensity" = 1;
"webgl.disabled" = false;
"privacy.resistFingerprinting" = false;
};
};
}

View File

@ -2,9 +2,10 @@
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
element-desktop # Matrix client
signal-desktop # Signal client signal-desktop # Signal client
discord-canary # Discord client discord-canary # Discord client
ripcord # Better discord client ripcord # Better discord client
element # Matrix client nheko # Better matrix client
]; ];
} }

8
maddie/nixos/secrets.nix Normal file
View File

@ -0,0 +1,8 @@
{ config, ... }:
{
services.pass-secret-service = {
enable = true;
storePath = "${config.xdg.dataHome}/password-store";
};
}

Some files were not shown because too many files have changed in this diff Show More