Christopher James Hayward
3 years ago
15 changed files with 377 additions and 0 deletions
-
95flake.lock
-
65flake.nix
-
9hosts/acernitro/default.nix
-
25hosts/nixos/configuration.nix
-
9hosts/nixos/default.nix
-
22hosts/nixos/hardware.nix
-
13modules/cachix.nix
-
16modules/flakes.nix
-
15modules/git.nix
-
11modules/gpg.nix
-
27modules/gtk.nix
-
23modules/vim.nix
-
28modules/x11.nix
-
19shell.nix
-
0shells/.git-keep
@ -0,0 +1,95 @@ |
|||||
|
{ |
||||
|
"nodes": { |
||||
|
"emacs-overlay": { |
||||
|
"locked": { |
||||
|
"lastModified": 1623260469, |
||||
|
"narHash": "sha256-zEisFZsGiAiI4k0D+zd1g+j+/YEEdzxIhmGV1fEcVZw=", |
||||
|
"owner": "nix-community", |
||||
|
"repo": "emacs-overlay", |
||||
|
"rev": "7a60fbc3fbcd1ac549af35db2b54c53b0b99da6e", |
||||
|
"type": "github" |
||||
|
}, |
||||
|
"original": { |
||||
|
"owner": "nix-community", |
||||
|
"repo": "emacs-overlay", |
||||
|
"type": "github" |
||||
|
} |
||||
|
}, |
||||
|
"home-manager": { |
||||
|
"inputs": { |
||||
|
"nixpkgs": [ |
||||
|
"nixpkgs" |
||||
|
] |
||||
|
}, |
||||
|
"locked": { |
||||
|
"lastModified": 1623251710, |
||||
|
"narHash": "sha256-eCMquRJXAzzFgNcTO4jQqp8D40N0jSA58+oqhyOrEbU=", |
||||
|
"owner": "nix-community", |
||||
|
"repo": "home-manager", |
||||
|
"rev": "42847469b3f65a363dc52b66be09d0ac4edcc55c", |
||||
|
"type": "github" |
||||
|
}, |
||||
|
"original": { |
||||
|
"owner": "nix-community", |
||||
|
"repo": "home-manager", |
||||
|
"type": "github" |
||||
|
} |
||||
|
}, |
||||
|
"nixos-hardware": { |
||||
|
"locked": { |
||||
|
"lastModified": 1623143341, |
||||
|
"narHash": "sha256-a8NjpJVvJkb3ehu/KP1OaWwlRexom2D7lQEH5uCO9yA=", |
||||
|
"owner": "nixos", |
||||
|
"repo": "nixos-hardware", |
||||
|
"rev": "fccbee72df707c3fb074854668deee6e1ff02351", |
||||
|
"type": "github" |
||||
|
}, |
||||
|
"original": { |
||||
|
"owner": "nixos", |
||||
|
"repo": "nixos-hardware", |
||||
|
"type": "github" |
||||
|
} |
||||
|
}, |
||||
|
"nixpkgs": { |
||||
|
"locked": { |
||||
|
"lastModified": 1622966049, |
||||
|
"narHash": "sha256-6g+28v94ISkVk9TBSsITVOnB2slK8plieWPIF2jo/l0=", |
||||
|
"owner": "NixOS", |
||||
|
"repo": "nixpkgs", |
||||
|
"rev": "fbfb79400a08bf754e32b4d4fc3f7d8f8055cf94", |
||||
|
"type": "github" |
||||
|
}, |
||||
|
"original": { |
||||
|
"id": "nixpkgs", |
||||
|
"ref": "nixos-unstable", |
||||
|
"type": "indirect" |
||||
|
} |
||||
|
}, |
||||
|
"nixpkgs-unstable": { |
||||
|
"locked": { |
||||
|
"lastModified": 1623267925, |
||||
|
"narHash": "sha256-qCQMqKqBrTHaPcxL8nSlUO+gWT+f96RmBr2lHGXKHSk=", |
||||
|
"owner": "NixOS", |
||||
|
"repo": "nixpkgs", |
||||
|
"rev": "83f6711464e03a856fb554693fe2e0f3af2ab0d5", |
||||
|
"type": "github" |
||||
|
}, |
||||
|
"original": { |
||||
|
"id": "nixpkgs", |
||||
|
"ref": "master", |
||||
|
"type": "indirect" |
||||
|
} |
||||
|
}, |
||||
|
"root": { |
||||
|
"inputs": { |
||||
|
"emacs-overlay": "emacs-overlay", |
||||
|
"home-manager": "home-manager", |
||||
|
"nixos-hardware": "nixos-hardware", |
||||
|
"nixpkgs": "nixpkgs", |
||||
|
"nixpkgs-unstable": "nixpkgs-unstable" |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
"root": "root", |
||||
|
"version": 7 |
||||
|
} |
@ -0,0 +1,65 @@ |
|||||
|
# This file is controlled by /etc/dotfiles/README.org |
||||
|
{ |
||||
|
description = "Immutable NixOS dotfiles."; |
||||
|
|
||||
|
inputs = { |
||||
|
nixpkgs.url = "nixpkgs/nixos-unstable"; |
||||
|
nixpkgs-unstable.url = "nixpkgs/master"; |
||||
|
home-manager.url = "github:nix-community/home-manager"; |
||||
|
home-manager.inputs.nixpkgs.follows = "nixpkgs"; |
||||
|
emacs-overlay.url = "github:nix-community/emacs-overlay"; |
||||
|
nixos-hardware.url = "github:nixos/nixos-hardware"; |
||||
|
}; |
||||
|
|
||||
|
outputs = inputs @ { self, nixpkgs, nixpkgs-unstable, ... }: { |
||||
|
nixosConfigurations = { |
||||
|
nixos = nixpkgs.lib.nixosSystem { |
||||
|
system = "x86_64-linux"; |
||||
|
specialArgs = { inherit inputs; }; |
||||
|
modules = [ |
||||
|
./hosts/nixos |
||||
|
./modules/x11.nix |
||||
|
./modules/flakes.nix |
||||
|
./modules/cachix.nix |
||||
|
inputs.home-manager.nixosModules.home-manager { |
||||
|
home-manager.useGlobalPkgs = true; |
||||
|
home-manager.useUserPackages = true; |
||||
|
home-manager.users.chris = { |
||||
|
imports = [ |
||||
|
./modules/git.nix |
||||
|
./modules/gpg.nix |
||||
|
./modules/vim.nix |
||||
|
./modules/gtk.nix |
||||
|
./modules/emacs.nix |
||||
|
]; |
||||
|
}; |
||||
|
} |
||||
|
]; |
||||
|
}; |
||||
|
# NOTE: Work In Progress! |
||||
|
# acernitro = nixpkgs.lib.nixosSystem { |
||||
|
# system = "x86_64-linux"; |
||||
|
# specialArgs = { inherit inputs; }; |
||||
|
# modules = [ |
||||
|
# ./hosts/acernitro |
||||
|
# ./modules/x11.nix |
||||
|
# ./modules/flakes.nix |
||||
|
# ./modules/cachix.nix |
||||
|
# inputs.home-manager.nixosModules.home-manager { |
||||
|
# home-manager.useGlobalPkgs = true; |
||||
|
# home-manager.useUserPackages = true; |
||||
|
# home-manager.users.chris = { |
||||
|
# imports = [ |
||||
|
# ./modules/git.nix |
||||
|
# ./modules/gpg.nix |
||||
|
# ./modules/vim.nix |
||||
|
# ./modules/gtk.nix |
||||
|
# ./modules/emacs.nix |
||||
|
# ]; |
||||
|
# }; |
||||
|
# } |
||||
|
# ]; |
||||
|
# }; |
||||
|
}; |
||||
|
}; |
||||
|
} |
@ -0,0 +1,9 @@ |
|||||
|
# This file is controlled by /etc/dotfiles/README.org |
||||
|
{ ... }: |
||||
|
|
||||
|
{ |
||||
|
imports = [ |
||||
|
./configuration.nix |
||||
|
./hardware.nix |
||||
|
]; |
||||
|
} |
@ -0,0 +1,25 @@ |
|||||
|
# This file is controlled by /etc/dotfiles/README.org |
||||
|
{ config, pkgs, inputs, ... }: |
||||
|
|
||||
|
{ |
||||
|
boot.loader.grub.enable = true; |
||||
|
boot.loader.grub.version = 2; |
||||
|
boot.loader.grub.device = "/dev/sda"; |
||||
|
|
||||
|
time.timeZone = "America/Toronto"; |
||||
|
|
||||
|
networking.hostName = "nixos"; |
||||
|
networking.useDHCP = false; |
||||
|
networking.firewall.enable = false; |
||||
|
networking.interfaces.ens3.useDHCP = true; |
||||
|
|
||||
|
programs.mtr.enable = true; |
||||
|
programs.fish.enable = true; |
||||
|
programs.gnupg.agent.enable = true; |
||||
|
|
||||
|
users.users.chris = { |
||||
|
shell = pkgs.fish; |
||||
|
isNormalUser = true; |
||||
|
extraGroups = [ "wheel" ]; |
||||
|
}; |
||||
|
} |
@ -0,0 +1,9 @@ |
|||||
|
# This file is controlled by /etc/dotfiles/README.org |
||||
|
{ ... }: |
||||
|
|
||||
|
{ |
||||
|
imports = [ |
||||
|
./configuration.nix |
||||
|
./hardware.nix |
||||
|
]; |
||||
|
} |
@ -0,0 +1,22 @@ |
|||||
|
# This file is controlled by /etc/dotfiles/README.org |
||||
|
{ config, lib, pkgs, modulesPath, ... }: |
||||
|
|
||||
|
{ |
||||
|
imports = |
||||
|
[ (modulesPath + "/profiles/qemu-guest.nix") |
||||
|
]; |
||||
|
|
||||
|
boot.initrd.availableKernelModules = [ "ata_piix" "floppy" "sd_mod" "sr_mod" ]; |
||||
|
boot.initrd.kernelModules = [ ]; |
||||
|
boot.kernelModules = [ ]; |
||||
|
boot.extraModulePackages = [ ]; |
||||
|
|
||||
|
fileSystems."/" = |
||||
|
{ device = "/dev/disk/by-uuid/fddc37ff-a442-41fa-afc4-abf878be7c5a"; |
||||
|
fsType = "ext4"; |
||||
|
}; |
||||
|
|
||||
|
swapDevices = |
||||
|
[ { device = "/dev/disk/by-uuid/5fc0e3df-e796-4fe2-8482-c6acaed9d36f"; } |
||||
|
]; |
||||
|
} |
@ -0,0 +1,13 @@ |
|||||
|
# This file is controlled by /etc/dotfiles/README.org |
||||
|
{ config, ... }: |
||||
|
|
||||
|
{ |
||||
|
nix = { |
||||
|
binaryCaches = [ |
||||
|
"https://nix-community.cachix.org" |
||||
|
]; |
||||
|
binaryCachePublicKeys = [ |
||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" |
||||
|
]; |
||||
|
}; |
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
# This file is controlled by /etc/dotfiles/README.org |
||||
|
{ config, pkgs, inputs, ... }: |
||||
|
|
||||
|
{ |
||||
|
nix = { |
||||
|
package = pkgs.nixUnstable; |
||||
|
extraOptions = '' |
||||
|
experimental-features = nix-command flakes |
||||
|
''; |
||||
|
}; |
||||
|
|
||||
|
nixpkgs = { |
||||
|
config = { allowUnfree = true; }; |
||||
|
overlays = [ inputs.emacs-overlay.overlay ]; |
||||
|
}; |
||||
|
} |
@ -0,0 +1,15 @@ |
|||||
|
# This file is controlled by /etc/dotfiles/README.org |
||||
|
{ pkgs, ... }: |
||||
|
|
||||
|
{ |
||||
|
programs.git = { |
||||
|
enable = true; |
||||
|
userName = "Christopher James Hayward"; |
||||
|
userEmail = "chris@chrishayward.xyz"; |
||||
|
|
||||
|
signing = { |
||||
|
key = "37AB1CB72B741E478CA026D43025DCBD46F81C0F"; |
||||
|
signByDefault = true; |
||||
|
}; |
||||
|
}; |
||||
|
} |
@ -0,0 +1,11 @@ |
|||||
|
# This file is controlled by /etc/dotfiles/README.org |
||||
|
{ pkgs, ... }: |
||||
|
|
||||
|
{ |
||||
|
services.gpg-agent = { |
||||
|
enable = true; |
||||
|
defaultCacheTtl = 1800; |
||||
|
enableSshSupport = true; |
||||
|
pinentryFlavor = "gtk2"; |
||||
|
}; |
||||
|
} |
@ -0,0 +1,27 @@ |
|||||
|
# This file is controlled by /etc/dotfiles/README.org |
||||
|
{ pkgs, ... }: |
||||
|
|
||||
|
{ |
||||
|
home.packages = [ |
||||
|
pkgs.nordic |
||||
|
pkgs.lxappearance |
||||
|
]; |
||||
|
|
||||
|
home.file.".gtkrc-2.0" = { |
||||
|
text = '' |
||||
|
gtk-theme-name="Nordic-bluish-accent" |
||||
|
gtk-icon-theme-name="Adwaita" |
||||
|
gtk-font-name="Sans 10" |
||||
|
gtk-cursor-theme-size=0 |
||||
|
gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ |
||||
|
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR |
||||
|
gtk-button-images=0 |
||||
|
gtk-menu-images=0 |
||||
|
gtk-enable-event-sounds=1 |
||||
|
gtk-enable-input-feedback-sounds=1 |
||||
|
gtk-xft-antialias=1 |
||||
|
gtk-xft-hinting=1 |
||||
|
gtk-xft-hintstyle="hintmedium" |
||||
|
''; |
||||
|
}; |
||||
|
} |
@ -0,0 +1,23 @@ |
|||||
|
# This file is controlled by /etc/dotfiles/README.org |
||||
|
{ pkgs, ... }: |
||||
|
|
||||
|
{ |
||||
|
programs.neovim = { |
||||
|
enable = true; |
||||
|
viAlias = true; |
||||
|
vimAlias = true; |
||||
|
vimdiffAlias = true; |
||||
|
extraConfig = '' |
||||
|
set number relativenumber |
||||
|
set nobackup |
||||
|
''; |
||||
|
extraPackages = [ |
||||
|
pkgs.nixfmt |
||||
|
]; |
||||
|
plugins = with pkgs.vimPlugins; [ |
||||
|
vim-nix |
||||
|
vim-airline |
||||
|
vim-polyglot |
||||
|
]; |
||||
|
}; |
||||
|
} |
@ -0,0 +1,28 @@ |
|||||
|
# This file is controlled by /etc/dotfiles/README.org |
||||
|
{ config, pkgs, ... }: |
||||
|
|
||||
|
{ |
||||
|
services.xserver.enable = true; |
||||
|
services.xserver.layout = "us"; |
||||
|
services.xserver.libinput.enable = true; |
||||
|
services.xserver.displayManager.startx.enable = true; |
||||
|
|
||||
|
environment = { |
||||
|
systemPackages = with pkgs; [ |
||||
|
pkgs.sqlite |
||||
|
]; |
||||
|
extraInit = '' |
||||
|
export XAUTHORITY=/tmp/Xauthority |
||||
|
[ -e ~/.Xauthority ] && mv -f ~/.Xauthority "$XAUTHORITY" |
||||
|
''; |
||||
|
}; |
||||
|
|
||||
|
services.picom.enable = true; |
||||
|
services.openssh.enable = true; |
||||
|
services.printing.enable = true; |
||||
|
|
||||
|
fonts.fonts = with pkgs; [ |
||||
|
iosevka |
||||
|
emacs-all-the-icons-fonts |
||||
|
]; |
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
# This file is controlled by /etc/dotfiles/README.org |
||||
|
{ pkgs ? import <nixpkgs> { } }: |
||||
|
|
||||
|
with pkgs; |
||||
|
|
||||
|
let |
||||
|
nixBin = writeShellScriptBin "nix" '' |
||||
|
${nixFlakes}/bin/nix --option experimental-features "nix-command flakes" "$@" |
||||
|
''; |
||||
|
|
||||
|
in mkShell { |
||||
|
buildInputs = [ |
||||
|
git |
||||
|
]; |
||||
|
shellHook = '' |
||||
|
export FLAKE=$(pwd) |
||||
|
export PATH=$FLAKE/bin:${nixBin}/bin:$PATH" |
||||
|
''; |
||||
|
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue