Merge branch 'module-1.0'

This commit is contained in:
Don Harper 2024-03-29 06:45:17 -05:00
commit fa82561ead
38 changed files with 127 additions and 165 deletions

3
.gitattributes vendored
View file

@ -1,3 +1,2 @@
hosts/*/*key filter=git-crypt diff=git-crypt
workstation/tailscale.nix filter=git-crypt diff=git-crypt
server/tailscale.nix filter=git-crypt diff=git-crypt
hosts/*/tailscale.nix filter=git-crypt diff=git-crypt

58
TODO.md
View file

@ -1,58 +0,0 @@
# TODO
## Machine types
- [ ] add HP 810RG1 profile
- [ ] add ssd to all
- [x] fix eve????
## Home-manager
### To Import
- [ ] aspell.en.prepl
- [ ] aspell.en.pws
- [ ] mbsyncrc
- [ ] neomutt
- [ ] vdirsyncer
### Port/import
- [x] All_Regions
- [x] TrusteRegion
- [x] Unknown_Region
- [x] UntrusteRegion
- [x] appsrv
- [x] authy
- [x] bash_aliases
- [x] bash_functions
- [x] bash_hosts
- [x] bash_logout
- [x] bash_motd
- [x] bash_motownscript
- [x] bash_profile
- [x] bash_ssh
- [x] bashrc
- [x] config-waybar
- [x] gitconfig
- [x] gnupg
- [x] inputrc
- [x] listadmin.ini
- [x] local
- [x] myapps
- [x] notmuch
- [x] qutebrowser
- [x] signature
- [x] sway
- [x] swaylock
- [x] task
- [x] tigrc
- [x] tmux-cssh
- [x] tmux.conf
- [x] tmuxinator
- [x] urlview
- [x] vit
- [x] wfclient
### Drop
- muttprintrc
- pw.gpg
- slack
- token

30
flake.lock generated
View file

