Compare commits

..

23 commits

Author SHA1 Message Date
3549028f28 Lock file maintenance 2024-04-05 19:10:07 +00:00
090514be37
Fix ref 2024-04-05 13:09:35 -05:00
344351cf3b
Lets try hyrda again. 2024-04-05 13:08:02 -05:00
9dfc28be1c
Re-enable renovate. 2024-04-05 11:33:15 -05:00
57cc4eef4a
Add garnix build config. 2024-04-04 14:18:02 -05:00
cb74116f7c
Add garnix cache. 2024-04-04 14:17:51 -05:00
4d1eb8cd94
Update UPS, NUT, network bridge, zfs backups, oh my 2024-04-02 07:11:09 -05:00
f81a81a675
Nix update. 2024-04-02 07:04:54 -05:00
1ae5854757
Add pci passthrough capability. 2024-03-29 17:54:09 -05:00
602f4d4770
Disable middle mouse button paste. 2024-03-24 10:34:14 -05:00
6c0ea5c354
Only updates nixpkgs. Nothing else. 2024-03-19 12:55:08 -05:00
50aff1b3ea
Enable virt-manager for laptop. 2024-03-15 16:51:28 -05:00
a38049a819
Make sure to follow stable. 2024-03-15 16:27:56 -05:00
0bc5c54878
Import nixos modules not add package. 2024-03-15 16:21:01 -05:00
1bc0a8f8c5
Enable QEMU/KVM/libvirt 2024-03-15 16:13:02 -05:00
bb1df0d1c0
Removing unused inputs and added NixVirt input. 2024-03-15 15:45:44 -05:00
65e969579d
Explain the comment commands for ZFS NFS Shares. 2024-03-15 14:17:08 -05:00
6c2ac5e4a0
Cleaning up config. 2024-03-15 14:13:09 -05:00
d003becfc6
Consolidating some settings. 2024-03-15 14:09:37 -05:00
28a962fe30
Add time machine to smb. 2024-03-13 19:09:13 -05:00
5962edaded
Update user/group. 2024-03-13 18:21:01 -05:00
64c812c4f4
Add smb share. 2024-03-13 17:52:02 -05:00
6c167f6863
auto-launch Hyprland on login. 2024-03-12 09:29:54 -05:00
10 changed files with 341 additions and 254 deletions

View file

@ -9,11 +9,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1710174970, "lastModified": 1712328717,
"narHash": "sha256-YEeNn5h9kIrkWPsraAqJ2fWh7YP1K8ngyMSA7bLDDVk=", "narHash": "sha256-JjyigEN2M6HTeeUBk6PcOkcSMqDaXoQhYAX7KYk6K24=",
"owner": "atuinsh", "owner": "atuinsh",
"repo": "atuin", "repo": "atuin",
"rev": "04f2c95617d8d5f1f9143fe1d9b1f71279232445", "rev": "28b0b490f93fe9f7964d0593b9ba600f4b24663e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -22,28 +22,6 @@
"type": "github" "type": "github"
} }
}, },
"deploy-rs": {
"inputs": {
"flake-compat": "flake-compat_2",
"nixpkgs": [
"nixpkgs-stable"
],
"utils": "utils"
},
"locked": {
"lastModified": 1708091384,
"narHash": "sha256-dTGGw2y8wvfjr+J9CjQbfdulOq72hUG17HXVNxpH1yE=",
"owner": "serokell",
"repo": "deploy-rs",
"rev": "0a0187794ac7f7a1e62cda3dabf8dc041f868790",
"type": "github"
},
"original": {
"owner": "serokell",
"repo": "deploy-rs",
"type": "github"
}
},
"flake-compat": { "flake-compat": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -60,44 +38,10 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": {
"lastModified": 1698882062,
"narHash": "sha256-HkhafUayIqxXyHH1X8d9RDl1M2CkFgZLjKD3MzabiEo=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "8c9fa2545007b49a5db5f650ae91f227672c3877",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_2"
},
"locked": { "locked": {
"lastModified": 1709336216, "lastModified": 1709336216,
"narHash": "sha256-Dt/wOWeW6Sqm11Yh+2+t0dfEWxoMxGBvv3JpIocFl9E=", "narHash": "sha256-Dt/wOWeW6Sqm11Yh+2+t0dfEWxoMxGBvv3JpIocFl9E=",
@ -117,11 +61,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1709126324, "lastModified": 1710146030,
"narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=", "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "d465f4819400de7c8d874d50b982301f28a84605", "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -137,11 +81,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1706981411, "lastModified": 1710888565,
"narHash": "sha256-cLbLPTL1CDmETVh4p0nQtvoF+FSEjsnJTFpTxhXywhQ=", "narHash": "sha256-s9Hi4RHhc6yut4EcYD50sZWRDKsugBJHSbON8KFwoTw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "652fda4ca6dafeb090943422c34ae9145787af37", "rev": "f33900124c23c4eca5831b9b5eb32ea5894375ce",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -158,11 +102,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1710164657, "lastModified": 1712317700,
"narHash": "sha256-l64+ZjaQAVkHDVaK0VHwtXBdjcBD6nLBD+p7IfyBp/w=", "narHash": "sha256-rnkQ6qMhlxfjpCECkTMlFXHU/88QvC5KpdJWq5H6F1E=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "017b12de5b899ef9b64e2c035ce257bfe95b8ae2", "rev": "782eed8bb64b27acaeb7c17be4a095c85e65717f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -196,7 +140,7 @@
"hyprland-protocols": "hyprland-protocols", "hyprland-protocols": "hyprland-protocols",
"hyprlang": "hyprlang", "hyprlang": "hyprlang",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"systems": "systems_3", "systems": "systems_2",
"wlroots": "wlroots", "wlroots": "wlroots",
"xdph": "xdph" "xdph": "xdph"
}, },
@ -220,7 +164,7 @@
"hyprland-protocols": "hyprland-protocols_2", "hyprland-protocols": "hyprland-protocols_2",
"hyprlang": "hyprlang_2", "hyprlang": "hyprlang_2",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"systems": "systems_4", "systems": "systems_3",
"wlroots": "wlroots_2", "wlroots": "wlroots_2",
"xdph": "xdph_2" "xdph": "xdph_2"
}, },
@ -321,7 +265,7 @@
"hyprland-protocols": "hyprland-protocols_3", "hyprland-protocols": "hyprland-protocols_3",
"hyprlang": "hyprlang_3", "hyprlang": "hyprlang_3",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_3",
"systems": "systems_6" "systems": "systems_5"
}, },
"locked": { "locked": {
"lastModified": 1709299639, "lastModified": 1709299639,
@ -390,7 +334,7 @@
"hyprland-xdph-git", "hyprland-xdph-git",
"nixpkgs" "nixpkgs"
], ],
"systems": "systems_5" "systems": "systems_4"
}, },
"locked": { "locked": {
"lastModified": 1708681732, "lastModified": 1708681732,
@ -406,39 +350,17 @@
"type": "github" "type": "github"
} }
}, },
"nix-fast-build": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs-stable"
],
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1709911523,
"narHash": "sha256-XNutwbRI6h57ybeKy0yYupfngWYcfcIqE0b0LgXnyxs=",
"owner": "Mic92",
"repo": "nix-fast-build",
"rev": "692fe3e98f36b60c678d637235271b57910a7f80",
"type": "github"
},
"original": {
"owner": "Mic92",
"repo": "nix-fast-build",
"type": "github"
}
},
"nixd-git": { "nixd-git": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_2", "flake-parts": "flake-parts",
"nixpkgs": "nixpkgs_4" "nixpkgs": "nixpkgs_4"
}, },
"locked": { "locked": {
"lastModified": 1710142672, "lastModified": 1711809944,
"narHash": "sha256-MRClVDHMGXglXpSR+RflwnrY/ngePqrxOwiwoh5/BtU=", "narHash": "sha256-Z5FEXEn/5lAnGUSDIah0NRkP3RCE5sQQrms7ltvzH/8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixd", "repo": "nixd",
"rev": "eb40e5b315fafa1086f69be84918bbd9235e0a10", "rev": "bcf0de61178c4dbf1488e8417cc7e28cc5390164",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -464,24 +386,6 @@
} }
}, },
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1698611440,
"narHash": "sha256-jPjHjrerhYDy3q9+s5EAsuhyhuknNfowY6yt6pjn9pc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0cbe9f69c234a7700596e943bfae7ef27a31b735",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib_2": {
"locked": { "locked": {
"dir": "lib", "dir": "lib",
"lastModified": 1709237383, "lastModified": 1709237383,
@ -499,13 +403,29 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-ovmf": {
"locked": {
"lastModified": 1708984720,
"narHash": "sha256-gJctErLbXx4QZBBbGp78PxtOOzsDaQ+yw1ylNQBuSUY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "13aff9b34cc32e59d35c62ac9356e4a41198a538",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1710021367, "lastModified": 1712168706,
"narHash": "sha256-FuMVdWqXMT38u1lcySYyv93A7B8wU0EGzUr4t4jQu8g=", "narHash": "sha256-XP24tOobf6GGElMd0ux90FEBalUtw6NkBSVh/RlA6ik=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b94a96839afcc56de3551aa7472b8d9a3e77e05d", "rev": "1487bdea619e4a7a53a4590c475deabb5a9d1bfb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -517,11 +437,11 @@
}, },
"nixpkgs-stable_2": { "nixpkgs-stable_2": {
"locked": { "locked": {
"lastModified": 1710033658, "lastModified": 1711819797,
"narHash": "sha256-yiZiVKP5Ya813iYLho2+CcFuuHpaqKc/CoxOlANKcqM=", "narHash": "sha256-tNeB6emxj74Y6ctwmsjtMlzUMn458sBmwnD35U5KIM4=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b17375d3bb7c79ffc52f3538028b2ec06eb79ef8", "rev": "2b4e3ca0091049c6fbb4908c66b05b77eaef9f0c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -533,11 +453,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1709961763, "lastModified": 1712163089,
"narHash": "sha256-6H95HGJHhEZtyYA3rIQpvamMKAGoa8Yh2rFV29QnuGw=", "narHash": "sha256-Um+8kTIrC19vD4/lUCN9/cU9kcOsD1O1m+axJqQPyMM=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3030f185ba6a4bf4f18b87f345f104e6a6961f34", "rev": "fd281bd6b7d3e32ddfa399853946f782553163b5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -595,19 +515,40 @@
"type": "github" "type": "github"
} }
}, },
"nixvirt-git": {
"inputs": {
"nixpkgs": [
"nixpkgs-stable"
],
"nixpkgs-ovmf": "nixpkgs-ovmf"
},
"locked": {
"lastModified": 1709064919,
"narHash": "sha256-uscnESRqfncrLg/gsEjDRP57u1tHk9+eGIBb5uhbf9g=",
"owner": "AshleyYakeley",
"repo": "NixVirt",
"rev": "a9cbedf52007b5d525837b0f736ad4fc8fe7f94c",
"type": "github"
},
"original": {
"owner": "AshleyYakeley",
"ref": "v0.3.0",
"repo": "NixVirt",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"atuin": "atuin", "atuin": "atuin",
"deploy-rs": "deploy-rs",
"home-manager-stable": "home-manager-stable", "home-manager-stable": "home-manager-stable",
"home-manager-unstable": "home-manager-unstable", "home-manager-unstable": "home-manager-unstable",
"hy3": "hy3", "hy3": "hy3",
"hyprland-git": "hyprland-git", "hyprland-git": "hyprland-git",
"hyprland-xdph-git": "hyprland-xdph-git", "hyprland-xdph-git": "hyprland-xdph-git",
"nix-fast-build": "nix-fast-build",
"nixd-git": "nixd-git", "nixd-git": "nixd-git",
"nixpkgs-stable": "nixpkgs-stable", "nixpkgs-stable": "nixpkgs-stable",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"nixvirt-git": "nixvirt-git",
"sops-nix": "sops-nix" "sops-nix": "sops-nix"
} }
}, },
@ -619,11 +560,11 @@
"nixpkgs-stable": "nixpkgs-stable_2" "nixpkgs-stable": "nixpkgs-stable_2"
}, },
"locked": { "locked": {
"lastModified": 1710195194, "lastModified": 1711855048,
"narHash": "sha256-KFxCJp0T6TJOz1IOKlpRdpsCr9xsvlVuWY/VCiAFnTE=", "narHash": "sha256-HxegAPnQJSC4cbEbF4Iq3YTlFHZKLiNTk8147EbLdGg=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "e52d8117b330f690382f1d16d81ae43daeb4b880", "rev": "99b1e37f9fc0960d064a7862eb7adfb92e64fa10",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -649,16 +590,16 @@
}, },
"systems_2": { "systems_2": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1689347949,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems", "owner": "nix-systems",
"repo": "default", "repo": "default-linux",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-systems", "owner": "nix-systems",
"repo": "default", "repo": "default-linux",
"type": "github" "type": "github"
} }
}, },
@ -707,60 +648,6 @@
"type": "github" "type": "github"
} }
}, },
"systems_6": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"nix-fast-build",
"nixpkgs"
]
},
"locked": {
"lastModified": 1698438538,
"narHash": "sha256-AWxaKTDL3MtxaVTVU5lYBvSnlspOS0Fjt8GxBgnU0Do=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "5deb8dc125a9f83b65ca86cf0c8167c46593e0b1",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"utils": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"wlroots": { "wlroots": {
"flake": false, "flake": false,
"locked": { "locked": {

View file

@ -25,24 +25,12 @@
inputs.nixpkgs.follows = "nixpkgs-unstable"; inputs.nixpkgs.follows = "nixpkgs-unstable";
}; };
# nix-fast-build
nix-fast-build = {
url = "github:Mic92/nix-fast-build";
inputs.nixpkgs.follows = "nixpkgs-stable";
};
# sops-nix # sops-nix
sops-nix = { sops-nix = {
url = "github:Mic92/sops-nix"; url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs-stable"; inputs.nixpkgs.follows = "nixpkgs-stable";
}; };
# deploy-rs
deploy-rs = {
url = "github:serokell/deploy-rs";
inputs.nixpkgs.follows = "nixpkgs-stable";
};
# atuin # atuin
atuin = { atuin = {
url = "github:atuinsh/atuin"; url = "github:atuinsh/atuin";
@ -68,6 +56,12 @@
nixd-git = { nixd-git = {
url = "github:nix-community/nixd"; url = "github:nix-community/nixd";
}; };
# NixVirt for qemu & libvirt
nixvirt-git = {
url = "github:AshleyYakeley/NixVirt/v0.3.0";
inputs.nixpkgs.follows = "nixpkgs-stable";
};
}; };
# The `@` syntax here is used to alias the attribute set of the # The `@` syntax here is used to alias the attribute set of the
@ -81,6 +75,7 @@
]; ];
in in
{ {
hydraJobs = import ./hydra.nix { inherit inputs outputs; };
nixosConfigurations = { nixosConfigurations = {
"durincore" = nixpkgs-unstable.lib.nixosSystem { "durincore" = nixpkgs-unstable.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";

8
garnix.yaml Normal file
View file

@ -0,0 +1,8 @@
---
# Config for garnix.io builds & caching
builds:
include:
- homeConfigurations.*
- nixosConfigurations.*
- packages.x86_64-linux.*
- packages.aarch64-linux.*

View file

@ -15,6 +15,8 @@
"$menu" = "wofi --show drun"; "$menu" = "wofi --show drun";
bind = bind =
[ [
# Disables middle mouse button paste.
", mouse:274, exec, ;"
# See https://wiki.hyprland.org/Configuring/Keywords/ for more # See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more

View file

@ -7,6 +7,13 @@
home = { home = {
username = "jahanson"; username = "jahanson";
homeDirectory = "/home/jahanson"; homeDirectory = "/home/jahanson";
stateVersion = "23.11";
packages = with pkgs; [
# it provides the command `nom` works just like `nix`
# with more details log output
nix-output-monitor
];
}; };
# basic configuration of git, please change to your own # basic configuration of git, please change to your own
@ -51,18 +58,5 @@
}; };
}; };
# Packages that should be installed to the user profile.
home.packages = with pkgs; [
# here is some command line tools I use frequently
# feel free to add your own or remove some of them
# nix related
#
# it provides the command `nom` works just like `nix`
# with more details log output
nix-output-monitor
];
home.stateVersion = "23.11";
programs.home-manager.enable = true; programs.home-manager.enable = true;
} }

18
hydra.nix Normal file
View file

@ -0,0 +1,18 @@
{ inputs, outputs }:
let
inherit (inputs.nixpkgs-stable.lib) filterAttrs mapAttrs elem;
notBroken = pkg: !(pkg.meta.broken or false);
isDistributable = pkg:
(pkg.meta.license or { redistributable = true; }).redistributable;
hasPlatform = sys: pkg: elem sys (pkg.meta.platforms or [ ]);
filterValidPkgs = sys: pkgs:
filterAttrs
(_: pkg: hasPlatform sys pkg && notBroken pkg && isDistributable pkg) pkgs;
getCfg = _: cfg: cfg.config.system.build.toplevel;
getHomeCfg = _: cfg: cfg.config.home.activationPackage;
in {
# pkgs = mapAttrs filterValidPkgs outputs.packages;
hosts = mapAttrs getCfg outputs.nixosConfigurations;
# homes = mapAttrs getHomeCfg outputs.homeConfigurations;
}

View file

@ -20,8 +20,12 @@
options = [ "x-systemd.automount" "noauto" ]; options = [ "x-systemd.automount" "noauto" ];
}; };
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings = {
nix.settings.trusted-users = [ "root" "jahanson" ]; experimental-features = [ "nix-command" "flakes" ];
trusted-users = [ "root" "jahanson" ];
extra-substituters = "https://cache.garnix.io";
extra-trusted-public-keys = "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=";
};
# Enable fish # Enable fish
programs.fish.enable = true; programs.fish.enable = true;

