Skip to content

Commit

Permalink
Add python 3.8 and 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
b-ran committed Jul 27, 2023
1 parent 1b90d36 commit 5577937
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
19 changes: 18 additions & 1 deletion flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# Adding an old nixpkgs to get python38 and python39 working, ref
# <https://discourse.nixos.org/t/python3-8-sphinx-build-failure-on-unstable/29102/11?u=stianlagstad>
old-nixpkgs = {
type = "github";
owner = "NixOS";
repo = "nixpkgs";
rev = "f294325aed382b66c7a188482101b0f336d1d7db";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
Expand All @@ -12,7 +20,7 @@
};
};

outputs = inputs @ { self, nixpkgs, home-manager, hyprland, hyprland-contrib, ... }:
outputs = inputs @ { self, nixpkgs, old-nixpkgs, home-manager, hyprland, hyprland-contrib, ... }:
let
user = "brandon";
system = "x86_64-linux";
Expand All @@ -21,7 +29,7 @@
nixosConfigurations = (
import ./hosts {
inherit (nixpkgs) lib;
inherit inputs nixpkgs home-manager hyprland hyprland-contrib user system;
inherit inputs nixpkgs old-nixpkgs home-manager hyprland hyprland-contrib user system;
}
);
};
Expand Down
14 changes: 10 additions & 4 deletions hosts/configuration.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, user, ... }:
{ pkgs, old-nixpkgs, user, system, ... }:

{
system.stateVersion = "23.11";
Expand Down Expand Up @@ -28,12 +28,11 @@
];

networking.networkmanager.enable = true;
networking.nameservers = [ "8.8.8.8" "8.8.4.4" ];

environment = {
shells = [ pkgs.zsh ];
pathsToLink = [ "/share/zsh" ];
systemPackages = with pkgs; [
systemPackages = with pkgs; ([
# cli
wget
cbonsai
Expand All @@ -52,6 +51,7 @@
kops
dive
awscli2
postgresql_15

#util
jq
Expand Down Expand Up @@ -92,9 +92,15 @@

# sound
pavucontrol
];
]) ++ (with old-nixpkgs.legacyPackages.${system}; [
# <https://discourse.nixos.org/t/python3-8-sphinx-build-failure-on-unstable/29102/11?u=stianlagstad>
python38
python39
]);
};

networking.firewall.enable = false;

security.pam.services.swaylock = { };
security.pam.services.swaylock.text = ''
auth include login
Expand Down
6 changes: 3 additions & 3 deletions hosts/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, inputs, nixpkgs, home-manager, hyprland, hyprland-contrib, user, system }:
{ lib, inputs, nixpkgs, old-nixpkgs, home-manager, hyprland, hyprland-contrib, user, system }:
let
pkgs = import nixpkgs {
inherit system;
Expand All @@ -9,7 +9,7 @@ in
desktop = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit pkgs home-manager hyprland hyprland-contrib user system;
inherit pkgs old-nixpkgs home-manager hyprland hyprland-contrib user system;
host = {
name = "desktop";
fristMonitor = "DP-1";
Expand Down Expand Up @@ -47,7 +47,7 @@ in
work = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit pkgs home-manager hyprland hyprland-contrib user system;
inherit pkgs old-nixpkgs home-manager hyprland hyprland-contrib user system;
host = {
name = "work";
fristMonitor = "DVI-I-1";
Expand Down
2 changes: 2 additions & 0 deletions hosts/work/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
(import ../../modules);

networking.hostName = "nixos";
networking.networkmanager.insertNameservers = ["10.1.0.3"];
networking.nameservers = [ "10.1.0.3" ];
}
13 changes: 12 additions & 1 deletion hosts/work/hardware-configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,21 @@
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.useDHCP = lib.mkDefault true;
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
# networking.interfaces.eth0.useDHCP = lib.mkDefault true;

nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

# networking = {
# enableIPv6 = false;
# interfaces = {
# eno1 = {
# useDHCP = true;
# };
# };
# defaultGateway = "192.168.128.1";
# nameservers = [ "10.1.0.3" ];
# };
}

0 comments on commit 5577937

Please sign in to comment.