@ -5,11 +5,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1711462743,
"narHash": "sha256-3wKGpHy9Kyh98DrziqC/s//60Q0pE17NgbY93L0uWng=",
"lastModified": 1711588700,
"narHash": "sha256-vBB5HoQVnA6c/UrDOhLXKAahEwSRccw2YXYHxD7qoi4=",
"owner": "nix-community",
"repo": "disko",
"rev": "a6717b1afee7ae955c61eefdf0ce8f864ef78115",
"rev": "502241afa3de2a24865ddcbe4c122f4546e32092",
"type": "github"
},
"original": {
@ -59,11 +59,11 @@
]
},
"locked": {
"lastModified": 1711133180,
"narHash": "sha256-WJOahf+6115+GMl3wUfURu8fszuNeJLv9qAWFQl3Vmo=",
"lastModified": 1711625603,
"narHash": "sha256-W+9dfqA9bqUIBV5u7jaIARAzMe3kTq/Hp2SpSVXKRQw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "1c2c5e4cabba4c43504ef0f8cc3f3dfa284e2dbb",
"rev": "c0ef0dab55611c676ad7539bf4e41b3ec6fa87d2",
"type": "github"
},
"original": {
@ -118,11 +118,11 @@
"nixpkgs-regression": "nixpkgs-regression"
},
"locked": {
"lastModified": 1711457510,
"narHash": "sha256-jUs32BtsymXL7nUgPmJ7WG8LlL+HkUJKNZ1dsrGQ+lA=",
"lastModified": 1711652043,
"narHash": "sha256-WlV3UBcv0hStLqKrNEsNqrOtTPQlzEjVbGt38XytOlo=",
"owner": "NixOS",
"repo": "nix",
"rev": "6c10cc0edabdbbdbf11ce0b388f88325c9958792",
"rev": "ef26133df309fcadb552467ba45a8f170e78d7ad",
"type": "github"
},
"original": {
@ -148,11 +148,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1710889954,
"narHash": "sha256-Pr6F5Pmd7JnNEMHHmspZ0qVqIBVxyZ13ik1pJtm2QXk=",
"lastModified": 1711401922,
"narHash": "sha256-QoQqXoj8ClGo0sqD/qWKFWezgEwUL0SUh37/vY2jNhc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7872526e9c5332274ea5932a0c3270d6e4724f3b",
"rev": "07262b18b97000d16a4bdb003418bd2fb067a932",
"type": "github"
},
"original": {
@ -230,11 +230,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1711333969,
"narHash": "sha256-5PiWGn10DQjMZee5NXzeA6ccsv60iLu+Xtw+mfvkUAs=",
"lastModified": 1711523803,
"narHash": "sha256-UKcYiHWHQynzj6CN/vTcix4yd1eCu1uFdsuarupdCQQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "57e6b3a9e4ebec5aa121188301f04a6b8c354c9b",
"rev": "2726f127c15a4cc9810843b96cad73c7eb39e443",
"type": "github"
},
"original": {

116
flake.nix
View file

@ -30,55 +30,91 @@
...
}:
let
inputs = { inherit disko home-manager nixpkgs nixos-hardware wayland-pipewire-idle-inhibit; };
inherit (self) outputs;
lib = nixpkgs.lib // home-manager.lib;
systems = [ "x86_64-linux" "aarch64-linux" ];
forEachSystem = f: lib.genAttrs systems (system: f pkgsFor.${system});
pkgsFor = lib.genAttrs systems (system: import nixpkgs {
inherit system;
config.allowUnfree = true;
});
in
{
inherit lib;
nixosModules = import ./modules/nixos;
homeManagerModules = import ./modules/home-manager;
templates = import ./templates;
genPkgs = system: import nixpkgs { inherit system; config.allowUnfree = true; };
overlays = import ./overlays { inherit inputs outputs; };
hydraJobs = import ./hydra.nix { inherit inputs outputs; };
# packages = forEachSystem (pkgs: import ./pkgs { inherit pkgs; });
# devShells = forEachSystem (pkgs: import ./shell.nix { inherit pkgs; });
# formatter = forEachSystem (pkgs: pkgs.nixpkgs-fmt);
# creates a nixos system config
nixosSystem = system: hostname: username:
let
pkgs = genPkgs system;
in
nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit pkgs;
# lets us use these things in modules
customArgs = { inherit system hostname username pkgs; };
};
modules = [
#disko.nixosModules.disko
./hosts/${hostname}
home-manager.nixosModules.home-manager {
networking.hostName = hostname;
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
#home-manager.users.${username} = { imports = [ ./home/${username}.nix ]; };
}
];
};
in {
nixosConfigurations = {
# clients
ace = nixosSystem "x86_64-linux" "ace" "don";
dragon = nixosSystem "x86_64-linux" "dragon" "don";
eve = nixosSystem "x86_64-linux" "eve" "don";
loki = nixosSystem "x86_64-linux" "loki" "don";
pocket2 = nixosSystem "x86_64-linux" "pocket2" "don";
smaug = nixosSystem "x86_64-linux" "smaug" "don";
#t2 = nixosSystem "x86_64-linux" "t2" "don";
ace = lib.nixosSystem {
modules = [ ./hosts/ace ];
specialArgs = { inherit inputs outputs; };
};
dragon = lib.nixosSystem {
modules = [ ./hosts/dragon ];
specialArgs = { inherit inputs outputs; };
};
eve = lib.nixosSystem {
modules = [ ./hosts/eve ];
specialArgs = { inherit inputs outputs; };
};
loki = lib.nixosSystem {
modules = [ ./hosts/loki ];
specialArgs = { inherit inputs outputs; };
};
pocket2 = lib.nixosSystem {
modules = [ ./hosts/pocket2 ];
specialArgs = { inherit inputs outputs; };
};
smaug = lib.nixosSystem {
modules = [ ./hosts/smaug ];
specialArgs = { inherit inputs outputs; };
};
# t2 = lib.nixosSystem {
# modules = [ ./hosts/t2 ];
# specialArgs = { inherit inputs outputs; };
# };
# servers
display = nixosSystem "x86_64-linux" "display" "don";
harper2 = nixosSystem "x86_64-linux" "harper2" "don";
harper = nixosSystem "x86_64-linux" "harper" "don";
nuwww = nixosSystem "x86_64-linux" "nuwww" "don";
pihole = nixosSystem "x86_64-linux" "pihole" "don";
www2 = nixosSystem "x86_64-linux" "www2" "don";
display = lib.nixosSystem {
modules = [ ./hosts/display ];
specialArgs = { inherit inputs outputs; };
};
harper2 = lib.nixosSystem {
modules = [ ./hosts/harper2 ];
specialArgs = { inherit inputs outputs; };
};
harper = lib.nixosSystem {
modules = [ ./hosts/harper ];
specialArgs = { inherit inputs outputs; };
};
nuwww = lib.nixosSystem {
modules = [ ./hosts/nuwww ];
specialArgs = { inherit inputs outputs; };
};
pihole = lib.nixosSystem {
modules = [ ./hosts/pihole ];
specialArgs = { inherit inputs outputs; };
};
www2 = lib.nixosSystem {
modules = [ ./hosts/www2 ];
specialArgs = { inherit inputs outputs; };
};
# test system
# use this for a blank ISO + disko to work
nixos = nixosSystem "x86_64-linux" "nixos" "don";
nixos = lib.nixosSystem {
modules = [ ./hosts/nixos ];
specialArgs = { inherit inputs outputs; };
};
};
};
}

View file