View file

@ -22,6 +22,9 @@
portalPackage = inputs.hyprland-xdph-git.packages.${pkgs.system}.xdg-desktop-portal-hyprland; portalPackage = inputs.hyprland-xdph-git.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
}; };
# VirtManager for gandalf QEMU/KVM
programs.virt-manager.enable = true;
environment.sessionVariables = { environment.sessionVariables = {
NIXOS_OZONE_WL = "1"; NIXOS_OZONE_WL = "1";
}; };
@ -46,6 +49,16 @@
# Enable CUPS to print documents. # Enable CUPS to print documents.
services.printing.enable = true; services.printing.enable = true;
# Enable login prompt when booting.
services.greetd = {
enable = true;
settings = {
default_session = {
command = "${pkgs.greetd.greetd}/bin/agreety --cmd Hyprland";
};
};
};
# Enable sound with pipewire. # Enable sound with pipewire.
sound.enable = true; sound.enable = true;
hardware.pulseaudio.enable = false; hardware.pulseaudio.enable = false;

View file

@ -2,33 +2,53 @@
# your system. Help is available in the configuration.nix(5) man page, on # your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). # https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, ... }: { config, lib, pkgs, inputs, ... }:
let
upsPassword = "illgettoiteventually";
vendorid = "0764";
productid = "0501";
in
{ {
imports = imports =
[ [
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
inputs.nixvirt-git.nixosModules.default
]; ];
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
boot = { boot = {
supportedFilesystems = [ "zfs" ]; supportedFilesystems = [ "zfs" ];
zfs.forceImportRoot = false; zfs.forceImportRoot = false;
kernelParams = [ "zfs.zfs_arc_max=107374182400" ]; kernelParams = [ "zfs.zfs_arc_max=107374182400" ]; # 100GB
zfs.extraPools = [ "eru" ]; zfs.extraPools = [ "eru" ];
}; };
# ZFS NFS Share settings for read/write. Allows root passthrough with no user permission squash. Multiple IPs.
# sudo zfs set sharenfs="rw=10.1.2.0/24:10.5.0.8/32,no_root_squash,sec=sys,anonuid=548,anongid=548" eru/xen-backups # sudo zfs set sharenfs="rw=10.1.2.0/24:10.5.0.8/32,no_root_squash,sec=sys,anonuid=548,anongid=548" eru/xen-backups
# Read Only
# sudo zfs set sharenfs="ro=10.1.2.0/24,no_root_squash,sec=sys,anonuid=548,anongid=548" eru/borg # sudo zfs set sharenfs="ro=10.1.2.0/24,no_root_squash,sec=sys,anonuid=548,anongid=548" eru/borg
# Read Only and Read Write
# sudo zfs set sharenfs="ro=10.1.2.0/24,rw=10.1.1.55/32,no_root_squash,sec=sys,anonuid=548,anongid=548" eru/borg/nextcloud # sudo zfs set sharenfs="ro=10.1.2.0/24,rw=10.1.1.55/32,no_root_squash,sec=sys,anonuid=548,anongid=548" eru/borg/nextcloud
# Disables NFS share for dataset.
# sudo zfs set sharenfs inherit eru/xen-backups # sudo zfs set sharenfs inherit eru/xen-backups
# Network settings # Network settings
networking = { networking = {
hostName = "gandalf"; # Define your hostname. hostName = "gandalf";
networkmanager.enable = true;
hostId = "e2fc95cd"; hostId = "e2fc95cd";
useDHCP = false; # needed for bridge
networkmanager.enable = true;
firewall.enable = false;
interfaces = {
"enp130s0f0".useDHCP = true;
"enp130s0f1".useDHCP = true;
};
bridges = {
"br0" = {
interfaces = [ "enp130s0f1" ];
};
};
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
@ -36,22 +56,103 @@
lazydocker lazydocker
]; ];
# Some programs need SUID wrappers, can be configured further or are # Services
# started in user sessions.
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable: # OpenSSH daemon.
# Enable the OpenSSH daemon.
services.openssh = { services.openssh = {
enable = true; enable = true;
# require public key authentication for better security # require public key authentication for better security
settings.PasswordAuthentication = false; settings.PasswordAuthentication = false;
settings.KbdInteractiveAuthentication = false; settings.KbdInteractiveAuthentication = false;
}; };
services.prometheus.exporters.zfs.enable = true;
services.prometheus.exporters.smartctl.enable = true;
# UPS & NUT
power.ups = {
enable = true;
ups.cyberpower = {
driver = "usbhid-ups";
port = "auto";
directives = [
"vendorid = ${vendorid}"
"productid = ${productid}"
"product = CP1500AVRLCDa"
"serial = CTHKY2013373"
"vendor = CPS"
"bus = 002"
];
};
};
users = {
users.nut = {
isSystemUser = true;
group = "nut";
# it does not seem to do anything with this directory
# but something errored without it, so whatever
home = "/var/lib/nut";
createHome = true;
};
groups.nut = { };
};
services.udev.extraRules = ''
SUBSYSTEM=="usb", ATTRS{idVendor}=="${vendorid}", ATTRS{idProduct}=="${productid}", MODE="664", GROUP="nut", OWNER="nut"
'';
systemd.services.upsd.serviceConfig = {
User = "root";
Group = "nut";
};
systemd.services.upsdrv.serviceConfig = {
User = "root";
Group = "nut";
};
# reference: https://github.com/networkupstools/nut/tree/master/conf
environment.etc = {
# all this file needs to do is exist
upsdConf = {
text = "";
target = "nut/upsd.conf";
mode = "0440";
group = "nut";
user = "nut";
};
upsdUsers = {
# update upsmonConf MONITOR to match
text = ''
[upsmon]
password = ${upsPassword}
upsmon master
'';
target = "nut/upsd.users";
mode = "0440";
group = "nut";
user = "nut";
};
# RUN_AS_USER is not a default
# the rest are from the sample
# grep -v '#' /nix/store/8nciysgqi7kmbibd8v31jrdk93qdan3a-nut-2.7.4/etc/upsmon.conf.sample
upsmonConf = {
text = ''
RUN_AS_USER nut
MINSUPPLIES 1
SHUTDOWNCMD "shutdown -h 0"
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5
MONITOR cyberpower@localhost 1 upsmon ${upsPassword} master
'';
target = "nut/upsmon.conf";
mode = "0444";
};
};
# NFS # NFS
services.nfs.server.enable = true; services.nfs.server.enable = true;
@ -86,6 +187,38 @@
"force user" = "apps"; "force user" = "apps";
"force group" = "apps"; "force group" = "apps";
}; };
hansonhive = {
path = "/eru/hansonhive";
browseable = "yes";
"read only" = "no";
"guest ok" = "no";
"create mask" = "0644";
"directory mask" = "0755";
"force user" = "www-data";
"force group" = "www-data";
};
tm_joe = {
path = "/eru/tm_joe";
"valid users" = "jahanson";
public = "no";
writeable = "yes";
"guest ok" = "no";
"force user" = "jahanson";
"fruit:aapl" = "yes";
"fruit:time machine" = "yes";
"vfs objects" = "catia fruit streams_xattr";
};
tm_elisia = {
path = "/eru/tm_elisia";
"valid users" = "emhanson";
public = "no";
writeable = "yes";
"guest ok" = "no";
"force user" = "emhanson";
"fruit:aapl" = "yes";
"fruit:time machine" = "yes";
"vfs objects" = "catia fruit streams_xattr";
};
}; };
}; };
@ -101,10 +234,11 @@
}; };
# Xen-orchestra # Podman Containers
virtualisation.oci-containers = { virtualisation.oci-containers = {
backend = "podman"; backend = "podman";
containers ={ containers ={
# Xen-orchestra container
xen-orchestra = { xen-orchestra = {
image = "docker.io/ronivay/xen-orchestra:5.136.0"; image = "docker.io/ronivay/xen-orchestra:5.136.0";
ports = [ "80:80" ]; ports = [ "80:80" ];
@ -140,6 +274,57 @@
daily = 7; daily = 7;
monthly = 12; monthly = 12;
}; };
"eru/hansonhive" = {
recursive = true;
autoprune = true;
autosnap = true;
hourly = 24;
daily = 7;
monthly = 12;
};
"eru/tm_joe" = {
recursive = true;
autoprune = true;
autosnap = true;
hourly = 24;
daily = 7;
monthly = 12;
};
"eru/tm_elisia" = {
recursive = true;
autoprune = true;
autosnap = true;
hourly = 24;
daily = 7;
monthly = 12;
};
"eru/containers/volumes/xo-data" = {
recursive = true;
autoprune = true;
autosnap = true;
hourly = 24;
daily = 7;
monthly = 12;
};
"eru/containers/volumes/xo-redis-data" = {
recursive = true;
autoprune = true;
autosnap = true;
hourly = 24;
daily = 7;
monthly = 12;
};
};
};
# Enable QEMU/KVM/libvirt
virtualisation.libvirt.enable = true;
virtualisation.libvirtd = {
enable = true;
qemu = {
package = pkgs.qemu_kvm;
ovmf.enable = true;
ovmf.packages = [pkgs.OVMFFull.fd];
}; };
}; };
@ -147,29 +332,9 @@
# networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether. # Or disable the firewall altogether.
networking.firewall.enable = false; # networking.firewall.enable = false;
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
# system.copySystemConfiguration = true;
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#
# Most users should NEVER change this value after the initial install, for any reason,
# even if you've upgraded your system to a new NixOS release.
#
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
# so changing it will NOT upgrade your system.
#
# This value being lower than the current NixOS release does NOT mean your system is
# out of date, out of support, or vulnerable.
#
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
# and migrated your data accordingly.
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "23.11"; # Did you read the comment? system.stateVersion = "23.11"; # Did you read the comment?
} }

View file

@ -10,8 +10,9 @@
boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "mpt3sas" "isci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "mpt3sas" "isci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" "vfio" "vfio_iommu_type1" "vfio_pci" "vfio_virqfd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
boot.kernelParams = [ "iommu=pt" "intel_iommu=on" ];
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/d5e03c8a-9488-47f7-b911-339bdae36009"; { device = "/dev/disk/by-uuid/d5e03c8a-9488-47f7-b911-339bdae36009";