Compare commits
10 Commits
6985875b3e
...
0fda8d240b
Author | SHA1 | Date | |
---|---|---|---|
0fda8d240b | |||
560050a801 | |||
8f003727fc | |||
4677d65add | |||
06bf35ff27 | |||
19db410ad5 | |||
8c7aed6264 | |||
d0248123ab | |||
39a0b2e5d0 | |||
28133afd92 |
@ -2,8 +2,13 @@
|
||||
A Nix flake for my system configuration - WIP.
|
||||
|
||||
## Structure
|
||||
- `./maddie` - A folder for my home-manager config
|
||||
- `./system` - A folder for my system-wide config
|
||||
- `./maddie` - A folder for my home-manager configs (aka my user)
|
||||
- `./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
|
||||
|
||||
## Many thanks
|
||||
|
33
flake.lock
33
flake.lock
@ -1,5 +1,25 @@
|
||||
{
|
||||
"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": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@ -8,11 +28,11 @@
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1678109311,
|
||||
"narHash": "sha256-Q64FoCH5rp3XHoC8u1+KyjLEFGTY7kX9YaIaYfugvfY=",
|
||||
"lastModified": 1680389554,
|
||||
"narHash": "sha256-+8FUmS4GbDMynQErZGXKg+wU76rq6mI5fprxFXFWKSM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "04d6cad67557512452decbfe888c68fa11338a96",
|
||||
"rev": "ddd8866c0306c48f465e7f48432e6f1ecd1da7f8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -23,11 +43,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1678116888,
|
||||
"narHash": "sha256-/Y4RTkPq+RVJjkoM/mYyCREFLZhvtISc/rLcgM1vLvo=",
|
||||
"lastModified": 1680487167,
|
||||
"narHash": "sha256-9FNIqrxDZgSliGGN2XJJSvcDYmQbgOANaZA4UWnTdg4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "49596eb4e50b18337aad3b73317371bcd4e3b047",
|
||||
"rev": "53dad94e874c9586e71decf82d972dfb640ef044",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -37,6 +57,7 @@
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"darwin": "darwin",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
|
77
flake.nix
77
flake.nix
@ -1,36 +1,67 @@
|
||||
{
|
||||
description = "Maddie's NixOS configuration";
|
||||
description = "Maddie's Nix configurations";
|
||||
|
||||
inputs = {
|
||||
# Home manager
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
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
|
||||
username = "spy";
|
||||
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; };
|
||||
in
|
||||
{
|
||||
packages.${system} = {
|
||||
nixosConfigurations.luna = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
inherit pkgs;
|
||||
inherit specialArgs;
|
||||
modules = [
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.users.${username}.imports = utils.nixFilesIn ./maddie;
|
||||
home-manager.extraSpecialArgs = specialArgs;
|
||||
}
|
||||
] ++ utils.nixFilesIn ./system;
|
||||
};
|
||||
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";
|
||||
};
|
||||
|
||||
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt;
|
||||
nixpkgs_aarch64 = import nixpkgs {
|
||||
config.allowUnfree = true;
|
||||
config.allowUnsupportedSystem = false;
|
||||
config.allowBroken = false;
|
||||
overlays = import ./overlays.nix;
|
||||
system = "aarch64-darwin";
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations."luna" = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit username; };
|
||||
pkgs = nixpkgs_x86_64;
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.users.${username}.imports = utils.nixFilesIn ./maddie/common ++ utils.nixFilesIn ./maddie/nixos;
|
||||
home-manager.extraSpecialArgs = { inherit username; pkgs = nixpkgs_x86_64; };
|
||||
}
|
||||
] ++ utils.nixFilesIn ./systems/mdesktop;
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1,11 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.browserpass = {
|
||||
enable = true;
|
||||
browsers = [
|
||||
"chromium"
|
||||
"firefox"
|
||||
];
|
||||
};
|
||||
}
|
8
maddie/common/browser.nix
Normal file
8
maddie/common/browser.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
amfora
|
||||
lynx
|
||||
];
|
||||
}
|
@ -4,6 +4,5 @@
|
||||
home.packages = with pkgs; [
|
||||
python3Full # Python
|
||||
go # Go
|
||||
gcc # C
|
||||
];
|
||||
}
|
@ -3,7 +3,6 @@
|
||||
{
|
||||
# Misc editors
|
||||
home.packages = with pkgs; [
|
||||
vscode
|
||||
helix
|
||||
vis
|
||||
];
|
16
maddie/common/exa.nix
Normal file
16
maddie/common/exa.nix
Normal 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;
|
||||
};
|
||||
}
|
@ -2,7 +2,6 @@
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
gitkraken
|
||||
gh
|
||||
];
|
||||
|
||||
@ -18,7 +17,7 @@
|
||||
userName = "Madeleine";
|
||||
userEmail = "maddie@spyhoodle.me";
|
||||
signing = {
|
||||
key = "467EFD918D5E770AD1EE2CE699CD1AB536E1C7AD";
|
||||
key = "FA50688B9EB6D8AA070C8241C296DE8C9053683F";
|
||||
signByDefault = true;
|
||||
gpgPath = "gpg2";
|
||||
};
|
||||
@ -37,5 +36,14 @@
|
||||
init.defaultBranch = "development";
|
||||
pull.rebase = "merges";
|
||||
};
|
||||
|
||||
ignores = [
|
||||
"**/.DS_Store"
|
||||
"**/._.DS_Store"
|
||||
".DS_Store"
|
||||
"._.DS_Store"
|
||||
"**/*.swp"
|
||||
"*.swp"
|
||||
];
|
||||
};
|
||||
}
|
@ -52,9 +52,7 @@ return require('packer').startup(function(use)
|
||||
use {
|
||||
'xiyaowong/nvim-transparent',
|
||||
config = function()
|
||||
require('transparent').setup({
|
||||
enable = false;
|
||||
})
|
||||
vim.g.transparent_enabled = false
|
||||
end
|
||||
}
|
||||
|
@ -4,6 +4,5 @@
|
||||
home.packages = with pkgs; [
|
||||
xorg.xkill # Kill X11 programs with mouse
|
||||
killall # Kill programs
|
||||
gotop # Process manager in go
|
||||
];
|
||||
}
|
@ -5,8 +5,6 @@
|
||||
# Aliases
|
||||
shellAliases = {
|
||||
# Core Programs
|
||||
ls = "ls -lhN --color=auto --group-directories-first";
|
||||
ll = "ls -av";
|
||||
cp = "cp -iv";
|
||||
mv = "mv -iv";
|
||||
rm = "rm -vI";
|
@ -1,11 +1,6 @@
|
||||
{ config, pkgs, username, ... }:
|
||||
|
||||
{
|
||||
# Drawterm
|
||||
home.packages = with pkgs; [
|
||||
drawterm
|
||||
];
|
||||
|
||||
# SSH
|
||||
programs.ssh = {
|
||||
enable = true;
|
14
maddie/common/wezterm.nix
Normal file
14
maddie/common/wezterm.nix
Normal 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
21
maddie/common/xdg.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
}
|
@ -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
10
maddie/macos/home.nix
Normal 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";
|
||||
};
|
||||
}
|
7
maddie/nixos/drawterm.nix
Normal file
7
maddie/nixos/drawterm.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
drawterm
|
||||
];
|
||||
}
|
12
maddie/nixos/librewolf.nix
Normal file
12
maddie/nixos/librewolf.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
programs.librewolf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"browser.uidensity" = 1;
|
||||
"webgl.disabled" = false;
|
||||
"privacy.resistFingerprinting" = false;
|
||||
};
|
||||
};
|
||||
}
|
@ -2,9 +2,10 @@
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
element-desktop # Matrix client
|
||||
signal-desktop # Signal client
|
||||
discord-canary # Discord client
|
||||
ripcord # Better discord client
|
||||
element # Matrix client
|
||||
nheko # Better matrix client
|
||||
];
|
||||
}
|
8
maddie/nixos/secrets.nix
Normal file
8
maddie/nixos/secrets.nix
Normal 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
Loading…
Reference in New Issue
Block a user