@ -1,6 +1,6 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [ taskwarrior tasksh vit timewarrior ];
home.packages = with pkgs; [ taskwarrior taskwarrior-tui tasksh vit timewarrior ];
programs.taskwarrior = {
enable = true;
colorTheme = "dark-green-256";

View file

@ -3,10 +3,6 @@
programs.topgrade = {
enable = true;
settings = {
linux = {
home_manager_arguments = [ "--flake" ];
nix_arguments = "--flake";
};
misc = {
assume_yes = true;
no_retry = true;

View file

@ -1,6 +1,8 @@
{ ... }:
{ inputs, outputs, ... }:
{
imports = [ inputs.home-manager.nixosModules.home-manager ];
home-manager.extraSpecialArgs = { inherit inputs outputs; };
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;

View file

@ -52,7 +52,7 @@
poweralertd
powerline-fonts
prusa-slicer
# pwvucontrol # FIXME Build errors 2024-03-26
# pwvucontrol ## TODO FIXME This is currently broken upstream 2024-03-26
qpwgraph
quickemu
quickgui

View file

@ -1,6 +1,6 @@
{ ... }:
{ inputs, outputs, ... }:
{
# xdg.configFile."sway/config".source = files/sway/${config.networking.hostName};
# xdg.configFile."sway/config".source = files/sway/${inputs.networking.hostName};
xdg.configFile."sway/config".source = files/sway/default;
programs.swaylock = {
enable = true;

View file

@ -4,10 +4,10 @@
imports =
[
./hardware-configuration.nix
../../workstation
../workstation
../../home
../../home/gui
../../wm
../wm
];
networking.hostName = "ace";
}

View file

@ -8,10 +8,10 @@
#inputs.nixos-hardware.nixosModules.common-gpu-intel
#inputs.nixos-hardware.nixosModules.common-pc-laptop
#inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd
../../workstation
../workstation
../../home
../../home/gui
../../wm
../wm
];
networking.hostName = "dragon";
}

View file

@ -4,10 +4,10 @@
imports =
[
./hardware-configuration.nix
../../workstation
../workstation
../../home
../../home/gui
../../wm
../wm
];
networking.hostName = "eve";
}

View file

@ -1,13 +1,14 @@
{ config, pkgs, ... }:
{ inputs, outputs, ... }:
{
imports =
[
./hardware-configuration.nix
../../workstation
../workstation
../workstation/kvm.nix
../../home
../../home/gui
../../wm
../wm
];
networking.hostName = "loki";
}

View file

@ -8,10 +8,10 @@
#inputs.nixos-hardware.nixosModules.common-gpu-intel
#inputs.nixos-hardware.nixosModules.common-pc-laptop
#inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd
../../workstation
../workstation
../../home
../../home/gui
../../wm
../wm
];
networking.hostName = "pocket2";
}

View file

@ -4,10 +4,10 @@
imports =
[
./hardware-configuration.nix
../../workstation
../workstation
../../home
../../home/gui
../../wm
../wm
];
networking.hostName = "smaug";
}

View file

@ -4,10 +4,10 @@
imports =
[
./hardware-configuration.nix
../../workstation
../workstation
../../home
../../home/gui
../../wm
../wm
];
networking.hostName = "t2";
}

View file

@ -3,6 +3,7 @@
let
my-python-packages = python-packages: with python-packages; [
pip
# pipx
python-dateutil
setuptools
requests

View file

@ -0,0 +1,5 @@
{ pkgs, inputs, ... }:
{
virtualisation.libvirtd.enable = true;
environment.systemPackages = with pkgs; [ gnome.gnome-boxes ];
}

View file

@ -3,7 +3,10 @@ UNAME_S := $(shell uname -s)
UNAME_M := $(shell uname -m)
all:
locate home-manager-backup | sort -u | xargs rm -f
@locate home-manager-backup | sort -u | xargs rm -f
doas nixos-rebuild build --flake .#${HOSTNAME}
switch:
doas nixos-rebuild switch --flake .#${HOSTNAME}
weekly: pull clean update ci all push
@ -24,8 +27,8 @@ push:
pull:
@. ~/.bash_ssh
git pull
doas nix-prefetch-url file://$$PWD/$$(ls -1 pkgs/linuxx64* | tail -n1)
doas nix-prefetch-url file://$$PWD/$$(ls -1 pkgs/linuxarm64* | tail -n1)
doas nix-prefetch-url file://$$PWD/$$(ls -1 src/linuxx64* | tail -n1)
doas nix-prefetch-url file://$$PWD/$$(ls -1 src/linuxarm64* | tail -n1)
ci:

View file

@ -1,3 +0,0 @@
{ allowUnfree = true;
permittedInsecurePackages = [ "electron-18.1.0" ];
}

View file

@ -1,20 +0,0 @@
{ config, pkgs, callPackage, ... }:
{
users.users.vicky = {
isNormalUser = true;
description = "Vicky Harper";
extraGroups = [ "networkmanager" "wheel" "scanner" "lp" "video" "mlocate" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINd8AdVbQQ/Fmw+b9mI8EMYqIoRkwmSwAOtmlte3incL don@loki"
];
};
services.xserver = {
enable = true;
desktopManager = {
xterm.enable = false;
xfce.enable = true;
};
displayManager.defaultSession = "xfce";
};
}